diff --git a/configure b/configure index eb8992f4f2f..9ee72f9eef6 100755 --- a/configure +++ b/configure @@ -11160,84 +11160,6 @@ fi fi -echo "$as_me:$LINENO: checking whether mmap64 works defined as mmap" >&5 -echo $ECHO_N "checking whether mmap64 works defined as mmap... $ECHO_C" >&6 -if test "${ac_cv_mmap64_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_mmap64_works="no" -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #define _FILE_OFFSET_BITS 64 - #include - #include - #include - #include - #include - - int main(int argc,char **argv) { - int fd = open("conftest.map",O_CREAT|O_RDWR,0600); - if (fd == -1) exit(1); - - unlink("conftest.map"); - - write(fd,"test",4); - - if ((-1 == mmap(0,4,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0)) && - (errno == EINVAL) - ) { - exit(1); - } - close(fd); - fprintf(stderr,"success!\n"); - exit(0); - } - - -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_mmap64_works="yes" -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_mmap64_works="no" -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_mmap64_works" >&5 -echo "${ECHO_T}$ac_cv_mmap64_works" >&6 - -if test "$ac_cv_mmap64_works" = "yes" -then - -cat >>confdefs.h <<\_ACEOF -#define _FILE_OFFSET_BITS 64 -_ACEOF - -fi - - EXTRACFLAGS="" if test "x${GCC}" = "xyes" diff --git a/configure.ac b/configure.ac index 718c9a28585..f306111f540 100644 --- a/configure.ac +++ b/configure.ac @@ -790,45 +790,6 @@ then AC_CHECK_LIB(capi20,capi20_register,[AC_DEFINE(HAVE_CAPI4LINUX,1,[Define if you have capi4linux libs and headers])]) fi -dnl **** Check for broken glibc mmap64 **** - -AC_CACHE_CHECK( [whether mmap64 works defined as mmap], ac_cv_mmap64_works, - AC_TRY_RUN([ - #define _FILE_OFFSET_BITS 64 - #include - #include - #include - #include - #include - - int main(int argc,char **argv) { - int fd = open("conftest.map",O_CREAT|O_RDWR,0600); - if (fd == -1) exit(1); - - unlink("conftest.map"); - - write(fd,"test",4); - - if ((-1 == mmap(0,4,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0)) && - (errno == EINVAL) - ) { - exit(1); - } - close(fd); - fprintf(stderr,"success!\n"); - exit(0); - } - - ], - ac_cv_mmap64_works="yes", - ac_cv_mmap64_works="no", - ac_cv_mmap64_works="no") ) - -if test "$ac_cv_mmap64_works" = "yes" -then - AC_DEFINE(_FILE_OFFSET_BITS, 64, [Set this to 64 to enable 64-bit file support on Linux]) -fi - dnl **** Check for gcc specific options **** AC_SUBST(EXTRACFLAGS,"") diff --git a/dlls/advapi32/crypt.c b/dlls/advapi32/crypt.c index 45d36ce0772..f8a97685768 100644 --- a/dlls/advapi32/crypt.c +++ b/dlls/advapi32/crypt.c @@ -25,6 +25,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/avicap32/avicap32_main.c b/dlls/avicap32/avicap32_main.c index f0dcef4b8a1..173dd4bcaaa 100644 --- a/dlls/avicap32/avicap32_main.c +++ b/dlls/avicap32/avicap32_main.c @@ -17,8 +17,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define COM_NO_WINDOWS_H #include "config.h" +#include "wine/port.h" + +#define COM_NO_WINDOWS_H + #include #include #include diff --git a/dlls/d3d8/surface.c b/dlls/d3d8/surface.c index aa36d5e76ce..0224dd8f40d 100644 --- a/dlls/d3d8/surface.c +++ b/dlls/d3d8/surface.c @@ -21,6 +21,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index 47a0faaaf33..36a30daf337 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -20,6 +20,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/ddraw/surface_dib.c b/dlls/ddraw/surface_dib.c index cfb0de627b7..d3c5f8bfa34 100644 --- a/dlls/ddraw/surface_dib.c +++ b/dlls/ddraw/surface_dib.c @@ -20,6 +20,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/ddraw/surface_main.c b/dlls/ddraw/surface_main.c index 39566c433ea..c20a08698f9 100644 --- a/dlls/ddraw/surface_main.c +++ b/dlls/ddraw/surface_main.c @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/ddraw/texture.c b/dlls/ddraw/texture.c index 90dbf3f80e2..dfe4e88f746 100644 --- a/dlls/ddraw/texture.c +++ b/dlls/ddraw/texture.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c index 085c53eddac..28103524e94 100644 --- a/dlls/iphlpapi/ipstats.c +++ b/dlls/iphlpapi/ipstats.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c index 423f9d46f3b..cb0fd1c987d 100644 --- a/dlls/ntdll/path.c +++ b/dlls/ntdll/path.c @@ -20,6 +20,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index 62cd3a21877..d06b383a313 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -23,6 +23,7 @@ */ #include "config.h" +#include "wine/port.h" #define NONAMELESSSTRUCT #define NONAMELESSUNION diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c index ae7ba1bbca3..54f93e0df19 100644 --- a/dlls/shell32/shfldr_unixfs.c +++ b/dlls/shell32/shfldr_unixfs.c @@ -19,6 +19,8 @@ */ #include "config.h" +#include "wine/port.h" + #include #include #include diff --git a/dlls/winaspi/aspi.c b/dlls/winaspi/aspi.c index 7c6c7052b52..91601458ba4 100644 --- a/dlls/winaspi/aspi.c +++ b/dlls/winaspi/aspi.c @@ -38,6 +38,7 @@ HKEY_DYN_DATA */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/winaspi/winaspi16.c b/dlls/winaspi/winaspi16.c index b96e38cef83..c0663e2895f 100644 --- a/dlls/winaspi/winaspi16.c +++ b/dlls/winaspi/winaspi16.c @@ -18,6 +18,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/winedos/ppdev.c b/dlls/winedos/ppdev.c index 259dbacf25e..3a25de9a21e 100644 --- a/dlls/winedos/ppdev.c +++ b/dlls/winedos/ppdev.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include "windef.h" diff --git a/dlls/wineps/ppd.c b/dlls/wineps/ppd.c index 84468994ad6..62da1b991ad 100644 --- a/dlls/wineps/ppd.c +++ b/dlls/wineps/ppd.c @@ -20,6 +20,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/wineps/type1afm.c b/dlls/wineps/type1afm.c index 33795c43a89..85325b8a7c5 100644 --- a/dlls/wineps/type1afm.c +++ b/dlls/wineps/type1afm.c @@ -26,6 +26,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/winmm/joystick/joystick.c b/dlls/winmm/joystick/joystick.c index 8a01fe42c6e..61e4fb099a2 100644 --- a/dlls/winmm/joystick/joystick.c +++ b/dlls/winmm/joystick/joystick.c @@ -36,6 +36,7 @@ */ #include "config.h" +#include "wine/port.h" #ifdef HAVE_UNISTD_H # include diff --git a/dlls/winmm/wineoss/midi.c b/dlls/winmm/wineoss/midi.c index 797ee45fc21..1fc0371324e 100644 --- a/dlls/winmm/wineoss/midi.c +++ b/dlls/winmm/wineoss/midi.c @@ -40,6 +40,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/winmm/wineoss/mixer.c b/dlls/winmm/wineoss/mixer.c index e72b28eb9f9..c697346c62e 100644 --- a/dlls/winmm/wineoss/mixer.c +++ b/dlls/winmm/wineoss/mixer.c @@ -26,6 +26,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/winmm/wineoss/mmaux.c b/dlls/winmm/wineoss/mmaux.c index 0fffa622362..8e92ec67613 100644 --- a/dlls/winmm/wineoss/mmaux.c +++ b/dlls/winmm/wineoss/mmaux.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/include/config.h.in b/include/config.h.in index ced8aa69b78..969bfb02383 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -977,9 +977,6 @@ `char[]'. */ #undef YYTEXT_POINTER -/* Set this to 64 to enable 64-bit file support on Linux */ -#undef _FILE_OFFSET_BITS - /* Define to a macro to generate an assembly function directive */ #undef __ASM_FUNC diff --git a/include/wine/port.h b/include/wine/port.h index 0d9c51a3493..38ea4150e47 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -25,6 +25,7 @@ # error You must include config.h to use this header #endif +#define _FILE_OFFSET_BITS 64 #define _GNU_SOURCE /* for pread/pwrite */ #include #include diff --git a/programs/winecfg/drivedetect.c b/programs/winecfg/drivedetect.c index 8982ad66dc8..7c3cf3d3f81 100644 --- a/programs/winecfg/drivedetect.c +++ b/programs/winecfg/drivedetect.c @@ -20,6 +20,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/server/fd.c b/server/fd.c index cd08432cd60..f6017ee5770 100644 --- a/server/fd.c +++ b/server/fd.c @@ -20,6 +20,7 @@ #include "config.h" +#include "wine/port.h" #include #include diff --git a/tools/fnt2bdf.c b/tools/fnt2bdf.c index e03f556d50c..3f0ab595e41 100644 --- a/tools/fnt2bdf.c +++ b/tools/fnt2bdf.c @@ -21,6 +21,7 @@ */ #include "config.h" +#include "wine/port.h" #ifdef HAVE_SYS_PARAM_H # include @@ -38,10 +39,6 @@ # include #endif -#ifndef O_BINARY -# define O_BINARY 0 -#endif - #include "fnt2bdf.h" #define FILE_ERROR 0 diff --git a/tools/fnt2fon.c b/tools/fnt2fon.c index 00cbbc84be0..77a1f31e84e 100644 --- a/tools/fnt2fon.c +++ b/tools/fnt2fon.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/tools/sfnt2fnt.c b/tools/sfnt2fnt.c index ecf3ae93c69..dcae9db898b 100644 --- a/tools/sfnt2fnt.c +++ b/tools/sfnt2fnt.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c index 69913a837ee..936e1e77943 100644 --- a/tools/widl/proxy.c +++ b/tools/widl/proxy.c @@ -20,6 +20,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/tools/widl/widl.c b/tools/widl/widl.c index fa856fa5303..9022179f48c 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -20,6 +20,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/tools/winedump/dump.c b/tools/winedump/dump.c index f2c1af3b16b..6b9dec8aab8 100644 --- a/tools/winedump/dump.c +++ b/tools/winedump/dump.c @@ -46,10 +46,6 @@ #include "winedump.h" #include "pe.h" -#ifndef O_BINARY -# define O_BINARY 0 -#endif - static void* dump_base; static unsigned long dump_total_len; diff --git a/tools/winedump/main.c b/tools/winedump/main.c index a24c31bac34..c5a0e6c7087 100644 --- a/tools/winedump/main.c +++ b/tools/winedump/main.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include "winedump.h" diff --git a/tools/wmc/wmc.c b/tools/wmc/wmc.c index 119860c3c32..3c8a77156a6 100644 --- a/tools/wmc/wmc.c +++ b/tools/wmc/wmc.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include @@ -279,4 +280,3 @@ static void segvhandler(int sig) fflush(stderr); abort(); } - diff --git a/tools/wmc/write.c b/tools/wmc/write.c index 50851f3753e..55f96e7358a 100644 --- a/tools/wmc/write.c +++ b/tools/wmc/write.c @@ -18,6 +18,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" +#include "wine/port.h" + #include #include #include diff --git a/tools/wrc/parser.y b/tools/wrc/parser.y index e31869c8937..1289db8c5ed 100644 --- a/tools/wrc/parser.y +++ b/tools/wrc/parser.y @@ -121,6 +121,7 @@ * - Added extra comment about grammar */ #include "config.h" +#include "wine/port.h" #include #include