build: always compile with large file support
authorBen Noordhuis <info@bnoordhuis.nl>
Wed, 30 Nov 2011 01:28:10 +0000 (02:28 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Wed, 30 Nov 2011 01:28:12 +0000 (02:28 +0100)
Fixes a nasty sizeof(struct stat) mismatch bug that caused random crashes and
silent memory corruption.

common.gypi
deps/uv/uv.gyp
node.gyp

index 6c1851a..a614991 100644 (file)
           'BUILDING_V8_SHARED=1',
           'BUILDING_UV_SHARED=1',
         ],
+      }, {
+        'defines': [
+          '_LARGEFILE_SOURCE',
+          '_FILE_OFFSET_BITS=64',
+        ],
       }],
       [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
         'cflags': [ '-Wall', '-pthread', ],
         ],
       }],
       ['OS=="mac"', {
-        'defines': ['__DARWIN_64_BIT_INO_T=1'],
         'xcode_settings': {
           'ALWAYS_SEARCH_USER_PATHS': 'NO',
           'GCC_CW_ASM_SYNTAX': 'NO',                # No -fasm-blocks
index aad7908..5b204d3 100644 (file)
@@ -3,15 +3,10 @@
     'conditions': [
       ['OS != "win"', {
         'defines': [
-          '_LARGEFILE_SOURCE',
-          '_FILE_OFFSET_BITS=64',
           '_GNU_SOURCE',
           'EIO_STACKSIZE=262144'
         ],
         'conditions': [
-          ['OS=="mac"', {
-            'defines': ['__DARWIN_64_BIT_INO_T=1'],
-          }],
           ['OS=="solaris"', {
             'cflags': ['-pthreads'],
             'ldlags': ['-pthreads'],
index e241397..89f5ea7 100644 (file)
--- a/node.gyp
+++ b/node.gyp
       'defines': [
         'ARCH="<(target_arch)"',
         'PLATFORM="<(OS)"',
-        '_LARGEFILE_SOURCE',
-        '_FILE_OFFSET_BITS=64',
       ],
 
       'conditions': [