This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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.
  • Loading branch information...
bnoordhuis committed Jan 22, 2013
1 parent bdb498f commit 7841f77b2e36006f8469ab396c4c5560030fe64a
Showing with 4 additions and 5 deletions.
  1. +4 −5 uv.gyp
View
9 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' ],
}],
],
},

0 comments on commit 7841f77

Please sign in to comment.