PATCH: set_thread_buffer 3rd try
Marcus Meissner
marcus at jet.franken.de
Wed Jun 6 01:58:05 CDT 2001
Index: configure.in
===================================================================
RCS file: /home/wine/wine/configure.in,v
retrieving revision 1.204
diff -u -r1.204 configure.in
--- configure.in 2001/05/31 21:35:15 1.204
+++ configure.in 2001/06/06 07:46:11
@@ -493,6 +493,42 @@
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
+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" = "no"
+ then
+ AC_DEFINE(HAVE_BROKEN_MMAP64)
+ fi
+
dnl **** Check for gcc strength-reduce bug ****
if test "x${GCC}" = "xyes"
Index: include/acconfig.h
===================================================================
RCS file: /home/wine/wine/include/acconfig.h,v
retrieving revision 1.40
diff -u -r1.40 acconfig.h
--- include/acconfig.h 2001/05/29 20:55:22 1.40
+++ include/acconfig.h 2001/06/06 07:46:11
@@ -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
- at TOP@
-
/* Define if .type asm directive must be inside a .def directive */
#undef NEED_TYPE_IN_DEF
@@ -129,3 +125,17 @@
/* Define if FreeType 2 is installed */
#undef HAVE_FREETYPE
+
+/* Define if the glibc mmap64 redefine works */
+#undef HAVE_BROKEN_MMAP64
+
+ at BOTTOM@
+
+/* This is for glibc on Linux, it will turn on 64 bit file support at
+ * compile time
+ *
+ * If we do not have a broken mmap64 prototype...
+ */
+#ifndef HAVE_BROKEN_MMAP64
+# define _FILE_OFFSET_BITS 64
+#endif
More information about the wine-patches
mailing list