build: set `process.platform` to "darwin" on OS X
authorNathan Rajlich <nathan@tootallnate.net>
Wed, 11 Jan 2012 22:36:27 +0000 (14:36 -0800)
committerBen Noordhuis <info@bnoordhuis.nl>
Thu, 12 Jan 2012 14:10:11 +0000 (15:10 +0100)
This is consistent with the old waf build system, and doesn't break old scripts
that are expecting the value to be "darwin".

Fixes #2518.

node.gyp

index 849b529..3123537 100644 (file)
--- a/node.gyp
+++ b/node.gyp
         }],
         [ 'OS=="mac"', {
           'libraries': [ '-framework Carbon' ],
+          'defines': [
+            # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
+            'PLATFORM="darwin"',
+          ],
         }],
         [ 'OS=="linux"', {
           'libraries': [