From 7841f77b2e36006f8469ab396c4c5560030fe64a Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 22 Jan 2013 16:15:58 +0100 Subject: [PATCH] build: don't export _POSIX_C_SOURCE on non-linux Don't export _POSIX_C_SOURCE to dependents. On the BSDs (and the BSD-ish, like OS X), it hides SysV and BSD definitions. The exception is Linux: _POSIX_C_SOURCE=200112 unlocks some of the newer pthreads features like spinlocks and barriers, so keep exporting it on that platform. --- uv.gyp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/uv.gyp b/uv.gyp index d7b19634..6ec5aa28 100644 --- a/uv.gyp +++ b/uv.gyp @@ -34,14 +34,13 @@ 'defines': [ '_LARGEFILE_SOURCE', '_FILE_OFFSET_BITS=64', - '_POSIX_C_SOURCE=200112', ], }], ['OS == "mac"', { - 'defines': [ - '_DARWIN_USE_64_BIT_INODE=1', - '_DARWIN_C_SOURCE', # _POSIX_C_SOURCE hides SysV definitions. - ], + 'defines': [ '_DARWIN_USE_64_BIT_INODE=1' ], + }], + ['OS == "linux"', { + 'defines': [ '_POSIX_C_SOURCE=200112' ], }], ], },