[llvm-commits] CVS: llvm/autoconf/aclocal.m4
Brian Gaeke
gaeke at cs.uiuc.edu
Tue Oct 7 16:34:00 PDT 2003
Changes in directory llvm/autoconf:
aclocal.m4 updated: 1.4 -> 1.5
---
Log message:
Fix bugs in mmap()-of-files test program on Mac OS X:
1) MAP_FAILED is declared to be a pointer
2) can't include sys/mman.h before sys/types.h without getting an error :-(
---
Diffs of the changes: (+5 -5)
Index: llvm/autoconf/aclocal.m4
diff -u llvm/autoconf/aclocal.m4:1.4 llvm/autoconf/aclocal.m4:1.5
--- llvm/autoconf/aclocal.m4:1.4 Sat Sep 6 09:46:19 2003
+++ llvm/autoconf/aclocal.m4 Tue Oct 7 16:33:27 2003
@@ -6111,21 +6111,21 @@
[AC_LANG_SAVE
AC_LANG_C
AC_TRY_RUN([
-#ifdef HAVE_SYS_MMAN_H
-#include <sys/mman.h>
-#endif
-
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif
+
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
int fd;
int main () {
- fd = creat ("foo",0777); fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0); unlink ("foo"); return (fd != MAP_FAILED);}],
+ fd = creat ("foo",0777); fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0); unlink ("foo"); return (fd != (int) MAP_FAILED);}],
ac_cv_func_mmap_file=yes, ac_cv_func_mmap_file=no)
AC_LANG_RESTORE
])
More information about the llvm-commits
mailing list