Commit 49b7fdcf authored by Alexandre Julliard's avatar Alexandre Julliard

Removed the broken mmap64 configure check, and moved the

_FILE_OFFSET_BITS define to wine/port.h. Made sure that all files that need the define include it.
parent 6b91f5b3
......@@ -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 <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);
}
_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"
......
......@@ -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 <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 specific options ****
AC_SUBST(EXTRACFLAGS,"")
......
......@@ -25,6 +25,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <time.h>
#include <stdlib.h>
......
......@@ -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 <stdarg.h>
#include <stdio.h>
#include <fcntl.h>
......
......@@ -21,6 +21,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
......
......@@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <stdio.h>
......
......@@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <stdlib.h>
......
......@@ -19,6 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <string.h>
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
......
......@@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <sys/types.h>
......
......@@ -23,6 +23,7 @@
*/
#include "config.h"
#include "wine/port.h"
#define NONAMELESSSTRUCT
#define NONAMELESSUNION
......
......@@ -19,6 +19,8 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdarg.h>
#include <limits.h>
......
......@@ -38,6 +38,7 @@ HKEY_DYN_DATA
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdarg.h>
......
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <sys/types.h>
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include "windef.h"
......
......@@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <string.h>
#include <stdarg.h>
......
......@@ -26,6 +26,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <string.h>
#include <stdlib.h>
......
......@@ -36,6 +36,7 @@
*/
#include "config.h"
#include "wine/port.h"
#ifdef HAVE_UNISTD_H
# include <unistd.h>
......
......@@ -40,6 +40,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <string.h>
#include <stdarg.h>
......
......@@ -26,6 +26,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <stdarg.h>
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdlib.h>
......
......@@ -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
......
......@@ -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 <fcntl.h>
#include <math.h>
......
......@@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <wine/debug.h>
#include <wine/library.h>
......
......@@ -20,6 +20,7 @@
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <errno.h>
......
......@@ -21,6 +21,7 @@
*/
#include "config.h"
#include "wine/port.h"
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
......@@ -38,10 +39,6 @@
# include <io.h>
#endif
#ifndef O_BINARY
# define O_BINARY 0
#endif
#include "fnt2bdf.h"
#define FILE_ERROR 0
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdlib.h>
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <ctype.h>
......
......@@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdlib.h>
......
......@@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdlib.h>
......
......@@ -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;
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include "winedump.h"
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdlib.h>
......@@ -279,4 +280,3 @@ static void segvhandler(int sig)
fflush(stderr);
abort();
}
......@@ -18,6 +18,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -121,6 +121,7 @@
* - Added extra comment about grammar
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdlib.h>
......
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