Commit 0f6cfbc7 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Added check for broken mmap64.

parent 7c3dec92
......@@ -514,6 +514,45 @@ fi
dnl **** If ln -s doesn't work, use cp instead ****
if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; 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 <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <errno.h>
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 strength-reduce bug ****
if test "x${GCC}" = "xyes"
......
......@@ -3,10 +3,6 @@
* defined in the 'configure' script.
*/
/* This is for glibc on Linux, it will turn on 64 bit file support at compile time */
#define _FILE_OFFSET_BITS 64
@TOP@
/* Define if .type asm directive must be inside a .def directive */
#undef NEED_TYPE_IN_DEF
......
/* include/config.h.in. Generated automatically from configure.in by autoheader. */
/*
* This file is used by 'autoheader' to generate the list of symbols
* defined in the 'configure' script.
*/
/* This is for glibc on Linux, it will turn on 64 bit file support at compile time */
#define _FILE_OFFSET_BITS 64
/* Define if using alloca.c. */
#undef C_ALLOCA
......@@ -532,3 +525,7 @@
/* Define if you have the xpg4 library (-lxpg4). */
#undef HAVE_LIBXPG4
/* Set this to 64 to enable 64-bit file support on Linux */
#undef _FILE_OFFSET_BITS
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment