diff --git a/byterun/io.c b/byterun/io.c index 614f63db9..f473ce7d2 100644 --- a/byterun/io.c +++ b/byterun/io.c @@ -15,8 +15,6 @@ /* Buffered input/output. */ -#define _FILE_OFFSET_BITS 64 - #include #include #include diff --git a/byterun/sys.c b/byterun/sys.c index 75cc05da3..f82fce4b3 100644 --- a/byterun/sys.c +++ b/byterun/sys.c @@ -15,8 +15,6 @@ /* Basic system calls */ -#define _FILE_OFFSET_BITS 64 - #include #include #include diff --git a/configure b/configure index dd0e45874..342d77088 100755 --- a/configure +++ b/configure @@ -645,6 +645,11 @@ fi echo "#define OCAML_OS_TYPE \"$ostype\"" >> s.h echo "#define OCAML_STDLIB_DIR \"$libdir\"" >> s.h +# Use 64-bit file offset if possible + +bytecccompopts="$bytecccompopts -D_FILE_OFFSET_BITS=64" +nativecccompopts="$nativecccompopts -D_FILE_OFFSET_BITS=64" + # Check the semantics of signal handlers if sh ./hasgot sigaction sigprocmask; then diff --git a/otherlibs/unix/Makefile b/otherlibs/unix/Makefile index b3d39e29b..bea9c8026 100644 --- a/otherlibs/unix/Makefile +++ b/otherlibs/unix/Makefile @@ -19,7 +19,7 @@ include ../../config/Makefile # Compilation options CC=$(BYTECC) -CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -D_FILE_OFFSET_BITS=64 +CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib