diff --git a/mozilla/modules/plugin/base/public/nsplugindefs.h b/mozilla/modules/plugin/base/public/nsplugindefs.h index 0013b2023fc..f1a7b4afe5f 100644 --- a/mozilla/modules/plugin/base/public/nsplugindefs.h +++ b/mozilla/modules/plugin/base/public/nsplugindefs.h @@ -38,12 +38,15 @@ #ifndef nsplugindefs_h___ #define nsplugindefs_h___ -#ifndef prtypes_h___ -#include "prtypes.h" +#if defined(XP_OS2) || defined(__OS2__) +#pragma pack(1) +#define INCL_BASE +#define INCL_PM +#include #endif -#ifdef __OS2__ -#pragma pack(1) +#ifndef prtypes_h___ +#include "prtypes.h" #endif #ifdef XP_MAC @@ -57,7 +60,7 @@ # include #endif -#ifdef XP_PC +#if defined(XP_PC) && !defined(XP_OS2) # include #endif @@ -297,13 +300,13 @@ struct nsPluginEvent { EventRecord* event; nsPluginPlatformWindowRef window; -#elif defined(XP_PC) - uint16 event; +#elif defined(XP_OS2) + uint32 event; uint32 wParam; uint32 lParam; -#elif defined(XP_OS2) - uint32 event; +#elif defined(XP_PC) + uint16 event; uint32 wParam; uint32 lParam; diff --git a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp index c6d8bc25a04..99958fd1a74 100644 --- a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -58,7 +58,7 @@ #include "nsDiskModule.h" #endif -#ifdef XP_PC +#if defined(XP_PC) && !defined(XP_OS2) #include "windows.h" #include "winbase.h" #endif diff --git a/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp b/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp index 0ecc8f82ae5..56c07d232a3 100644 --- a/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp @@ -39,7 +39,7 @@ #include "nsIScriptGlobalObject.h" #include "nsIScriptObjectOwner.h" -#ifdef XP_PC +#if defined(XP_PC) && !defined(XP_OS2) #include "windows.h" #include "winbase.h" #endif @@ -200,7 +200,11 @@ nsPluginStreamToFile::nsPluginStreamToFile(const char* target, nsIPluginInstance // open the file and prepare it for writing char buf[400], tpath[300]; #ifdef XP_PC +#ifdef XP_OS2 + PL_strcpy(tpath, getenv("TEMP")); +#else ::GetTempPath(sizeof(tpath), tpath); +#endif PRInt32 len = PL_strlen(tpath); if ((len > 0) && (tpath[len-1] != '\\')) diff --git a/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp b/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp index c6d8bc25a04..99958fd1a74 100644 --- a/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp @@ -58,7 +58,7 @@ #include "nsDiskModule.h" #endif -#ifdef XP_PC +#if defined(XP_PC) && !defined(XP_OS2) #include "windows.h" #include "winbase.h" #endif diff --git a/mozilla/modules/plugin/nglsrc/nsPluginInstancePeer.cpp b/mozilla/modules/plugin/nglsrc/nsPluginInstancePeer.cpp index 0ecc8f82ae5..56c07d232a3 100644 --- a/mozilla/modules/plugin/nglsrc/nsPluginInstancePeer.cpp +++ b/mozilla/modules/plugin/nglsrc/nsPluginInstancePeer.cpp @@ -39,7 +39,7 @@ #include "nsIScriptGlobalObject.h" #include "nsIScriptObjectOwner.h" -#ifdef XP_PC +#if defined(XP_PC) && !defined(XP_OS2) #include "windows.h" #include "winbase.h" #endif @@ -200,7 +200,11 @@ nsPluginStreamToFile::nsPluginStreamToFile(const char* target, nsIPluginInstance // open the file and prepare it for writing char buf[400], tpath[300]; #ifdef XP_PC +#ifdef XP_OS2 + PL_strcpy(tpath, getenv("TEMP")); +#else ::GetTempPath(sizeof(tpath), tpath); +#endif PRInt32 len = PL_strlen(tpath); if ((len > 0) && (tpath[len-1] != '\\')) diff --git a/mozilla/modules/plugin/public/nsplugindefs.h b/mozilla/modules/plugin/public/nsplugindefs.h index 0013b2023fc..f1a7b4afe5f 100644 --- a/mozilla/modules/plugin/public/nsplugindefs.h +++ b/mozilla/modules/plugin/public/nsplugindefs.h @@ -38,12 +38,15 @@ #ifndef nsplugindefs_h___ #define nsplugindefs_h___ -#ifndef prtypes_h___ -#include "prtypes.h" +#if defined(XP_OS2) || defined(__OS2__) +#pragma pack(1) +#define INCL_BASE +#define INCL_PM +#include #endif -#ifdef __OS2__ -#pragma pack(1) +#ifndef prtypes_h___ +#include "prtypes.h" #endif #ifdef XP_MAC @@ -57,7 +60,7 @@ # include #endif -#ifdef XP_PC +#if defined(XP_PC) && !defined(XP_OS2) # include #endif @@ -297,13 +300,13 @@ struct nsPluginEvent { EventRecord* event; nsPluginPlatformWindowRef window; -#elif defined(XP_PC) - uint16 event; +#elif defined(XP_OS2) + uint32 event; uint32 wParam; uint32 lParam; -#elif defined(XP_OS2) - uint32 event; +#elif defined(XP_PC) + uint16 event; uint32 wParam; uint32 lParam;