summaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-04-28 16:46:16 -0600
committerEric Blake <eblake@redhat.com>2011-04-28 17:35:16 -0600
commit74175b903b1716c1677658e45fa69ef1fbc99015 (patch)
treeea876262a1dc6e99eacad03069070d6f7a064b93 /ChangeLog
parent7aa5e8dd3a8431c2354197961b3f2cd76864091f (diff)
downloadgnulib-74175b903b1716c1677658e45fa69ef1fbc99015.tar.gz
getaddrinfo: fix gai_strerror signature
Several platforms declare gai_strerror to return char* rather than const char*. Worse, on mingw, if UNICODE is defined, it is defined to return WCHAR*, which means the result is in unicode but an application expecting bytes for characters will only see a one-byte answer. * m4/getaddrinfo.m4 (gl_GETADDRINFO): Detect broken signatures, and work around mingw with UNICODE defined. (gl_PREREQ_GETADDRINFO): Drop redundant decl check. * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Add witness. * modules/netdb (Makefile.am): Substitute it. * lib/netdb.in.h (gai_strerror): Declare replacement. * lib/gai_strerror.c (rpl_gai_strerror): Fix signature. * doc/posix-functions/gai_strerror.texi (gai_strerror): Document the fix. Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog11
1 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6b755c1470..9e5aa41558 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2011-04-28 Eric Blake <eblake@redhat.com>
+ getaddrinfo: fix gai_strerror signature
+ * m4/getaddrinfo.m4 (gl_GETADDRINFO): Detect broken signatures,
+ and work around mingw with UNICODE defined.
+ (gl_PREREQ_GETADDRINFO): Drop redundant decl check.
+ * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Add witness.
+ * modules/netdb (Makefile.am): Substitute it.
+ * lib/netdb.in.h (gai_strerror): Declare replacement.
+ * lib/gai_strerror.c (rpl_gai_strerror): Fix signature.
+ * doc/posix-functions/gai_strerror.texi (gai_strerror): Document
+ the fix.
+
getsockopt: avoid compiler warning
* lib/getsockopt.c (rpl_getsockopt): Add a cast for mingw.
Reported by Matthias Bolte.