OSDN Git Service

Do not add -D_FILE_OFFSET_BITS=64 and -D_LARGEFILE_SOURCE unconditionally to
authorDiego Biurrun <diego@biurrun.de>
Tue, 3 Mar 2009 12:52:12 +0000 (12:52 +0000)
committerDiego Biurrun <diego@biurrun.de>
Tue, 3 Mar 2009 12:52:12 +0000 (12:52 +0000)
CFLAGS.  Apparently there are some systems that do not like these definitions.

Originally committed as revision 17755 to svn://svn.ffmpeg.org/ffmpeg/trunk

common.mak
configure

index 35c0579..b756123 100644 (file)
@@ -18,8 +18,7 @@ endif
 
 ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
 
-CFLAGS := -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-          -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(OPTFLAGS)
+CFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(OPTFLAGS)
 
 %.o: %.c
        $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
index 1e51ebe..2b761fe 100755 (executable)
--- a/configure
+++ b/configure
@@ -1418,6 +1418,12 @@ if test "$?" != 0; then
 fi
 
 check_cflags -std=c99
+check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cflags -D_FILE_OFFSET_BITS=64
+#include <stdlib.h>
+EOF
+check_cc -D_LARGEFILE_SOURCE <<EOF && add_cflags -D_LARGEFILE_SOURCE
+#include <stdlib.h>
+EOF
 
 case "$arch" in
     alpha)