svn commit: trunk/uClibc: include include/rpc libc/inet libc/inet/ etc...
vda at uclibc.org
vda at uclibc.org
Sat Apr 12 01:34:05 UTC 2008
Author: vda
Date: 2008-04-11 18:34:04 -0700 (Fri, 11 Apr 2008)
New Revision: 21713
Log:
Functions should be either exported in public .h files
and marked with libc_hidden_proto/def(),
or not be exported in .h files
and be hidden (or even static if possible).
We have five functions which violate this. Fixing:
netdb.h: export ruserpass()
rpc/rpc.h: export xdr_accepted_reply() and xdr_rejected_reply()
make inet_ntoa_r static function (it is not exported in any .h file)
make _time_tzset hidden function (it is not exported in any .h file)
Modified:
trunk/uClibc/include/netdb.h
trunk/uClibc/include/rpc/rpc.h
trunk/uClibc/libc/inet/addr.c
trunk/uClibc/libc/inet/rpc/rexec.c
trunk/uClibc/libc/inet/rpc/rpc_prot.c
trunk/uClibc/libc/inet/rpc/ruserpass.c
trunk/uClibc/libc/misc/time/time.c
Changeset:
Modified: trunk/uClibc/include/netdb.h
===================================================================
--- trunk/uClibc/include/netdb.h 2008-04-11 21:32:09 UTC (rev 21712)
+++ trunk/uClibc/include/netdb.h 2008-04-12 01:34:04 UTC (rev 21713)
@@ -444,6 +444,11 @@
#endif /* misc */
+/* ruserpass - remote password check.
+ This function also exists in glibc but is undocumented */
+extern int ruserpass(const char *host, const char **aname, const char **apass);
+
+
#ifdef __USE_BSD
/* Call `rshd' at port RPORT on remote machine *AHOST to execute CMD.
The local user is LOCUSER, on the remote machine the command is
Modified: trunk/uClibc/include/rpc/rpc.h
===================================================================
--- trunk/uClibc/include/rpc/rpc.h 2008-04-11 21:32:09 UTC (rev 21712)
+++ trunk/uClibc/include/rpc/rpc.h 2008-04-12 01:34:04 UTC (rev 21713)
@@ -105,6 +105,9 @@
extern int *__rpc_thread_svc_max_pollfd (void) __attribute__ ((__const__));
#define svc_max_pollfd (*__rpc_thread_svc_max_pollfd ())
+extern bool_t xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar);
+extern bool_t xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr);
+
__END_DECLS
#endif /* rpc/rpc.h */
Modified: trunk/uClibc/libc/inet/addr.c
===================================================================
--- trunk/uClibc/libc/inet/addr.c 2008-04-11 21:32:09 UTC (rev 21712)
+++ trunk/uClibc/libc/inet/addr.c 2008-04-12 01:34:04 UTC (rev 21713)
@@ -122,9 +122,7 @@
#define INET_NTOA_MAX_LEN 16 /* max 12 digits + 3 '.'s + 1 nul */
-extern 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])
+static char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN])
{
in_addr_t addr = ntohl(in.s_addr);
int i;
@@ -143,7 +141,6 @@
return p+1;
}
-libc_hidden_def(inet_ntoa_r)
libc_hidden_proto(inet_ntoa)
char *inet_ntoa(struct in_addr in)
Modified: trunk/uClibc/libc/inet/rpc/rexec.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/rexec.c 2008-04-11 21:32:09 UTC (rev 21712)
+++ trunk/uClibc/libc/inet/rpc/rexec.c 2008-04-12 01:34:04 UTC (rev 21713)
@@ -61,14 +61,13 @@
libc_hidden_proto(connect)
libc_hidden_proto(accept)
libc_hidden_proto(listen)
+libc_hidden_proto(ruserpass)
#define SA_LEN(_x) __libc_sa_len((_x)->sa_family)
extern int __libc_sa_len (sa_family_t __af) __THROW attribute_hidden;
int rexecoptions;
char ahostbuf[NI_MAXHOST] attribute_hidden;
-extern int ruserpass(const char *host, const char **aname, const char **apass) attribute_hidden;
-libc_hidden_proto(ruserpass)
libc_hidden_proto(rexec_af)
int
Modified: trunk/uClibc/libc/inet/rpc/rpc_prot.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/rpc_prot.c 2008-04-11 21:32:09 UTC (rev 21712)
+++ trunk/uClibc/libc/inet/rpc/rpc_prot.c 2008-04-12 01:34:04 UTC (rev 21713)
@@ -89,7 +89,6 @@
/*
* XDR the MSG_ACCEPTED part of a reply message union
*/
-extern bool_t xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar);
libc_hidden_proto(xdr_accepted_reply)
bool_t
xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar)
@@ -117,7 +116,6 @@
/*
* XDR the MSG_DENIED part of a reply message union
*/
-extern bool_t xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr);
libc_hidden_proto(xdr_rejected_reply)
bool_t
xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr)
Modified: trunk/uClibc/libc/inet/rpc/ruserpass.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/ruserpass.c 2008-04-11 21:32:09 UTC (rev 21712)
+++ trunk/uClibc/libc/inet/rpc/ruserpass.c 2008-04-12 01:34:04 UTC (rev 21713)
@@ -115,8 +115,8 @@
};
-
-extern int ruserpass(const char *host, const char **aname, const char **apass);
+/* ruserpass - remote password check.
+ This function also exists in glibc but is undocumented */
libc_hidden_proto(ruserpass)
int ruserpass(const char *host, const char **aname, const char **apass)
{
Modified: trunk/uClibc/libc/misc/time/time.c
===================================================================
--- trunk/uClibc/libc/misc/time/time.c 2008-04-11 21:32:09 UTC (rev 21712)
+++ trunk/uClibc/libc/misc/time/time.c 2008-04-12 01:34:04 UTC (rev 21713)
@@ -202,8 +202,7 @@
((defined(L_strftime) || defined(L_strftime_l)) && \
defined(__UCLIBC_HAS_XLOCALE__))
-void _time_tzset(int use_old_rules);
-libc_hidden_proto(_time_tzset)
+void _time_tzset(int use_old_rules) attribute_hidden;
#ifndef L__time_mktime
More information about the uClibc-cvs
mailing list