]> Savannah Git Hosting - gnulib.git/commitdiff
Support for MSVC compiler: Ensure mode_t gets defined.
authorBruno Haible <bruno@clisp.org>
Fri, 16 Sep 2011 21:43:21 +0000 (23:43 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 16 Sep 2011 21:43:21 +0000 (23:43 +0200)
* m4/fcntl_h.m4 (gl_FCNTL_H): Require AC_TYPE_MODE_T.
* m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
* m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
* m4/sys_types_h.m4 (gl_SYS_TYPES_H): Likewise.
* tests/test-fcntl-h.c: Check that mode_t is defined.
* tests/test-sys_stat.c: Likewise.
* tests/test-sys_types.c: Likewise.
* doc/posix-headers/fcntl.texi: Mention the missing mode_t problem.
* doc/posix-headers/sys_stat.texi: Likewise.
* doc/posix-headers/sys_types.texi: Likewise.

ChangeLog
doc/posix-headers/fcntl.texi
doc/posix-headers/sys_stat.texi
doc/posix-headers/sys_types.texi
m4/fcntl_h.m4
m4/spawn_h.m4
m4/sys_stat_h.m4
m4/sys_types_h.m4
tests/test-fcntl-h.c
tests/test-sys_stat.c
tests/test-sys_types.c

index 7f56e2235b2fb50fa54342d8aee8c65ed33c9446..9a6d45895f93cc27f0661d55b8997045bff6587e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2011-09-15  Bruno Haible  <bruno@clisp.org>
+
+       Support for MSVC compiler: Ensure mode_t gets defined.
+       * m4/fcntl_h.m4 (gl_FCNTL_H): Require AC_TYPE_MODE_T.
+       * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
+       * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
+       * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Likewise.
+       * tests/test-fcntl-h.c: Check that mode_t is defined.
+       * tests/test-sys_stat.c: Likewise.
+       * tests/test-sys_types.c: Likewise.
+       * doc/posix-headers/fcntl.texi: Mention the missing mode_t problem.
+       * doc/posix-headers/sys_stat.texi: Likewise.
+       * doc/posix-headers/sys_types.texi: Likewise.
+
 2011-09-16  Bruno Haible  <bruno@clisp.org>
 
        sys_stat: Support for MSVC.
index 598bf69435b05516b641f11d3455e94678c5211b..332fe5ae2b4786731fd4e31ec0a0cf7218a1d4d2 100644 (file)
@@ -11,6 +11,10 @@ Portability problems fixed by Gnulib:
 The type @code{pid_t} is not defined on some platforms:
 MSVC 9.
 
+@item
+The type @code{mode_t} is not defined on some platforms:
+MSVC 9.
+
 @item
 @samp{O_CLOEXEC}, @samp{O_DIRECTORY}, @samp{O_DSYNC}, @samp{O_NOCTTY},
 @samp{O_NOFOLLOW}, @samp{O_RSYNC}, @samp{O_SYNC},
index 86fd2deef7f0519e069a7b2562ed07f12a55405b..47b29f7930e1f0e4780e63a9d4e4f2c4261b9d8a 100644 (file)
@@ -8,6 +8,9 @@ Gnulib module: sys_stat
 Portability problems fixed by Gnulib:
 @itemize
 @item
+The type @code{mode_t} is not defined on some platforms:
+MSVC 9.
+@item
 Some macros, such as @code{S_IFMT} or @code{S_IFIFO}, are missing on some
 platforms.
 @item
index f124171d855c065e7e9d76bad296113665e75eb1..35d24c0c743cd7ab4093b1a1da8622a3dd2a0c04 100644 (file)
@@ -16,6 +16,9 @@ MSVC 9.
 @item
 The type @code{ssize_t} is not defined on some platforms:
 MSVC 9.
+@item
+The type @code{mode_t} is not defined on some platforms:
+MSVC 9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index 346315c0b4243540b0dbc34239747f72c0389690..03a41e6709cc17e5c1b4753de86d9ceaeb1e3af5 100644 (file)
@@ -1,4 +1,4 @@
-# serial 14
+# serial 15
 # Configure fcntl.h.
 dnl Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
@@ -16,6 +16,9 @@ AC_DEFUN([gl_FCNTL_H],
   dnl Ensure the type pid_t gets defined.
   AC_REQUIRE([AC_TYPE_PID_T])
 
+  dnl Ensure the type mode_t gets defined.
+  AC_REQUIRE([AC_TYPE_MODE_T])
+
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use, if it is not common
   dnl enough to be declared everywhere.
index 33d30e6e9020ef889508531c6c0469d4f0873958..5f0df9a624b3b0ac62538f04756b47fe0a85fd69 100644 (file)
@@ -1,4 +1,4 @@
-# spawn_h.m4 serial 14
+# spawn_h.m4 serial 15
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -34,6 +34,9 @@ AC_DEFUN([gl_SPAWN_H],
   dnl Ensure the type pid_t gets defined.
   AC_REQUIRE([AC_TYPE_PID_T])
 
+  dnl Ensure the type mode_t gets defined.
+  AC_REQUIRE([AC_TYPE_MODE_T])
+
   AC_REQUIRE([gl_HAVE_POSIX_SPAWN])
 
   AC_REQUIRE([AC_C_RESTRICT])
index fc419129e985a77db4cdbd64ed0db1dec3a4bccd..a3e46ca9654ce8aa72d3767a3cc7c0b94acd377e 100644 (file)
@@ -1,4 +1,4 @@
-# sys_stat_h.m4 serial 24   -*- Autoconf -*-
+# sys_stat_h.m4 serial 25   -*- Autoconf -*-
 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -19,6 +19,9 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
 
   gl_CHECK_NEXT_HEADERS([sys/stat.h])
 
+  dnl Ensure the type mode_t gets defined.
+  AC_REQUIRE([AC_TYPE_MODE_T])
+
   dnl Define types that are supposed to be defined in <sys/types.h> or
   dnl <sys/stat.h>.
   AC_CHECK_TYPE([nlink_t], [],
index 89dda82a287f2c157729c8fc3d27883bd9dc4fcb..62113df4929dcdfb223d756d7ef719d3b5dcab16 100644 (file)
@@ -1,4 +1,4 @@
-# sys_types_h.m4 serial 1
+# sys_types_h.m4 serial 2
 dnl Copyright (C) 2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,9 @@ AC_DEFUN([gl_SYS_TYPES_H],
 
   dnl Ensure the type pid_t gets defined.
   AC_REQUIRE([AC_TYPE_PID_T])
+
+  dnl Ensure the type mode_t gets defined.
+  AC_REQUIRE([AC_TYPE_MODE_T])
 ])
 
 AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
index f3520d148ee1ec9634000f657055c55df92fe4c5..7f350b46f1e8a25f9107c6fdc71a79f10a0ed5d4 100644 (file)
@@ -34,6 +34,7 @@ int i = FD_CLOEXEC;
 /* Check that the types are all defined.  */
 pid_t t1;
 off_t t2;
+mode_t t3;
 
 int
 main (void)
index 6e8178e9b12872a73d3fb82292deb9a93b91e927..3303badccef90cd63e8c4e673ef475353206bfc7 100644 (file)
@@ -314,8 +314,9 @@ invalid UTIME macros
 /* Check the existence of some types.  */
 nlink_t t1;
 off_t t2;
+mode_t t3;
 
-struct timespec t3;
+struct timespec st;
 
 int
 main (void)
index b95706f1db20cca06dd7ef2faf8da4e577905760..816c9d616248b9140e311a68dbe557737a693900 100644 (file)
@@ -25,6 +25,7 @@ pid_t t1;
 size_t t2;
 ssize_t t3;
 off_t t4;
+mode_t t5;
 
 int
 main (void)