Bug 577011 - [OS/2] make _declspec unconditionally default symbol export r=daveryeo@telus.net a=benjamin
authorWalter Meinl <wuno@lsvw.de>
Tue, 09 Nov 2010 11:13:03 +0100
changeset 57150 18143cc0603b595cfd0bdef923278629b84c7136
parent 57149 f8cfc4c027090419290f76ce8717072f495037a3
child 57151 4b5e489173b61d50ee9c478791fe37746618a423
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersdaveryeo, benjamin
bugs577011
milestone2.0b8pre
Bug 577011 - [OS/2] make _declspec unconditionally default symbol export r=daveryeo@telus.net a=benjamin
config/autoconf.mk.in
config/rules.mk
configure.in
gfx/cairo/cairo/src/cairo-platform.h
js/src/config/autoconf.mk.in
js/src/config/rules.mk
js/src/configure.in
js/src/jstypes.h
memory/mozalloc/mozalloc_abort.cpp
memory/mozalloc/mozalloc_oom.cpp
memory/mozalloc/msvc_raise_wrappers.cpp
memory/mozalloc/msvc_throw_wrapper.cpp
modules/zlib/src/zconf.h
widget/src/os2/Makefile.in
xpcom/base/nscore.h
xpcom/reflect/xptcall/src/md/os2/xptcstubs_gcc_x86_os2.cpp
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -607,17 +607,16 @@ OS_TEST=@OS_TEST@
 SOLARIS_SUNPRO_CC = @SOLARIS_SUNPRO_CC@
 SOLARIS_SUNPRO_CXX = @SOLARIS_SUNPRO_CXX@
 
 # For AIX build
 AIX_OBJMODEL = @AIX_OBJMODEL@
 
 # For OS/2 build
 MOZ_OS2_TOOLS = @MOZ_OS2_TOOLS@
-MOZ_OS2_USE_DECLSPEC = @MOZ_OS2_USE_DECLSPEC@
 MOZ_OS2_HIGH_MEMORY = @MOZ_OS2_HIGH_MEMORY@
 
 HAVE_XIE=@HAVE_XIE@
 
 MOZ_PSM=@MOZ_PSM@
 
 # Gssapi (krb5) libraries and headers for the Negotiate auth method
 GSSAPI_INCLUDES = @GSSAPI_INCLUDES@
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -1244,36 +1244,20 @@ endif
 ifeq ($(OS_ARCH),OS2)
 $(DEF_FILE): $(OBJS) $(SHARED_LIBRARY_LIBS)
 	rm -f $@
 	echo LIBRARY $(SHARED_LIBRARY_NAME) INITINSTANCE TERMINSTANCE > $@
 	echo PROTMODE >> $@
 	echo CODE    LOADONCALL MOVEABLE DISCARDABLE >> $@
 	echo DATA    PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@
 	echo EXPORTS >> $@
-ifeq ($(IS_COMPONENT),1)
-ifeq ($(HAS_EXTRAEXPORTS),1)
-ifndef MOZ_OS2_USE_DECLSPEC
-	$(FILTER) $(OBJS) $(SHARED_LIBRARY_LIBS) >> $@
-endif	
-else
-	echo    _NSModule >> $@
-endif
-else
-ifndef MOZ_OS2_USE_DECLSPEC
-	$(FILTER) $(OBJS) $(SHARED_LIBRARY_LIBS) >> $@
-endif	
-endif
+
 	$(ADD_TO_DEF_FILE)
 
-ifdef MOZ_OS2_USE_DECLSPEC
 $(IMPORT_LIBRARY): $(SHARED_LIBRARY)
-else
-$(IMPORT_LIBRARY): $(DEF_FILE)
-endif
 	rm -f $@
 	$(IMPLIB) $@ $^
 	$(RANLIB) $@
 endif # OS/2
 
 $(HOST_LIBRARY): $(HOST_OBJS) Makefile
 	rm -f $@
 	$(HOST_AR) $(HOST_AR_FLAGS) $(HOST_OBJS)
--- a/configure.in
+++ b/configure.in
@@ -2637,17 +2637,17 @@ ia64*-hpux*)
     DSO_PIC_CFLAGS=
     AR=emxomfar
     AR_FLAGS='r $@'
     CFLAGS="$CFLAGS -Zomf"
     CXXFLAGS="$CXXFLAGS -Zomf"
     DSO_LDOPTS='-Zdll'
     BIN_FLAGS='-Zlinker /ST:0x100000'
     IMPLIB='emximp -o'
