mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-14 02:33:53 +00:00
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
This commit is contained in:
parent
0c9efc2b1d
commit
f204012bd1
10
autoconf/aclocal.m4
vendored
10
autoconf/aclocal.m4
vendored
@ -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
|
||||
])
|
||||
|
Loading…
x
Reference in New Issue
Block a user