svn commit: trunk/uClibc: include/arpa libc/inet

vda at uclibc.org vda at uclibc.org
Fri Apr 25 07:43:19 UTC 2008


Author: vda
Date: 2008-04-25 00:43:18 -0700 (Fri, 25 Apr 2008)
New Revision: 21854

Log:
reinstate external visibility of inet_ntoa_r,
and add it to arpa/inet.h header.



Modified:
   trunk/uClibc/include/arpa/inet.h
   trunk/uClibc/libc/inet/addr.c


Changeset:
Modified: trunk/uClibc/include/arpa/inet.h
===================================================================
--- trunk/uClibc/include/arpa/inet.h	2008-04-25 02:14:07 UTC (rev 21853)
+++ trunk/uClibc/include/arpa/inet.h	2008-04-25 07:43:18 UTC (rev 21854)
@@ -52,6 +52,8 @@
 /* Convert Internet number in IN to ASCII representation.  The return value
    is a pointer to an internal array containing the string.  */
 extern char *inet_ntoa (struct in_addr __in) __THROW;
+/* Recursion-safe flavor */
+extern char *inet_ntoa_r (struct in_addr __in, char *__buf) __THROW;
 
 /* Convert from presentation format of an Internet number in buffer
    starting at CP to the binary network format and store result for

Modified: trunk/uClibc/libc/inet/addr.c
===================================================================
--- trunk/uClibc/libc/inet/addr.c	2008-04-25 02:14:07 UTC (rev 21853)
+++ trunk/uClibc/libc/inet/addr.c	2008-04-25 07:43:18 UTC (rev 21854)
@@ -122,7 +122,8 @@
 
 #define INET_NTOA_MAX_LEN	16	/* max 12 digits + 3 '.'s + 1 nul */
 
-static char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN])
+libc_hidden_proto(inet_ntoa_r)
+char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN])
 {
 	in_addr_t addr = ntohl(in.s_addr);
 	int i;
@@ -141,6 +142,7 @@
 
 	return p+1;
 }
+libc_hidden_def(inet_ntoa_r)
 
 libc_hidden_proto(inet_ntoa)
 char *inet_ntoa(struct in_addr in)




More information about the uClibc-cvs mailing list