From bbd976b8c4f82d22dc3f6bc5075aeaf26f8b6fa9 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 30 Nov 2011 02:28:10 +0100 Subject: [PATCH] build: always compile with large file support Fixes a nasty sizeof(struct stat) mismatch bug that caused random crashes and silent memory corruption. --- common.gypi | 6 +++++- deps/uv/uv.gyp | 5 ----- node.gyp | 2 -- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/common.gypi b/common.gypi index 6c1851a2b6..a6149910a8 100644 --- a/common.gypi +++ b/common.gypi @@ -109,6 +109,11 @@ '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', ], @@ -128,7 +133,6 @@ ], }], ['OS=="mac"', { - 'defines': ['__DARWIN_64_BIT_INO_T=1'], 'xcode_settings': { 'ALWAYS_SEARCH_USER_PATHS': 'NO', 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks diff --git a/deps/uv/uv.gyp b/deps/uv/uv.gyp index aad7908d69..5b204d3700 100644 --- a/deps/uv/uv.gyp +++ b/deps/uv/uv.gyp @@ -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'], diff --git a/node.gyp b/node.gyp index e241397912..89f5ea75a6 100644 --- a/node.gyp +++ b/node.gyp @@ -124,8 +124,6 @@ 'defines': [ 'ARCH="<(target_arch)"', 'PLATFORM="<(OS)"', - '_LARGEFILE_SOURCE', - '_FILE_OFFSET_BITS=64', ], 'conditions': [