Mercurial > hg > octave-nkf > gnulib-hg
changeset 15627:4afad5701552
Support for MSVC compiler: Ensure off_t gets defined.
* lib/unistd.in.h: Include <sys/types.h>.
* tests/test-fcntl-h.c: Check that off_t is defined.
* tests/test-sys_stat.c: Likewise.
* tests/test-sys_types.c: Likewise.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Fri, 16 Sep 2011 22:55:49 +0200 |
parents | a508d7847f6d |
children | e575fc472c1a |
files | ChangeLog lib/unistd.in.h tests/test-fcntl-h.c tests/test-sys_stat.c tests/test-sys_types.c |
diffstat | 5 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-09-16 Bruno Haible <bruno@clisp.org> + + Support for MSVC compiler: Ensure off_t gets defined. + * lib/unistd.in.h: Include <sys/types.h>. + * tests/test-fcntl-h.c: Check that off_t is defined. + * tests/test-sys_stat.c: Likewise. + * tests/test-sys_types.c: Likewise. + 2011-09-16 Eric Blake <eblake@redhat.com> fdatasync: port to Solaris
--- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -98,6 +98,12 @@ # include <netdb.h> #endif +/* MSVC defines off_t in <sys/types.h>. */ +#if !@HAVE_UNISTD_H@ +/* Get off_t. */ +# include <sys/types.h> +#endif + #if (@GNULIB_READ@ || @GNULIB_WRITE@ \ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK)
--- a/tests/test-fcntl-h.c +++ b/tests/test-fcntl-h.c @@ -33,6 +33,7 @@ /* Check that the types are all defined. */ pid_t t1; +off_t t2; int main (void)