svn commit: trunk/uClibc/libc/inet: rpc
psm at uclibc.org
psm at uclibc.org
Thu Dec 8 14:31:33 UTC 2005
Author: psm
Date: 2005-12-08 06:29:53 -0800 (Thu, 08 Dec 2005)
New Revision: 12740
Log:
Again rpc ;-( , all *inet*, *addr*
Modified:
trunk/uClibc/libc/inet/addr.c
trunk/uClibc/libc/inet/ether_addr.c
trunk/uClibc/libc/inet/getaddrinfo.c
trunk/uClibc/libc/inet/getnetent.c
trunk/uClibc/libc/inet/getproto.c
trunk/uClibc/libc/inet/getservice.c
trunk/uClibc/libc/inet/herror.c
trunk/uClibc/libc/inet/if_nametoindex.c
trunk/uClibc/libc/inet/inet_net.c
trunk/uClibc/libc/inet/ntop.c
trunk/uClibc/libc/inet/resolv.c
trunk/uClibc/libc/inet/rpc/auth_unix.c
trunk/uClibc/libc/inet/rpc/bindresvport.c
trunk/uClibc/libc/inet/rpc/clnt_tcp.c
trunk/uClibc/libc/inet/rpc/clnt_udp.c
trunk/uClibc/libc/inet/rpc/clnt_unix.c
trunk/uClibc/libc/inet/rpc/create_xid.c
trunk/uClibc/libc/inet/rpc/get_myaddress.c
trunk/uClibc/libc/inet/rpc/getrpcent.c
trunk/uClibc/libc/inet/rpc/pmap_clnt.c
trunk/uClibc/libc/inet/rpc/pmap_rmt.c
trunk/uClibc/libc/inet/rpc/rcmd.c
trunk/uClibc/libc/inet/rpc/rexec.c
trunk/uClibc/libc/inet/rpc/rtime.c
trunk/uClibc/libc/inet/rpc/ruserpass.c
trunk/uClibc/libc/inet/rpc/svc.c
trunk/uClibc/libc/inet/rpc/svc_simple.c
trunk/uClibc/libc/inet/rpc/svc_tcp.c
trunk/uClibc/libc/inet/rpc/svc_udp.c
trunk/uClibc/libc/inet/rpc/svc_unix.c
trunk/uClibc/libc/inet/socketcalls.c
Changeset:
Modified: trunk/uClibc/libc/inet/addr.c
===================================================================
--- trunk/uClibc/libc/inet/addr.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/addr.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -28,8 +28,6 @@
#include <netinet/in.h>
#include <bits/uClibc_uintmaxtostr.h>
-int inet_aton(const char *cp, struct in_addr *addrptr);
-
#ifdef L_inet_aton
/*
* More undocumented inet_aton features.
@@ -47,9 +45,7 @@
* leading 0 -> octal
* all else -> decimal
*/
-int inet_aton(cp, addrptr)
-const char *cp;
-struct in_addr *addrptr;
+int attribute_hidden __inet_aton(const char *cp, struct in_addr *addrptr)
{
in_addr_t addr;
int value;
@@ -95,25 +91,29 @@
return 1;
}
+strong_alias(__inet_aton,inet_aton)
#endif
#ifdef L_inet_addr
-in_addr_t inet_addr(const char *cp)
+extern int __inet_aton (__const char *__cp, struct in_addr *__inp) __THROW attribute_hidden;
+
+in_addr_t attribute_hidden __inet_addr(const char *cp)
{
struct in_addr a;
- if (!inet_aton(cp, &a))
+ if (!__inet_aton(cp, &a))
return INADDR_NONE;
else
return a.s_addr;
}
+strong_alias(__inet_addr,inet_addr)
#endif
#ifdef L_inet_ntoa
#define INET_NTOA_MAX_LEN 16 /* max 12 digits + 3 '.'s + 1 nul */
-char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN])
+char attribute_hidden *__inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN])
{
in_addr_t addr = ntohl(in.s_addr);
int i;
@@ -132,12 +132,14 @@
return p+1;
}
+strong_alias(__inet_ntoa_r,inet_ntoa_r)
-char *inet_ntoa(struct in_addr in)
+char attribute_hidden *__inet_ntoa(struct in_addr in)
{
static char buf[INET_NTOA_MAX_LEN];
- return(inet_ntoa_r(in, buf));
+ return(__inet_ntoa_r(in, buf));
}
+strong_alias(__inet_ntoa,inet_ntoa)
#endif
#ifdef L_inet_makeaddr
@@ -189,8 +191,8 @@
* Return the network number from an internet
* address; handles class a/b/c network #'s.
*/
-in_addr_t
-inet_netof(struct in_addr in)
+in_addr_t attribute_hidden
+__inet_netof(struct in_addr in)
{
in_addr_t i = ntohl(in.s_addr);
@@ -201,5 +203,6 @@
else
return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT);
}
+strong_alias(__inet_netof,inet_netof)
#endif
Modified: trunk/uClibc/libc/inet/ether_addr.c
===================================================================
--- trunk/uClibc/libc/inet/ether_addr.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/ether_addr.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -32,15 +32,8 @@
#include <netinet/ether.h>
#include <netinet/if_ether.h>
-struct ether_addr *ether_aton(const char *asc)
+struct ether_addr attribute_hidden *__ether_aton_r(const char *asc, struct ether_addr *addr)
{
- static struct ether_addr result;
-
- return ether_aton_r(asc, &result);
-}
-
-struct ether_addr *ether_aton_r(const char *asc, struct ether_addr *addr)
-{
size_t cnt;
for (cnt = 0; cnt < 6; ++cnt) {
@@ -75,15 +68,16 @@
return addr;
}
+strong_alias(__ether_aton_r,ether_aton_r)
-char *ether_ntoa(const struct ether_addr *addr)
+struct ether_addr *ether_aton(const char *asc)
{
- static char asc[18];
+ static struct ether_addr result;
- return ether_ntoa_r(addr, asc);
+ return __ether_aton_r(asc, &result);
}
-char *ether_ntoa_r(const struct ether_addr *addr, char *buf)
+char attribute_hidden *__ether_ntoa_r(const struct ether_addr *addr, char *buf)
{
sprintf(buf, "%x:%x:%x:%x:%x:%x",
addr->ether_addr_octet[0], addr->ether_addr_octet[1],
@@ -91,3 +85,11 @@
addr->ether_addr_octet[4], addr->ether_addr_octet[5]);
return buf;
}
+strong_alias(__ether_ntoa_r,ether_ntoa_r)
+
+char *ether_ntoa(const struct ether_addr *addr)
+{
+ static char asc[18];
+
+ return __ether_ntoa_r(addr, asc);
+}
Modified: trunk/uClibc/libc/inet/getaddrinfo.c
===================================================================
--- trunk/uClibc/libc/inet/getaddrinfo.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/getaddrinfo.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -48,6 +48,9 @@
#define gethostbyname_r __gethostbyname_r
#define gethostbyname2_r __gethostbyname2_r
#define gethostbyaddr_r __gethostbyaddr_r
+#define inet_pton __inet_pton
+#define inet_ntop __inet_ntop
+#define strtoul __strtoul
#if 0
#define uname __uname
#define stpcpy __stpcpy
@@ -771,6 +774,20 @@
{ PF_UNSPEC, NULL }
};
+void attribute_hidden
+__freeaddrinfo (struct addrinfo *ai)
+{
+ struct addrinfo *p;
+
+ while (ai != NULL)
+ {
+ p = ai;
+ ai = ai->ai_next;
+ free (p);
+ }
+}
+strong_alias(__freeaddrinfo,freeaddrinfo)
+
int attribute_hidden
__getaddrinfo (const char *name, const char *service,
const struct addrinfo *hints, struct addrinfo **pai)
@@ -842,7 +859,7 @@
continue;
if (p)
- freeaddrinfo (p);
+ __freeaddrinfo (p);
return -(i & GAIH_EAI);
}
@@ -866,21 +883,8 @@
return 0;
if (p)
- freeaddrinfo (p);
+ __freeaddrinfo (p);
return last_i ? -(last_i & GAIH_EAI) : EAI_NONAME;
}
strong_alias(__getaddrinfo,getaddrinfo)
-
-void
-freeaddrinfo (struct addrinfo *ai)
-{
- struct addrinfo *p;
-
- while (ai != NULL)
- {
- p = ai;
- ai = ai->ai_next;
- free (p);
- }
-}
Modified: trunk/uClibc/libc/inet/getnetent.c
===================================================================
--- trunk/uClibc/libc/inet/getnetent.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/getnetent.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -15,6 +15,8 @@
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
+#define inet_network __inet_network
+
#define __FORCE_GLIBC
#include <features.h>
#include <stdio.h>
Modified: trunk/uClibc/libc/inet/getproto.c
===================================================================
--- trunk/uClibc/libc/inet/getproto.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/getproto.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -52,6 +52,7 @@
*/
#define strpbrk __strpbrk
+#define atoi __atoi
#define __FORCE_GLIBC
#define _GNU_SOURCE
Modified: trunk/uClibc/libc/inet/getservice.c
===================================================================
--- trunk/uClibc/libc/inet/getservice.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/getservice.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -52,6 +52,7 @@
*/
#define strpbrk __strpbrk
+#define atoi __atoi
#define __FORCE_GLIBC
#define _GNU_SOURCE
Modified: trunk/uClibc/libc/inet/herror.c
===================================================================
--- trunk/uClibc/libc/inet/herror.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/herror.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -36,7 +36,7 @@
/*
* herror -- print the error indicated by the h_errno value.
*/
-void herror(const char *s)
+void attribute_hidden __herror(const char *s)
{
static const char colon_space[] = ": ";
const char *p;
@@ -52,6 +52,7 @@
}
fprintf(stderr, "%s%s%s\n", s, c, p);
}
+strong_alias(__herror,herror)
const char *hstrerror(int err)
Modified: trunk/uClibc/libc/inet/if_nametoindex.c
===================================================================
--- trunk/uClibc/libc/inet/if_nametoindex.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/if_nametoindex.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -52,7 +52,7 @@
if (fd < 0)
return 0;
__strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name));
- if (ioctl(fd,SIOCGIFINDEX,&ifr) < 0) {
+ if (__ioctl(fd,SIOCGIFINDEX,&ifr) < 0) {
int saved_errno = errno;
__close(fd);
if (saved_errno == EINVAL)
@@ -102,7 +102,7 @@
/* Read all the interfaces out of the kernel. */
do {
ifc.ifc_buf = realloc(ifc.ifc_buf, ifc.ifc_len = rq_len);
- if (ifc.ifc_buf == NULL || ioctl(fd, SIOCGIFCONF, &ifc) < 0) {
+ if (ifc.ifc_buf == NULL || __ioctl(fd, SIOCGIFCONF, &ifc) < 0) {
__close(fd);
return NULL;
}
@@ -121,7 +121,7 @@
for (i = 0; i < nifs; ++i) {
struct ifreq *ifr = &ifc.ifc_req[i];
idx[i].if_name = __strdup (ifr->ifr_name);
- if (idx[i].if_name == NULL || ioctl(fd,SIOCGIFINDEX,ifr) < 0) {
+ if (idx[i].if_name == NULL || __ioctl(fd,SIOCGIFINDEX,ifr) < 0) {
int saved_errno = errno;
unsigned int j;
for (j = 0; j < i; ++j)
@@ -159,7 +159,7 @@
return NULL;
ifr.ifr_ifindex = ifindex;
- if (ioctl (fd, SIOCGIFNAME, &ifr) < 0) {
+ if (__ioctl (fd, SIOCGIFNAME, &ifr) < 0) {
saved_errno = errno;
__close (fd);
__set_errno (saved_errno);
Modified: trunk/uClibc/libc/inet/inet_net.c
===================================================================
--- trunk/uClibc/libc/inet/inet_net.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/inet_net.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -42,8 +42,8 @@
* The library routines call this routine to interpret
* network numbers.
*/
-in_addr_t
-inet_network(const char *cp)
+in_addr_t attribute_hidden
+__inet_network(const char *cp)
{
register in_addr_t val, base, n;
register char c;
@@ -98,3 +98,4 @@
}
return (val);
}
+strong_alias(__inet_network,inet_network)
Modified: trunk/uClibc/libc/inet/ntop.c
===================================================================
--- trunk/uClibc/libc/inet/ntop.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/ntop.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -349,12 +349,8 @@
* author:
* Paul Vixie, 1996.
*/
-extern const char *
-inet_ntop(af, src, dst, size)
- int af;
- const void *src;
- char *dst;
- socklen_t size;
+const char attribute_hidden *
+__inet_ntop(int af, const void *src, char *dst, socklen_t size)
{
switch (af) {
case AF_INET:
@@ -369,6 +365,7 @@
}
/* NOTREACHED */
}
+strong_alias(__inet_ntop,inet_ntop)
/* int
@@ -382,11 +379,8 @@
* author:
* Paul Vixie, 1996.
*/
-extern int
-inet_pton(af, src, dst)
- int af;
- const char *src;
- void *dst;
+int attribute_hidden
+__inet_pton(int af, const char *src, void *dst)
{
switch (af) {
case AF_INET:
@@ -401,4 +395,4 @@
}
/* NOTREACHED */
}
-
+strong_alias(__inet_pton,inet_pton)
Modified: trunk/uClibc/libc/inet/resolv.c
===================================================================
--- trunk/uClibc/libc/inet/resolv.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/resolv.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -140,6 +140,11 @@
#define getservbyport __getservbyport
#define getdomainname __getdomainname
#define uname __uname
+#define inet_addr __inet_addr
+#define inet_aton __inet_aton
+#define inet_pton __inet_pton
+#define inet_ntop __inet_ntop
+#define connect __connect
#define __FORCE_GLIBC
#include <features.h>
Modified: trunk/uClibc/libc/inet/rpc/auth_unix.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/auth_unix.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/auth_unix.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -46,6 +46,7 @@
#define xdrmem_create __xdrmem_create
#define xdr_authunix_parms __xdr_authunix_parms
#define xdr_opaque_auth __xdr_opaque_auth
+#define gettimeofday __gettimeofday
#define __FORCE_GLIBC
#include <features.h>
Modified: trunk/uClibc/libc/inet/rpc/bindresvport.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/bindresvport.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/bindresvport.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -30,6 +30,8 @@
* Copyright (c) 1987 by Sun Microsystems, Inc.
*/
+#define bind __bind
+
#define __FORCE_GLIBC
#include <features.h>
@@ -43,8 +45,8 @@
/*
* Bind a socket to a privileged IP port
*/
-int
-bindresvport (int sd, struct sockaddr_in *sin)
+int attribute_hidden
+__bindresvport (int sd, struct sockaddr_in *sin)
{
int res;
static short port;
@@ -86,3 +88,4 @@
return res;
}
+strong_alias(__bindresvport,bindresvport)
Modified: trunk/uClibc/libc/inet/rpc/clnt_tcp.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/clnt_tcp.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/clnt_tcp.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -60,6 +60,8 @@
#define xdrmem_create __xdrmem_create
#define pmap_getport __pmap_getport
#define _seterr_reply __seterr_reply
+#define connect __connect
+#define bindresvport __bindresvport
#define __FORCE_GLIBC
#include <features.h>
Modified: trunk/uClibc/libc/inet/rpc/clnt_udp.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/clnt_udp.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/clnt_udp.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -47,6 +47,8 @@
#define xdr_opaque_auth __xdr_opaque_auth
#define pmap_getport __pmap_getport
#define _seterr_reply __seterr_reply
+#define setsockopt __setsockopt
+#define bindresvport __bindresvport
#define __FORCE_GLIBC
#include <features.h>
@@ -206,7 +208,7 @@
/* attempt to bind to prov port */
(void) bindresvport (*sockp, (struct sockaddr_in *) 0);
/* the sockets rpc controls are non-blocking */
- (void) ioctl (*sockp, FIONBIO, (char *) &dontblock);
+ (void) __ioctl (*sockp, FIONBIO, (char *) &dontblock);
#ifdef IP_RECVERR
{
int on = 1;
@@ -250,13 +252,13 @@
ifc.ifc_len = sizeof (buf);
ifc.ifc_buf = buf;
- if (ioctl(sock, SIOCGIFCONF, (char *) &ifc) == 0)
+ if (__ioctl(sock, SIOCGIFCONF, (char *) &ifc) == 0)
{
ifr = ifc.ifc_req;
for (n = ifc.ifc_len / sizeof (struct ifreq); n > 0; n--, ifr++)
{
ifreq = *ifr;
- if (ioctl (sock, SIOCGIFFLAGS, (char *) &ifreq) < 0)
+ if (__ioctl (sock, SIOCGIFFLAGS, (char *) &ifreq) < 0)
break;
if ((ifreq.ifr_flags & IFF_UP)
Modified: trunk/uClibc/libc/inet/rpc/clnt_unix.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/clnt_unix.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/clnt_unix.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -57,6 +57,8 @@
#define getegid __getegid
#define geteuid __geteuid
#define _seterr_reply __seterr_reply
+#define setsockopt __setsockopt
+#define connect __connect
#define __FORCE_GLIBC
#include <features.h>
Modified: trunk/uClibc/libc/inet/rpc/create_xid.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/create_xid.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/create_xid.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -19,6 +19,7 @@
#define lrand48_r __lrand48_r
#define srand48_r __srand48_r
+#define gettimeofday __gettimeofday
#define __FORCE_GLIBC
#include <features.h>
Modified: trunk/uClibc/libc/inet/rpc/get_myaddress.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/get_myaddress.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/get_myaddress.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -72,7 +72,7 @@
}
ifc.ifc_len = sizeof (buf);
ifc.ifc_buf = buf;
- if (ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0)
+ if (__ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0)
{
__perror (_("get_myaddress: ioctl (get interface configuration)"));
exit (1);
@@ -83,7 +83,7 @@
for (len = ifc.ifc_len; len; len -= sizeof ifreq)
{
ifreq = *ifr;
- if (ioctl (s, SIOCGIFFLAGS, (char *) &ifreq) < 0)
+ if (__ioctl (s, SIOCGIFFLAGS, (char *) &ifreq) < 0)
{
__perror ("get_myaddress: ioctl");
exit (1);
Modified: trunk/uClibc/libc/inet/rpc/getrpcent.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/getrpcent.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/getrpcent.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -1,6 +1,4 @@
/* @(#)getrpcent.c 2.2 88/07/29 4.0 RPCSRC */
-#define __FORCE_GLIBC
-#include <features.h>
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,6 +33,10 @@
* Copyright (c) 1985 by Sun Microsystems, Inc.
*/
+#define atoi __atoi
+
+#define __FORCE_GLIBC
+#include <features.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
Modified: trunk/uClibc/libc/inet/rpc/pmap_clnt.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/pmap_clnt.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/pmap_clnt.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -73,7 +73,7 @@
}
ifc.ifc_len = sizeof (buf);
ifc.ifc_buf = buf;
- if (ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0)
+ if (__ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0)
{
__perror (_("__get_myaddress: ioctl (get interface configuration)"));
exit (1);
@@ -84,7 +84,7 @@
for (len = ifc.ifc_len; len; len -= sizeof ifreq)
{
ifreq = *ifr;
- if (ioctl (s, SIOCGIFFLAGS, (char *) &ifreq) < 0)
+ if (__ioctl (s, SIOCGIFFLAGS, (char *) &ifreq) < 0)
{
__perror ("__get_myaddress: ioctl");
exit (1);
Modified: trunk/uClibc/libc/inet/rpc/pmap_rmt.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/pmap_rmt.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/pmap_rmt.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -46,7 +46,9 @@
#define xdr_reference __xdr_reference
#define xdr_u_long __xdr_u_long
#define inet_makeaddr __inet_makeaddr
+#define inet_netof __inet_netof
#define clntudp_create __clntudp_create
+#define setsockopt __setsockopt
#define __FORCE_GLIBC
#include <features.h>
@@ -193,7 +195,7 @@
ifc.ifc_len = UDPMSGSIZE;
ifc.ifc_buf = buf;
- if (ioctl (sock, SIOCGIFCONF, (char *) &ifc) < 0)
+ if (__ioctl (sock, SIOCGIFCONF, (char *) &ifc) < 0)
{
__perror (_("broadcast: ioctl (get interface configuration)"));
return (0);
@@ -202,7 +204,7 @@
for (i = 0, n = ifc.ifc_len / sizeof (struct ifreq); n > 0; n--, ifr++)
{
ifreq = *ifr;
- if (ioctl (sock, SIOCGIFFLAGS, (char *) &ifreq) < 0)
+ if (__ioctl (sock, SIOCGIFFLAGS, (char *) &ifreq) < 0)
{
__perror (_("broadcast: ioctl (get interface flags)"));
continue;
@@ -213,7 +215,7 @@
{
sin = (struct sockaddr_in *) &ifr->ifr_addr;
#ifdef SIOCGIFBRDADDR /* 4.3BSD */
- if (ioctl (sock, SIOCGIFBRDADDR, (char *) &ifreq) < 0)
+ if (__ioctl (sock, SIOCGIFBRDADDR, (char *) &ifreq) < 0)
{
addrs[i++] = inet_makeaddr (inet_netof
/* Changed to pass struct instead of s_addr member
Modified: trunk/uClibc/libc/inet/rpc/rcmd.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/rcmd.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/rcmd.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -43,6 +43,13 @@
#define getpwnam_r __getpwnam_r
#define gethostbyname __gethostbyname
#define gethostbyname_r __gethostbyname_r
+#define fileno __fileno
+#define sleep __sleep
+#define inet_addr __inet_addr
+#define inet_ntoa __inet_ntoa
+#define herror __herror
+#define bind __bind
+#define connect __connect
#define __FORCE_GLIBC
#include <features.h>
@@ -67,6 +74,8 @@
#include <arpa/inet.h>
+extern int __rresvport(int *alport) attribute_hidden;
+
/* some forward declarations */
static int __ivaliduser2(FILE *hostf, u_int32_t raddr,
const char *luser, const char *ruser, const char *rhost);
@@ -144,7 +153,7 @@
*ahost = hp->h_name;
oldmask = sigblock(sigmask(SIGURG)); /* __sigblock */
for (timo = 1, lport = IPPORT_RESERVED - 1;;) {
- s = rresvport(&lport);
+ s = __rresvport(&lport);
if (s < 0) {
if (errno == EAGAIN)
(void)fprintf(stderr,
@@ -195,7 +204,7 @@
lport = 0;
} else {
char num[8];
- int s2 = rresvport(&lport), s3;
+ int s2 = __rresvport(&lport), s3;
socklen_t len = sizeof(from);
if (s2 < 0)
@@ -264,7 +273,7 @@
return -1;
}
-int rresvport(int *alport)
+int attribute_hidden __rresvport(int *alport)
{
struct sockaddr_in sin;
int s;
@@ -292,6 +301,7 @@
return -1;
}
+strong_alias(__rresvport,rresvport)
int __check_rhosts_file = 1;
char *__rcmd_errstr;
Modified: trunk/uClibc/libc/inet/rpc/rexec.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/rexec.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/rexec.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -27,9 +27,13 @@
* SUCH DAMAGE.
*/
+#define getsockname __getsockname
#define getnameinfo __getnameinfo
#define getaddrinfo __getaddrinfo
-#define getsockname __getsockname
+#define freeaddrinfo __freeaddrinfo
+#define sleep __sleep
+#define atoi __atoi
+#define connect __connect
#define __FORCE_GLIBC
#include <features.h>
Modified: trunk/uClibc/libc/inet/rpc/rtime.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/rtime.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/rtime.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -42,6 +42,9 @@
* subtract seconds before Jan 1, 1970 to get
* what unix uses.
*/
+
+#define connect __connect
+
#define __FORCE_GLIBC
#include <features.h>
Modified: trunk/uClibc/libc/inet/rpc/ruserpass.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/ruserpass.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/ruserpass.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -33,6 +33,7 @@
#define getegid __getegid
#define geteuid __geteuid
#define gethostname __gethostname
+#define fileno __fileno
#define __FORCE_GLIBC
#include <features.h>
Modified: trunk/uClibc/libc/inet/rpc/svc.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/svc.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/svc.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -36,16 +36,14 @@
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
+#define ffs __ffs
#define pmap_set __pmap_set
#define pmap_unset __pmap_unset
-
#define _authenticate _authenticate_internal
#define _rpc_dtablesize _rpc_dtablesize_internal
-
/* used by svc_[max_]pollfd */
#define __rpc_thread_svc_pollfd __rpc_thread_svc_pollfd_internal
#define __rpc_thread_svc_max_pollfd __rpc_thread_svc_max_pollfd_internal
-
/* used by svc_fdset */
#define __rpc_thread_svc_fdset __rpc_thread_svc_fdset_internal
@@ -131,8 +129,8 @@
strong_alias(__xprt_register,xprt_register)
/* De-activate a transport handle. */
-void
-xprt_unregister (SVCXPRT *xprt)
+void attribute_hidden
+__xprt_unregister (SVCXPRT *xprt)
{
register int sock = xprt->xp_sock;
register int i;
@@ -149,6 +147,7 @@
svc_pollfd[i].fd = -1;
}
}
+strong_alias(__xprt_unregister,xprt_unregister)
/* ********************** CALLOUT list related stuff ************* */
@@ -494,7 +493,7 @@
++fds_found;
if (p->revents & POLLNVAL)
- xprt_unregister (xports[p->fd]);
+ __xprt_unregister (xports[p->fd]);
else
__svc_getreq_common (p->fd);
}
Modified: trunk/uClibc/libc/inet/rpc/svc_simple.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/svc_simple.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/svc_simple.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -43,6 +43,7 @@
#define svcerr_decode __svcerr_decode
#define svcudp_create __svcudp_create
#define pmap_unset __pmap_unset
+#define asprintf __asprintf
#define __FORCE_GLIBC
#define _GNU_SOURCE
Modified: trunk/uClibc/libc/inet/rpc/svc_tcp.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/svc_tcp.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/svc_tcp.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -48,7 +48,10 @@
#define xdr_callmsg __xdr_callmsg
#define xdr_replymsg __xdr_replymsg
#define xprt_register __xprt_register
+#define xprt_unregister __xprt_unregister
#define getsockname __getsockname
+#define bind __bind
+#define bindresvport __bindresvport
#define __FORCE_GLIBC
#define _GNU_SOURCE
Modified: trunk/uClibc/libc/inet/rpc/svc_udp.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/svc_udp.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/svc_udp.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -40,10 +40,14 @@
*/
#define xprt_register __xprt_register
+#define xprt_unregister __xprt_unregister
#define xdrmem_create __xdrmem_create
#define xdr_callmsg __xdr_callmsg
#define xdr_replymsg __xdr_replymsg
#define getsockname __getsockname
+#define setsockopt __setsockopt
+#define bind __bind
+#define bindresvport __bindresvport
#define __FORCE_GLIBC
#define _GNU_SOURCE
Modified: trunk/uClibc/libc/inet/rpc/svc_unix.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/svc_unix.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/rpc/svc_unix.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -44,9 +44,12 @@
#define xdr_callmsg __xdr_callmsg
#define xdr_replymsg __xdr_replymsg
#define xprt_register __xprt_register
+#define xprt_unregister __xprt_unregister
#define getegid __getegid
#define geteuid __geteuid
#define getsockname __getsockname
+#define setsockopt __setsockopt
+#define bind __bind
#define __FORCE_GLIBC
#include <features.h>
Modified: trunk/uClibc/libc/inet/socketcalls.c
===================================================================
--- trunk/uClibc/libc/inet/socketcalls.c 2005-12-08 14:23:42 UTC (rev 12739)
+++ trunk/uClibc/libc/inet/socketcalls.c 2005-12-08 14:29:53 UTC (rev 12740)
@@ -48,9 +48,11 @@
#ifdef L_bind
#ifdef __NR_bind
-_syscall3(int, bind, int, sockfd, const struct sockaddr *, myaddr, socklen_t, addrlen);
+#define __NR___bind __NR_bind
+attribute_hidden _syscall3(int, __bind, int, sockfd, const struct sockaddr *, myaddr, socklen_t, addrlen);
+strong_alias(__bind,bind)
#elif defined(__NR_socketcall)
-int bind(int sockfd, const struct sockaddr *myaddr, socklen_t addrlen)
+int attribute_hidden __bind(int sockfd, const struct sockaddr *myaddr, socklen_t addrlen)
{
unsigned long args[3];
@@ -59,15 +61,18 @@
args[2] = addrlen;
return __socketcall(SYS_BIND, args);
}
+strong_alias(__bind,bind)
#endif
#endif
#ifdef L_connect
#ifdef __NR_connect
-#define __NR___libc_connect __NR_connect
-_syscall3(int, __libc_connect, int, sockfd, const struct sockaddr *, saddr, socklen_t, addrlen);
+#define __NR___connect __NR_connect
+attribute_hidden _syscall3(int, __connect, int, sockfd, const struct sockaddr *, saddr, socklen_t, addrlen);
+strong_alias(__connect,connect)
+weak_alias(__connect,__libc_connect)
#elif defined(__NR_socketcall)
-int __libc_connect(int sockfd, const struct sockaddr *saddr, socklen_t addrlen)
+int attribute_hidden __connect(int sockfd, const struct sockaddr *saddr, socklen_t addrlen)
{
unsigned long args[3];
@@ -76,8 +81,9 @@
args[2] = addrlen;
return __socketcall(SYS_CONNECT, args);
}
+strong_alias(__connect,connect)
+weak_alias(__connect,__libc_connect)
#endif
-weak_alias(__libc_connect, connect);
#endif
#ifdef L_getpeername
@@ -289,10 +295,12 @@
#ifdef L_setsockopt
#ifdef __NR_setsockopt
-_syscall5(int, setsockopt, int, fd, int, level, int, optname, const void *, optval, socklen_t, optlen);
+#define __NR___setsockopt __NR_setsockopt
+attribute_hidden _syscall5(int, __setsockopt, int, fd, int, level, int, optname, const void *, optval, socklen_t, optlen);
+strong_alias(__setsockopt,setsockopt)
#elif defined(__NR_socketcall)
/* [sg]etsockoptions by bir7 at leland.stanford.edu */
-int setsockopt(int fd, int level, int optname, const void *optval,
+int attribute_hidden __setsockopt(int fd, int level, int optname, const void *optval,
socklen_t optlen)
{
unsigned long args[5];
@@ -304,6 +312,7 @@
args[4] = optlen;
return (__socketcall(SYS_SETSOCKOPT, args));
}
+strong_alias(__setsockopt,setsockopt)
#endif
#endif
More information about the uClibc-cvs
mailing list