Bug 976443 - Move undefines to moz.build; r=glandium
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 25 Feb 2014 22:51:26 -0500
changeset 170947 a6a0700bf77546590aab05f9bbedccd837de2bad
parent 170946 93c87caa78559b44dc7c65552e2c126f0430db37
child 170948 7193af53cd1e4b06401aa19cc5889fb4dcca684f
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersglandium
bugs976443
milestone30.0a1
Bug 976443 - Move undefines to moz.build; r=glandium
netwerk/sctp/src/Makefile.in
netwerk/sctp/src/moz.build
--- a/netwerk/sctp/src/Makefile.in
+++ b/netwerk/sctp/src/Makefile.in
@@ -1,42 +1,10 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-ifeq ($(OS_TARGET),Darwin)
-DEFINES += \
-  -U__APPLE__ \
-  $(NULL)
-else
-ifeq ($(OS_TARGET),FreeBSD)
-DEFINES += \
-  -U__FreeBSD__ \
-  $(NULL)
-else
-ifeq ($(OS_TARGET),NetBSD)
-DEFINES += \
-  -U__NetBSD__ \
-  $(NULL)
-else
-ifeq ($(OS_TARGET),OpenBSD)
-DEFINES += \
-  -U__OpenBSD__ \
-  $(NULL)
-else
-ifeq ($(OS_TARGET),DragonFly)
-DEFINES += \
-  -U__DragonFly__ \
-  $(NULL)
-else
-#error Unsupported platform!
-endif
-endif
-endif
-endif
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 ifdef GNU_CC
 CFLAGS += -std=gnu99
 endif
--- a/netwerk/sctp/src/moz.build
+++ b/netwerk/sctp/src/moz.build
@@ -69,14 +69,27 @@ if CONFIG['OS_TARGET'] == 'WINNT':
     DEFINES['_LIB'] = 1
 elif CONFIG['OS_TARGET'] == 'Android':
     DEFINES['__Userspace_os_Linux'] = 1
 else:
     DEFINES['__Userspace_os_%s' % CONFIG['OS_TARGET']] = 1
 
 if CONFIG['OS_TARGET'] == 'Darwin':
     DEFINES['__APPLE_USE_RFC_2292'] = 1
+    DEFINES['__APPLE__'] = False
 
 if CONFIG['OS_TARGET'] in ('Linux', 'Android'):
     # to make sure that in6_pktinfo gets defined on all distros
     DEFINES['_GNU_SOURCE'] = True
 
+if CONFIG['OS_TARGET'] == 'FreeBSD':
+    DEFINES['__FreeBSD__'] = False
+
+if CONFIG['OS_TARGET'] == 'NetBSD':
+    DEFINES['__NetBSD__'] = False
+
+if CONFIG['OS_TARGET'] == 'OpenBSD':
+    DEFINES['__OpenBSD__'] = False
+
+if CONFIG['OS_TARGET'] == 'DragonFly':
+    DEFINES['__DragonFly__'] = False
+
 NO_PGO = True # Don't PGO