summaryrefslogtreecommitdiff
path: root/m4/fcntl_h.m4
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-12-15 20:14:02 +0100
committerLudovic Courtès <ludo@gnu.org>2009-12-15 20:14:19 +0100
commit1cd4fffcde4edd4853e039da9a42e0972d851a51 (patch)
tree82c1f750fd5acf88414b85a421c7b7212d9efcfc /m4/fcntl_h.m4
parent20ccae8dbb8d92a6a32e0275c517f70961c6b833 (diff)
downloadguile-1cd4fffcde4edd4853e039da9a42e0972d851a51.tar.gz
Use Gnulib's `sys_stat' module; update Gnulib.
* .x-sc_prohibit_S_IS_definition: New file. * m4/gnulib-cache.m4: Add `sys_stat'. * libguile/filesys.c: Remove `S_IS*' macro definitions for Ultrix and MinGW.
Diffstat (limited to 'm4/fcntl_h.m4')
-rw-r--r--m4/fcntl_h.m490
1 files changed, 45 insertions, 45 deletions
diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4
index 223fa4830..40a18034d 100644
--- a/m4/fcntl_h.m4
+++ b/m4/fcntl_h.m4
@@ -26,53 +26,53 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
- [[#include <sys/types.h>
- #include <sys/stat.h>
- #include <unistd.h>
- #include <fcntl.h>
- #ifndef O_NOATIME
- #define O_NOATIME 0
- #endif
- #ifndef O_NOFOLLOW
- #define O_NOFOLLOW 0
- #endif
- static int const constants[] =
- {
- O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
- O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
- };
- ]],
- [[
- int status = !constants;
- {
- static char const sym[] = "conftest.sym";
- if (symlink (".", sym) != 0
- || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
- status |= 32;
- unlink (sym);
- }
- {
- static char const file[] = "confdefs.h";
- int fd = open (file, O_RDONLY | O_NOATIME);
- char c;
- struct stat st0, st1;
- if (fd < 0
- || fstat (fd, &st0) != 0
- || sleep (1) != 0
- || read (fd, &c, 1) != 1
- || close (fd) != 0
- || stat (file, &st1) != 0
- || st0.st_atime != st1.st_atime)
- status |= 64;
- }
- return status;]])],
+ [[#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #ifndef O_NOATIME
+ #define O_NOATIME 0
+ #endif
+ #ifndef O_NOFOLLOW
+ #define O_NOFOLLOW 0
+ #endif
+ static int const constants[] =
+ {
+ O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+ O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+ };
+ ]],
+ [[
+ int status = !constants;
+ {
+ static char const sym[] = "conftest.sym";
+ if (symlink (".", sym) != 0
+ || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
+ status |= 32;
+ unlink (sym);
+ }
+ {
+ static char const file[] = "confdefs.h";
+ int fd = open (file, O_RDONLY | O_NOATIME);
+ char c;
+ struct stat st0, st1;
+ if (fd < 0
+ || fstat (fd, &st0) != 0
+ || sleep (1) != 0
+ || read (fd, &c, 1) != 1
+ || close (fd) != 0
+ || stat (file, &st1) != 0
+ || st0.st_atime != st1.st_atime)
+ status |= 64;
+ }
+ return status;]])],
[gl_cv_header_working_fcntl_h=yes],
[case $? in #(
- 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
- 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
- 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
- *) gl_cv_header_working_fcntl_h='no';;
- esac],
+ 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+ 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+ 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+ *) gl_cv_header_working_fcntl_h='no';;
+ esac],
[gl_cv_header_working_fcntl_h=cross-compiling])])
case $gl_cv_header_working_fcntl_h in #(