diff --git a/modules/libreg/include/NSReg.h b/modules/libreg/include/NSReg.h index be832f75268..c0cba20da7d 100644 --- a/modules/libreg/include/NSReg.h +++ b/modules/libreg/include/NSReg.h @@ -100,16 +100,15 @@ typedef struct _reginfo #define UNIX_GLOBAL_FLAG "MOZILLA_SHARED_REGISTRY" /* Platform-dependent declspec for library interface */ -#if defined(XP_PC) +#if defined(XP_PC) && !defined(XP_OS2_EMX) #if defined(WIN32) - #if defined (STANDALONE_REGISTRY) #define VR_INTERFACE(type) __declspec(dllexport) type __cdecl #else #define VR_INTERFACE(type) __declspec(dllexport) type __stdcall #endif - #elif defined(XP_OS2) + #elif defined(XP_OS2_VACPP) #define VR_INTERFACE(type) type _Optlink #else #define VR_INTERFACE(type) type _far _pascal _export diff --git a/modules/libreg/src/VerReg.c b/modules/libreg/src/VerReg.c index 29eb1d363fb..fc4e7028a3a 100644 --- a/modules/libreg/src/VerReg.c +++ b/modules/libreg/src/VerReg.c @@ -43,6 +43,11 @@ #include #endif +#if defined(XP_OS2) +#include +#include +#endif + #include #include diff --git a/modules/libreg/src/reg.c b/modules/libreg/src/reg.c index a75be9ef4ac..c6ff1aaa0f5 100644 --- a/modules/libreg/src/reg.c +++ b/modules/libreg/src/reg.c @@ -74,7 +74,7 @@ #include "reg.h" #include "NSReg.h" -#if defined(XP_UNIX) +#if defined(XP_UNIX) || defined(XP_OS2) #ifndef MAX_PATH #define MAX_PATH 1024 #endif diff --git a/modules/libreg/src/vr_stubs.c b/modules/libreg/src/vr_stubs.c index d39f9d5a54c..439181985fc 100644 --- a/modules/libreg/src/vr_stubs.c +++ b/modules/libreg/src/vr_stubs.c @@ -127,7 +127,7 @@ char* vr_findVerRegName() * WINDOWS STUBS * ------------------------------------------------------------------ */ -#ifdef XP_PC +#if defined(XP_PC) && !defined(XP_OS2) #include "windows.h" #define PATHLEN 260 diff --git a/modules/libreg/src/vr_stubs.h b/modules/libreg/src/vr_stubs.h index 29c1b8eb968..37f9a9b5fe3 100644 --- a/modules/libreg/src/vr_stubs.h +++ b/modules/libreg/src/vr_stubs.h @@ -50,12 +50,15 @@ #ifdef XP_MAC #include #else -#if defined(BSDI) && !defined(BSDI_2) +#if ( defined(BSDI) && !defined(BSDI_2) ) || defined(XP_OS2_EMX) #include #endif #include #endif +#ifdef XP_OS2_VACPP +#include +#endif #ifndef FALSE #define FALSE 0 @@ -213,7 +216,6 @@ typedef PRFileDesc* XP_File; #endif /*STANDALONE_REGISTRY*/ - /*--- file open modes for stdio ---*/ #ifdef USE_STDIO_MODES #define XP_FILE_READ "r" @@ -240,7 +242,6 @@ typedef PRFileDesc* XP_File; #define XP_FILE_WRITE_BIN PR_WRONLY, 0644 #define XP_FILE_UPDATE (PR_RDWR|PR_CREATE_FILE), 0644 #define XP_FILE_TRUNCATE (PR_RDWR | PR_TRUNCATE), 0644 - #define XP_FILE_UPDATE_BIN PR_RDWR|PR_CREATE_FILE, 0644 #define XP_FILE_TRUNCATE_BIN (PR_RDWR | PR_TRUNCATE), 0644