r=mkaply, sr=mkaply (OS/2 only) Patch from Andy Willis - add _declspec(dllexport/dllimport) for OS/2 git-svn-id: svn://10.0.0.236/trunk@191994 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
d889b206ab
commit
4bd74e9b89
@ -1262,8 +1262,15 @@ typedef z_stream FAR * png_zstreamp;
|
||||
# endif
|
||||
# endif /* PNG_IMPEXP */
|
||||
#else /* !(DLL || non-cygwin WINDOWS) */
|
||||
# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
|
||||
# ifndef PNGAPI
|
||||
# if defined(__OS2__)
|
||||
# if defined(__GNUC__) && defined(__declspec) && defined(PNG_DLL) && !defined(PNG_IMPEXP)
|
||||
# ifdef PNG_BUILD_DLL
|
||||
# define PNG_IMPEXP __declspec(dllexport)
|
||||
# else
|
||||
# define PNG_IMPEXP __declspec(dllimport)
|
||||
# endif
|
||||
# endif /* GNUC & declspec */
|
||||
# if (defined(__IBMC__) || defined(__IBMCPP__)) && !defined(PNGAPI)
|
||||
# define PNGAPI _System
|
||||
# endif
|
||||
# else
|
||||
|
||||
@ -78,6 +78,9 @@
|
||||
#elif defined(XP_WIN)
|
||||
#define PR_EXTERN(__type) extern _declspec(dllexport) __type
|
||||
#define PR_PUBLIC_API(__type) _declspec(dllexport) __type
|
||||
#elif defined(XP_OS2) && defined(__declspec)
|
||||
#define PR_EXTERN(__type) extern __declspec(dllexport) __type
|
||||
#define PR_PUBLIC_API(__type) __declspec(dllexport) __type
|
||||
#else /* XP_UNIX */
|
||||
#define PR_EXTERN(__type) extern __type
|
||||
#define PR_PUBLIC_API(__type) __type
|
||||
|
||||
@ -127,6 +127,8 @@ typedef struct _reginfo
|
||||
#else
|
||||
#define VR_INTERFACE(type) type _far _pascal _export
|
||||
#endif
|
||||
#elif defined(XP_OS2) && defined(__declspec)
|
||||
#define VR_INTERFACE(type) __declspec(dllexport) type
|
||||
#elif defined XP_MAC
|
||||
#define VR_INTERFACE(__x) __declspec(export) __x
|
||||
#elif defined (HAVE_VISIBILITY_ATTRIBUTE)
|
||||
|
||||
@ -60,7 +60,7 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
|
||||
ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH)))
|
||||
DEFINES += -DZLIB_DLL=1
|
||||
endif
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id: zconf.h,v 3.9 2005-08-04 19:14:14 tor%cs.brown.edu Exp $ */
|
||||
/* @(#) $Id: zconf.h,v 3.10 2006-03-08 19:21:35 mkaply%us.ibm.com Exp $ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
@ -234,6 +234,18 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__OS2__) && defined(__declspec)
|
||||
# ifdef ZLIB_DLL
|
||||
# ifdef ZLIB_INTERNAL
|
||||
# define ZEXPORT __declspec(dllexport)
|
||||
# define ZEXPORTVA __declspec(dllexport)
|
||||
# else
|
||||
# define ZEXPORT __declspec(dllimport)
|
||||
# define ZEXPORTVA __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (__BEOS__)
|
||||
# ifdef ZLIB_DLL
|
||||
# ifdef ZLIB_INTERNAL
|
||||
|
||||
@ -98,20 +98,8 @@
|
||||
******************************************************************************/
|
||||
|
||||
/* DLL Entry modifiers... */
|
||||
#if defined(XP_OS2)
|
||||
# ifdef XP_OS2_VACPP
|
||||
# define JNI_PUBLIC_API(ResultType) ResultType _System
|
||||
# define JNI_PUBLIC_VAR(VarType) VarType
|
||||
# define JNICALL _Optlink
|
||||
# define JNIEXPORT
|
||||
# else
|
||||
# define JNI_PUBLIC_API(ResultType) ResultType
|
||||
# define JNI_PUBLIC_VAR(VarType) VarType
|
||||
# define JNICALL
|
||||
# define JNIEXPORT
|
||||
# endif
|
||||
/* Win32 */
|
||||
#elif defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32)
|
||||
#if defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32)
|
||||
# include <windows.h>
|
||||
# if defined(_MSC_VER) || defined(__GNUC__)
|
||||
# if defined(WIN32) || defined(_WIN32)
|
||||
@ -153,6 +141,28 @@
|
||||
/* This is the stuff inherited from JavaSoft .. */
|
||||
# define JNIEXPORT __declspec(dllexport)
|
||||
|
||||
/* OS/2 */
|
||||
#elif defined(XP_OS2)
|
||||
# ifdef XP_OS2_VACPP
|
||||
# define JNI_PUBLIC_API(ResultType) ResultType _System
|
||||
# define JNI_PUBLIC_VAR(VarType) VarType
|
||||
# define JNICALL _Optlink
|
||||
# define JNIEXPORT
|
||||
# elif defined(__declspec)
|
||||
# define JNI_PUBLIC_API(ResultType) __declspec(dllexport) ResultType
|
||||
# define JNI_PUBLIC_VAR(VarType) VarType
|
||||
# define JNI_NATIVE_STUB(ResultType) __declspec(dllexport) ResultType
|
||||
# define JNICALL
|
||||
# define JNIEXPORT
|
||||
# else
|
||||
# define JNI_PUBLIC_API(ResultType) ResultType
|
||||
# define JNI_PUBLIC_VAR(VarType) VarType
|
||||
# define JNICALL
|
||||
# define JNIEXPORT
|
||||
# endif
|
||||
# ifndef IS_LITTLE_ENDIAN
|
||||
# define IS_LITTLE_ENDIAN
|
||||
# endif
|
||||
|
||||
/* Mac */
|
||||
#elif macintosh || Macintosh || THINK_C
|
||||
|
||||
@ -68,18 +68,8 @@ extern "C" {
|
||||
|
||||
/* DLL Entry modifiers... */
|
||||
|
||||
/* PC */
|
||||
#if defined(XP_OS2)
|
||||
# ifdef XP_OS2_VACPP
|
||||
# define JRI_PUBLIC_API(ResultType) ResultType _Optlink
|
||||
# define JRI_PUBLIC_VAR(VarType) VarType
|
||||
# define JRI_CALLBACK
|
||||
# else
|
||||
# define JRI_PUBLIC_API(ResultType) ResultType
|
||||
# define JRI_PUBLIC_VAR(VarType) VarType
|
||||
# define JRI_CALLBACK
|
||||
# endif
|
||||
#elif defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32)
|
||||
/* Windows */
|
||||
#if defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32)
|
||||
# include <windows.h>
|
||||
# if defined(_MSC_VER) || defined(__GNUC__)
|
||||
# if defined(WIN32) || defined(_WIN32)
|
||||
@ -129,6 +119,25 @@ extern "C" {
|
||||
# define IS_LITTLE_ENDIAN
|
||||
# endif
|
||||
|
||||
/* OS/2 */
|
||||
#elif defined(XP_OS2)
|
||||
# ifdef XP_OS2_VACPP
|
||||
# define JRI_PUBLIC_API(ResultType) ResultType _Optlink
|
||||
# define JRI_PUBLIC_VAR(VarType) VarType
|
||||
# define JRI_CALLBACK
|
||||
# elif defined(__declspec)
|
||||
# define JRI_PUBLIC_API(ResultType) __declspec(dllexport) ResultType
|
||||
# define JRI_PUBLIC_VAR(VarType) VarType
|
||||
# define JRI_PUBLIC_VAR_EXP(VarType) __declspec(dllexport) VarType
|
||||
# define JRI_PUBLIC_VAR_IMP(VarType) __declspec(dllimport) VarType
|
||||
# define JRI_NATIVE_STUB(ResultType) __declspec(dllexport) ResultType
|
||||
# define JRI_CALLBACK
|
||||
# else
|
||||
# define JRI_PUBLIC_API(ResultType) ResultType
|
||||
# define JRI_PUBLIC_VAR(VarType) VarType
|
||||
# define JRI_CALLBACK
|
||||
# endif
|
||||
|
||||
/* Mac */
|
||||
#elif defined (macintosh) || Macintosh || THINK_C
|
||||
# if defined(__MWERKS__) /* Metrowerks */
|
||||
|
||||
@ -68,6 +68,10 @@ ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
|
||||
CPPSRCS += dlldeps-xul.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
CPPSRCS += dlldeps-xul.cpp
|
||||
endif
|
||||
|
||||
# dependent libraries
|
||||
STATIC_LIBS = \
|
||||
xulapp_s \
|
||||
|
||||
@ -60,10 +60,27 @@ endif
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/windows
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
|
||||
DEFINES += -DZLIB_DLL=1
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
REQUIRES += libreg widget gfx
|
||||
|
||||
CPPSRCS += \
|
||||
dlldeps.cpp \
|
||||
dlldeps-obs.cpp \
|
||||
nsGFXDeps.cpp \
|
||||
$(NULL)
|
||||
|
||||
ifndef MOZ_NATIVE_ZLIB
|
||||
CPPSRCS += dlldeps-zlib.cpp
|
||||
DEFINES += -DZLIB_INTERNAL
|
||||
endif
|
||||
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/os2
|
||||
endif
|
||||
|
||||
# dependent libraries
|
||||
STATIC_LIBS += \
|
||||
xpcom_core \
|
||||
|
||||
@ -92,6 +92,12 @@ CPPSRCS += dlldeps.cpp
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef MINIMO
|
||||
ifeq ($(OS_ARCH)$(MOZ_ENABLE_LIBXUL),OS2)
|
||||
CPPSRCS += dlldeps.cpp
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef XPCOM_USE_LEA
|
||||
CSRCS += malloc.c
|
||||
endif
|
||||
|
||||
@ -38,7 +38,9 @@
|
||||
// Force references to all of the symbols that we want exported from
|
||||
// the dll that are located in the .lib files we link with
|
||||
|
||||
#ifndef XP_OS2
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include "nsXPCOMGlue.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsValueArray.h"
|
||||
@ -95,7 +97,7 @@
|
||||
#include "nsStringBuffer.h"
|
||||
#include "nsCategoryCache.h"
|
||||
|
||||
#ifndef WINCE
|
||||
#if !defined(WINCE) && !defined(XP_OS2)
|
||||
#include "nsWindowsRegKey.h"
|
||||
#endif
|
||||
|
||||
@ -152,7 +154,7 @@ void XXXNeverCalled()
|
||||
NS_ProxyRelease(nsnull, nsnull, PR_FALSE);
|
||||
XPT_DoString(nsnull, nsnull, nsnull);
|
||||
XPT_DoHeader(nsnull, nsnull, nsnull);
|
||||
#if defined (DEBUG) && !defined (WINCE)
|
||||
#if defined (DEBUG) && !defined (WINCE) && !defined(XP_OS2)
|
||||
PurePrintf(0);
|
||||
#endif
|
||||
XPTC_InvokeByIndex(nsnull, 0, 0, nsnull);
|
||||
@ -261,7 +263,7 @@ void XXXNeverCalled()
|
||||
b.ToString(0, y);
|
||||
}
|
||||
|
||||
#ifndef WINCE
|
||||
#if !defined(WINCE) && !defined(XP_OS2)
|
||||
NS_NewWindowsRegKey(nsnull);
|
||||
#endif
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user