-    FILTER='emxexp -o'
+    FILTER='true'
     LDFLAGS='-Zmap'
     WARNINGS_AS_ERRORS='-Werror'
     MOZ_DEBUG_FLAGS="-g -fno-inline"
     MOZ_OPTIMIZE_FLAGS="-O2"
     MOZ_OPTIMIZE_LDFLAGS="-s -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
     DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
     LIBXUL_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
     TARGET_MD_ARCH=os2
@@ -2673,19 +2673,18 @@ ia64*-hpux*)
     _DEFINES_CXXFLAGS="$_DEFINES_CXXFLAGS -Uunix -U__unix -U__unix__"
 
     AC_CACHE_CHECK(for __declspec(dllexport),
         ac_os2_declspec,
         [AC_TRY_COMPILE([__declspec(dllexport) void ac_os2_declspec(void) {}],
                         [return 0;],
                         ac_os2_declspec="yes",
                         ac_os2_declspec="no")])
-    if test "$ac_os2_declspec" = "yes"; then
-        FILTER='true'
-        MOZ_OS2_USE_DECLSPEC='1'
+    if test "$ac_os2_declspec" != "yes"; then
+        AC_MSG_ERROR([Compiler does not support __declspec(dllexport), install GCC-4.3.2 or newer])
     fi
     ;;
 
 alpha*-*-osf*)
     if test "$GNU_CC"; then
       MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$@ -o $@'
       MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$@ -o $@'
 
@@ -8929,17 +8928,16 @@ AC_SUBST(XPCOM_LIBS)
 AC_SUBST(XPCOM_FROZEN_LDOPTS)
 AC_SUBST(XPCOM_GLUE_LDOPTS)
 AC_SUBST(XPCOM_STANDALONE_GLUE_LDOPTS)
 
 AC_SUBST(USE_DEPENDENT_LIBS)
 
 AC_SUBST(MOZ_BUILD_ROOT)
 AC_SUBST(MOZ_OS2_TOOLS)
-AC_SUBST(MOZ_OS2_USE_DECLSPEC)
 
 AC_SUBST(MOZ_POST_DSO_LIB_COMMAND)
 AC_SUBST(MOZ_POST_PROGRAM_COMMAND)
 AC_SUBST(MOZ_TIMELINE)
 AC_SUBST(OGLES_SDK_DIR)
 
 AC_SUBST(MOZ_APP_NAME)
 AC_SUBST(MOZ_APP_DISPLAYNAME)
--- a/gfx/cairo/cairo/src/cairo-platform.h
+++ b/gfx/cairo/cairo/src/cairo-platform.h
@@ -52,24 +52,18 @@
 /* In libxul builds we don't ever want to export cairo symbols */
 #define cairo_public extern CVISIBILITY_HIDDEN
 
 #else
 
 #ifdef MOZ_STATIC_BUILD
 # define cairo_public
 #else
-# if defined(XP_WIN) || defined(XP_BEOS)
+# if defined(XP_WIN) || defined(XP_BEOS) || defined(XP_OS2)
 #  define cairo_public extern __declspec(dllexport)
-# elif defined(XP_OS2)
-#  ifdef __declspec
-#   define cairo_public extern __declspec(dllexport)
-#  else
-#   define cairo_public extern
-#  endif
 # else
 #  ifdef HAVE_VISIBILITY_ATTRIBUTE
 #   define cairo_public extern __attribute__((visibility("default")))
 #  elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
 #   define cairo_public extern __global
 #  else
 #   define cairo_public extern
 #  endif
--- a/js/src/config/autoconf.mk.in
+++ b/js/src/config/autoconf.mk.in
@@ -300,17 +300,16 @@ OS_TEST=@OS_TEST@
 SOLARIS_SUNPRO_CC = @SOLARIS_SUNPRO_CC@
 SOLARIS_SUNPRO_CXX = @SOLARIS_SUNPRO_CXX@
 
 # For AIX build
 AIX_OBJMODEL = @AIX_OBJMODEL@
 
 # For OS/2 build
 MOZ_OS2_TOOLS = @MOZ_OS2_TOOLS@
