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 c5cb4f4..3717d06 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 e4157a7..892290f 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 a7d6cbc..f124171 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 f8880df..5fae1b9 100644 (file)
@@ -10,6 +10,7 @@ include_next
 snippet/arg-nonnull
 snippet/c++defs
 snippet/warn-on-use
+ssize_t
 stddef
 
 configure.ac:
index df0844b..82c6909 100644 (file)
@@ -14,6 +14,7 @@ snippet/arg-nonnull
 snippet/c++defs
 snippet/warn-on-use
 socklen
+ssize_t
 sys_uio
 
 configure.ac:
index 2798676..810f640 100644 (file)
@@ -7,6 +7,7 @@ m4/sys_types_h.m4
 
 Depends-on:
 include_next
+ssize_t
 
 configure.ac:
 gl_SYS_TYPES_H
index 337ad8f..45b15ee 100644 (file)
@@ -7,6 +7,7 @@ m4/sys_uio_h.m4
 
 Depends-on:
 include_next
+ssize_t
 sys_types
 
 configure.ac:
index 6c8ea1e..d6642a7 100644 (file)
@@ -10,6 +10,7 @@ include_next
 snippet/arg-nonnull
 snippet/c++defs
 snippet/warn-on-use
+ssize_t
 stddef
 
 configure.ac:
index a6e99d6..766bd17 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 fcd5acf..bfd9aa5 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)