[PATCH] Remove unnecessary #defines from getaddrinfo
Ricard Wanderlof
ricard.wanderlof at axis.com
Thu Feb 21 14:37:53 UTC 2008
The following definitions in getaddrinfo.c seem redundant as they _are_
defined in the public netdb.h header, contrary to the comment. AI_DEFAULT
is not, however it is not used in the file either so can be safely
removed.
Seems a no-brainer to me to remove them, unless anyone has any objections.
/Ricard
Index: libc/inet/getaddrinfo.c
===================================================================
--- libc/inet/getaddrinfo.c (revision 21085)
+++ libc/inet/getaddrinfo.c (working copy)
@@ -90,15 +90,6 @@
libc_hidden_proto(in6addr_loopback)
#endif
-/* The following declarations and definitions have been removed from
- * the public header since we don't want people to use them. */
-#define AI_V4MAPPED 0x0008 /* IPv4-mapped addresses are acceptable. */
-#define AI_ALL 0x0010 /* Return both IPv4 and IPv6 addresses. */
-#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose
- returned address type. */
-#define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG)
-
-
#define GAIH_OKIFUNSPEC 0x0100
#define GAIH_EAI ~(GAIH_OKIFUNSPEC)
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
-------------- next part --------------
Index: libc/inet/getaddrinfo.c
===================================================================
--- libc/inet/getaddrinfo.c (revision 21085)
+++ libc/inet/getaddrinfo.c (working copy)
@@ -90,15 +90,6 @@
libc_hidden_proto(in6addr_loopback)
#endif
-/* The following declarations and definitions have been removed from
- * the public header since we don't want people to use them. */
-#define AI_V4MAPPED 0x0008 /* IPv4-mapped addresses are acceptable. */
-#define AI_ALL 0x0010 /* Return both IPv4 and IPv6 addresses. */
-#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose
- returned address type. */
-#define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG)
-
-
#define GAIH_OKIFUNSPEC 0x0100
#define GAIH_EAI ~(GAIH_OKIFUNSPEC)
More information about the uClibc
mailing list