Bug 550542: [OS/2] Followups for xmalloc r=cjones
authorWalter Meinl <wuno@lsvw.de>
Sat, 06 Mar 2010 12:58:04 -0500
changeset 39033 9c194614760087cfa810ddc51b45479ab1bdc13c
parent 39032 af423ee89967a9954c7378d8ebde578f7e0f4045
child 39034 bae59e32bd066dffabfce6842eb3343cf3857dff
push idunknown
push userunknown
push dateunknown
reviewerscjones
bugs550542
milestone1.9.3a3pre
Bug 550542: [OS/2] Followups for xmalloc r=cjones
configure.in
js/src/configure.in
memory/mozalloc/Makefile.in
--- a/configure.in
+++ b/configure.in
@@ -2534,18 +2534,18 @@ case "$target" in
     BIN_FLAGS='-Zlinker /ST:0x100000'
     IMPLIB='emximp -o'
     FILTER='emxexp -o'
     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_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib'
+    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
     _PLATFORM_DEFAULT_TOOLKIT="cairo-os2"
     MOZ_ENABLE_POSTSCRIPT=
     RC=rc.exe
     RCFLAGS='-n'
     MOZ_USER_DIR="Mozilla"
 
     if test "$MOZTOOLS"; then
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -2210,18 +2210,18 @@ case "$target" in
     BIN_FLAGS='-Zlinker /ST:0x100000'
     IMPLIB='emximp -o'
     FILTER='emxexp -o'
     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_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib'
+    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
     _PLATFORM_DEFAULT_TOOLKIT="cairo-os2"
     MOZ_ENABLE_POSTSCRIPT=
     RC=rc.exe
     RCFLAGS='-n'
     MOZ_USER_DIR="Mozilla"
 
     if test "$MOZTOOLS"; then
--- a/memory/mozalloc/Makefile.in
+++ b/memory/mozalloc/Makefile.in
@@ -53,16 +53,21 @@ DIST_INSTALL 	= 1
 ifeq (,$(filter-out WINCE,$(OS_ARCH)))
 # The wince shunt relies on this library in a somewhat complicated
 # way.  In wince builds, jemalloc replaces the wince libc allocators
 # and moz_* will end up using those symbols at run time.
 export NO_SHUNT	= 1
 OS_LIBS		=
 endif
 
+ifeq (,$(filter-out OS2,$(OS_ARCH)))
+# The strndup declaration in string.h is in an ifdef __USE_GNU section
+DEFINES		+= -D_GNU_SOURCE
+endif
+
 EXPORTS_NAMESPACES 	= mozilla
 EXPORTS_mozilla 	= mozalloc.h mozalloc_macro_wrappers.h mozalloc_oom.h
 
 CPPSRCS =					\
 	mozalloc.cpp				\
 	mozalloc_oom.cpp			\
 	$(NULL)