зеркало из https://github.com/mozilla/gecko-dev.git
Support platform-specific import declaration for public NSPR functions.
Bugzilla #12913. rwtc.
This commit is contained in:
Родитель
1ec9e54be0
Коммит
67e7d01f85
|
@ -61,7 +61,7 @@ typedef struct PRLock PRLock;
|
|||
** is returned.
|
||||
**
|
||||
***********************************************************************/
|
||||
PR_EXTERN(PRLock*) PR_NewLock(void);
|
||||
NSPR_API(PRLock*) PR_NewLock(void);
|
||||
|
||||
/***********************************************************************
|
||||
** FUNCTION: PR_DestroyLock
|
||||
|
@ -72,7 +72,7 @@ PR_EXTERN(PRLock*) PR_NewLock(void);
|
|||
** OUTPUTS: void
|
||||
** RETURN: None
|
||||
***********************************************************************/
|
||||
PR_EXTERN(void) PR_DestroyLock(PRLock *lock);
|
||||
NSPR_API(void) PR_DestroyLock(PRLock *lock);
|
||||
|
||||
/***********************************************************************
|
||||
** FUNCTION: PR_Lock
|
||||
|
@ -83,7 +83,7 @@ PR_EXTERN(void) PR_DestroyLock(PRLock *lock);
|
|||
** OUTPUTS: void
|
||||
** RETURN: None
|
||||
***********************************************************************/
|
||||
PR_EXTERN(void) PR_Lock(PRLock *lock);
|
||||
NSPR_API(void) PR_Lock(PRLock *lock);
|
||||
|
||||
/***********************************************************************
|
||||
** FUNCTION: PR_Unlock
|
||||
|
@ -95,7 +95,7 @@ PR_EXTERN(void) PR_Lock(PRLock *lock);
|
|||
** RETURN: PR_STATUS
|
||||
** Returns PR_FAILURE if the caller does not own the lock.
|
||||
***********************************************************************/
|
||||
PR_EXTERN(PRStatus) PR_Unlock(PRLock *lock);
|
||||
NSPR_API(PRStatus) PR_Unlock(PRLock *lock);
|
||||
|
||||
PR_END_EXTERN_C
|
||||
|
||||
|
|
|
@ -68,6 +68,11 @@
|
|||
#define _declspec(x) __declspec(x)
|
||||
#endif
|
||||
|
||||
#define PR_EXPORT(__type) extern _declspec(dllexport) __type
|
||||
#define PR_EXPORT_DATA(__type) extern _declspec(dllexport) __type
|
||||
#define PR_IMPORT(__type) _declspec(dllimport) __type
|
||||
#define PR_IMPORT_DATA(__type) _declspec(dllimport) __type
|
||||
|
||||
#define PR_EXTERN(__type) extern _declspec(dllexport) __type
|
||||
#define PR_IMPLEMENT(__type) _declspec(dllexport) __type
|
||||
#define PR_EXTERN_DATA(__type) extern _declspec(dllexport) __type
|
||||
|
@ -78,6 +83,12 @@
|
|||
#define PR_STATIC_CALLBACK(__x) static __x
|
||||
|
||||
#elif defined(XP_BEOS)
|
||||
|
||||
#define PR_EXPORT(__type) extern _declspec(dllexport) __type
|
||||
#define PR_EXPORT_DATA(__type) extern _declspec(dllexport) __type
|
||||
#define PR_IMPORT(__type) extern _declspec(dllexport) __type
|
||||
#define PR_IMPORT_DATA(__type) extern _declspec(dllexport) __type
|
||||
|
||||
#define PR_EXTERN(__type) extern __declspec(dllexport) __type
|
||||
#define PR_IMPLEMENT(__type) __declspec(dllexport) __type
|
||||
#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type
|
||||
|
@ -92,6 +103,11 @@
|
|||
#define PR_CALLBACK_DECL __cdecl
|
||||
|
||||
#if defined(_WINDLL)
|
||||
#define PR_EXPORT(__type) extern __type _cdecl _export _loadds
|
||||
#define PR_IMPORT(__type) extern __type _cdecl _export _loadds
|
||||
#define PR_EXPORT_DATA(__type) extern __type _export
|
||||
#define PR_IMPORT_DATA(__type) extern __type _export
|
||||
|
||||
#define PR_EXTERN(__type) extern __type _cdecl _export _loadds
|
||||
#define PR_IMPLEMENT(__type) __type _cdecl _export _loadds
|
||||
#define PR_EXTERN_DATA(__type) extern __type _export
|
||||
|
@ -101,6 +117,11 @@
|
|||
#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK
|
||||
|
||||
#else /* this must be .EXE */
|
||||
#define PR_EXPORT(__type) extern __type _cdecl _export
|
||||
#define PR_IMPORT(__type) extern __type _cdecl _export
|
||||
#define PR_EXPORT_DATA(__type) extern __type _export
|
||||
#define PR_IMPORT_DATA(__type) extern __type _export
|
||||
|
||||
#define PR_EXTERN(__type) extern __type _cdecl _export
|
||||
#define PR_IMPLEMENT(__type) __type _cdecl _export
|
||||
#define PR_EXTERN_DATA(__type) extern __type _export
|
||||
|
@ -111,6 +132,12 @@
|
|||
#endif /* _WINDLL */
|
||||
|
||||
#elif defined(XP_MAC)
|
||||
|
||||
#define PR_EXPORT(__type) extern _declspec(export) __type
|
||||
#define PR_EXPORT_DATA(__type) extern _declspec(export) __type
|
||||
#define PR_IMPORT(__type) extern _declspec(export) __type
|
||||
#define PR_IMPORT_DATA(__type) extern _declspec(export) __type
|
||||
|
||||
#define PR_EXTERN(__type) extern __declspec(export) __type
|
||||
#define PR_IMPLEMENT(__type) __declspec(export) __type
|
||||
#define PR_EXTERN_DATA(__type) extern __declspec(export) __type
|
||||
|
@ -121,6 +148,12 @@
|
|||
#define PR_STATIC_CALLBACK(__x) static __x
|
||||
|
||||
#elif defined(XP_OS2)
|
||||
|
||||
#define PR_EXPORT(__type) extern __type
|
||||
#define PR_EXPORT_DATA(__type) extern __type
|
||||
#define PR_IMPORT(__type) extern __type
|
||||
#define PR_IMPORT_DATA(__type) extern __type
|
||||
|
||||
#define PR_EXTERN(__type) extern __type
|
||||
#define PR_IMPLEMENT(__type) __type
|
||||
#define PR_EXTERN_DATA(__type) extern __type
|
||||
|
@ -134,6 +167,12 @@
|
|||
#endif
|
||||
|
||||
#else /* Unix */
|
||||
|
||||
#define PR_EXPORT(__type) extern __type
|
||||
#define PR_EXPORT_DATA(__type) extern __type
|
||||
#define PR_IMPORT(__type) extern __type
|
||||
#define PR_IMPORT_DATA(__type) extern __type
|
||||
|
||||
#define PR_EXTERN(__type) extern __type
|
||||
#define PR_IMPLEMENT(__type) __type
|
||||
#define PR_EXTERN_DATA(__type) extern __type
|
||||
|
@ -144,6 +183,14 @@
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(_NSPR_BUILD_)
|
||||
#define NSPR_API(__type) PR_EXPORT(__type)
|
||||
#define NSPR_DATA_API(__type) PR_EXPORT_DATA(__type)
|
||||
#else
|
||||
#define NSPR_API(__type) PR_IMPORT(__type)
|
||||
#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type)
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
** MACROS: PR_BEGIN_MACRO
|
||||
** PR_END_MACRO
|
||||
|
|
|
@ -364,6 +364,8 @@ else
|
|||
SUF = LL
|
||||
endif
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
$(TINC):
|
||||
@$(MAKE_OBJDIR)
|
||||
@$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
|
||||
|
|
|
@ -25,6 +25,8 @@ INCLUDES = -I$(DIST)/include -I$(MOD_DEPTH)/pr/include -I$(MOD_DEPTH)/pr/include
|
|||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
||||
install:: export
|
||||
|
|
|
@ -40,6 +40,8 @@ TARGETS = $(OBJS)
|
|||
|
||||
INCLUDES = -I$(DIST)/include
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
||||
HEADERS = *.h
|
||||
|
|
|
@ -59,6 +59,8 @@ TARGETS = $(OBJS)
|
|||
|
||||
INCLUDES = -I$(DIST)/include -I$(MOD_DEPTH)/pr/include -I$(MOD_DEPTH)/pr/include/private
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
|
|
@ -36,6 +36,8 @@ TARGETS = $(OBJS)
|
|||
|
||||
INCLUDES = -I$(DIST)/include -I$(MOD_DEPTH)/pr/include -I$(MOD_DEPTH)/pr/include/private
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
|
|
@ -32,6 +32,8 @@ TARGETS = $(OBJS)
|
|||
|
||||
INCLUDES = -I$(DIST)/include -I$(MOD_DEPTH)/pr/include -I$(MOD_DEPTH)/pr/include/private
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
CSRCS = prmalloc.c prmem.c
|
||||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
|
|
@ -50,6 +50,8 @@ TARGETS = $(OBJS)
|
|||
|
||||
INCLUDES = -I$(DIST)/include -I$(MOD_DEPTH)/pr/include
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
|
|
@ -21,6 +21,8 @@ TARGETS = $(OBJS)
|
|||
|
||||
INCLUDES = -I$(DIST)/include -I$(MOD_DEPTH)/pr/include -I$(MOD_DEPTH)/pr/include/private
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
|
|
@ -40,6 +40,8 @@ TARGETS = $(OBJS)
|
|||
|
||||
INCLUDES = -I$(DIST)/include -I$(MOD_DEPTH)/pr/include -I$(MOD_DEPTH)/pr/include/private
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
|
|
@ -280,6 +280,8 @@ endif
|
|||
|
||||
INCLUDES = -I$(DIST)/include -I$(MOD_DEPTH)/pr/include -I$(MOD_DEPTH)/pr/include/private
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
|
|
@ -76,6 +76,8 @@ TARGETS = $(OBJS)
|
|||
|
||||
INCLUDES = -I$(DIST)/include -I$(MOD_DEPTH)/pr/include -I$(MOD_DEPTH)/pr/include/private
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
|
|
@ -34,6 +34,8 @@ TARGETS = $(OBJS)
|
|||
|
||||
INCLUDES = -I$(DIST)/include -I$(MOD_DEPTH)/pr/include -I$(MOD_DEPTH)/pr/include/private
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
|
|
@ -61,6 +61,8 @@ TARGETS = $(OBJS)
|
|||
|
||||
INCLUDES = -I$(DIST)/include -I$(MOD_DEPTH)/pr/include -I$(MOD_DEPTH)/pr/include/private
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
RELEASE_BINS = compile-et.pl prerr.properties
|
||||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
|
|
@ -39,6 +39,8 @@ TARGETS = $(OBJS)
|
|||
|
||||
INCLUDES = -I$(DIST)/include -I$(MOD_DEPTH)/pr/include -I$(MOD_DEPTH)/pr/include/private
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
|
|
@ -68,6 +68,8 @@ TARGETS = $(OBJS)
|
|||
|
||||
INCLUDES = -I$(DIST)/include -I$(MOD_DEPTH)/pr/include -I$(MOD_DEPTH)/pr/include/private
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
|
|
@ -45,6 +45,8 @@ TARGETS = $(OBJS)
|
|||
|
||||
INCLUDES = -I$(DIST)/include -I$(MOD_DEPTH)/pr/include -I$(MOD_DEPTH)/pr/include/private
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
include $(MOD_DEPTH)/config/rules.mk
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
|
Загрузка…
Ссылка в новой задаче