Support for MSVC compiler: Ensure ssize_t gets defined.
authorBruno Haible <bruno@clisp.org>
Thu, 15 Sep 2011 16:00:32 +0000 (18:00 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 15 Sep 2011 16:00:32 +0000 (18:00 +0200)
* doc/posix-headers/sys_types.texi: Mention the missing ssize_t problem.
* doc/posix-headers/stdio.texi: Likewise.
* modules/stdio (Depends-on): Add ssize_t.
* modules/sys_socket (Depends-on): Likewise.
* modules/sys_types (Depends-on): Likewise.
* modules/sys_uio (Depends-on): Likewise.
* modules/unistd (Depends-on): Likewise.
* tests/test-sys_socket.c: Check that size_t and ssize_t are defined.
* tests/test-sys_types.c: Check that ssize_t is defined.

ChangeLog
doc/posix-headers/stdio.texi
doc/posix-headers/sys_types.texi
modules/stdio
modules/sys_socket
modules/sys_types
modules/sys_uio
modules/unistd
tests/test-sys_socket.c
tests/test-sys_types.c

index c5cb4f48f34003bc8d8034cee8b66a7f2c74b028..3717d06a5afa286d7c660bf93addaa9b87aa47a5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2011-09-15  Bruno Haible  <bruno@clisp.org>
+
+       Support for MSVC compiler: Ensure ssize_t gets defined.
+       * doc/posix-headers/sys_types.texi: Mention the missing ssize_t problem.
+       * doc/posix-headers/stdio.texi: Likewise.
+       * modules/stdio (Depends-on): Add ssize_t.
+       * modules/sys_socket (Depends-on): Likewise.
+       * modules/sys_types (Depends-on): Likewise.
+       * modules/sys_uio (Depends-on): Likewise.
+       * modules/unistd (Depends-on): Likewise.
+       * tests/test-sys_socket.c: Check that size_t and ssize_t are defined.
+       * tests/test-sys_types.c: Check that ssize_t is defined.
+
 2011-09-14  Bruno Haible  <bruno@clisp.org>
 
        Avoid using #, the m4 comment starter character, near brackets.
index e4157a79243ea00daa540860392d0dce9bd78128..892290f86f5b64b56431bd79cb0953b83ce30228 100644 (file)
@@ -12,7 +12,7 @@ The type @code{off_t} is missing on some platforms:
 glibc 2.8, eglibc 2.11.2 and others.
 @item
 The type @code{ssize_t} is missing on some platforms:
-glibc 2.8, MacOS X 10.5, Solaris 10, and others.
+glibc 2.8, MacOS X 10.5, Solaris 10, MSVC 9, and others.
 @item
 The type @code{va_list} is missing on some platforms:
 glibc 2.8, OpenBSD 4.0, Solaris 11 2010-11, and others.
index a7d6cbccd469048d13ab8d33846c45f0ed3f6dd0..f124171d855c065e7e9d76bad296113665e75eb1 100644 (file)
@@ -13,6 +13,9 @@ MSVC 9.
 @item
 The type @code{size_t} is not defined in this file on some platforms:
 MSVC 9.
+@item
+The type @code{ssize_t} is not defined on some platforms:
+MSVC 9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index f8880df3f7c28ffcdce4bdbedfe17892be950a16..5fae1b95cfff7348ddc7214e59b94b1bb2b8957f 100644 (file)
@@ -10,6 +10,7 @@ include_next
 snippet/arg-nonnull
 snippet/c++defs
 snippet/warn-on-use
+ssize_t
 stddef
 
 configure.ac:
index df0844bf99d940d6b6689a113fa6141c769ee79f..82c6909ac9c4391a6d1746f5ee991eea6f0c2a55 100644 (file)
@@ -14,6 +14,7 @@ snippet/arg-nonnull
 snippet/c++defs
 snippet/warn-on-use
 socklen
+ssize_t
 sys_uio
 
 configure.ac:
index 2798676ffc02c3b5bd8a2e9d29985f1d61cd0707..810f640cd4ed90542e570221c13ae6bbcbff79e7 100644 (file)
@@ -7,6 +7,7 @@ m4/sys_types_h.m4
 
 Depends-on:
 include_next
+ssize_t
 
 configure.ac:
 gl_SYS_TYPES_H
index 337ad8f629f688e71e2f37b93c5d884324d40b67..45b15eee6c0c750a062098a614717954da15d3be 100644 (file)
@@ -7,6 +7,7 @@ m4/sys_uio_h.m4
 
 Depends-on:
 include_next
+ssize_t
 sys_types
 
 configure.ac:
index 6c8ea1e4066b07501590f477bb63625754640492..d6642a7f0a91ef2fc937c6b0e796337910dfda02 100644 (file)
@@ -10,6 +10,7 @@ include_next
 snippet/arg-nonnull
 snippet/c++defs
 snippet/warn-on-use
+ssize_t
 stddef
 
 configure.ac:
index a6e99d6008ab39b24500a61053ba21243e5e9ba0..766bd17b9bf257239d1c733eac42a71aaa343a54 100644 (file)
@@ -30,6 +30,10 @@ int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
 /* Check that the 'socklen_t' type is defined.  */
 socklen_t t1;
 
+/* Check that the 'size_t' and 'ssize_t' types are defined.  */
+size_t t1;
+ssize_t t2;
+
 /* Check that 'struct iovec' is defined.  */
 struct iovec io;
 
index fcd5acf75e32e8cd6174921964d07fcc2258c87e..bfd9aa548f5cca595781d4e0e227be96c93fe75c 100644 (file)
@@ -23,6 +23,7 @@
 /* Check that the types are all defined.  */
 pid_t t1;
 size_t t2;
+ssize_t t3;
 
 int
 main (void)