-MOZ_OS2_USE_DECLSPEC = @MOZ_OS2_USE_DECLSPEC@
 MOZ_OS2_HIGH_MEMORY = @MOZ_OS2_HIGH_MEMORY@
 
 MOZILLA_OFFICIAL = @MOZILLA_OFFICIAL@
 
 # Win32 options
 MOZ_BROWSE_INFO	= @MOZ_BROWSE_INFO@
 MOZ_TOOLS_DIR	= @MOZ_TOOLS_DIR@
 MOZ_QUANTIFY	= @MOZ_QUANTIFY@
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -1244,36 +1244,20 @@ endif
 ifeq ($(OS_ARCH),OS2)
 $(DEF_FILE): $(OBJS) $(SHARED_LIBRARY_LIBS)
 	rm -f $@
 	echo LIBRARY $(SHARED_LIBRARY_NAME) INITINSTANCE TERMINSTANCE > $@
 	echo PROTMODE >> $@
 	echo CODE    LOADONCALL MOVEABLE DISCARDABLE >> $@
 	echo DATA    PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@
 	echo EXPORTS >> $@
-ifeq ($(IS_COMPONENT),1)
-ifeq ($(HAS_EXTRAEXPORTS),1)
-ifndef MOZ_OS2_USE_DECLSPEC
-	$(FILTER) $(OBJS) $(SHARED_LIBRARY_LIBS) >> $@
-endif	
-else
-	echo    _NSModule >> $@
-endif
-else
-ifndef MOZ_OS2_USE_DECLSPEC
-	$(FILTER) $(OBJS) $(SHARED_LIBRARY_LIBS) >> $@
-endif	
-endif
+
 	$(ADD_TO_DEF_FILE)
 
-ifdef MOZ_OS2_USE_DECLSPEC
 $(IMPORT_LIBRARY): $(SHARED_LIBRARY)
-else
-$(IMPORT_LIBRARY): $(DEF_FILE)
-endif
 	rm -f $@
 	$(IMPLIB) $@ $^
 	$(RANLIB) $@
 endif # OS/2
 
 $(HOST_LIBRARY): $(HOST_OBJS) Makefile
 	rm -f $@
 	$(HOST_AR) $(HOST_AR_FLAGS) $(HOST_OBJS)
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -2327,17 +2327,17 @@ ia64*-hpux*)
     DSO_PIC_CFLAGS=
     AR=emxomfar
     AR_FLAGS='r $@'
     CFLAGS="$CFLAGS -Zomf"
     CXXFLAGS="$CXXFLAGS -Zomf"
     DSO_LDOPTS='-Zdll'
     BIN_FLAGS='-Zlinker /ST:0x100000'
     IMPLIB='emximp -o'
-    FILTER='emxexp -o'
+    FILTER='true'
     LDFLAGS='-Zmap'
     WARNINGS_AS_ERRORS='-Werror'
     MOZ_DEBUG_FLAGS="-g -fno-inline"
     MOZ_OPTIMIZE_FLAGS="-O2"
     MOZ_OPTIMIZE_LDFLAGS="-s -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
     DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
     LIBXUL_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
     TARGET_MD_ARCH=os2
@@ -2363,19 +2363,18 @@ ia64*-hpux*)
     _DEFINES_CXXFLAGS="$_DEFINES_CXXFLAGS -Uunix -U__unix -U__unix__"
 
     AC_CACHE_CHECK(for __declspec(dllexport),
         ac_os2_declspec,
         [AC_TRY_COMPILE([__declspec(dllexport) void ac_os2_declspec(void) {}],
                         [return 0;],
                         ac_os2_declspec="yes",
                         ac_os2_declspec="no")])
-    if test "$ac_os2_declspec" = "yes"; then
-        FILTER='true'
-        MOZ_OS2_USE_DECLSPEC='1'
+    if test "$ac_os2_declspec" != "yes"; then
+        AC_MSG_ERROR([Compiler does not support __declspec(dllexport), install GCC-4.3.2 or newer])
     fi
     ;;
 
 alpha*-*-osf*)
     if test "$GNU_CC"; then
       MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$@ -o $@'
       MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$@ -o $@'
 
