about summary refs log tree commit diff
diff options
context:
space:
mode:
-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 92a34c0406..134fe9b49d 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-29  Ulrich Drepper  <drepper@gmail.com>
 
 	* grp/initgroups.c (internal_getgrouplist): Prefer initgroups setting
diff --git a/conform/data/netdb.h-data b/conform/data/netdb.h-data
index 254ea65027..95afed81f6 100644
--- a/conform/data/netdb.h-data
+++ b/conform/data/netdb.h-data
@@ -89,7 +89,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 db6b5c7eee..6fb6ad6e1d 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 e60dc4405b..6b76a25d3f 100644
--- a/resolv/netdb.h
+++ b/resolv/netdb.h
@@ -1,4 +1,4 @@
-  /* Copyright (C) 1996-2004, 2009, 2010 Free Software Foundation, Inc.
+  /* Copyright (C) 1996-2004, 2009, 2010, 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
@@ -679,7 +679,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