aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-05-02 02:36:43 +0100
committerPetr Baudis <pasky@ucw.cz>2011-05-27 00:39:36 +0200
commit7b1d92c6439bfeea8b72631a1f3849109a38c909 (patch)
treeb6b2b4de8e48eacfbac7e24ae9edf394d288c640
parent1b31d30e82cf802fa6e31ffa216264b035d339d1 (diff)
downloadglibc-7b1d92c6439bfeea8b72631a1f3849109a38c909.zip
glibc-7b1d92c6439bfeea8b72631a1f3849109a38c909.tar.gz
glibc-7b1d92c6439bfeea8b72631a1f3849109a38c909.tar.bz2
Fix getnameinfo flags parameter type.
(cherry picked from commit e4ecafe004b3d4270b3a9dace8f970047400ed38)
-rw-r--r--ChangeLog8
-rw-r--r--conform/data/netdb.h-data2
-rw-r--r--inet/getnameinfo.c4
-rw-r--r--resolv/netdb.h4
4 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index ff00f2e..853f82d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-04-30 Bruno Haible <bruno@clisp.org>
+
+ [BZ #12717]
+ * conform/data/netdb.h-data (getnameinfo): Make POSIX compliant.
+ * resolv/netdb.h (getnameinfo): Change type of flags parameter
+ to 'int'.
+ * inet/getnameinfo.c (getnameinfo): Likewise.
+
2011-04-22 Ulrich Drepper <drepper@gmail.com>
[BZ #12685]
diff --git a/conform/data/netdb.h-data b/conform/data/netdb.h-data
index 483a3fc..0e22d7e 100644
--- a/conform/data/netdb.h-data
+++ b/conform/data/netdb.h-data
@@ -87,7 +87,7 @@ function int getaddrinfo (const char*, const char*, const struct addrinfo*, stru
function {struct hostent*} gethostbyaddr (const void*, socklen_t, int)
function {struct hostent*} gethostbyname (const char*)
function {struct hostent*} gethostent (void)
-function int getnameinfo (const struct sockaddr*, socklen_t, char*, socklen_t, char*, socklen_t, unsigned)
+function int getnameinfo (const struct sockaddr*, socklen_t, char*, socklen_t, char*, socklen_t, int)
function {struct netent*} getnetbyaddr (uint32_t, int)
function {struct netent*} getnetbyname (const char*)
function {struct netent*} getnetent (void)
diff --git a/inet/getnameinfo.c b/inet/getnameinfo.c
index db6b5c7..6fb6ad6 100644
--- a/inet/getnameinfo.c
+++ b/inet/getnameinfo.c
@@ -159,7 +159,7 @@ nrl_domainname (void)
int
getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host,
socklen_t hostlen, char *serv, socklen_t servlen,
- unsigned int flags)
+ int flags)
{
int serrno = errno;
int tmpbuflen = 1024;
@@ -385,7 +385,7 @@ getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host,
break;
default:
- return EAI_FAMILY;
+ return EAI_FAMILY;
}
if (serv && (servlen > 0))
diff --git a/resolv/netdb.h b/resolv/netdb.h
index 06e9a9a..bc8b6f4 100644
--- a/resolv/netdb.h
+++ b/resolv/netdb.h
@@ -1,4 +1,4 @@
- /* Copyright (C) 1996-2002, 2003, 2004, 2009 Free Software Foundation, Inc.
+ /* Copyright (C) 1996-2004, 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -677,7 +677,7 @@ extern __const char *gai_strerror (int __ecode) __THROW;
extern int getnameinfo (__const struct sockaddr *__restrict __sa,
socklen_t __salen, char *__restrict __host,
socklen_t __hostlen, char *__restrict __serv,
- socklen_t __servlen, unsigned int __flags);
+ socklen_t __servlen, int __flags);
#endif /* POSIX */
#ifdef __USE_GNU