From 1a08d30a61f8363b9a48ca3723f5c76a09ab8fdf Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Mon, 28 Feb 2000 15:00:30 +0000 Subject: [PATCH] # 25555 r= beard@netscape.com OS/2 changes for Mozilla - add #ifdef, change #ifdef git-svn-id: svn://10.0.0.236/trunk@61785 18797224-902f-48f8-a5cc-f745e15eee43 --- .../modules/plugin/base/public/nsplugindefs.h | 21 +++++++++++-------- .../plugin/base/src/nsPluginHostImpl.cpp | 2 +- .../plugin/base/src/nsPluginInstancePeer.cpp | 6 +++++- .../plugin/nglsrc/nsPluginHostImpl.cpp | 2 +- .../plugin/nglsrc/nsPluginInstancePeer.cpp | 6 +++++- mozilla/modules/plugin/public/nsplugindefs.h | 21 +++++++++++-------- 6 files changed, 36 insertions(+), 22 deletions(-) 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;