diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-10-07 21:33:27 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-10-07 21:33:27 +0000 |
commit | f204012bd1deb5d19fbabbc145358a1d111b9497 (patch) | |
tree | fcb2b1d5f19a6fca7051b2402211871c2ab8290d /autoconf | |
parent | 0c9efc2b1dea248599b4092c8b8260362149775f (diff) | |
download | external_llvm-f204012bd1deb5d19fbabbc145358a1d111b9497.zip external_llvm-f204012bd1deb5d19fbabbc145358a1d111b9497.tar.gz external_llvm-f204012bd1deb5d19fbabbc145358a1d111b9497.tar.bz2 |
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 :-(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/aclocal.m4 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/autoconf/aclocal.m4 b/autoconf/aclocal.m4 index c708300..8f64b5b 100644 --- a/autoconf/aclocal.m4 +++ b/autoconf/aclocal.m4 @@ -6111,21 +6111,21 @@ ac_cv_func_mmap_file, [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 ]) |