summary refs log tree commit diff stats
path: root/lib/nimbase.h
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-11-18 00:29:56 +0100
committerAraq <rumpf_a@web.de>2011-11-18 00:29:56 +0100
commit61792dc7d6926bcaeed858f9acc00ec7e1517724 (patch)
treeac03827c7dd33e5395652b3da02844e6d973e687 /lib/nimbase.h
parentb05418a4310c5e9fb9074a66bccba13a95053616 (diff)
downloadNim-61792dc7d6926bcaeed858f9acc00ec7e1517724.tar.gz
cgen: no type canon for integral types; osproc use posix_spawn instead of fork&exec
Diffstat (limited to 'lib/nimbase.h')
-rwxr-xr-xlib/nimbase.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/nimbase.h b/lib/nimbase.h
index 11278ccd2..d42befea7 100755
--- a/lib/nimbase.h
+++ b/lib/nimbase.h
@@ -427,6 +427,11 @@ __declspec(naked) int __fastcall NimXadd(volatile int* pNum, int val) {
 #ifdef __GNUC__
 #  define likely(x) __builtin_expect(x, 1)
 #  define unlikely(x) __builtin_expect(x, 0)
+/* We need the following for the posix wrapper. In particular it will give us
+   POSIX_SPAWN_USEVFORK: */
+#  ifndef _GNU_SOURCE
+#    define _GNU_SOURCE
+#  endif
 #else
 #  define likely(x) (x)
 #  define unlikely(x) (x)