@@ -5138,17 +5137,16 @@ AC_SUBST(MOZ_COMPONENTS_VERSION_SCRIPT_L
 AC_SUBST(MOZ_COMPONENT_NSPR_LIBS)
 
 AC_SUBST(MOZ_FIX_LINK_PATHS)
 
 AC_SUBST(USE_DEPENDENT_LIBS)
 
 AC_SUBST(MOZ_BUILD_ROOT)
 AC_SUBST(MOZ_OS2_TOOLS)
-AC_SUBST(MOZ_OS2_USE_DECLSPEC)
 
 AC_SUBST(MOZ_POST_DSO_LIB_COMMAND)
 AC_SUBST(MOZ_POST_PROGRAM_COMMAND)
 AC_SUBST(MOZ_TIMELINE)
 AC_SUBST(WINCE)
 AC_SUBST(WINCE_WINDOWS_MOBILE)
 
 AC_SUBST(MOZ_APP_NAME)
--- a/js/src/jstypes.h
+++ b/js/src/jstypes.h
@@ -75,31 +75,24 @@
 **   in dowhim.c
 **     JS_EXPORT_API( void ) DoWhatIMean( void ) { return; }
 **
 **
 ***********************************************************************/
 
 #define DEFINE_LOCAL_CLASS_OF_STATIC_FUNCTION(Name) class Name
 
-#ifdef WIN32
+#if defined(WIN32) || defined(XP_OS2)
 
 /* These also work for __MWERKS__ */
 # define JS_EXTERN_API(__type)  extern __declspec(dllexport) __type
 # define JS_EXPORT_API(__type)  __declspec(dllexport) __type
 # define JS_EXTERN_DATA(__type) extern __declspec(dllexport) __type
 # define JS_EXPORT_DATA(__type) __declspec(dllexport) __type
 
-#elif defined(XP_OS2) && defined(__declspec)
-
-# define JS_EXTERN_API(__type)  extern __declspec(dllexport) __type
-# define JS_EXPORT_API(__type)  __declspec(dllexport) __type
-# define JS_EXTERN_DATA(__type) extern __declspec(dllexport) __type
-# define JS_EXPORT_DATA(__type) __declspec(dllexport) __type
-
 #elif defined(__SYMBIAN32__)
 
 # define JS_EXTERN_API(__type) extern EXPORT_C __type
 # define JS_EXPORT_API(__type) EXPORT_C __type
 # define JS_EXTERN_DATA(__type) extern EXPORT_C __type
 # define JS_EXPORT_DATA(__type) EXPORT_C __type
 
 #else /* Unix */
@@ -131,27 +124,27 @@
 #endif
 
 #ifdef _WIN32
 # if defined(__MWERKS__) || defined(__GNUC__)
 #  define JS_IMPORT_API(__x)    __x
 # else
 #  define JS_IMPORT_API(__x)    __declspec(dllimport) __x
 # endif
-#elif defined(XP_OS2) && defined(__declspec)
+#elif defined(XP_OS2)
 # define JS_IMPORT_API(__x)     __declspec(dllimport) __x
 #elif defined(__SYMBIAN32__)
 # define JS_IMPORT_API(__x)     IMPORT_C __x
 #else
 # define JS_IMPORT_API(__x)     JS_EXPORT_API (__x)
 #endif
 
 #if defined(_WIN32) && !defined(__MWERKS__)
 # define JS_IMPORT_DATA(__x)      __declspec(dllimport) __x
-#elif defined(XP_OS2) && defined(__declspec)
+#elif defined(XP_OS2)
 # define JS_IMPORT_DATA(__x)      __declspec(dllimport) __x
 #elif defined(__SYMBIAN32__)
 # if defined(__CW32__)
 #   define JS_IMPORT_DATA(__x)    __declspec(dllimport) __x
 # else
 #   define JS_IMPORT_DATA(__x)    IMPORT_C __x
 # endif
 #else
--- a/memory/mozalloc/mozalloc_abort.cpp
+++ b/memory/mozalloc/mozalloc_abort.cpp
@@ -44,17 +44,17 @@
 #if defined(_MSC_VER)           // MSVC
 #  include <intrin.h>           // for __debugbreak()
 #elif defined(XP_WIN)           // mingw
 #  include <windows.h>          // for DebugBreak
 #elif defined(XP_UNIX)
 #  include <unistd.h>           // for _exit
 #endif
 
-#if defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec))
+#if defined(XP_WIN) || defined(XP_OS2)
 #  define MOZALLOC_EXPORT __declspec(dllexport)
 #endif
 
 #include "mozilla/mozalloc_abort.h"
 
 static int gDummyCounter;
 
 static void
--- a/memory/mozalloc/mozalloc_oom.cpp
+++ b/memory/mozalloc/mozalloc_oom.cpp
@@ -33,17 +33,17 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#if defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec))
+#if defined(XP_WIN) || defined(XP_OS2)
 #  define MOZALLOC_EXPORT __declspec(dllexport)
 #endif
 
 #include "mozilla/mozalloc_abort.h"
 #include "mozilla/mozalloc_oom.h"
 
 void
 mozalloc_handle_oom()
--- a/memory/mozalloc/msvc_raise_wrappers.cpp
+++ b/memory/mozalloc/msvc_raise_wrappers.cpp
@@ -35,17 +35,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include <stdio.h>
 
-#if defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec))
+#if defined(XP_WIN) || (defined(XP_OS2)
 #  define MOZALLOC_EXPORT __declspec(dllexport)
 #endif
 
 #define MOZALLOC_DONT_WRAP_RAISE_FUNCTIONS
 #include "mozilla/throw_msvc.h"
 
 __declspec(noreturn) static void abort_from_exception(const char* const which,
                                                       const char* const what);
--- a/memory/mozalloc/msvc_throw_wrapper.cpp
+++ b/memory/mozalloc/msvc_throw_wrapper.cpp
@@ -35,17 +35,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include <exception>
 
-#if defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec))
+#if defined(XP_WIN) || (defined(XP_OS2)
 #  define MOZALLOC_EXPORT __declspec(dllexport)
 #endif
 
 #include "mozilla/mozalloc_abort.h"
 
 namespace std {
 
 // NB: user code is not supposed to touch the std:: namespace.  We're
--- a/modules/zlib/src/zconf.h
+++ b/modules/zlib/src/zconf.h
@@ -301,29 +301,17 @@
 #    ifdef WIN32
 #      define ZEXPORTVA WINAPIV
 #    else
 #      define ZEXPORTVA FAR CDECL
 #    endif
 #  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__)
+#if defined(__OS2__) || defined (__BEOS__)
 #  ifdef ZLIB_DLL
 #    ifdef ZLIB_INTERNAL
 #      define ZEXPORT   __declspec(dllexport)
 #      define ZEXPORTVA __declspec(dllexport)
 #    else
 #      define ZEXPORT   __declspec(dllimport)
 #      define ZEXPORTVA __declspec(dllimport)
 #    endif
--- a/widget/src/os2/Makefile.in
+++ b/widget/src/os2/Makefile.in
@@ -87,20 +87,16 @@ EXTRA_DSO_LIBS	= gkgfx
 EXTRA_DSO_LDOPTS = \
 		$(EXTRA_DSO_LIBS) \
 		$(MOZ_UNICHARUTIL_LIBS) \
 		$(MOZ_COMPONENT_LIBS) \
 		-lthebes \
 		$(QCMS_LIBS) \
 		$(NULL)
 
-ifdef ENABLE_TESTS
-HAS_EXTRAEXPORTS = 1
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 CXXFLAGS += $(MOZ_CAIRO_CFLAGS)
 
 DEFINES		+= -D_IMPL_NS_WIDGET
 
 DEFINES += -DUSE_OS2_TOOLKIT_HEADERS
 
--- a/xpcom/base/nscore.h
+++ b/xpcom/base/nscore.h
@@ -190,17 +190,17 @@
 /*
   These are needed to mark static members in exported classes, due to
   gcc bug XXX insert bug# here.
  */
 
 #define NS_EXPORT_STATIC_MEMBER_(type) type
 #define NS_IMPORT_STATIC_MEMBER_(type) type
 
-#elif defined(XP_OS2) && defined(__declspec)
+#elif defined(XP_OS2)
 
 #define NS_IMPORT __declspec(dllimport)
 #define NS_IMPORT_(type) type __declspec(dllimport)
 #define NS_EXPORT __declspec(dllexport)
 #define NS_EXPORT_(type) type __declspec(dllexport)
 #define NS_IMETHOD_(type) virtual type
 #define NS_IMETHODIMP_(type) type
 #define NS_METHOD_(type) type
--- a/xpcom/reflect/xptcall/src/md/os2/xptcstubs_gcc_x86_os2.cpp
+++ b/xpcom/reflect/xptcall/src/md/os2/xptcstubs_gcc_x86_os2.cpp
@@ -94,22 +94,18 @@ PrepareAndDispatch(uint32 methodIndex, n
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 } // extern "C"
 
-#if defined(__declspec)
 #define SYMBOL_EXPORT(sym) \
     ".stabs \"" sym ",0=" sym ",code\", 0x6c,0,0,-42\n\t"
-#else
-#define SYMBOL_EXPORT(sym)
-#endif 
 
 #define STUB_ENTRY(n) \
 asm(".text\n\t" \
     ".align	2\n\t" \
     ".if	" #n " < 10\n\t" \
     ".globl	" SYMBOL_UNDERSCORE "_ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \
     ".type	" SYMBOL_UNDERSCORE "_ZN14nsXPTCStubBase5Stub" #n "Ev,@function\n" \
     SYMBOL_EXPORT(SYMBOL_UNDERSCORE "_ZN14nsXPTCStubBase5Stub" #n "Ev") \