[pypy-commit] pypy stmgc-c7-rewindjmp: Fix the double definition of _GNU_SOURCE

arigo noreply at buildbot.pypy.org
Thu Aug 14 16:19:17 CEST 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7-rewindjmp
Changeset: r72798:654eb5a6b76f
Date: 2014-08-14 16:03 +0200
http://bitbucket.org/pypy/pypy/changeset/654eb5a6b76f/

Log:	Fix the double definition of _GNU_SOURCE

diff --git a/rpython/translator/c/genc.py b/rpython/translator/c/genc.py
--- a/rpython/translator/c/genc.py
+++ b/rpython/translator/c/genc.py
@@ -919,14 +919,6 @@
 
     filename = targetdir.join(modulename + '.c')
     f = filename.open('w')
-    if database.with_stm:
-        print >> f, '/* XXX temporary, for SYS_arch_prctl below */'
-        print >> f, '#define _GNU_SOURCE'
-        print >> f, '#include <unistd.h>'
-        print >> f, '#include <sys/syscall.h>'
-        print >> f, '#include <sys/prctl.h>'
-        print >> f, '#include <asm/prctl.h>'
-        print >> f
     incfilename = targetdir.join('common_header.h')
     fi = incfilename.open('w')
     fi.write('#ifndef _PY_COMMON_HEADER_H\n#define _PY_COMMON_HEADER_H\n')
@@ -935,6 +927,12 @@
     # Header
     #
     print >> f, '#include "common_header.h"'
+    if database.with_stm:
+        print >> f, '/* XXX temporary, for SYS_arch_prctl below */'
+        print >> f, '#include <unistd.h>'
+        print >> f, '#include <sys/syscall.h>'
+        print >> f, '#include <sys/prctl.h>'
+        print >> f, '#include <asm/prctl.h>'
     print >> f
     commondefs(defines)
     for key, value in defines.items():


More information about the pypy-commit mailing list