svn commit: branches/uClibc-nptl: libc/inet libc/misc/syslog libc/pwd_grp etc...
sjhill at uclibc.org
sjhill at uclibc.org
Sat Dec 10 23:04:46 UTC 2005
Author: sjhill
Date: 2005-12-10 15:04:41 -0800 (Sat, 10 Dec 2005)
New Revision: 12832
Log:
Finish merge from trunk, again, no really.
Modified:
branches/uClibc-nptl/libc/inet/resolv.c
branches/uClibc-nptl/libc/misc/syslog/syslog.c
branches/uClibc-nptl/libc/pwd_grp/lckpwdf.c
branches/uClibc-nptl/libc/stdio/vswprintf.c
branches/uClibc-nptl/libc/stdlib/ptsname.c
branches/uClibc-nptl/libc/string/arm/strcmp.S
branches/uClibc-nptl/libc/string/i386/strcmp.c
branches/uClibc-nptl/libc/sysdeps/linux/common/ssp.c
branches/uClibc-nptl/libc/sysdeps/linux/mips/pipe.S
branches/uClibc-nptl/libc/sysdeps/linux/mips/pipe.c
branches/uClibc-nptl/libpthread/nptl/init.c
branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/sigaction.c
branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c
Changeset:
Modified: branches/uClibc-nptl/libc/inet/resolv.c
===================================================================
--- branches/uClibc-nptl/libc/inet/resolv.c 2005-12-10 21:53:53 UTC (rev 12831)
+++ branches/uClibc-nptl/libc/inet/resolv.c 2005-12-10 23:04:41 UTC (rev 12832)
@@ -140,6 +140,15 @@
#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 select __select
+#define recv __recv
+#define send __send
+#define snprintf __snprintf
#define __FORCE_GLIBC
#include <features.h>
@@ -764,9 +773,9 @@
#ifdef __UCLIBC_HAS_IPV6__
v6 = inet_pton(AF_INET6, dns, &sa6.sin6_addr) > 0;
- fd = socket(v6 ? AF_INET6 : AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+ fd = __socket(v6 ? AF_INET6 : AF_INET, SOCK_DGRAM, IPPROTO_UDP);
#else
- fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+ fd = __socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
#endif
if (fd < 0) {
retries++;
@@ -1400,7 +1409,7 @@
#ifdef DEBUG
if (_res.options & RES_DEBUG)
- printf(";; res_querydomain(%s, %s, %d, %d)\n",
+ __printf(";; res_querydomain(%s, %s, %d, %d)\n",
name, domain?domain:"<Nil>", class, type);
#endif
if (domain == NULL) {
@@ -2338,7 +2347,7 @@
addr_list[0] = in;
- sprintf(buf, "%u.%u.%u.%u.in-addr.arpa",
+ __sprintf(buf, "%u.%u.%u.%u.in-addr.arpa",
tmp_addr[3], tmp_addr[2], tmp_addr[1], tmp_addr[0]);
#ifdef __UCLIBC_HAS_IPV6__
} else {
@@ -2348,7 +2357,7 @@
qp = buf;
for (i = len - 1; i >= 0; i--) {
- qp += sprintf(qp, "%x.%x.", in6->s6_addr[i] & 0xf,
+ qp += __sprintf(qp, "%x.%x.", in6->s6_addr[i] & 0xf,
(in6->s6_addr[i] >> 4) & 0xf);
}
__strcpy(qp, "ip6.int");
Modified: branches/uClibc-nptl/libc/misc/syslog/syslog.c
===================================================================
--- branches/uClibc-nptl/libc/misc/syslog/syslog.c 2005-12-10 21:53:53 UTC (rev 12831)
+++ branches/uClibc-nptl/libc/misc/syslog/syslog.c 2005-12-10 23:04:41 UTC (rev 12832)
@@ -32,6 +32,9 @@
*/
#define ctime __ctime
+#define sigaction __sigaction
+#define connect __connect
+#define vsnprintf __vsnprintf
#define __FORCE_GLIBC
#define _GNU_SOURCE
@@ -100,13 +103,6 @@
static int LogMask = 0xff; /* mask of priorities to be logged */
static struct sockaddr SyslogAddr; /* AF_UNIX address of local logger */
-static void closelog_intern( int );
-void syslog( int, const char *, ...);
-void vsyslog( int, const char *, va_list );
-void openlog( const char *, int, int );
-void closelog( void );
-int setlogmask(int pmask);
-
static void
closelog_intern(int to_default)
{
@@ -127,12 +123,65 @@
}
static void
-sigpipe_handler (int sig)
+sigpipe_handler (attribute_unused int sig)
{
closelog_intern (0);
}
/*
+ * OPENLOG -- open system log
+ */
+void attribute_hidden
+__openlog( const char *ident, int logstat, int logfac )
+{
+ int logType = SOCK_DGRAM;
+
+ LOCK;
+
+ if (ident != NULL)
+ LogTag = ident;
+ LogStat = logstat;
+ if (logfac != 0 && (logfac &~ LOG_FACMASK) == 0)
+ LogFacility = logfac;
+ if (LogFile == -1) {
+ SyslogAddr.sa_family = AF_UNIX;
+ (void)__strncpy(SyslogAddr.sa_data, _PATH_LOG,
+ sizeof(SyslogAddr.sa_data));
+retry:
+ if (LogStat & LOG_NDELAY) {
+ if ((LogFile = __socket(AF_UNIX, logType, 0)) == -1){
+ UNLOCK;
+ return;
+ }
+ /* fcntl(LogFile, F_SETFD, 1); */
+ }
+ }
+
+ if (LogFile != -1 && !connected) {
+ if (connect(LogFile, &SyslogAddr, sizeof(SyslogAddr) -
+ sizeof(SyslogAddr.sa_data) + __strlen(SyslogAddr.sa_data)) != -1)
+ {
+ connected = 1;
+ } else if (logType == SOCK_DGRAM) {
+ logType = SOCK_STREAM;
+ if (LogFile != -1) {
+ __close(LogFile);
+ LogFile = -1;
+ }
+ goto retry;
+ } else {
+ if (LogFile != -1) {
+ __close(LogFile);
+ LogFile = -1;
+ }
+ }
+ }
+
+ UNLOCK;
+}
+strong_alias(__openlog,openlog)
+
+/*
* syslog, vsyslog --
* print message on log file; output is intended for syslogd(8).
*/
@@ -161,7 +210,7 @@
if (!(LogMask & LOG_MASK(LOG_PRI(pri))) || (pri &~ (LOG_PRIMASK|LOG_FACMASK)))
goto getout;
if (LogFile < 0 || !connected)
- openlog(LogTag, LogStat | LOG_NDELAY, 0);
+ __openlog(LogTag, LogStat | LOG_NDELAY, 0);
/* Set default facility if none specified. */
if ((pri & LOG_FACMASK) == 0)
@@ -172,15 +221,15 @@
* safe to test only LogTag and use normal sprintf everywhere else.
*/
(void)__time(&now);
- stdp = p = tbuf + sprintf(tbuf, "<%d>%.15s ", pri, ctime(&now) + 4);
+ stdp = p = tbuf + __sprintf(tbuf, "<%d>%.15s ", pri, ctime(&now) + 4);
if (LogTag) {
if (__strlen(LogTag) < sizeof(tbuf) - 64)
- p += sprintf(p, "%s", LogTag);
+ p += __sprintf(p, "%s", LogTag);
else
- p += sprintf(p, "<BUFFER OVERRUN ATTEMPT>");
+ p += __sprintf(p, "<BUFFER OVERRUN ATTEMPT>");
}
if (LogStat & LOG_PID)
- p += sprintf(p, "[%d]", __getpid());
+ p += __sprintf(p, "[%d]", __getpid());
if (LogTag) {
*p++ = ':';
*p++ = ' ';
@@ -271,59 +320,6 @@
strong_alias(__syslog,syslog)
/*
- * OPENLOG -- open system log
- */
-void attribute_hidden
-__openlog( const char *ident, int logstat, int logfac )
-{
- int logType = SOCK_DGRAM;
-
- LOCK;
-
- if (ident != NULL)
- LogTag = ident;
- LogStat = logstat;
- if (logfac != 0 && (logfac &~ LOG_FACMASK) == 0)
- LogFacility = logfac;
- if (LogFile == -1) {
- SyslogAddr.sa_family = AF_UNIX;
- (void)__strncpy(SyslogAddr.sa_data, _PATH_LOG,
- sizeof(SyslogAddr.sa_data));
-retry:
- if (LogStat & LOG_NDELAY) {
- if ((LogFile = socket(AF_UNIX, logType, 0)) == -1){
- UNLOCK;
- return;
- }
- /* fcntl(LogFile, F_SETFD, 1); */
- }
- }
-
- if (LogFile != -1 && !connected) {
- if (connect(LogFile, &SyslogAddr, sizeof(SyslogAddr) -
- sizeof(SyslogAddr.sa_data) + __strlen(SyslogAddr.sa_data)) != -1)
- {
- connected = 1;
- } else if (logType == SOCK_DGRAM) {
- logType = SOCK_STREAM;
- if (LogFile != -1) {
- __close(LogFile);
- LogFile = -1;
- }
- goto retry;
- } else {
- if (LogFile != -1) {
- __close(LogFile);
- LogFile = -1;
- }
- }
- }
-
- UNLOCK;
-}
-strong_alias(__openlog,openlog)
-
-/*
* CLOSELOG -- close the system log
*/
void attribute_hidden
Modified: branches/uClibc-nptl/libc/pwd_grp/lckpwdf.c
===================================================================
--- branches/uClibc-nptl/libc/pwd_grp/lckpwdf.c 2005-12-10 21:53:53 UTC (rev 12831)
+++ branches/uClibc-nptl/libc/pwd_grp/lckpwdf.c 2005-12-10 23:04:41 UTC (rev 12832)
@@ -20,6 +20,8 @@
Boston, MA 02111-1307, USA. */
#define sigfillset __sigfillset_internal
+#define sigaction __sigaction
+#define alarm __alarm
#include <features.h>
#include <fcntl.h>
@@ -174,7 +176,7 @@
}
-static void noop_handler (int sig)
+static void noop_handler (attribute_unused int sig)
{
/* We simply return which makes the `fcntl' call return with an error. */
}
Modified: branches/uClibc-nptl/libc/stdio/vswprintf.c
===================================================================
--- branches/uClibc-nptl/libc/stdio/vswprintf.c 2005-12-10 21:53:53 UTC (rev 12831)
+++ branches/uClibc-nptl/libc/stdio/vswprintf.c 2005-12-10 23:04:41 UTC (rev 12832)
@@ -38,8 +38,12 @@
#ifdef __UCLIBC_HAS_THREADS__
f.__user_locking = 1; /* Set user locking. */
+#ifdef __USE_STDIO_FUTEXES__
+ _IO_lock_init (f._lock);
+#else
__stdio_init_mutex(&f.__lock);
#endif
+#endif
f.__nextopen = NULL;
if (size > ((SIZE_MAX - (size_t) buf)/sizeof(wchar_t))) {
Modified: branches/uClibc-nptl/libc/stdlib/ptsname.c
===================================================================
--- branches/uClibc-nptl/libc/stdlib/ptsname.c 2005-12-10 21:53:53 UTC (rev 12831)
+++ branches/uClibc-nptl/libc/stdlib/ptsname.c 2005-12-10 23:04:41 UTC (rev 12832)
@@ -152,7 +152,7 @@
if (major (st.st_rdev) == 4)
ptyno -= 128;
- if (ptyno / 16 >= __strlen (_ptyname1))
+ if (ptyno / 16 >= __strlen (__libc_ptyname1))
{
errno = ENOTTY;
return ENOTTY;
@@ -160,8 +160,8 @@
__strcpy (buf, _PATH_TTY);
p = buf + __strlen (buf);
- p[0] = _ptyname1[ptyno / 16];
- p[1] = _ptyname2[ptyno % 16];
+ p[0] = __libc_ptyname1[ptyno / 16];
+ p[1] = __libc_ptyname2[ptyno % 16];
p[2] = '\0';
}
Modified: branches/uClibc-nptl/libc/string/arm/strcmp.S
===================================================================
--- branches/uClibc-nptl/libc/string/arm/strcmp.S 2005-12-10 21:53:53 UTC (rev 12831)
+++ branches/uClibc-nptl/libc/string/arm/strcmp.S 2005-12-10 23:04:41 UTC (rev 12832)
@@ -29,7 +29,7 @@
* by Erik Andersen <andersen at codepoet.org>
*/
-#include <locale.h>
+#include <features.h>
.global strcmp
.set strcmp,__strcmp
@@ -50,7 +50,7 @@
mov pc, lr
.size __strcmp,.-__strcmp
-#ifdef __LOCALE_C_ONLY
-.weak __strcoll ; __strcoll = __strcmp
-.global strcoll ; .set strcoll,__strcoll
+#ifndef __UCLIBC_HAS_LOCALE__
+.global __strcoll ; .hidden __strcoll ; __strcoll = __strcmp
+.global strcoll ; .set strcoll,__strcmp
#endif
Modified: branches/uClibc-nptl/libc/string/i386/strcmp.c
===================================================================
--- branches/uClibc-nptl/libc/string/i386/strcmp.c 2005-12-10 21:53:53 UTC (rev 12831)
+++ branches/uClibc-nptl/libc/string/i386/strcmp.c 2005-12-10 23:04:41 UTC (rev 12832)
@@ -57,6 +57,6 @@
strong_alias(__strcmp, strcmp)
#ifdef __LOCALE_C_ONLY
-weak_alias(__strcmp, __strcoll)
-strong_alias(__strcoll, strcoll)
+hidden_strong_alias(__strcmp, __strcoll)
+strong_alias(__strcmp, strcoll)
#endif /* __LOCALE_C_ONLY */
Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/ssp.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/ssp.c 2005-12-10 21:53:53 UTC (rev 12831)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/ssp.c 2005-12-10 23:04:41 UTC (rev 12832)
@@ -31,6 +31,7 @@
#define closelog __closelog
#define sigfillset __sigfillset_internal
#define sigdelset __sigdelset_internal
+#define sigaction __sigaction
#define kill __kill
#include <string.h>
@@ -62,9 +63,9 @@
__write(fd, msg2, __strlen(msg2));
__write(fd, msg3, __strlen(msg3));
__write(fd, "()\n", 3);
- __openlog("ssp", LOG_CONS | LOG_PID, LOG_USER);
- __syslog(LOG_INFO, "%s%s%s()", msg1, msg2, msg3);
- __closelog();
+ openlog("ssp", LOG_CONS | LOG_PID, LOG_USER);
+ syslog(LOG_INFO, "%s%s%s()", msg1, msg2, msg3);
+ closelog();
}
static __always_inline attribute_noreturn void terminate(void)
Modified: branches/uClibc-nptl/libc/sysdeps/linux/mips/pipe.S
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/mips/pipe.S 2005-12-10 21:53:53 UTC (rev 12831)
+++ branches/uClibc-nptl/libc/sysdeps/linux/mips/pipe.S 2005-12-10 23:04:41 UTC (rev 12832)
@@ -7,9 +7,12 @@
#include <asm/unistd.h>
#include <asm/regdef.h>
- .globl pipe
- .ent pipe, 0
-pipe:
+ .globl pipe
+ .set pipe,__pipe
+ .globl __pipe
+ .hidden __pipe
+ .ent __pipe, 0
+__pipe:
addiu sp,sp,-24
sw a0,16(sp)
li v0,__NR_pipe
@@ -27,5 +30,5 @@
2:
addiu sp,sp,24
j ra
- .end pipe
- .size pipe,.-pipe
+ .end __pipe
+ .size __pipe,.-__pipe
Modified: branches/uClibc-nptl/libc/sysdeps/linux/mips/pipe.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/mips/pipe.c 2005-12-10 21:53:53 UTC (rev 12831)
+++ branches/uClibc-nptl/libc/sysdeps/linux/mips/pipe.c 2005-12-10 23:04:41 UTC (rev 12832)
@@ -6,7 +6,7 @@
#include <unistd.h>
#include <syscall.h>
-int pipe(int *fd)
+int attribute_hidden __pipe(int *fd)
{
register long int res __asm__ ("$2"); // v0
register long int res2 __asm__ ("$3"); // v1
@@ -21,3 +21,4 @@
fd[1] = res2;
return(0);
}
+strong_alias(__pipe,pipe)
Modified: branches/uClibc-nptl/libpthread/nptl/init.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/init.c 2005-12-10 21:53:53 UTC (rev 12831)
+++ branches/uClibc-nptl/libpthread/nptl/init.c 2005-12-10 23:04:41 UTC (rev 12832)
@@ -264,13 +264,13 @@
sa.sa_flags = SA_SIGINFO;
__sigemptyset (&sa.sa_mask);
- (void) __sigaction_internal (SIGCANCEL, &sa, NULL);
+ (void) __libc_sigaction (SIGCANCEL, &sa, NULL);
/* Install the handle to change the threads' uid/gid. */
sa.sa_sigaction = sighandler_setxid;
sa.sa_flags = SA_SIGINFO | SA_RESTART;
- (void) __sigaction_internal (SIGSETXID, &sa, NULL);
+ (void) __libc_sigaction (SIGSETXID, &sa, NULL);
/* The parent process might have left the signals blocked. Just in
case, unblock it. We reuse the signal mask in the sigaction
Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/sigaction.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/sigaction.c 2005-12-10 21:53:53 UTC (rev 12831)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/sigaction.c 2005-12-10 23:04:41 UTC (rev 12832)
@@ -42,7 +42,7 @@
return -1;
}
- return __sigaction_internal (sig, act, oact);
+ return __libc_sigaction (sig, act, oact);
}
weak_alias(__sigaction, sigaction)
Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c 2005-12-10 21:53:53 UTC (rev 12831)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c 2005-12-10 23:04:41 UTC (rev 12832)
@@ -68,8 +68,10 @@
/* Return any pending signal or wait for one for the given time. */
-int attribute_hidden
-__sigwaitinfo (const sigset_t *set, siginfo_t *info)
+int
+__sigwaitinfo (set, info)
+ const sigset_t *set;
+ siginfo_t *info;
{
if (SINGLE_THREAD_P)
return do_sigwaitinfo (set, info);
More information about the uClibc-cvs
mailing list