From ricardw at uclibc.org Tue Jul 1 05:54:50 2008 From: ricardw at uclibc.org (ricardw at uclibc.org) Date: Tue, 1 Jul 2008 05:54:50 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/inet Message-ID: <20080701125450.41CF4F8012@busybox.net> Author: ricardw Date: 2008-07-01 05:54:49 -0700 (Tue, 01 Jul 2008) New Revision: 22589 Log: Simplified check_pf() so it returns a bit vector in an unsigned int, instead of modifying the contents of two bools. Removed: trunk/uClibc/libc/inet/check_pf.c Modified: trunk/uClibc/libc/inet/Makefile.in trunk/uClibc/libc/inet/getaddrinfo.c trunk/uClibc/libc/inet/ifaddrs.h Changeset: Modified: trunk/uClibc/libc/inet/Makefile.in =================================================================== --- trunk/uClibc/libc/inet/Makefile.in 2008-07-01 12:20:20 UTC (rev 22588) +++ trunk/uClibc/libc/inet/Makefile.in 2008-07-01 12:54:49 UTC (rev 22589) @@ -14,7 +14,7 @@ ifneq ($(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),) CSRC += getservice.c getproto.c hostid.c getnetent.c getnetbynm.c getnetbyad.c \ inet_net.c herror.c if_index.c gai_strerror.c getaddrinfo.c \ - ether_addr.c ntohl.c ifaddrs.c ntop.c check_pf.c + ether_addr.c ntohl.c ifaddrs.c ntop.c endif ifeq ($(UCLIBC_HAS_IPV6),y) CSRC += in6_addr.c Deleted: trunk/uClibc/libc/inet/check_pf.c =================================================================== --- trunk/uClibc/libc/inet/check_pf.c 2008-07-01 12:20:20 UTC (rev 22588) +++ trunk/uClibc/libc/inet/check_pf.c 2008-07-01 12:54:49 UTC (rev 22589) @@ -1,74 +0,0 @@ -/* Determine protocol families for which interfaces exist. Generic version. - Copyright (C) 2003, 2006 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include "ifaddrs.h" -#include - - -void -attribute_hidden -__check_pf (bool *seen_ipv4, bool *seen_ipv6) -{ - *seen_ipv4 = false; - *seen_ipv6 = false; -#if defined __UCLIBC_SUPPORT_AI_ADDRCONFIG__ - { - /* Get the interface list via getifaddrs. */ - struct ifaddrs *ifa = NULL; - struct ifaddrs *runp; - if (getifaddrs (&ifa) != 0) - { - /* We cannot determine what interfaces are available. Be - optimistic. */ -#if defined __UCLIBC_HAS_IPV4__ - *seen_ipv4 = true; -#endif /* __UCLIBC_HAS_IPV4__ */ -#if defined __UCLIBC_HAS_IPV6__ - *seen_ipv6 = true; -#endif /* __UCLIBC_HAS_IPV6__ */ - return; - } - - for (runp = ifa; runp != NULL; runp = runp->ifa_next) -#if defined __UCLIBC_HAS_IPV4__ - if (runp->ifa_addr->sa_family == PF_INET) - *seen_ipv4 = true; -#endif /* __UCLIBC_HAS_IPV4__ */ -#if defined __UCLIBC_HAS_IPV4__ && defined __UCLIBC_HAS_IPV6__ - else /* can't be both at once */ -#endif /* __UCLIBC_HAS_IPV4__ && defined __UCLIBC_HAS_IPV6__ */ -#if defined __UCLIBC_HAS_IPV6__ - if (runp->ifa_addr->sa_family == PF_INET6) - *seen_ipv6 = true; -#endif /* __UCLIBC_HAS_IPV6__ */ - - (void) freeifaddrs (ifa); - } -#else - /* AI_ADDRCONFIG is disabled, assume both ipv4 and ipv6 available. */ -#if defined __UCLIBC_HAS_IPV4__ - *seen_ipv4 = true; -#endif /* __UCLIBC_HAS_IPV4__ */ -#if defined __UCLIBC_HAS_IPV6__ - *seen_ipv6 = true; -#endif /* __UCLIBC_HAS_IPV6__ */ - -#endif /* __UCLIBC_SUPPORT_AI_ADDRCONFIG__ */ -} Modified: trunk/uClibc/libc/inet/getaddrinfo.c =================================================================== --- trunk/uClibc/libc/inet/getaddrinfo.c 2008-07-01 12:20:20 UTC (rev 22588) +++ trunk/uClibc/libc/inet/getaddrinfo.c 2008-07-01 12:54:49 UTC (rev 22589) @@ -1,6 +1,8 @@ /* * Copyright 1996 by Craig Metz * Copyright (C) 2000-2006 Erik Andersen + * Portions from the GNU C library, + * Copyright (C) 2003, 2006 Free Software Foundation, Inc. * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ @@ -157,29 +159,85 @@ { 0, PF_UNSPEC, 0, 0, 0, NULL, NULL, NULL }; #endif +#define SEEN_IPV4 1 +#define SEEN_IPV6 2 + +static unsigned __check_pf (void) +{ + unsigned seen = 0; +#if defined __UCLIBC_SUPPORT_AI_ADDRCONFIG__ + { + /* Get the interface list via getifaddrs. */ + struct ifaddrs *ifa = NULL; + struct ifaddrs *runp; + if (getifaddrs (&ifa) != 0) + { + /* We cannot determine what interfaces are available. Be + optimistic. */ +#if defined __UCLIBC_HAS_IPV4__ + seen |= SEEN_IPV4; +#endif /* __UCLIBC_HAS_IPV4__ */ +#if defined __UCLIBC_HAS_IPV6__ + seen |= SEEN_IPV6; +#endif /* __UCLIBC_HAS_IPV6__ */ + return seen; + } + + for (runp = ifa; runp != NULL; runp = runp->ifa_next) +#if defined __UCLIBC_HAS_IPV4__ + if (runp->ifa_addr->sa_family == PF_INET) + seen |= SEEN_IPV4; +#endif /* __UCLIBC_HAS_IPV4__ */ +#if defined __UCLIBC_HAS_IPV4__ && defined __UCLIBC_HAS_IPV6__ + else /* can't be both at once */ +#endif /* __UCLIBC_HAS_IPV4__ && defined __UCLIBC_HAS_IPV6__ */ +#if defined __UCLIBC_HAS_IPV6__ + if (runp->ifa_addr->sa_family == PF_INET6) + seen |= SEEN_IPV6; +#endif /* __UCLIBC_HAS_IPV6__ */ + + (void) freeifaddrs (ifa); + } +#else + /* AI_ADDRCONFIG is disabled, assume both ipv4 and ipv6 available. */ +#if defined __UCLIBC_HAS_IPV4__ + seen |= SEEN_IPV4; +#endif /* __UCLIBC_HAS_IPV4__ */ +#if defined __UCLIBC_HAS_IPV6__ + seen |= SEEN_IPV6; +#endif /* __UCLIBC_HAS_IPV6__ */ + +#endif /* __UCLIBC_SUPPORT_AI_ADDRCONFIG__ */ + return seen; +} + static int addrconfig (sa_family_t af) { int s; int ret; int saved_errno = errno; - bool seen_ipv4; - bool seen_ipv6; + unsigned seen; - __check_pf(&seen_ipv4, &seen_ipv6); + seen = __check_pf(); +#if defined __UCLIBC_HAS_IPV4__ if (af == AF_INET) - ret = (int)seen_ipv4; - else if (af == AF_INET6) - ret = (int)seen_ipv6; + ret = seen & SEEN_IPV4; else +#endif +#if defined __UCLIBC_HAS_IPV6__ + if (af == AF_INET6) + ret = seen & SEEN_IPV6; + else +#endif { s = socket(af, SOCK_DGRAM, 0); - if (s < 0) - ret = (errno == EMFILE) ? 1 : 0; + ret = 1; /* Assume PF_UNIX. */ + if (s < 0) { + if (errno != EMFILE) + ret = 0; + } else - { close(s); - ret = 1; - } } __set_errno (saved_errno); return ret; @@ -384,9 +442,7 @@ int rc; int v4mapped = (req->ai_family == PF_UNSPEC || req->ai_family == PF_INET6) && (req->ai_flags & AI_V4MAPPED); - bool seen_ipv4; - bool seen_ipv6; - __check_pf(&seen_ipv4, &seen_ipv6); + unsigned seen = __check_pf(); if (req->ai_protocol || req->ai_socktype) { @@ -574,7 +630,7 @@ #if defined __UCLIBC_HAS_IPV6__ if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET6) - if (!(req->ai_flags & AI_ADDRCONFIG) || seen_ipv6) + if (!(req->ai_flags & AI_ADDRCONFIG) || (seen & SEEN_IPV6)) gethosts (AF_INET6, struct in6_addr); #endif no_inet6_data = no_data; @@ -582,7 +638,7 @@ if (req->ai_family == AF_INET || (!v4mapped && req->ai_family == AF_UNSPEC) || (v4mapped && (no_inet6_data != 0 || (req->ai_flags & AI_ALL)))) - if (!(req->ai_flags & AI_ADDRCONFIG) || seen_ipv4) + if (!(req->ai_flags & AI_ADDRCONFIG) || (seen & SEEN_IPV4)) gethosts (AF_INET, struct in_addr); if (no_data != 0 && no_inet6_data != 0) @@ -715,10 +771,10 @@ for (st2 = st; st2 != NULL; st2 = st2->next) { if (req->ai_flags & AI_ADDRCONFIG) { - if (family == AF_INET && !seen_ipv4) + if (family == AF_INET && !(seen & SEEN_IPV4)) break; #if defined __UCLIBC_HAS_IPV6__ - else if (family == AF_INET6 && !seen_ipv6) + else if (family == AF_INET6 && !(seen & SEEN_IPV6)) break; #endif } Modified: trunk/uClibc/libc/inet/ifaddrs.h =================================================================== --- trunk/uClibc/libc/inet/ifaddrs.h 2008-07-01 12:20:20 UTC (rev 22588) +++ trunk/uClibc/libc/inet/ifaddrs.h 2008-07-01 12:54:49 UTC (rev 22589) @@ -73,17 +73,4 @@ __END_DECLS -struct in6addrinfo -{ - enum { - in6ai_deprecated = 1, - in6ai_temporary = 2, - in6ai_homeaddress = 4 - } flags; - uint32_t addr[4]; -}; - -extern void __check_pf (bool *seen_ipv4, bool *seen_ipv6) - attribute_hidden; - #endif /* ifaddrs.h */ From carmelo at uclibc.org Wed Jul 2 08:45:57 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 2 Jul 2008 08:45:57 -0700 (PDT) Subject: svn commit: trunk/uClibc/test Message-ID: <20080702154557.E52603C650@busybox.net> Author: carmelo Date: 2008-07-02 08:45:57 -0700 (Wed, 02 Jul 2008) New Revision: 22611 Log: Fix makefile target to run test when there are some shell script. SImply do not include SHEL_TESTS among RUNTIME_TESTS, because shell script have a their own rule to be excuted. The runtime evaluation by using the $(shell ...) command doesn't work due to immediate expansion of shell function. Currently only nptl tests have shell script, so this problem have been never discovered before. Signed-off-by: Filippo Arcidiacono Signed-off-by: Carmelo Amoroso Modified: trunk/uClibc/test/Test.mak Changeset: Modified: trunk/uClibc/test/Test.mak =================================================================== --- trunk/uClibc/test/Test.mak 2008-07-02 15:43:58 UTC (rev 22610) +++ trunk/uClibc/test/Test.mak 2008-07-02 15:45:57 UTC (rev 22611) @@ -32,8 +32,8 @@ endif CLEAN_TARGETS := $(U_TARGETS) $(G_TARGETS) COMPILE_TARGETS := $(TARGETS) -TARGETS += $(SHELL_TESTS) RUN_TARGETS := $(patsubst %,%.exe,$(TARGETS)) +TARGETS += $(SHELL_TESTS) define binary_name $(patsubst %.exe,%,$@) @@ -73,13 +73,11 @@ test check all: run run: $(RUN_TARGETS) compile $(RUN_TARGETS): $(TARGETS) -ifeq ($(shell echo "$(SHELL_TESTS)"|grep "$(binary_name)"),) $(exec_test) $(diff_test) ifeq ($(UCLIBC_ONLY),) $(uclibc_glibc_diff_test) endif -endif compile: $(COMPILE_TARGETS) From carmelo at uclibc.org Wed Jul 2 09:26:23 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 2 Jul 2008 09:26:23 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/sysdeps/linux: alpha/bits common/bits mips/bits sparc/b etc... Message-ID: <20080702162623.ED8E73C671@busybox.net> Author: carmelo Date: 2008-07-02 09:26:23 -0700 (Wed, 02 Jul 2008) New Revision: 22612 Log: Include errno.h from kernel headers instead of using internal errno_values.h otherwie some errno will be missed (i.e. ENOKEY used in libusb) Signed-off-by: Carmelo Amoroso Removed: trunk/uClibc/libc/sysdeps/linux/alpha/bits/errno_values.h trunk/uClibc/libc/sysdeps/linux/common/bits/errno_values.h trunk/uClibc/libc/sysdeps/linux/mips/bits/errno_values.h trunk/uClibc/libc/sysdeps/linux/sparc/bits/errno_values.h Modified: trunk/uClibc/libc/sysdeps/linux/common/bits/errno.h Changeset: Deleted: trunk/uClibc/libc/sysdeps/linux/alpha/bits/errno_values.h =================================================================== --- trunk/uClibc/libc/sysdeps/linux/alpha/bits/errno_values.h 2008-07-02 15:45:57 UTC (rev 22611) +++ trunk/uClibc/libc/sysdeps/linux/alpha/bits/errno_values.h 2008-07-02 16:26:23 UTC (rev 22612) @@ -1,129 +0,0 @@ -#ifndef _BITS_ERRNO_VALUES_H -#define _BITS_ERRNO_VALUES_H - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Arg list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No child processes */ -#define EDEADLK 11 /* Resource deadlock would occur */ -#define ENOMEM 12 /* Out of memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Device or resource busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* File table overflow */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ -#define EDOM 33 /* Math argument out of domain of func */ -#define ERANGE 34 /* Math result not representable */ -#define EAGAIN 35 /* Try again */ -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define EINPROGRESS 36 /* Operation now in progress */ -#define EALREADY 37 /* Operation already in progress */ -#define ENOTSOCK 38 /* Socket operation on non-socket */ -#define EDESTADDRREQ 39 /* Destination address required */ -#define EMSGSIZE 40 /* Message too long */ -#define EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 42 /* Protocol not available */ -#define EPROTONOSUPPORT 43 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define EOPNOTSUPP 45 /* Operation not supported on transport endpoint */ -#define EPFNOSUPPORT 46 /* Protocol family not supported */ -#define EAFNOSUPPORT 47 /* Address family not supported by protocol */ -#define EADDRINUSE 48 /* Address already in use */ -#define EADDRNOTAVAIL 49 /* Cannot assign requested address */ -#define ENETDOWN 50 /* Network is down */ -#define ENETUNREACH 51 /* Network is unreachable */ -#define ENETRESET 52 /* Network dropped connection because of reset */ -#define ECONNABORTED 53 /* Software caused connection abort */ -#define ECONNRESET 54 /* Connection reset by peer */ -#define ENOBUFS 55 /* No buffer space available */ -#define EISCONN 56 /* Transport endpoint is already connected */ -#define ENOTCONN 57 /* Transport endpoint is not connected */ -#define ESHUTDOWN 58 /* Cannot send after transport endpoint shutdown */ -#define ETOOMANYREFS 59 /* Too many references: cannot splice */ -#define ETIMEDOUT 60 /* Connection timed out */ -#define ECONNREFUSED 61 /* Connection refused */ -#define ELOOP 62 /* Too many symbolic links encountered */ -#define ENAMETOOLONG 63 /* File name too long */ -#define EHOSTDOWN 64 /* Host is down */ -#define EHOSTUNREACH 65 /* No route to host */ -#define ENOTEMPTY 66 /* Directory not empty */ -#define EUSERS 68 /* Too many users */ -#define EDQUOT 69 /* Quota exceeded */ -#define ESTALE 70 /* Stale NFS file handle */ -#define EREMOTE 71 /* Object is remote */ -#define ENOLCK 77 /* No record locks available */ -#define ENOSYS 78 /* Function not implemented */ -#define ENOMSG 80 /* No message of desired type */ -#define EIDRM 81 /* Identifier removed */ -#define ENOSR 82 /* Out of streams resources */ -#define ETIME 83 /* Timer expired */ -#define EBADMSG 84 /* Not a data message */ -#define EPROTO 85 /* Protocol error */ -#define ENODATA 86 /* No data available */ -#define ENOSTR 87 /* Device not a stream */ -#define ENOPKG 92 /* Package not installed */ -#define EILSEQ 116 /* Illegal byte sequence */ -#define ECHRNG 88 /* Channel number out of range */ -#define EL2NSYNC 89 /* Level 2 not synchronized */ -#define EL3HLT 90 /* Level 3 halted */ -#define EL3RST 91 /* Level 3 reset */ -#define ELNRNG 93 /* Link number out of range */ -#define EUNATCH 94 /* Protocol driver not attached */ -#define ENOCSI 95 /* No CSI structure available */ -#define EL2HLT 96 /* Level 2 halted */ -#define EBADE 97 /* Invalid exchange */ -#define EBADR 98 /* Invalid request descriptor */ -#define EXFULL 99 /* Exchange full */ -#define ENOANO 100 /* No anode */ -#define EBADRQC 101 /* Invalid request code */ -#define EBADSLT 102 /* Invalid slot */ -#define EDEADLOCK EDEADLK -#define EBFONT 104 /* Bad font file format */ -#define ENONET 105 /* Machine is not on the network */ -#define ENOLINK 106 /* Link has been severed */ -#define EADV 107 /* Advertise error */ -#define ESRMNT 108 /* Srmount error */ -#define ECOMM 109 /* Communication error on send */ -#define EMULTIHOP 110 /* Multihop attempted */ -#define EDOTDOT 111 /* RFS specific error */ -#define EOVERFLOW 112 /* Value too large for defined data type */ -#define ENOTUNIQ 113 /* Name not unique on network */ -#define EBADFD 114 /* File descriptor in bad state */ -#define EREMCHG 115 /* Remote address changed */ -#define EUCLEAN 117 /* Structure needs cleaning */ -#define ENOTNAM 118 /* Not a XENIX named type file */ -#define ENAVAIL 119 /* No XENIX semaphores available */ -#define EISNAM 120 /* Is a named type file */ -#define EREMOTEIO 121 /* Remote I/O error */ -#define ELIBACC 122 /* Can not access a needed shared library */ -#define ELIBBAD 123 /* Accessing a corrupted shared library */ -#define ELIBSCN 124 /* .lib section in a.out corrupted */ -#define ELIBMAX 125 /* Attempting to link in too many shared libraries */ -#define ELIBEXEC 126 /* Cannot exec a shared library directly */ -#define ERESTART 127 /* Interrupted system call should be restarted */ -#define ESTRPIPE 128 /* Streams pipe error */ -#define ENOMEDIUM 129 /* No medium found */ -#define EMEDIUMTYPE 130 /* Wrong medium type */ - -#endif /* _BITS_ERRNO_VALUES_H */ Modified: trunk/uClibc/libc/sysdeps/linux/common/bits/errno.h =================================================================== --- trunk/uClibc/libc/sysdeps/linux/common/bits/errno.h 2008-07-02 15:45:57 UTC (rev 22611) +++ trunk/uClibc/libc/sysdeps/linux/common/bits/errno.h 2008-07-02 16:26:23 UTC (rev 22612) @@ -22,7 +22,7 @@ # undef EDOM # undef EILSEQ # undef ERANGE -# include +# include /* Linux has no ENOTSUP error code. */ # define ENOTSUP EOPNOTSUPP Deleted: trunk/uClibc/libc/sysdeps/linux/common/bits/errno_values.h =================================================================== --- trunk/uClibc/libc/sysdeps/linux/common/bits/errno_values.h 2008-07-02 15:45:57 UTC (rev 22611) +++ trunk/uClibc/libc/sysdeps/linux/common/bits/errno_values.h 2008-07-02 16:26:23 UTC (rev 22612) @@ -1,137 +0,0 @@ -#ifndef _BITS_ERRNO_VALUES_H -#define _BITS_ERRNO_VALUES_H - -/* Most architectures use these errno values (i.e. arm cris - * i386 ia64 m68k parisc ppc ppc64 s390 s390x sh x86_64, etc) - * - * A few arches do their own wierd thing, specifically alpha, - * mips, and sparc. - * - */ - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Argument list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No child processes */ -#define EAGAIN 11 /* Try again */ -#define ENOMEM 12 /* Out of memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Device or resource busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* File table overflow */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ -#define EDOM 33 /* Math argument out of domain of func */ -#define ERANGE 34 /* Math result not representable */ -#define EDEADLK 35 /* Resource deadlock would occur */ -#define ENAMETOOLONG 36 /* File name too long */ -#define ENOLCK 37 /* No record locks available */ -#define ENOSYS 38 /* Function not implemented */ -#define ENOTEMPTY 39 /* Directory not empty */ -#define ELOOP 40 /* Too many symbolic links encountered */ -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define ENOMSG 42 /* No message of desired type */ -#define EIDRM 43 /* Identifier removed */ -#define ECHRNG 44 /* Channel number out of range */ -#define EL2NSYNC 45 /* Level 2 not synchronized */ -#define EL3HLT 46 /* Level 3 halted */ -#define EL3RST 47 /* Level 3 reset */ -#define ELNRNG 48 /* Link number out of range */ -#define EUNATCH 49 /* Protocol driver not attached */ -#define ENOCSI 50 /* No CSI structure available */ -#define EL2HLT 51 /* Level 2 halted */ -#define EBADE 52 /* Invalid exchange */ -#define EBADR 53 /* Invalid request descriptor */ -#define EXFULL 54 /* Exchange full */ -#define ENOANO 55 /* No anode */ -#define EBADRQC 56 /* Invalid request code */ -#define EBADSLT 57 /* Invalid slot */ -#define EDEADLOCK EDEADLK -#define EBFONT 59 /* Bad font file format */ -#define ENOSTR 60 /* Device not a stream */ -#define ENODATA 61 /* No data available */ -#define ETIME 62 /* Timer expired */ -#define ENOSR 63 /* Out of streams resources */ -#define ENONET 64 /* Machine is not on the network */ -#define ENOPKG 65 /* Package not installed */ -#define EREMOTE 66 /* Object is remote */ -#define ENOLINK 67 /* Link has been severed */ -#define EADV 68 /* Advertise error */ -#define ESRMNT 69 /* Srmount error */ -#define ECOMM 70 /* Communication error on send */ -#define EPROTO 71 /* Protocol error */ -#define EMULTIHOP 72 /* Multihop attempted */ -#define EDOTDOT 73 /* RFS specific error */ -#define EBADMSG 74 /* Not a data message */ -#define EOVERFLOW 75 /* Value too large for defined data type */ -#define ENOTUNIQ 76 /* Name not unique on network */ -#define EBADFD 77 /* File descriptor in bad state */ -#define EREMCHG 78 /* Remote address changed */ -#define ELIBACC 79 /* Can not access a needed shared library */ -#define ELIBBAD 80 /* Accessing a corrupted shared library */ -#define ELIBSCN 81 /* .lib section in a.out corrupted */ -#define ELIBMAX 82 /* Attempting to link in too many shared libraries */ -#define ELIBEXEC 83 /* Cannot exec a shared library directly */ -#define EILSEQ 84 /* Illegal byte sequence */ -#define ERESTART 85 /* Interrupted system call should be restarted */ -#define ESTRPIPE 86 /* Streams pipe error */ -#define EUSERS 87 /* Too many users */ -#define ENOTSOCK 88 /* Socket operation on non-socket */ -#define EDESTADDRREQ 89 /* Destination address required */ -#define EMSGSIZE 90 /* Message too long */ -#define EPROTOTYPE 91 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 92 /* Protocol not available */ -#define EPROTONOSUPPORT 93 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 94 /* Socket type not supported */ -#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ -#define EPFNOSUPPORT 96 /* Protocol family not supported */ -#define EAFNOSUPPORT 97 /* Address family not supported by protocol */ -#define EADDRINUSE 98 /* Address already in use */ -#define EADDRNOTAVAIL 99 /* Cannot assign requested address */ -#define ENETDOWN 100 /* Network is down */ -#define ENETUNREACH 101 /* Network is unreachable */ -#define ENETRESET 102 /* Network dropped connection because of reset */ -#define ECONNABORTED 103 /* Software caused connection abort */ -#define ECONNRESET 104 /* Connection reset by peer */ -#define ENOBUFS 105 /* No buffer space available */ -#define EISCONN 106 /* Transport endpoint is already connected */ -#define ENOTCONN 107 /* Transport endpoint is not connected */ -#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ -#define ETOOMANYREFS 109 /* Too many references: cannot splice */ -#define ETIMEDOUT 110 /* Connection timed out */ -#define ECONNREFUSED 111 /* Connection refused */ -#define EHOSTDOWN 112 /* Host is down */ -#define EHOSTUNREACH 113 /* No route to host */ -#define EALREADY 114 /* Operation already in progress */ -#define EINPROGRESS 115 /* Operation now in progress */ -#define ESTALE 116 /* Stale NFS file handle */ -#define EUCLEAN 117 /* Structure needs cleaning */ -#define ENOTNAM 118 /* Not a XENIX named type file */ -#define ENAVAIL 119 /* No XENIX semaphores available */ -#define EISNAM 120 /* Is a named type file */ -#define EREMOTEIO 121 /* Remote I/O error */ -#define EDQUOT 122 /* Quota exceeded */ -#define ENOMEDIUM 123 /* No medium found */ -#define EMEDIUMTYPE 124 /* Wrong medium type */ - -#endif /* _BITS_ERRNO_VALUES_H */ Deleted: trunk/uClibc/libc/sysdeps/linux/mips/bits/errno_values.h =================================================================== --- trunk/uClibc/libc/sysdeps/linux/mips/bits/errno_values.h 2008-07-02 15:45:57 UTC (rev 22611) +++ trunk/uClibc/libc/sysdeps/linux/mips/bits/errno_values.h 2008-07-02 16:26:23 UTC (rev 22612) @@ -1,135 +0,0 @@ -#ifndef _BITS_ERRNO_VALUES_H -#define _BITS_ERRNO_VALUES_H - -/* These error numbers are intended to be MIPS ABI compatible */ - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Argument list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No child processes */ -#define EAGAIN 11 /* Try again */ -#define ENOMEM 12 /* Out of memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Device or resource busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* File table overflow */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ -#define EDOM 33 /* Math argument out of domain of func */ -#define ERANGE 34 /* Math result not representable */ -#define ENOMSG 35 /* No message of desired type */ -#define EIDRM 36 /* Identifier removed */ -#define ECHRNG 37 /* Channel number out of range */ -#define EL2NSYNC 38 /* Level 2 not synchronized */ -#define EL3HLT 39 /* Level 3 halted */ -#define EL3RST 40 /* Level 3 reset */ -#define ELNRNG 41 /* Link number out of range */ -#define EUNATCH 42 /* Protocol driver not attached */ -#define ENOCSI 43 /* No CSI structure available */ -#define EL2HLT 44 /* Level 2 halted */ -#define EDEADLK 45 /* Resource deadlock would occur */ -#define ENOLCK 46 /* No record locks available */ -#define EBADE 50 /* Invalid exchange */ -#define EBADR 51 /* Invalid request descriptor */ -#define EXFULL 52 /* Exchange full */ -#define ENOANO 53 /* No anode */ -#define EBADRQC 54 /* Invalid request code */ -#define EBADSLT 55 /* Invalid slot */ -#define EDEADLOCK 56 /* File locking deadlock error */ -#define EBFONT 59 /* Bad font file format */ -#define ENOSTR 60 /* Device not a stream */ -#define ENODATA 61 /* No data available */ -#define ETIME 62 /* Timer expired */ -#define ENOSR 63 /* Out of streams resources */ -#define ENONET 64 /* Machine is not on the network */ -#define ENOPKG 65 /* Package not installed */ -#define EREMOTE 66 /* Object is remote */ -#define ENOLINK 67 /* Link has been severed */ -#define EADV 68 /* Advertise error */ -#define ESRMNT 69 /* Srmount error */ -#define ECOMM 70 /* Communication error on send */ -#define EPROTO 71 /* Protocol error */ -#define EDOTDOT 73 /* RFS specific error */ -#define EMULTIHOP 74 /* Multihop attempted */ -#define EBADMSG 77 /* Not a data message */ -#define ENAMETOOLONG 78 /* File name too long */ -#define EOVERFLOW 79 /* Value too large for defined data type */ -#define ENOTUNIQ 80 /* Name not unique on network */ -#define EBADFD 81 /* File descriptor in bad state */ -#define EREMCHG 82 /* Remote address changed */ -#define ELIBACC 83 /* Can not access a needed shared library */ -#define ELIBBAD 84 /* Accessing a corrupted shared library */ -#define ELIBSCN 85 /* .lib section in a.out corrupted */ -#define ELIBMAX 86 /* Attempting to link in too many shared libraries */ -#define ELIBEXEC 87 /* Cannot exec a shared library directly */ -#define EILSEQ 88 /* Illegal byte sequence */ -#define ENOSYS 89 /* Function not implemented */ -#define ELOOP 90 /* Too many symbolic links encountered */ -#define ERESTART 91 /* Interrupted system call should be restarted */ -#define ESTRPIPE 92 /* Streams pipe error */ -#define ENOTEMPTY 93 /* Directory not empty */ -#define EUSERS 94 /* Too many users */ -#define ENOTSOCK 95 /* Socket operation on non-socket */ -#define EDESTADDRREQ 96 /* Destination address required */ -#define EMSGSIZE 97 /* Message too long */ -#define EPROTOTYPE 98 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 99 /* Protocol not available */ -#define EPROTONOSUPPORT 120 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 121 /* Socket type not supported */ -#define EOPNOTSUPP 122 /* Operation not supported on transport endpoint */ -#define EPFNOSUPPORT 123 /* Protocol family not supported */ -#define EAFNOSUPPORT 124 /* Address family not supported by protocol */ -#define EADDRINUSE 125 /* Address already in use */ -#define EADDRNOTAVAIL 126 /* Cannot assign requested address */ -#define ENETDOWN 127 /* Network is down */ -#define ENETUNREACH 128 /* Network is unreachable */ -#define ENETRESET 129 /* Network dropped connection because of reset */ -#define ECONNABORTED 130 /* Software caused connection abort */ -#define ECONNRESET 131 /* Connection reset by peer */ -#define ENOBUFS 132 /* No buffer space available */ -#define EISCONN 133 /* Transport endpoint is already connected */ -#define ENOTCONN 134 /* Transport endpoint is not connected */ -#define EUCLEAN 135 /* Structure needs cleaning */ -#define ENOTNAM 137 /* Not a XENIX named type file */ -#define ENAVAIL 138 /* No XENIX semaphores available */ -#define EISNAM 139 /* Is a named type file */ -#define EREMOTEIO 140 /* Remote I/O error */ -#define EINIT 141 /* Reserved */ -#define EREMDEV 142 /* Error 142 */ -#define ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */ -#define ETOOMANYREFS 144 /* Too many references: cannot splice */ -#define ETIMEDOUT 145 /* Connection timed out */ -#define ECONNREFUSED 146 /* Connection refused */ -#define EHOSTDOWN 147 /* Host is down */ -#define EHOSTUNREACH 148 /* No route to host */ -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define EALREADY 149 /* Operation already in progress */ -#define EINPROGRESS 150 /* Operation now in progress */ -#define ESTALE 151 /* Stale NFS file handle */ -#define ECANCELED 158 /* AIO operation canceled */ -/* These errors are Linux extensions. */ -#define ENOMEDIUM 159 /* No medium found */ -#define EMEDIUMTYPE 160 /* Wrong medium type */ -#define EDQUOT 1133 /* Quota exceeded */ - -#endif /* _BITS_ERRNO_VALUES_H */ Deleted: trunk/uClibc/libc/sysdeps/linux/sparc/bits/errno_values.h =================================================================== --- trunk/uClibc/libc/sysdeps/linux/sparc/bits/errno_values.h 2008-07-02 15:45:57 UTC (rev 22611) +++ trunk/uClibc/libc/sysdeps/linux/sparc/bits/errno_values.h 2008-07-02 16:26:23 UTC (rev 22612) @@ -1,134 +0,0 @@ -#ifndef _BITS_ERRNO_VALUES_H -#define _BITS_ERRNO_VALUES_H - -/* These match the SunOS error numbering scheme. */ - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Arg list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No child processes */ -#define EAGAIN 11 /* Try again */ -#define ENOMEM 12 /* Out of memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Device or resource busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* File table overflow */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ -#define EDOM 33 /* Math argument out of domain of func */ -#define ERANGE 34 /* Math result not representable */ -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define EINPROGRESS 36 /* Operation now in progress */ -#define EALREADY 37 /* Operation already in progress */ -#define ENOTSOCK 38 /* Socket operation on non-socket */ -#define EDESTADDRREQ 39 /* Destination address required */ -#define EMSGSIZE 40 /* Message too long */ -#define EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 42 /* Protocol not available */ -#define EPROTONOSUPPORT 43 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define EOPNOTSUPP 45 /* Op not supported on transport endpoint */ -#define EPFNOSUPPORT 46 /* Protocol family not supported */ -#define EAFNOSUPPORT 47 /* Address family not supported by protocol */ -#define EADDRINUSE 48 /* Address already in use */ -#define EADDRNOTAVAIL 49 /* Cannot assign requested address */ -#define ENETDOWN 50 /* Network is down */ -#define ENETUNREACH 51 /* Network is unreachable */ -#define ENETRESET 52 /* Net dropped connection because of reset */ -#define ECONNABORTED 53 /* Software caused connection abort */ -#define ECONNRESET 54 /* Connection reset by peer */ -#define ENOBUFS 55 /* No buffer space available */ -#define EISCONN 56 /* Transport endpoint is already connected */ -#define ENOTCONN 57 /* Transport endpoint is not connected */ -#define ESHUTDOWN 58 /* No send after transport endpoint shutdown */ -#define ETOOMANYREFS 59 /* Too many references: cannot splice */ -#define ETIMEDOUT 60 /* Connection timed out */ -#define ECONNREFUSED 61 /* Connection refused */ -#define ELOOP 62 /* Too many symbolic links encountered */ -#define ENAMETOOLONG 63 /* File name too long */ -#define EHOSTDOWN 64 /* Host is down */ -#define EHOSTUNREACH 65 /* No route to host */ -#define ENOTEMPTY 66 /* Directory not empty */ -#define EPROCLIM 67 /* SUNOS: Too many processes */ -#define EUSERS 68 /* Too many users */ -#define EDQUOT 69 /* Quota exceeded */ -#define ESTALE 70 /* Stale NFS file handle */ -#define EREMOTE 71 /* Object is remote */ -#define ENOSTR 72 /* Device not a stream */ -#define ETIME 73 /* Timer expired */ -#define ENOSR 74 /* Out of streams resources */ -#define ENOMSG 75 /* No message of desired type */ -#define EBADMSG 76 /* Not a data message */ -#define EIDRM 77 /* Identifier removed */ -#define EDEADLK 78 /* Resource deadlock would occur */ -#define ENOLCK 79 /* No record locks available */ -#define ENONET 80 /* Machine is not on the network */ -#define ERREMOTE 81 /* SunOS: Too many lvls of remote in path */ -#define ENOLINK 82 /* Link has been severed */ -#define EADV 83 /* Advertise error */ -#define ESRMNT 84 /* Srmount error */ -#define ECOMM 85 /* Communication error on send */ -#define EPROTO 86 /* Protocol error */ -#define EMULTIHOP 87 /* Multihop attempted */ -#define EDOTDOT 88 /* RFS specific error */ -#define EREMCHG 89 /* Remote address changed */ -#define ENOSYS 90 /* Function not implemented */ -/* The rest have no SunOS equivalent. */ -#define ESTRPIPE 91 /* Streams pipe error */ -#define EOVERFLOW 92 /* Value too large for defined data type */ -#define EBADFD 93 /* File descriptor in bad state */ -#define ECHRNG 94 /* Channel number out of range */ -#define EL2NSYNC 95 /* Level 2 not synchronized */ -#define EL3HLT 96 /* Level 3 halted */ -#define EL3RST 97 /* Level 3 reset */ -#define ELNRNG 98 /* Link number out of range */ -#define EUNATCH 99 /* Protocol driver not attached */ -#define ENOCSI 100 /* No CSI structure available */ -#define EL2HLT 101 /* Level 2 halted */ -#define EBADE 102 /* Invalid exchange */ -#define EBADR 103 /* Invalid request descriptor */ -#define EXFULL 104 /* Exchange full */ -#define ENOANO 105 /* No anode */ -#define EBADRQC 106 /* Invalid request code */ -#define EBADSLT 107 /* Invalid slot */ -#define EDEADLOCK 108 /* File locking deadlock error */ -#define EBFONT 109 /* Bad font file format */ -#define ELIBEXEC 110 /* Cannot exec a shared library directly */ -#define ENODATA 111 /* No data available */ -#define ELIBBAD 112 /* Accessing a corrupted shared library */ -#define ENOPKG 113 /* Package not installed */ -#define ELIBACC 114 /* Can not access a needed shared library */ -#define ENOTUNIQ 115 /* Name not unique on network */ -#define ERESTART 116 /* Interrupted syscall should be restarted */ -#define EUCLEAN 117 /* Structure needs cleaning */ -#define ENOTNAM 118 /* Not a XENIX named type file */ -#define ENAVAIL 119 /* No XENIX semaphores available */ -#define EISNAM 120 /* Is a named type file */ -#define EREMOTEIO 121 /* Remote I/O error */ -#define EILSEQ 122 /* Illegal byte sequence */ -#define ELIBMAX 123 /* Atmpt to link in too many shared libs */ -#define ELIBSCN 124 /* .lib section in a.out corrupted */ -#define ENOMEDIUM 125 /* No medium found */ -#define EMEDIUMTYPE 126 /* Wrong medium type */ - -#endif /* _BITS_ERRNO_VALUES_H */ From vda at uclibc.org Mon Jul 7 19:41:22 2008 From: vda at uclibc.org (vda at uclibc.org) Date: Mon, 7 Jul 2008 19:41:22 -0700 (PDT) Subject: svn commit: trunk/uClibc: extra/Configs include libc/sysdeps/linux etc... Message-ID: <20080708024122.2EA7C3C2C9@busybox.net> Author: vda Date: 2008-07-07 19:41:21 -0700 (Mon, 07 Jul 2008) New Revision: 22677 Log: New .config option UCLIBC_HAS_STUBS, enables fork() stub on NOMMU Modified: trunk/uClibc/extra/Configs/Config.in trunk/uClibc/include/unistd.h trunk/uClibc/libc/sysdeps/linux/common/fork.c Changeset: Modified: trunk/uClibc/extra/Configs/Config.in =================================================================== --- trunk/uClibc/extra/Configs/Config.in 2008-07-07 23:20:09 UTC (rev 22676) +++ trunk/uClibc/extra/Configs/Config.in 2008-07-08 02:41:21 UTC (rev 22677) @@ -515,6 +515,23 @@ Currently applies to bcopy/bzero/bcmp/index/rindex et al. WARNING! ABI incompatibility. +config UCLIBC_HAS_STUBS + bool "Provide stubs for unavailable functionality" + default n + help + With this option uClibc provides non-functional stubs for + functions which are impossible to implement on the target + architecture. Otherwise, such functions are simply omitted. + + As of 2008-07, this option makes uClibc provide fork() stub + on NOMMU targets. It always sets errno to ENOSYS and returns -1. + + This may be useful if you port a lot of software and cannot + audit all of it and replace or disable fork() usage. + With this option, a program which uses fork() will build + successfully. Of course, it may be useless if fork() + is essential for its operation. + config UCLIBC_HAS_SHADOW bool "Shadow Password Support" default y Modified: trunk/uClibc/include/unistd.h =================================================================== --- trunk/uClibc/include/unistd.h 2008-07-07 23:20:09 UTC (rev 22676) +++ trunk/uClibc/include/unistd.h 2008-07-08 02:41:21 UTC (rev 22677) @@ -717,7 +717,7 @@ #endif -#ifdef __ARCH_USE_MMU__ +#if defined __UCLIBC_HAS_STUBS__ || defined __ARCH_USE_MMU__ /* Clone the calling process, creating an exact copy. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ Modified: trunk/uClibc/libc/sysdeps/linux/common/fork.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/common/fork.c 2008-07-07 23:20:09 UTC (rev 22676) +++ trunk/uClibc/libc/sysdeps/linux/common/fork.c 2008-07-08 02:41:21 UTC (rev 22677) @@ -11,6 +11,7 @@ #include #ifdef __ARCH_USE_MMU__ + #ifdef __NR_fork extern __typeof(fork) __libc_fork; #define __NR___libc_fork __NR_fork @@ -19,4 +20,17 @@ weak_alias(__libc_fork,fork) libc_hidden_weak(fork) #endif + +#elif defined __UCLIBC_HAS_STUBS__ + +pid_t __libc_fork(void) +{ + __set_errno(ENOSYS); + return -1; +} +libc_hidden_proto(fork) +weak_alias(__libc_fork,fork) +libc_hidden_weak(fork) +link_warning(fork, "fork: this function is not implemented on no-mmu systems") + #endif From carmelo at uclibc.org Tue Jul 8 01:05:45 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Tue, 8 Jul 2008 01:05:45 -0700 (PDT) Subject: svn commit: trunk/uClibc: test test/signal Message-ID: <20080708080545.6258F3C682@busybox.net> Author: carmelo Date: 2008-07-08 01:05:44 -0700 (Tue, 08 Jul 2008) New Revision: 22684 Log: Fix the test build system by installing headers on a local folder instead of using internal headers. Signed-off-by: Filippo Arcidiacono Signed-off-by: Carmelo Amoroso Modified: trunk/uClibc/Makefile.in trunk/uClibc/Rules.mak trunk/uClibc/test/Rules.mak trunk/uClibc/test/signal/Makefile Changeset: Modified: trunk/uClibc/Makefile.in =================================================================== --- trunk/uClibc/Makefile.in 2008-07-08 06:40:05 UTC (rev 22683) +++ trunk/uClibc/Makefile.in 2008-07-08 08:05:44 UTC (rev 22684) @@ -66,7 +66,7 @@ ifneq ($(TARGET_SUBARCH),) HEADERS_BITS_SUBARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/*.h)) endif -HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH) $(HEADERS_BITS_SUBARCH),$(HEADERS_BITS_COMMON)) +HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH) $(HEADERS_BITS_SUBARCH) $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_COMMON)) HEADERS_SYS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/sys/*.h)) HEADERS_SYS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/sys/*.h)) @@ -152,6 +152,15 @@ mv -f $$tmp include/bits/sysnum.h; \ fi +$(LOCAL_INSTALL_PATH): + $(Q)$(MAKE) PREFIX=$(shell pwd)/ RUNTIME_PREFIX=./ \ + DEVEL_PREFIX=$(LOCAL_INSTALL_PATH)/usr/ \ + HOSTCC="$(HOSTCC)" \ + install_kernel_headers + $(Q)$(MAKE) PREFIX=$(shell pwd)/ RUNTIME_PREFIX=./ \ + DEVEL_PREFIX=$(LOCAL_INSTALL_PATH)/usr/ \ + HOSTCC="$(HOSTCC)" \ + install_dev install: install_runtime install_dev @@ -451,7 +460,8 @@ $(Q)$(RM) -r lib include/bits $(RM) ldso/*/*.a libpthread/*/*.a libc/*.a libcrypt/*.a libintl/*.a \ libm/*.a libnsl/*.a libpthread/*.a libresolv/*.a librt/*.a \ - libutil/*.a lib/*.a + libutil/*.a lib/*.a \ + include/fpu_control.h include/dl-osinfo.h include/hp-timing.h $(MAKE) objclean-y headers_clean-y $(MAKE) -s -C test clean $(MAKE) -C utils utils_clean @@ -466,6 +476,7 @@ fi @$(RM) include/linux include/asm* $(RM) $(top_builddir)extra/scripts/unifdef + $(RM) -r $(LOCAL_INSTALL_PATH) distclean: clean -find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \) -exec $(RM) {} \; @@ -481,3 +492,6 @@ test check: $(Q)$(MAKE) -C test + +test_compile: $(LOCAL_INSTALL_PATH) + $(Q)$(MAKE) -C test compile Modified: trunk/uClibc/Rules.mak =================================================================== --- trunk/uClibc/Rules.mak 2008-07-08 06:40:05 UTC (rev 22683) +++ trunk/uClibc/Rules.mak 2008-07-08 08:05:44 UTC (rev 22684) @@ -632,3 +632,5 @@ SHARED_START_FILES:=$(top_builddir)lib/crti.o $(LIBGCC_DIR)crtbeginS.o SHARED_END_FILES:=$(LIBGCC_DIR)crtendS.o $(top_builddir)lib/crtn.o endif + +LOCAL_INSTALL_PATH := install_dir Modified: trunk/uClibc/test/Rules.mak =================================================================== --- trunk/uClibc/test/Rules.mak 2008-07-08 06:40:05 UTC (rev 22683) +++ trunk/uClibc/test/Rules.mak 2008-07-08 08:05:44 UTC (rev 22684) @@ -79,7 +79,11 @@ XWARNINGS := $(subst ",, $(strip $(WARNINGS))) -Wstrict-prototypes XARCH_CFLAGS := $(subst ",, $(strip $(ARCH_CFLAGS))) $(CPU_CFLAGS) XCOMMON_CFLAGS := -D_GNU_SOURCE -I$(top_builddir)test -CFLAGS += $(XWARNINGS) $(OPTIMIZATION) $(XCOMMON_CFLAGS) $(XARCH_CFLAGS) -I$(top_builddir)include $(PTINC) +CFLAGS := $(XWARNINGS) $(OPTIMIZATION) $(XCOMMON_CFLAGS) $(XARCH_CFLAGS) -nostdinc -I$(top_builddir)$(LOCAL_INSTALL_PATH)/usr/include + +CC_IPREFIX:=$(shell $(CC) --print-file-name=include) +CFLAGS += -I$(CC_IPREFIX) + HOST_CFLAGS += $(XWARNINGS) $(OPTIMIZATION) $(XCOMMON_CFLAGS) LDFLAGS := $(CPU_LDFLAGS) @@ -97,11 +101,12 @@ LDFLAGS += -static HOST_LDFLAGS += -static endif + LDFLAGS += -B$(top_builddir)lib -Wl,-rpath,$(top_builddir)lib -Wl,-rpath-link,$(top_builddir)lib UCLIBC_LDSO_ABSPATH=$(shell pwd) ifdef TEST_INSTALLED_UCLIBC LDFLAGS += -Wl,-rpath,./ -UCLIBC_LDSO_ABSPATH=/lib +UCLIBC_LDSO_ABSPATH=$(SHARED_LIB_LOADER_PREFIX) endif ifeq ($(findstring -static,$(LDFLAGS)),) Modified: trunk/uClibc/test/signal/Makefile =================================================================== --- trunk/uClibc/test/signal/Makefile 2008-07-08 06:40:05 UTC (rev 22683) +++ trunk/uClibc/test/signal/Makefile 2008-07-08 08:05:44 UTC (rev 22684) @@ -1,4 +1,8 @@ # uClibc signal tests # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. +ifeq ($(UCLIBC_HAS_OBSOLETE_BSD_SIGNAL),) +TESTS_DISABLED := tst-sigsimple +endif + include ../Test.mak From carmelo at uclibc.org Tue Jul 8 03:37:06 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Tue, 8 Jul 2008 03:37:06 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/sysdeps/linux/sh/bits Message-ID: <20080708103706.26DAE3C6C6@busybox.net> Author: carmelo Date: 2008-07-08 03:37:05 -0700 (Tue, 08 Jul 2008) New Revision: 22688 Log: sh4 don't need to cope with older RLIMIT implementation. Signed-off-by: Carmelo Amoroso Modified: trunk/uClibc/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h Changeset: Modified: trunk/uClibc/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h =================================================================== --- trunk/uClibc/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h 2008-07-08 10:13:04 UTC (rev 22687) +++ trunk/uClibc/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h 2008-07-08 10:37:05 UTC (rev 22688) @@ -22,7 +22,7 @@ #undef __UCLIBC_BROKEN_CREATE_MODULE__ /* does your target have to worry about older [gs]etrlimit() ? */ -#define __UCLIBC_HANDLE_OLDER_RLIMIT__ +#undef __UCLIBC_HANDLE_OLDER_RLIMIT__ /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ From carmelo at uclibc.org Wed Jul 9 05:39:47 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 9 Jul 2008 05:39:47 -0700 (PDT) Subject: svn commit: branches/uClibc-nptl/extra/config Message-ID: <20080709123947.92FF63C6A2@busybox.net> Author: carmelo Date: 2008-07-09 05:39:44 -0700 (Wed, 09 Jul 2008) New Revision: 22701 Log: .depend not under conf mgmt Removed: branches/uClibc-nptl/extra/config/.depend Changeset: Deleted: branches/uClibc-nptl/extra/config/.depend =================================================================== --- branches/uClibc-nptl/extra/config/.depend 2008-07-09 11:43:57 UTC (rev 22700) +++ branches/uClibc-nptl/extra/config/.depend 2008-07-09 12:39:44 UTC (rev 22701) @@ -1,12 +0,0 @@ -conf.o: conf.c lkc.h expr.h lkc_proto.h -confdata.o: confdata.c lkc.h expr.h lkc_proto.h -expr.o: expr.c lkc.h expr.h lkc_proto.h -images.o: images.c -kxgettext.o: kxgettext.c lkc.h expr.h lkc_proto.h -lex.zconf.o: lex.zconf.c lkc.h expr.h lkc_proto.h -mconf.o: mconf.c lkc.h expr.h lkc_proto.h lxdialog/dialog.h -menu.o: menu.c lkc.h expr.h lkc_proto.h -symbol.o: symbol.c lkc.h expr.h lkc_proto.h -zconf.hash.o: zconf.hash.c -zconf.tab.o: zconf.tab.c lkc.h expr.h lkc_proto.h zconf.hash.c \ - lex.zconf.c util.c confdata.c expr.c symbol.c menu.c From carmelo at uclibc.org Wed Jul 9 05:46:14 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 9 Jul 2008 05:46:14 -0700 (PDT) Subject: svn commit: branches/uClibc-nptl/extra/config: lxdialog Message-ID: <20080709124615.5F3E33C6A2@busybox.net> Author: carmelo Date: 2008-07-09 05:46:12 -0700 (Wed, 09 Jul 2008) New Revision: 22702 Log: Synch extra/config with trunk Added: branches/uClibc-nptl/extra/config/.gitignore branches/uClibc-nptl/extra/config/check.sh branches/uClibc-nptl/extra/config/kconfig-to-uclibc.patch.gz branches/uClibc-nptl/extra/config/lxdialog/.gitignore Removed: branches/uClibc-nptl/extra/config/kconfig-to-uclibc.patch Modified: branches/uClibc-nptl/extra/config/Makefile branches/uClibc-nptl/extra/config/Makefile.kconfig branches/uClibc-nptl/extra/config/POTFILES.in branches/uClibc-nptl/extra/config/conf.c branches/uClibc-nptl/extra/config/confdata.c branches/uClibc-nptl/extra/config/expr.c branches/uClibc-nptl/extra/config/expr.h branches/uClibc-nptl/extra/config/gconf.c branches/uClibc-nptl/extra/config/gconf.glade branches/uClibc-nptl/extra/config/kconfig-language.txt branches/uClibc-nptl/extra/config/kxgettext.c branches/uClibc-nptl/extra/config/lex.zconf.c_shipped branches/uClibc-nptl/extra/config/lkc.h branches/uClibc-nptl/extra/config/lkc_proto.h branches/uClibc-nptl/extra/config/lxdialog/check-lxdialog.sh branches/uClibc-nptl/extra/config/lxdialog/checklist.c branches/uClibc-nptl/extra/config/lxdialog/dialog.h branches/uClibc-nptl/extra/config/lxdialog/inputbox.c branches/uClibc-nptl/extra/config/lxdialog/menubox.c branches/uClibc-nptl/extra/config/lxdialog/textbox.c branches/uClibc-nptl/extra/config/lxdialog/util.c branches/uClibc-nptl/extra/config/lxdialog/yesno.c branches/uClibc-nptl/extra/config/mconf.c branches/uClibc-nptl/extra/config/menu.c branches/uClibc-nptl/extra/config/qconf.cc branches/uClibc-nptl/extra/config/qconf.h branches/uClibc-nptl/extra/config/symbol.c branches/uClibc-nptl/extra/config/util.c branches/uClibc-nptl/extra/config/zconf.gperf branches/uClibc-nptl/extra/config/zconf.hash.c_shipped branches/uClibc-nptl/extra/config/zconf.l branches/uClibc-nptl/extra/config/zconf.tab.c_shipped branches/uClibc-nptl/extra/config/zconf.y Changeset: Sorry, the patch is too large to include (6338 lines). Please use ViewCVS to see it! http://uclibc.org/cgi-bin/viewcvs.cgi?view=rev&root=svn&rev=22702 From carmelo at uclibc.org Wed Jul 9 06:01:14 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 9 Jul 2008 06:01:14 -0700 (PDT) Subject: svn commit: branches/uClibc-nptl: docs Message-ID: <20080709130116.329CC3C684@busybox.net> Author: carmelo Date: 2008-07-09 06:01:12 -0700 (Wed, 09 Jul 2008) New Revision: 22703 Log: Synch with trunk: docs; no code change Modified: branches/uClibc-nptl/MAINTAINERS branches/uClibc-nptl/TODO branches/uClibc-nptl/docs/PORTING Changeset: Modified: branches/uClibc-nptl/MAINTAINERS =================================================================== --- branches/uClibc-nptl/MAINTAINERS 2008-07-09 12:46:12 UTC (rev 22702) +++ branches/uClibc-nptl/MAINTAINERS 2008-07-09 13:01:12 UTC (rev 22703) @@ -34,7 +34,7 @@ AVR32 N: Hans-Christian Egtvedt -E: hcegtvedt at atmel.com +E: hans-christian.egtvedt at atmel.com N: Haavard Skinnemoen E: haavard.skinnemoen at atmel.com W: http://avr32linux.org/ Modified: branches/uClibc-nptl/TODO =================================================================== --- branches/uClibc-nptl/TODO 2008-07-09 12:46:12 UTC (rev 22702) +++ branches/uClibc-nptl/TODO 2008-07-09 13:01:12 UTC (rev 22703) @@ -143,6 +143,11 @@ d) Implement glibc 'a' flag for scanf string conversions. e) Allow use of the older non-table-based ctype functions when using stub locale support. (smaller) + f) __drand48_iterate should be void + g) alphasort vs. versionsort. The former seems to be SVID, the latter GNU + i.e. reverse to what we currently do. The latter is unimplemented. + h) ponder removal/configs to turn off: __xpg_*, bsd_signal, dysize, + getw/putw, utimes, 2) Additional str{f|p}time issues. ---------------------------------- Modified: branches/uClibc-nptl/docs/PORTING =================================================================== --- branches/uClibc-nptl/docs/PORTING 2008-07-09 12:46:12 UTC (rev 22702) +++ branches/uClibc-nptl/docs/PORTING 2008-07-09 13:01:12 UTC (rev 22703) @@ -10,8 +10,8 @@ - add ARCH to the 'Target Architecture' list in extra/Configs/Config.in - Initially you will want to disable shared libraries, since making the shared library loader work requires you first have basic architecture - support working. Thus you should add HAVE_NO_SHARED and ARCH_HAS_NO_LDSO - to Config.ARCH's TARGET_ARCH + support working. Thus you should add ARCH_HAS_NO_SHARED and + ARCH_HAS_NO_LDSO to Config.ARCH's TARGET_ARCH ==================== === libc sysdeps === From carmelo at uclibc.org Wed Jul 9 06:02:52 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 9 Jul 2008 06:02:52 -0700 (PDT) Subject: svn commit: branches/uClibc-nptl/extra/Configs Message-ID: <20080709130252.A8ADE3C6A2@busybox.net> Author: carmelo Date: 2008-07-09 06:02:51 -0700 (Wed, 09 Jul 2008) New Revision: 22704 Log: Synch extra/Configs with trunk Modified: branches/uClibc-nptl/extra/Configs/Config.e1 branches/uClibc-nptl/extra/Configs/Config.in branches/uClibc-nptl/extra/Configs/Config.in.arch branches/uClibc-nptl/extra/Configs/Config.sh branches/uClibc-nptl/extra/Configs/Config.sparc Changeset: Modified: branches/uClibc-nptl/extra/Configs/Config.e1 =================================================================== --- branches/uClibc-nptl/extra/Configs/Config.e1 2008-07-09 13:01:12 UTC (rev 22703) +++ branches/uClibc-nptl/extra/Configs/Config.e1 2008-07-09 13:02:51 UTC (rev 22704) @@ -12,7 +12,7 @@ default y select ARCH_BIG_ENDIAN select ARCH_HAS_NO_MMU - select HAVE_NO_SHARED + select ARCH_HAS_NO_SHARED config ARCH_E1 bool Modified: branches/uClibc-nptl/extra/Configs/Config.in =================================================================== --- branches/uClibc-nptl/extra/Configs/Config.in 2008-07-09 13:01:12 UTC (rev 22703) +++ branches/uClibc-nptl/extra/Configs/Config.in 2008-07-09 13:02:51 UTC (rev 22704) @@ -17,7 +17,7 @@ bool "arm" config TARGET_avr32 - bool "avr32" + bool "avr32" config TARGET_bfin bool "bfin" @@ -210,23 +210,23 @@ config DOPIC bool "Generate only Position Independent Code (PIC)" default y - depends !HAVE_NO_PIC + depends on !HAVE_NO_PIC help If you wish to build all of uClibc as PIC objects, then answer Y here. If you are unsure, then you should answer N. -config HAVE_NO_SHARED +config ARCH_HAS_NO_SHARED bool default n config ARCH_HAS_NO_LDSO bool - select HAVE_NO_SHARED + select ARCH_HAS_NO_SHARED default n config HAVE_SHARED bool "Enable support for shared libraries" - depends on !HAVE_NO_SHARED + depends on !ARCH_HAS_NO_SHARED default y help If you wish to build uClibc with support for shared libraries then @@ -312,12 +312,12 @@ depends on HAVE_SHARED default y help - ELF's may have dynamic RPATH/RUNPATH tags. These tags list paths - which extend the library search paths. They are really only useful - if a package installs libraries in non standard locations and + ELF's may have dynamic RPATH/RUNPATH tags. These tags list paths + which extend the library search paths. They are really only useful + if a package installs libraries in non standard locations and ld.so.conf support is disabled. - Usage of RUNPATH tags is not too common, so disabling this feature + Usage of RUNPATH tags is not too common, so disabling this feature should be safe for most people. config UCLIBC_CTOR_DTOR @@ -343,23 +343,25 @@ default n help Newest binutils support a new hash style named GNU-hash. The dynamic - linker will use the new GNU-hash section (.gnu.hash) for symbol lookup - if present into the ELF binaries, otherwise it will use the old SysV + linker will use the new GNU-hash section (.gnu.hash) for symbol lookup + if present into the ELF binaries, otherwise it will use the old SysV hash style (.hash). This ensures that it is completely backward compatible. Further, being the hash table implementation self-contained into each executable and shared libraries, objects with mixed hash style can peacefully coexist in the same process. - - If you want to use this new feature, answer Y + If you want to use this new feature, answer Y + config HAS_NO_THREADS bool default n config UCLIBC_HAS_THREADS - bool "POSIX Threading Support" + bool "POSIX Threading support" depends on !HAS_NO_THREADS default y + # linuxthreads and linuxthreads.old need nanosleep() + select UCLIBC_HAS_REALTIME help If you want to compile uClibc with pthread support, then answer Y. This will increase the size of uClibc by adding a bunch of locking @@ -420,6 +422,15 @@ the latest code from glibc, so it may be the only choice for the newer ports (like alpha/amd64/64bit arches and hppa). +config UCLIBC_HAS_SYSLOG + bool "Syslog support" + default y + depends on UCLIBC_HAS_NETWORK_SUPPORT + select UCLIBC_HAS_SOCKET + help + Support sending messages to the system logger. + This requires socket-support. + config UCLIBC_HAS_LFS bool "Large File Support" default y @@ -514,7 +525,7 @@ help Enable this option if you want to have SuSv3 LEGACY functions in the library, else they are replaced by SuSv3 proposed macros. - Currently applies to bcopy/bzero/bcmp/index/rindex. + Currently applies to bcopy/bzero/bcmp/index/rindex/ftime. WARNING! ABI incompatibility. config UCLIBC_SUSV3_LEGACY_MACROS @@ -525,6 +536,23 @@ Currently applies to bcopy/bzero/bcmp/index/rindex et al. WARNING! ABI incompatibility. +config UCLIBC_HAS_STUBS + bool "Provide stubs for unavailable functionality" + default n + help + With this option uClibc provides non-functional stubs for + functions which are impossible to implement on the target + architecture. Otherwise, such functions are simply omitted. + + As of 2008-07, this option makes uClibc provide fork() stub + on NOMMU targets. It always sets errno to ENOSYS and returns -1. + + This may be useful if you port a lot of software and cannot + audit all of it and replace or disable fork() usage. + With this option, a program which uses fork() will build + successfully. Of course, it may be useless if fork() + is essential for its operation. + config UCLIBC_HAS_SHADOW bool "Shadow Password Support" default y @@ -559,17 +587,19 @@ If unsure, just answer N. -config UNIX98PTY_ONLY - bool "Support only Unix 98 PTYs" +config UCLIBC_HAS_PTY + bool "Support for pseudo-terminals" default y help - If you want to support only Unix 98 PTYs enable this. Some older - applications may need this disabled. For most current programs, - you can generally answer Y. + This enables support for pseudo-terminals (see man 4 pts + and man 7 pty). + If unsure, just answer Y. + config ASSUME_DEVPTS bool "Assume that /dev/pts is a devpts or devfs file system" default y + depends on UCLIBC_HAS_PTY help Enable this if /dev/pts is on a devpts or devfs filesystem. Both these filesystems automatically manage permissions on the /dev/pts @@ -578,6 +608,38 @@ Most people should answer Y. +config UNIX98PTY_ONLY + bool "Support only Unix 98 PTYs" + default y + depends on UCLIBC_HAS_PTY + help + If you want to support only Unix 98 PTYs enable this. Some older + applications may need this disabled and will thus use legacy BSD + style PTY handling which is more complex and also bigger than + Unix 98 PTY handling. + + For most current programs, you can generally answer Y. + +if UNIX98PTY_ONLY +config UCLIBC_HAS_GETPT + bool "Support getpt() (glibc-compat)" + default n + depends on UCLIBC_HAS_PTY + help + Some packages may need getpt(). + All of those are non-standard and can be considered + GNU/libc compatibility. + Either use posix_openpt() or just open /dev/ptmx yourself. + + If unsure, just say N. +endif + +if !UNIX98PTY_ONLY +# Have to use __libc_ptyname{1,2}[] and related bloat +config UCLIBC_HAS_GETPT + def_bool y +endif + config UCLIBC_HAS_TM_EXTENSIONS bool "Support 'struct tm' timezone extension fields" default y @@ -670,13 +732,282 @@ The value can be found using sysconf() with the _SC_GETGR_R_SIZE_MAX parameter. +comment "Support various families of functions" + +config UCLIBC_LINUX_MODULE_24 + bool "Linux kernel module functions" + default y + help + init_module, create_module, query_module, delete_module + are used in linux (allegedly prior to 2.6) for loadable + kernel modules. + + Say N if you do not use kernel modules. + +config UCLIBC_LINUX_SPECIFIC + bool "Linux specific functions" + default y + help + fstatfs(), inotify_*(), ioperm(), iopl(), madvise(), modify_ldt(), + personality(), ppoll(), setresuid() + +config UCLIBC_HAS_GNU_ERROR + bool "Support GNU extensions for error-reporting" + default y + help + Support for the GNU-specific error(), error_at_line(), + void (* error_print_progname)(), error_message_count + functions and variables. Some GNU packages + utilize these for extra useful output, but in general + are not required. + + If unsure, just answer N. + +config UCLIBC_BSD_SPECIFIC + bool "BSD specific functions" + default y + help + mincore(), getdomainname(), setdomainname() + + If unsure, say N. + +config UCLIBC_HAS_BSD_ERR + bool "BSD err functions" + default y + help + These functions are non-standard BSD extensions. + err(), errx(), warn(), warnx(), verr(), verrx(), vwarn(), vwarnx() + + If unsure, say N. + +config UCLIBC_HAS_OBSOLETE_BSD_SIGNAL + bool "BSD obsolete signal functions" + default n + help + These functions are provided as a compatibility interface for + programs that make use of the historical System V signal API. + This API is obsolete: + new applications should use the POSIX signal API (sigaction(2), + sigprocmask(2), etc.). + Affected functions: + + sigset(), sighold(), sigrelse(), sigignore() + + If unsure, say N. + +config UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL + bool "SYSV obsolete signal functions" + default n + help + Use of sysv_signal() should be avoided; use sigaction(2) instead. + + If unsure, say N. + +config UCLIBC_NTP_LEGACY + bool "ntp_*() aliases" + default n + help + Provide legacy aliases for ntp functions: + ntp_adjtime(), ntp_gettime() + + It is safe to say N here. + +config UCLIBC_SV4_DEPRECATED + bool "Enable SVr4 deprecated functions" + default n + help + These functions are DEPRECATED in System V release 4. + Say N unless you desparately need one of the functions below: + + ustat() [use statfs(2) in your code instead] + +config UCLIBC_HAS_REALTIME + bool "Realtime-related family of SUSv functions" + default y + # glitch in mq_{send,receive} currently forces this on + select UCLIBC_HAS_ADVANCED_REALTIME + help + These functions are part of the Timers option and need not + be available on all implementations. + Includes AIO, message-queue, scheduler, semaphore functions: + + aio.h + mqueue.h + sched.h + semaphore.h + + aio_cancel() + aio_error() + aio_fsync() + aio_read() + lio_listio() + aio_return() + aio_suspend() + aio_write() + clock_getres(), clock_gettime(), clock_settime() + fdatasync() + mlockall(), munlockall() + mlock(), munlock() + mq_close() + mq_getattr() + mq_notify() + mq_open() + mq_receive() + mq_send() + mq_setattr() + mq_unlink() + nanosleep() + sched_getparam() + sched_get_priority_max(), sched_get_priority_min() + sched_getscheduler() + sched_rr_get_interval() + sched_setparam() + sched_setscheduler() + sem_close() + sem_destroy() + sem_getvalue() + sem_init() + sem_open() + sem_post() + sem_trywait(), sem_wait() + sem_unlink() + sigqueue() + sigtimedwait(), sigwaitinfo() + timer_create() + timer_delete() + timer_getoverrun(), timer_gettime(), timer_settime() + +config UCLIBC_HAS_ADVANCED_REALTIME + bool "Advanced realtime-related family of SUSv functions" + default y + depends on UCLIBC_HAS_REALTIME + help + These functions are part of the Timers option and need not + be available on all implementations. + + clock_getcpuclockid() + clock_nanosleep() + mq_timedreceive() + mq_timedsend() + posix_fadvise() + posix_fallocate() + posix_madvise() + posix_memalign() + posix_mem_offset() + posix_spawnattr_destroy(), posix_spawnattr_init() + posix_spawnattr_getflags(), posix_spawnattr_setflags() + posix_spawnattr_getpgroup(), posix_spawnattr_setpgroup() + posix_spawnattr_getschedparam(), posix_spawnattr_setschedparam() + posix_spawnattr_getschedpolicy(), posix_spawnattr_setschedpolicy() + posix_spawnattr_getsigdefault(), posix_spawnattr_setsigdefault() + posix_spawnattr_getsigmask(), posix_spawnattr_setsigmask() + posix_spawn_file_actions_addclose() + posix_spawn_file_actions_adddup2() + posix_spawn_file_actions_addopen() + posix_spawn_file_actions_destroy() + posix_spawn_file_actions_init() + posix_spawn() + posix_spawnp() + posix_typed_mem_get_info() + pthread_mutex_timedlock() + sem_timedwait() + +#config UCLIBC_HAS_TERMIOS +# bool "termios functions" +# default y +# help +# Get and set terminal attributes, line control, get and set baud +# rate. +# termios(), tcgetattr(), tcsetattr(), tcsendbreak(), tcdrain(), +# tcflush(), tcflow(), cfmakeraw(), cfgetospeed(), cfgetispeed(), +# cfsetispeed(), cfsetospeed(), cfsetspeed() +# +# If unsure, say Y. + +config UCLIBC_HAS_EPOLL + bool "epoll" + default y + help + epoll_create(), epoll_ctl(), epoll_wait() functions. + +config UCLIBC_HAS_XATTR + bool "Extended Attributes" + default y + help + Extended Attributes support. + + setxattr() + lsetxattr() + fsetxattr() + getxattr() + lgetxattr() + fgetxattr() + listxattr() + llistxattr() + flistxattr() + removexattr() + lremovexattr() + fremovexattr() + + Say N unless you need support for extended attributes and the + filesystems do actually support them. + +config UCLIBC_HAS_PROFILING + bool "Profiling support" + default y + help + gcc's -finstrument-functions needs these. + + Most people can safely answer N. + +config UCLIBC_HAS_CRYPT_IMPL + bool "libcrypt support" + default y + help + libcrypt contains crypt(), setkey() and encrypt() + +config UCLIBC_HAS_CRYPT_STUB + bool "libcrypt stubs" + default y + depends on !UCLIBC_HAS_CRYPT_IMPL + help + Standards mandate that crypt(3) provides a stub if it is unavailable. + If you enable this option then stubs for + crypt(), setkey() and encrypt() + will be provided in a small libcrypt. + +config UCLIBC_HAS_CRYPT + def_bool y + depends on UCLIBC_HAS_CRYPT_IMPL || UCLIBC_HAS_CRYPT_STUB endmenu -menu "Networking Support" +menuconfig UCLIBC_HAS_NETWORK_SUPPORT + bool "Networking Support" + default y + help + Say N here if you do not need network support. +if UCLIBC_HAS_NETWORK_SUPPORT +config UCLIBC_HAS_SOCKET + bool "Socket support" + default y + help + If you want to include support for sockets then answer Y. + +config UCLIBC_HAS_IPV4 + bool "IP version 4 support" + default y + select UCLIBC_HAS_SOCKET + help + If you want to include support for the Internet Protocol + (IP version 4) then answer Y. + + Most people will say Y. + config UCLIBC_HAS_IPV6 - bool "IP version 6 Support" + bool "IP version 6 support" default n + select UCLIBC_HAS_SOCKET help If you want to include support for the next version of the Internet Protocol (IP version 6) then answer Y. @@ -706,14 +1037,15 @@ depends on UCLIBC_HAS_RPC default y if !HAVE_SHARED help - Most packages utilize the normal (non-reentrant) RPC functions, but - some (like exportfs from nfs-utils) need these reentrant versions. + Most packages utilize the normal (non-reentrant) RPC functions, but + some (like exportfs from nfs-utils) need these reentrant versions. Most people can safely answer N. config UCLIBC_USE_NETLINK bool "Use netlink to query interfaces" default n + depends on UCLIBC_HAS_SOCKET help In newer versions of Linux (2.4.17+), support was added for querying network device information via netlink rather than the old style @@ -724,6 +1056,18 @@ Most people can safely answer N. +config UCLIBC_SUPPORT_AI_ADDRCONFIG + bool "Support the AI_ADDRCONFIG flag" + depends on UCLIBC_USE_NETLINK + default n + help + The implementation of AI_ADDRCONFIG is aligned with the glibc + implementation using netlink to query interfaces to find both + ipv4 and ipv6 support. This is only needed if an application uses + the AI_ADDRCONFIG flag. + + Most people can safely answer N. + config UCLIBC_HAS_BSD_RES_CLOSE bool "Support res_close() (bsd-compat)" default n @@ -733,7 +1077,7 @@ Most people will say N. -endmenu +endif menu "String and Stdio Support" @@ -770,7 +1114,7 @@ config UCLIBC_HAS_CTYPE_SIGNED bool "Support Signed Characters In 'ctype.h' Functions." - depends UCLIBC_HAS_CTYPE_TABLES + depends on UCLIBC_HAS_CTYPE_TABLES default y help Answer Y to enable support for passing signed char values to @@ -783,7 +1127,7 @@ choice prompt "ctype argument checking" - depends UCLIBC_HAS_CTYPE_TABLES + depends on UCLIBC_HAS_CTYPE_TABLES default UCLIBC_HAS_CTYPE_UNSAFE help Please select the invalid arg behavior you want for the 'ctype' functions. @@ -879,7 +1223,7 @@ config UCLIBC_HAS_HEXADECIMAL_FLOATS bool "Support hexadecimal float notation" - depends UCLIBC_HAS_CTYPE_TABLES + depends on UCLIBC_HAS_CTYPE_TABLES depends on UCLIBC_HAS_FLOATS default n help @@ -982,7 +1326,7 @@ config UCLIBC_HAS_STDIO_BUFSIZ_NONE bool "none (WARNING - BUFSIZ will be 256 in stdio.h)" - depends !UCLIBC_HAS_WCHAR + depends on !UCLIBC_HAS_WCHAR config UCLIBC_HAS_STDIO_BUFSIZ_256 bool "256 (minimum ANSI/ISO C99 value)" @@ -1008,7 +1352,7 @@ choice prompt "Stdio builtin buffer size (uClibc-specific)" - depends !UCLIBC_HAS_STDIO_BUFSIZ_NONE + depends on !UCLIBC_HAS_STDIO_BUFSIZ_NONE default UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE help When a FILE is created with fopen(), an attempt is made to allocate @@ -1045,7 +1389,7 @@ config UCLIBC_HAS_STDIO_GETC_MACRO bool "Provide a macro version of getc()" - depends !UCLIBC_HAS_STDIO_BUFSIZ_NONE + depends on !UCLIBC_HAS_STDIO_BUFSIZ_NONE default y help Provide a macro version of getc(). @@ -1054,7 +1398,7 @@ config UCLIBC_HAS_STDIO_PUTC_MACRO bool "Provide a macro version of putc()" - depends !UCLIBC_HAS_STDIO_BUFSIZ_NONE + depends on !UCLIBC_HAS_STDIO_BUFSIZ_NONE default y help Provide a macro version of putc(). @@ -1202,7 +1546,7 @@ config UCLIBC_HAS_GETOPT_LONG bool "Support getopt_long/getopt_long_only" - depends !UCLIBC_HAS_GNU_GETOPT + depends on !UCLIBC_HAS_GNU_GETOPT default y help Answer Y if you want to include getopt_long[_only() used by many @@ -1506,8 +1850,8 @@ string "Cross-compiling toolchain prefix" default "" help - The prefix used to execute your cross-compiling toolchain. For - example, if you run 'arm-linux-uclibc-gcc' to compile something, + The prefix used to execute your cross-compiling toolchain. For + example, if you run 'arm-linux-uclibc-gcc' to compile something, then enter 'arm-linux-uclibc-' here. config UCLIBC_EXTRA_CFLAGS @@ -1534,7 +1878,7 @@ depends on UCLIBC_HAS_THREADS && LINUXTHREADS_OLD default n help - Enable debug output in libpthread. This is only useful when doing + Enable debug output in libpthread. This is only useful when doing development in libpthread itself. Otherwise, answer N. @@ -1608,7 +1952,7 @@ config UCLIBC_MALLOC_DEBUGGING bool "Build malloc with debugging support" - depends MALLOC || MALLOC_STANDARD + depends on MALLOC || MALLOC_STANDARD default n help Answer Y here to compile extra debugging support code into malloc. Modified: branches/uClibc-nptl/extra/Configs/Config.in.arch =================================================================== --- branches/uClibc-nptl/extra/Configs/Config.in.arch 2008-07-09 13:01:12 UTC (rev 22703) +++ branches/uClibc-nptl/extra/Configs/Config.in.arch 2008-07-09 13:02:51 UTC (rev 22704) @@ -94,7 +94,7 @@ config ARCH_HAS_MMU bool "Target CPU has a memory management unit (MMU)" - depends !ARCH_HAS_NO_MMU + depends on !ARCH_HAS_NO_MMU default y help If your target CPU does not have a memory management unit (MMU), Modified: branches/uClibc-nptl/extra/Configs/Config.sh =================================================================== --- branches/uClibc-nptl/extra/Configs/Config.sh 2008-07-09 13:01:12 UTC (rev 22703) +++ branches/uClibc-nptl/extra/Configs/Config.sh 2008-07-09 13:02:51 UTC (rev 22704) @@ -52,4 +52,4 @@ config ARCH_HAS_BWD_MEMCPY bool default y - depends CONFIG_SH4 + depends on CONFIG_SH4 Modified: branches/uClibc-nptl/extra/Configs/Config.sparc =================================================================== --- branches/uClibc-nptl/extra/Configs/Config.sparc 2008-07-09 13:01:12 UTC (rev 22703) +++ branches/uClibc-nptl/extra/Configs/Config.sparc 2008-07-09 13:02:51 UTC (rev 22704) @@ -26,7 +26,7 @@ SPARC v7 will give you only static support. config CONFIG_SPARC_V7 - select HAVE_NO_SHARED + select ARCH_HAS_NO_SHARED bool "SPARC v7" config CONFIG_SPARC_V8 From carmelo at uclibc.org Wed Jul 9 07:00:56 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 9 Jul 2008 07:00:56 -0700 (PDT) Subject: svn commit: branches/uClibc-nptl: ldso/ldso ldso/libdl libc libc/inet lib etc... Message-ID: <20080709140056.967DC3C674@busybox.net> Author: carmelo Date: 2008-07-09 07:00:50 -0700 (Wed, 09 Jul 2008) New Revision: 22705 Log: Synch the whole build system. Also including recent fix on testsuite build system Modified: branches/uClibc-nptl/Makefile.in branches/uClibc-nptl/Makerules branches/uClibc-nptl/Rules.mak branches/uClibc-nptl/ldso/ldso/Makefile.in branches/uClibc-nptl/ldso/libdl/Makefile.in branches/uClibc-nptl/libc/Makefile.in branches/uClibc-nptl/libc/inet/Makefile.in branches/uClibc-nptl/libc/misc/dirent/Makefile.in branches/uClibc-nptl/libc/misc/error/Makefile.in branches/uClibc-nptl/libc/misc/locale/Makefile.in branches/uClibc-nptl/libc/misc/pthread/Makefile.in branches/uClibc-nptl/libc/misc/syslog/Makefile.in branches/uClibc-nptl/libc/misc/sysvipc/Makefile.in branches/uClibc-nptl/libc/misc/time/Makefile.in branches/uClibc-nptl/libc/signal/Makefile.in branches/uClibc-nptl/libc/stdio/Makefile.in branches/uClibc-nptl/libc/stdlib/Makefile.in branches/uClibc-nptl/libc/sysdeps/linux/Makefile.commonarch branches/uClibc-nptl/libc/sysdeps/linux/common/Makefile.in branches/uClibc-nptl/libcrypt/Makefile.in branches/uClibc-nptl/libintl/Makefile.in branches/uClibc-nptl/libnsl/Makefile.in branches/uClibc-nptl/libpthread/nptl/Makefile.in branches/uClibc-nptl/libpthread/nptl/sysdeps/generic/Makefile.in branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/Makefile.in branches/uClibc-nptl/libpthread/nptl/sysdeps/sh/Makefile.arch branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in branches/uClibc-nptl/libpthread/nptl_db/Makefile.in branches/uClibc-nptl/libresolv/Makefile.in branches/uClibc-nptl/librt/Makefile.in branches/uClibc-nptl/libutil/Makefile.in branches/uClibc-nptl/test/Makefile branches/uClibc-nptl/test/Rules.mak branches/uClibc-nptl/test/Test.mak branches/uClibc-nptl/test/math/Makefile branches/uClibc-nptl/test/nptl/Makefile branches/uClibc-nptl/utils/Makefile.in Changeset: Sorry, the patch is too large to include (2269 lines). Please use ViewCVS to see it! http://uclibc.org/cgi-bin/viewcvs.cgi?view=rev&root=svn&rev=22705 From carmelo at uclibc.org Wed Jul 9 07:02:24 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 9 Jul 2008 07:02:24 -0700 (PDT) Subject: svn commit: branches/uClibc-nptl/utils Message-ID: <20080709140224.C9DAB3C682@busybox.net> Author: carmelo Date: 2008-07-09 07:02:22 -0700 (Wed, 09 Jul 2008) New Revision: 22706 Log: Synch utils directory with trunk Modified: branches/uClibc-nptl/utils/bswap.h branches/uClibc-nptl/utils/chroot_realpath.c branches/uClibc-nptl/utils/ldconfig.c branches/uClibc-nptl/utils/ldd.c branches/uClibc-nptl/utils/readelf.c branches/uClibc-nptl/utils/readsoname2.c Changeset: Sorry, the patch is too large to include (2711 lines). Please use ViewCVS to see it! http://uclibc.org/cgi-bin/viewcvs.cgi?view=rev&root=svn&rev=22706 From carmelo at uclibc.org Wed Jul 9 07:19:38 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 9 Jul 2008 07:19:38 -0700 (PDT) Subject: svn commit: branches/uClibc-nptl/test: locale locale-mbwc Message-ID: <20080709141938.DB97A3C674@busybox.net> Author: carmelo Date: 2008-07-09 07:19:37 -0700 (Wed, 09 Jul 2008) New Revision: 22707 Log: Added new tests for 'locale' support- taken from glibc; added new part for testing UTF-8 encoding Added: branches/uClibc-nptl/test/locale-mbwc/ branches/uClibc-nptl/test/locale-mbwc/Makefile branches/uClibc-nptl/test/locale-mbwc/dat_isw-funcs.h branches/uClibc-nptl/test/locale-mbwc/dat_iswalnum.c branches/uClibc-nptl/test/locale-mbwc/dat_iswalpha.c branches/uClibc-nptl/test/locale-mbwc/dat_iswcntrl.c branches/uClibc-nptl/test/locale-mbwc/dat_iswctype.c branches/uClibc-nptl/test/locale-mbwc/dat_iswdigit.c branches/uClibc-nptl/test/locale-mbwc/dat_iswgraph.c branches/uClibc-nptl/test/locale-mbwc/dat_iswlower.c branches/uClibc-nptl/test/locale-mbwc/dat_iswprint.c branches/uClibc-nptl/test/locale-mbwc/dat_iswpunct.c branches/uClibc-nptl/test/locale-mbwc/dat_iswspace.c branches/uClibc-nptl/test/locale-mbwc/dat_iswupper.c branches/uClibc-nptl/test/locale-mbwc/dat_iswxdigit.c branches/uClibc-nptl/test/locale-mbwc/dat_mblen.c branches/uClibc-nptl/test/locale-mbwc/dat_mbrlen.c branches/uClibc-nptl/test/locale-mbwc/dat_mbrtowc.c branches/uClibc-nptl/test/locale-mbwc/dat_mbsrtowcs.c branches/uClibc-nptl/test/locale-mbwc/dat_mbstowcs.c branches/uClibc-nptl/test/locale-mbwc/dat_mbtowc.c branches/uClibc-nptl/test/locale-mbwc/dat_strcoll.c branches/uClibc-nptl/test/locale-mbwc/dat_strfmon.c branches/uClibc-nptl/test/locale-mbwc/dat_strxfrm.c branches/uClibc-nptl/test/locale-mbwc/dat_swscanf.c branches/uClibc-nptl/test/locale-mbwc/dat_tow-funcs.h branches/uClibc-nptl/test/locale-mbwc/dat_towctrans.c branches/uClibc-nptl/test/locale-mbwc/dat_towlower.c branches/uClibc-nptl/test/locale-mbwc/dat_towupper.c branches/uClibc-nptl/test/locale-mbwc/dat_wcrtomb.c branches/uClibc-nptl/test/locale-mbwc/dat_wcscat.c branches/uClibc-nptl/test/locale-mbwc/dat_wcschr.c branches/uClibc-nptl/test/locale-mbwc/dat_wcscmp.c branches/uClibc-nptl/test/locale-mbwc/dat_wcscoll.c branches/uClibc-nptl/test/locale-mbwc/dat_wcscpy.c branches/uClibc-nptl/test/locale-mbwc/dat_wcscspn.c branches/uClibc-nptl/test/locale-mbwc/dat_wcslen.c branches/uClibc-nptl/test/locale-mbwc/dat_wcsncat.c branches/uClibc-nptl/test/locale-mbwc/dat_wcsncmp.c branches/uClibc-nptl/test/locale-mbwc/dat_wcsncpy.c branches/uClibc-nptl/test/locale-mbwc/dat_wcspbrk.c branches/uClibc-nptl/test/locale-mbwc/dat_wcsrtombs.c branches/uClibc-nptl/test/locale-mbwc/dat_wcsspn.c branches/uClibc-nptl/test/locale-mbwc/dat_wcsstr.c branches/uClibc-nptl/test/locale-mbwc/dat_wcstod.c branches/uClibc-nptl/test/locale-mbwc/dat_wcstok.c branches/uClibc-nptl/test/locale-mbwc/dat_wcstombs.c branches/uClibc-nptl/test/locale-mbwc/dat_wcswidth.c branches/uClibc-nptl/test/locale-mbwc/dat_wcsxfrm.c branches/uClibc-nptl/test/locale-mbwc/dat_wctob.c branches/uClibc-nptl/test/locale-mbwc/dat_wctomb.c branches/uClibc-nptl/test/locale-mbwc/dat_wctrans.c branches/uClibc-nptl/test/locale-mbwc/dat_wctype.c branches/uClibc-nptl/test/locale-mbwc/dat_wcwidth.c branches/uClibc-nptl/test/locale-mbwc/tgn_funcdef.h branches/uClibc-nptl/test/locale-mbwc/tgn_locdef.h branches/uClibc-nptl/test/locale-mbwc/tsp_common.c branches/uClibc-nptl/test/locale-mbwc/tst_funcs.h branches/uClibc-nptl/test/locale-mbwc/tst_iswalnum.c branches/uClibc-nptl/test/locale-mbwc/tst_iswalpha.c branches/uClibc-nptl/test/locale-mbwc/tst_iswcntrl.c branches/uClibc-nptl/test/locale-mbwc/tst_iswctype.c branches/uClibc-nptl/test/locale-mbwc/tst_iswdigit.c branches/uClibc-nptl/test/locale-mbwc/tst_iswgraph.c branches/uClibc-nptl/test/locale-mbwc/tst_iswlower.c branches/uClibc-nptl/test/locale-mbwc/tst_iswprint.c branches/uClibc-nptl/test/locale-mbwc/tst_iswpunct.c branches/uClibc-nptl/test/locale-mbwc/tst_iswspace.c branches/uClibc-nptl/test/locale-mbwc/tst_iswupper.c branches/uClibc-nptl/test/locale-mbwc/tst_iswxdigit.c branches/uClibc-nptl/test/locale-mbwc/tst_mblen.c branches/uClibc-nptl/test/locale-mbwc/tst_mbrlen.c branches/uClibc-nptl/test/locale-mbwc/tst_mbrlen.i branches/uClibc-nptl/test/locale-mbwc/tst_mbrlen.s branches/uClibc-nptl/test/locale-mbwc/tst_mbrtowc.c branches/uClibc-nptl/test/locale-mbwc/tst_mbsrtowcs.c branches/uClibc-nptl/test/locale-mbwc/tst_mbstowcs.c branches/uClibc-nptl/test/locale-mbwc/tst_mbtowc.c branches/uClibc-nptl/test/locale-mbwc/tst_strcoll.c branches/uClibc-nptl/test/locale-mbwc/tst_strfmon.c branches/uClibc-nptl/test/locale-mbwc/tst_strxfrm.c branches/uClibc-nptl/test/locale-mbwc/tst_swscanf.c branches/uClibc-nptl/test/locale-mbwc/tst_towctrans.c branches/uClibc-nptl/test/locale-mbwc/tst_towlower.c branches/uClibc-nptl/test/locale-mbwc/tst_towupper.c branches/uClibc-nptl/test/locale-mbwc/tst_types.h branches/uClibc-nptl/test/locale-mbwc/tst_wcrtomb.c branches/uClibc-nptl/test/locale-mbwc/tst_wcscat.c branches/uClibc-nptl/test/locale-mbwc/tst_wcschr.c branches/uClibc-nptl/test/locale-mbwc/tst_wcscmp.c branches/uClibc-nptl/test/locale-mbwc/tst_wcscoll.c branches/uClibc-nptl/test/locale-mbwc/tst_wcscpy.c branches/uClibc-nptl/test/locale-mbwc/tst_wcscspn.c branches/uClibc-nptl/test/locale-mbwc/tst_wcslen.c branches/uClibc-nptl/test/locale-mbwc/tst_wcsncat.c branches/uClibc-nptl/test/locale-mbwc/tst_wcsncmp.c branches/uClibc-nptl/test/locale-mbwc/tst_wcsncpy.c branches/uClibc-nptl/test/locale-mbwc/tst_wcspbrk.c branches/uClibc-nptl/test/locale-mbwc/tst_wcsrtombs.c branches/uClibc-nptl/test/locale-mbwc/tst_wcsspn.c branches/uClibc-nptl/test/locale-mbwc/tst_wcsstr.c branches/uClibc-nptl/test/locale-mbwc/tst_wcstod.c branches/uClibc-nptl/test/locale-mbwc/tst_wcstok.c branches/uClibc-nptl/test/locale-mbwc/tst_wcstombs.c branches/uClibc-nptl/test/locale-mbwc/tst_wcswidth.c branches/uClibc-nptl/test/locale-mbwc/tst_wcsxfrm.c branches/uClibc-nptl/test/locale-mbwc/tst_wctob.c branches/uClibc-nptl/test/locale-mbwc/tst_wctomb.c branches/uClibc-nptl/test/locale-mbwc/tst_wctrans.c branches/uClibc-nptl/test/locale-mbwc/tst_wctype.c branches/uClibc-nptl/test/locale-mbwc/tst_wcwidth.c branches/uClibc-nptl/test/locale/ branches/uClibc-nptl/test/locale/Makefile branches/uClibc-nptl/test/locale/bug-iconv-trans.c branches/uClibc-nptl/test/locale/bug-usesetlocale.c branches/uClibc-nptl/test/locale/collate-test.c branches/uClibc-nptl/test/locale/dump-ctype.c branches/uClibc-nptl/test/locale/gen-unicode-ctype.c branches/uClibc-nptl/test/locale/show-ucs-data.c branches/uClibc-nptl/test/locale/tst-C-locale.c branches/uClibc-nptl/test/locale/tst-ctype-de_DE.ISO-8859-1.in branches/uClibc-nptl/test/locale/tst-ctype.c branches/uClibc-nptl/test/locale/tst-digits.c branches/uClibc-nptl/test/locale/tst-fmon.c branches/uClibc-nptl/test/locale/tst-langinfo.c branches/uClibc-nptl/test/locale/tst-langinfo.input branches/uClibc-nptl/test/locale/tst-leaks.c branches/uClibc-nptl/test/locale/tst-mbswcs1.c branches/uClibc-nptl/test/locale/tst-mbswcs2.c branches/uClibc-nptl/test/locale/tst-mbswcs3.c branches/uClibc-nptl/test/locale/tst-mbswcs4.c branches/uClibc-nptl/test/locale/tst-mbswcs5.c branches/uClibc-nptl/test/locale/tst-mbswcs6.c branches/uClibc-nptl/test/locale/tst-numeric.c branches/uClibc-nptl/test/locale/tst-rpmatch.c branches/uClibc-nptl/test/locale/tst-setlocale.c branches/uClibc-nptl/test/locale/tst-sscanf.c branches/uClibc-nptl/test/locale/tst-strfmon1.c branches/uClibc-nptl/test/locale/tst-trans.c branches/uClibc-nptl/test/locale/tst-wctype.c branches/uClibc-nptl/test/locale/tst-xlocale1.c branches/uClibc-nptl/test/locale/tst-xlocale2.c branches/uClibc-nptl/test/locale/tst_nl_langinfo.c branches/uClibc-nptl/test/locale/xfrm-test.c Changeset: Sorry, the patch is too large to include (34801 lines). Please use ViewCVS to see it! http://uclibc.org/cgi-bin/viewcvs.cgi?view=rev&root=svn&rev=22707 From carmelo at uclibc.org Wed Jul 9 07:33:59 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 9 Jul 2008 07:33:59 -0700 (PDT) Subject: svn commit: branches/uClibc-nptl/test/dlopen Message-ID: <20080709143359.2FB4F3C67A@busybox.net> Author: carmelo Date: 2008-07-09 07:33:58 -0700 (Wed, 09 Jul 2008) New Revision: 22708 Log: Remove Ctrl^M Modified: branches/uClibc-nptl/test/dlopen/dladdr.c Changeset: Modified: branches/uClibc-nptl/test/dlopen/dladdr.c =================================================================== --- branches/uClibc-nptl/test/dlopen/dladdr.c 2008-07-09 14:19:37 UTC (rev 22707) +++ branches/uClibc-nptl/test/dlopen/dladdr.c 2008-07-09 14:33:58 UTC (rev 22708) @@ -1,25 +1,25 @@ -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - Dl_info info; - int res = 0; - - memset(&info, '\0', sizeof(Dl_info)); - res = dladdr((void *)1, &info); - if (res != 0) { - fprintf(stderr, "dladdr() should fail\n"); - fprintf(stderr, "dli_fname = %s\n", info.dli_fname); - fprintf(stderr, "dli_fbase = 0x%08x\n", (unsigned int)info.dli_fbase); - fprintf(stderr, "dli_sname = %s\n", info.dli_sname); - fprintf(stderr, "dli_saddr = 0x%08x\n", (unsigned int)info.dli_saddr); - exit(1); - } - - fprintf(stderr, "dladdr() failed as expected\n"); - return EXIT_SUCCESS; -} - +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + Dl_info info; + int res = 0; + + memset(&info, '\0', sizeof(Dl_info)); + res = dladdr((void *)1, &info); + if (res != 0) { + fprintf(stderr, "dladdr() should fail\n"); + fprintf(stderr, "dli_fname = %s\n", info.dli_fname); + fprintf(stderr, "dli_fbase = 0x%08x\n", (unsigned int)info.dli_fbase); + fprintf(stderr, "dli_sname = %s\n", info.dli_sname); + fprintf(stderr, "dli_saddr = 0x%08x\n", (unsigned int)info.dli_saddr); + exit(1); + } + + fprintf(stderr, "dladdr() failed as expected\n"); + return EXIT_SUCCESS; +} + From carmelo at uclibc.org Wed Jul 9 07:42:43 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 9 Jul 2008 07:42:43 -0700 (PDT) Subject: svn commit: branches/uClibc-nptl/test: inet nptl signal stdlib tls unistd Message-ID: <20080709144243.E3A4B3C67C@busybox.net> Author: carmelo Date: 2008-07-09 07:42:40 -0700 (Wed, 09 Jul 2008) New Revision: 22709 Log: Synch tests with trunk Added: branches/uClibc-nptl/test/unistd/exec-null.c Modified: branches/uClibc-nptl/test/inet/tst-ethers-line.c branches/uClibc-nptl/test/inet/tst-ethers.c branches/uClibc-nptl/test/nptl/tst-align.c branches/uClibc-nptl/test/nptl/tst-align2.c branches/uClibc-nptl/test/nptl/tst-clock2.c branches/uClibc-nptl/test/nptl/tst-mqueue1.c branches/uClibc-nptl/test/nptl/tst-tls5mod.c branches/uClibc-nptl/test/nptl/tst-tls5moda.c branches/uClibc-nptl/test/nptl/tst-tls5modb.c branches/uClibc-nptl/test/nptl/tst-tls5modc.c branches/uClibc-nptl/test/nptl/tst-tls5modd.c branches/uClibc-nptl/test/nptl/tst-tls5mode.c branches/uClibc-nptl/test/nptl/tst-tls5modf.c branches/uClibc-nptl/test/signal/Makefile branches/uClibc-nptl/test/stdlib/test-canon.c branches/uClibc-nptl/test/test-skeleton.c branches/uClibc-nptl/test/tls/Makefile branches/uClibc-nptl/test/tls/tst-tls1.c branches/uClibc-nptl/test/tls/tst-tls6.c Changeset: Modified: branches/uClibc-nptl/test/inet/tst-ethers-line.c =================================================================== --- branches/uClibc-nptl/test/inet/tst-ethers-line.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/inet/tst-ethers-line.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -6,8 +6,17 @@ #include #include +/* glibc 2.4 has no ETHER_FILE_NAME, host compile fails without this */ +#ifndef ETHER_FILE_NAME +#define ETHER_FILE_NAME "/etc/ethers" +#endif + #define ETHER_LINE_LEN 256 +/* This test requires /etc/ethers to exist + * and to have nonzero length + */ + int main(void) { struct ether_addr addr; Modified: branches/uClibc-nptl/test/inet/tst-ethers.c =================================================================== --- branches/uClibc-nptl/test/inet/tst-ethers.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/inet/tst-ethers.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -3,6 +3,11 @@ #define ETHER_LINE_LEN 256 +/* This test requires /etc/ethers to exist + * and to have host "teeth". For example: + * 00:11:22:33:44:55 teeth + */ + int main(void) { struct ether_addr addr; Modified: branches/uClibc-nptl/test/nptl/tst-align.c =================================================================== --- branches/uClibc-nptl/test/nptl/tst-align.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/nptl/tst-align.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -21,7 +21,7 @@ #include #include #include -#include +#include "tst-stack-align.h" static void * tf (void *arg) Modified: branches/uClibc-nptl/test/nptl/tst-align2.c =================================================================== --- branches/uClibc-nptl/test/nptl/tst-align2.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/nptl/tst-align2.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -23,7 +23,7 @@ #include #include #include -#include +#include "tst-stack-align.h" static int f (void *arg) Modified: branches/uClibc-nptl/test/nptl/tst-clock2.c =================================================================== --- branches/uClibc-nptl/test/nptl/tst-clock2.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/nptl/tst-clock2.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -62,7 +62,7 @@ if (sysconf (_SC_THREAD_CPUTIME) < 0) { puts ("_POSIX_THREAD_CPUTIME option not available"); - return 0; + return 1; } # endif Modified: branches/uClibc-nptl/test/nptl/tst-mqueue1.c =================================================================== --- branches/uClibc-nptl/test/nptl/tst-mqueue1.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/nptl/tst-mqueue1.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -72,7 +72,7 @@ { int result = 0; - char v [] + unsigned char v [] = { 0x32, 0x62, 0x22, 0x31, 0x11, 0x73, 0x61, 0x21, 0x72, 0x71, 0x81 }; struct mq_attr attr; @@ -208,9 +208,9 @@ for (int i = 0; i < 10; ++i) { if (i & 1) - rets = mq_receive (q, (char *) &vr[i], 1, &prio); + rets = mq_receive (q, &vr[i], 1, &prio); else - rets = mq_timedreceive (q, (char *) &vr[i], 1, &prio, &ts); + rets = mq_timedreceive (q, &vr[i], 1, &prio, &ts); if (rets != 1) { @@ -236,7 +236,7 @@ result = 1; } - rets = mq_timedreceive (q, (char *) &vr[10], 1, &prio, &ts); + rets = mq_timedreceive (q, &vr[10], 1, &prio, &ts); if (rets != -1) { puts ("mq_timedreceive on empty queue did not fail"); @@ -251,7 +251,7 @@ if (nonblock) { - ret = mq_receive (q, (char *) &vr[10], 1, &prio); + ret = mq_receive (q, &vr[10], 1, &prio); if (ret != -1) { puts ("mq_receive on empty non-blocking queue did not fail"); @@ -414,4 +414,4 @@ return result; } -#include "../test-skeleton.c" +#include "../test-skeleton.c" \ No newline at end of file Modified: branches/uClibc-nptl/test/nptl/tst-tls5mod.c =================================================================== --- branches/uClibc-nptl/test/nptl/tst-tls5mod.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/nptl/tst-tls5mod.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -1,4 +1,4 @@ -#include +#include "tst-tls5.h" #ifdef TLS_REGISTER /* Ensure tls_registry is exported from the binary. */ Modified: branches/uClibc-nptl/test/nptl/tst-tls5moda.c =================================================================== --- branches/uClibc-nptl/test/nptl/tst-tls5moda.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/nptl/tst-tls5moda.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -1,4 +1,4 @@ -#include +#include "tst-tls5.h" #ifdef TLS_REGISTER static __thread char a [32] __attribute__ ((aligned (64))); Modified: branches/uClibc-nptl/test/nptl/tst-tls5modb.c =================================================================== --- branches/uClibc-nptl/test/nptl/tst-tls5modb.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/nptl/tst-tls5modb.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -1,4 +1,4 @@ -#include +#include "tst-tls5.h" #ifdef TLS_REGISTER static __thread int b; Modified: branches/uClibc-nptl/test/nptl/tst-tls5modc.c =================================================================== --- branches/uClibc-nptl/test/nptl/tst-tls5modc.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/nptl/tst-tls5modc.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -1,4 +1,4 @@ -#include +#include "tst-tls5.h" #ifdef TLS_REGISTER static __thread int c; Modified: branches/uClibc-nptl/test/nptl/tst-tls5modd.c =================================================================== --- branches/uClibc-nptl/test/nptl/tst-tls5modd.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/nptl/tst-tls5modd.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -1,4 +1,4 @@ -#include +#include "tst-tls5.h" #ifdef TLS_REGISTER static __thread int d; Modified: branches/uClibc-nptl/test/nptl/tst-tls5mode.c =================================================================== --- branches/uClibc-nptl/test/nptl/tst-tls5mode.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/nptl/tst-tls5mode.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -1,4 +1,4 @@ -#include +#include "tst-tls5.h" #ifdef TLS_REGISTER static __thread int e1 = 24; Modified: branches/uClibc-nptl/test/nptl/tst-tls5modf.c =================================================================== --- branches/uClibc-nptl/test/nptl/tst-tls5modf.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/nptl/tst-tls5modf.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -1,4 +1,4 @@ -#include +#include "tst-tls5.h" #ifdef TLS_REGISTER char tst_tls5modf[60] attribute_hidden = { 26 }; Modified: branches/uClibc-nptl/test/signal/Makefile =================================================================== --- branches/uClibc-nptl/test/signal/Makefile 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/signal/Makefile 2008-07-09 14:42:40 UTC (rev 22709) @@ -1,4 +1,8 @@ # uClibc signal tests # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. +ifeq ($(UCLIBC_HAS_OBSOLETE_BSD_SIGNAL),) +TESTS_DISABLED := tst-sigsimple +endif + include ../Test.mak Modified: branches/uClibc-nptl/test/stdlib/test-canon.c =================================================================== --- branches/uClibc-nptl/test/stdlib/test-canon.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/stdlib/test-canon.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -52,8 +52,12 @@ }; struct { - const char * in, * out, * resolved; - int error; + const char * in; + const char * retval; /* what realpath should return */ + const char * retbuf; /* what realpath should store in buf */ + /* if both of the above are NULL, we won't check for result, + * it's undefined */ + int error; /* expected errno value */ } tests[] = { /* 0 */ {"/", "/"}, @@ -72,17 +76,9 @@ {"foobar", 0, "./foobar", ENOENT}, {".", "."}, {"./foobar", 0, "./foobar", ENOENT}, -#ifdef __UCLIBC__ - /* we differ from glibc here, but POSIX allows it as it says that if we did - * not successfuly complete, the value of resolved_path is undefined */ - {"SYMLINK_LOOP", 0, "", ELOOP}, + {"SYMLINK_LOOP", 0, 0, ELOOP}, /* 15 */ - {"./SYMLINK_LOOP", 0, "", ELOOP}, -#else - {"SYMLINK_LOOP", 0, "./SYMLINK_LOOP", ELOOP}, - /* 15 */ - {"./SYMLINK_LOOP", 0, "./SYMLINK_LOOP", ELOOP}, -#endif + {"./SYMLINK_LOOP", 0, 0, ELOOP}, {"SYMLINK_1", "."}, {"SYMLINK_1/foobar", 0, "./foobar", ENOENT}, {"SYMLINK_2", "/etc"}, @@ -180,27 +176,28 @@ for (i = 0; i < (int) (sizeof (tests) / sizeof (tests[0])); ++i) { buf[0] = '\0'; + errno = 0; result = realpath (tests[i].in, buf); - if (!check_path (result, tests[i].out)) + if (!check_path (result, tests[i].retval)) { printf ("%s: flunked test %d (expected `%s', got `%s')\n", - argv[0], i, tests[i].out ? tests[i].out : "NULL", + argv[0], i, tests[i].retval ? tests[i].retval : "NULL", result ? result : "NULL"); ++errors; continue; } - if (!check_path (buf, tests[i].out ? tests[i].out : tests[i].resolved)) + if (result && !check_path (buf, tests[i].retval ? tests[i].retval : tests[i].retbuf)) { printf ("%s: flunked test %d (expected resolved `%s', got `%s')\n", - argv[0], i, tests[i].out ? tests[i].out : tests[i].resolved, + argv[0], i, tests[i].retval ? tests[i].retval : tests[i].retbuf, buf); ++errors; continue; } - if (!tests[i].out && errno != tests[i].error) + if (errno != tests[i].error) { printf ("%s: flunked test %d (expected errno %d, got %d)\n", argv[0], i, tests[i].error, errno); Modified: branches/uClibc-nptl/test/test-skeleton.c =================================================================== --- branches/uClibc-nptl/test/test-skeleton.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/test-skeleton.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -135,7 +135,7 @@ __attribute__ ((noreturn)) timeout_handler (int sig __attribute__ ((unused))) { - int killed; + int killed = 0; int status; /* Send signal. */ Modified: branches/uClibc-nptl/test/tls/Makefile =================================================================== --- branches/uClibc-nptl/test/tls/Makefile 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/tls/Makefile 2008-07-09 14:42:40 UTC (rev 22709) @@ -12,7 +12,7 @@ TARGET_ARCH := $(strip $(subst ",, $(strip $(TARGET_ARCH)))) PTDIR := $(top_builddir)libpthread/nptl -EXTRA_CFLAGS := -DNOT_IN_libc=1 -DIS_IN_libpthread=1 -D_LIBC \ +EXTRA_CFLAGS := -DNOT_IN_libc=1 \ -std=gnu99 -I. -I$(PTDIR) \ -I$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH) \ -I$(PTDIR)/sysdeps/$(TARGET_ARCH) \ Modified: branches/uClibc-nptl/test/tls/tst-tls1.c =================================================================== --- branches/uClibc-nptl/test/tls/tst-tls1.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/tls/tst-tls1.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -1,4 +1,5 @@ /* glibc test for TLS in ld.so. */ +#undef _LIBC #include #include Modified: branches/uClibc-nptl/test/tls/tst-tls6.c =================================================================== --- branches/uClibc-nptl/test/tls/tst-tls6.c 2008-07-09 14:33:58 UTC (rev 22708) +++ branches/uClibc-nptl/test/tls/tst-tls6.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -4,6 +4,10 @@ #include #include +#ifdef __UCLIBC__ +#include "dl-elf.h" +#include "dl-hash.h" +#endif #define TEST_FUNCTION do_test () @@ -32,7 +36,20 @@ /* Dirty test code here: we peek into a private data structure. We make sure that the module gets assigned the same ID every time. The value of the first round is used. */ +#ifdef __UCLIBC__ if (modid == -1) + modid = ((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid; + else if (((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid + != (size_t) modid) + { + printf ("round %d: modid now %zu, initially %d\n", + i, + ((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid, + modid); + result = 1; + } +#else + if (modid == -1) modid = ((struct link_map *) h)->l_tls_modid; else if (((struct link_map *) h)->l_tls_modid != modid) { @@ -40,6 +57,7 @@ i, ((struct link_map *) h)->l_tls_modid, modid); result = 1; } +#endif foop = dlsym (h, "foo"); if (foop == NULL) Added: branches/uClibc-nptl/test/unistd/exec-null.c =================================================================== --- branches/uClibc-nptl/test/unistd/exec-null.c (rev 0) +++ branches/uClibc-nptl/test/unistd/exec-null.c 2008-07-09 14:42:40 UTC (rev 22709) @@ -0,0 +1,13 @@ +/* make sure we handle argv[0] == NULL */ + +#include + +int main(int argc, char *argv[]) +{ + if (argc == 0) + return 0; + + char *exec_argv[1], *exec_envp[1]; + exec_argv[0] = exec_envp[0] = NULL; + return execve("./exec-null", exec_argv, exec_envp); +} From carmelo at uclibc.org Wed Jul 9 07:46:06 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 9 Jul 2008 07:46:06 -0700 (PDT) Subject: svn commit: branches/uClibc-nptl/extra/locale: programs Message-ID: <20080709144606.417C33C67A@busybox.net> Author: carmelo Date: 2008-07-09 07:46:05 -0700 (Wed, 09 Jul 2008) New Revision: 22710 Log: Added 'locale' utilities Added: branches/uClibc-nptl/extra/locale/programs/ branches/uClibc-nptl/extra/locale/programs/categories.def branches/uClibc-nptl/extra/locale/programs/locale.c Changeset: Added: branches/uClibc-nptl/extra/locale/programs/categories.def =================================================================== --- branches/uClibc-nptl/extra/locale/programs/categories.def (rev 0) +++ branches/uClibc-nptl/extra/locale/programs/categories.def 2008-07-09 14:46:05 UTC (rev 22710) @@ -0,0 +1,357 @@ +/* + * + * Copyright (c) 2008 STMicroelectronics Ltd + * Filippo Arcidiacono (filippo.arcidiacono at st.com) + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + * + * Taken from glibc 2.6 + * + */ + + +/* Definition of all available locale categories and their items. -*- C -*- + + These definitions are used by the 'locale' the program. + + The general format of the descriptions is like this: + + DEFINE_CATEGORY (ID, name, ( items ), setlocale-postload) + + where items itself is an array of entries in the form + + { ID, name, standard, value-type, min, max } + + The usage of the load, check, output functions depends on the individual + program code which loads this file. + + The various value types for the items are `string', `stringarray', `byte' + `bytearray', and `word'. These cover all possible values in the current + locale definitions. `min' and `max' can be individually used again. */ + +#ifndef NO_POSTLOAD +#define NO_POSTLOAD NULL +#endif + +#if 0 +DEFINE_CATEGORY +( + LC_COLLATE, "LC_COLLATE", + ( + DEFINE_ELEMENT (_NL_COLLATE_NRULES, "collate-nrules", std, word) + DEFINE_ELEMENT (_NL_COLLATE_RULESETS, "collate-rulesets", std, string) + DEFINE_ELEMENT (_NL_COLLATE_TABLEMB, "collate-tablemb", std, wstring) + DEFINE_ELEMENT (_NL_COLLATE_WEIGHTMB, "collate-weightmb", std, wstring) + DEFINE_ELEMENT (_NL_COLLATE_EXTRAMB, "collate-extramb", std, wstring) + DEFINE_ELEMENT (_NL_COLLATE_INDIRECTMB, "collate-indirectmb", std, wstring) + DEFINE_ELEMENT (_NL_COLLATE_TABLEWC, "collate-tablewc", std, wstring) + DEFINE_ELEMENT (_NL_COLLATE_WEIGHTWC, "collate-weightwc", std, wstring) + DEFINE_ELEMENT (_NL_COLLATE_EXTRAWC, "collate-extrawc", std, wstring) + DEFINE_ELEMENT (_NL_COLLATE_INDIRECTWC, "collate-indirectwc", std, wstring) + DEFINE_ELEMENT (_NL_COLLATE_SYMB_HASH_SIZEMB, "collate-symb-hash-sizemb", std, word) + DEFINE_ELEMENT (_NL_COLLATE_SYMB_TABLEMB, "collate-symb-tablemb", std, wstring) + DEFINE_ELEMENT (_NL_COLLATE_SYMB_EXTRAMB, "collate-symb-extramb", std, wstring) + DEFINE_ELEMENT (_NL_COLLATE_COLLSEQMB, "collate-collseqmb", std, wstring) + DEFINE_ELEMENT (_NL_COLLATE_COLLSEQWC, "collate-collseqwc", std, wstring) + DEFINE_ELEMENT (_NL_COLLATE_CODESET, "collate-codeset", std, string) + ), NO_POSTLOAD) +#endif + + +/* The actual definition of ctype is meaningless here. It is hard coded in + the code because it has to be handled very specially. Only the names of + the functions and the value types are important. */ +DEFINE_CATEGORY +( + LC_CTYPE, "LC_CTYPE", + ( +#if 0 + DEFINE_ELEMENT (_NL_CTYPE_CLASS, "ctype-class", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_TOUPPER, "ctype-toupper", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_TOLOWER, "ctype-tolower", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_CLASS32, "ctype-class32", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_CLASS_NAMES, "ctype-class-names", std, stringlist, 10, 32) + DEFINE_ELEMENT (_NL_CTYPE_MAP_NAMES, "ctype-map-names", std, stringlist, 2, 32) + DEFINE_ELEMENT (_NL_CTYPE_WIDTH, "ctype-width", std, bytearray) + DEFINE_ELEMENT (_NL_CTYPE_MB_CUR_MAX, "ctype-mb-cur-max", std, word) + DEFINE_ELEMENT (_NL_CTYPE_CODESET_NAME, "charmap", std, string) + DEFINE_ELEMENT (_NL_CTYPE_TOUPPER32, "ctype-toupper32", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_TOLOWER32, "ctype-tolower32", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_CLASS_OFFSET, "ctype-class-offset", std, word) + DEFINE_ELEMENT (_NL_CTYPE_MAP_OFFSET, "ctype-map-offset", std, word) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS_MB_LEN, "ctype-indigits_mb-len", std, word) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS0_MB, "ctype-indigits0_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS1_MB, "ctype-indigits1_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS2_MB, "ctype-indigits2_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS3_MB, "ctype-indigits3_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS4_MB, "ctype-indigits4_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS5_MB, "ctype-indigits5_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS6_MB, "ctype-indigits6_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS7_MB, "ctype-indigits7_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS8_MB, "ctype-indigits8_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS9_MB, "ctype-indigits9_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS_WC_LEN, "ctype-indigits_wc-len", std, word) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS0_WC, "ctype-indigits0_wc", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS1_WC, "ctype-indigits1_wc", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS2_WC, "ctype-indigits2_wc", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS3_WC, "ctype-indigits3_wc", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS4_WC, "ctype-indigits4_wc", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS5_WC, "ctype-indigits5_wc", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS6_WC, "ctype-indigits6_wc", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS7_WC, "ctype-indigits7_wc", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS8_WC, "ctype-indigits8_wc", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_INDIGITS9_WC, "ctype-indigits9_wc", std, wstring) +#endif + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT0_MB, "ctype-outdigit0_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT1_MB, "ctype-outdigit1_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT2_MB, "ctype-outdigit2_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT3_MB, "ctype-outdigit3_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT4_MB, "ctype-outdigit4_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT5_MB, "ctype-outdigit5_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT6_MB, "ctype-outdigit6_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT7_MB, "ctype-outdigit7_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT8_MB, "ctype-outdigit8_mb", std, string) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT9_MB, "ctype-outdigit9_mb", std, string) +#if 0 + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT0_WC, "ctype-outdigit0_wc", std, word) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT1_WC, "ctype-outdigit1_wc", std, word) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT2_WC, "ctype-outdigit2_wc", std, word) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT3_WC, "ctype-outdigit3_wc", std, word) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT4_WC, "ctype-outdigit4_wc", std, word) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT5_WC, "ctype-outdigit5_wc", std, word) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT6_WC, "ctype-outdigit6_wc", std, word) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT7_WC, "ctype-outdigit7_wc", std, word) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT8_WC, "ctype-outdigit8_wc", std, word) + DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT9_WC, "ctype-outdigit9_wc", std, word) + DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_TAB_SIZE, "ctype-translit-tab-size", std, word) + DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_FROM_IDX, "ctype-translit-from-idx", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_FROM_TBL, "ctype-translit-from-tbl", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_TO_IDX, "ctype-translit-to-idx", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_TO_TBL, "ctype-translit-to-tbl", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN, "ctype-translit-default-missing-len", std, word) + DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_DEFAULT_MISSING, "ctype-translit-default-missing", std, wstring) + DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_IGNORE_LEN, "ctype-translit-ignore-len", std, word) + DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_IGNORE, "ctype-translit-ignore", std, string) + DEFINE_ELEMENT (_NL_CTYPE_MAP_TO_NONASCII, "map-to-nonascii", std, word) +#endif + ), _nl_postload_ctype) + + +DEFINE_CATEGORY +( + LC_MONETARY, "LC_MONETARY", + ( + DEFINE_ELEMENT (INT_CURR_SYMBOL, "int_curr_symbol", std, string) + DEFINE_ELEMENT (CURRENCY_SYMBOL, "currency_symbol", std, string) + DEFINE_ELEMENT (MON_DECIMAL_POINT, "mon_decimal_point", std, string) + DEFINE_ELEMENT (MON_THOUSANDS_SEP, "mon_thousands_sep", std, string) + DEFINE_ELEMENT (MON_GROUPING, "mon_grouping", std, bytearray) + DEFINE_ELEMENT (POSITIVE_SIGN, "positive_sign", std, string) + DEFINE_ELEMENT (NEGATIVE_SIGN, "negative_sign", std, string) + DEFINE_ELEMENT (INT_FRAC_DIGITS, "int_frac_digits", std, byte) + DEFINE_ELEMENT (FRAC_DIGITS, "frac_digits", std, byte) + DEFINE_ELEMENT (P_CS_PRECEDES, "p_cs_precedes", std, byte, 0, 1) + DEFINE_ELEMENT (P_SEP_BY_SPACE, "p_sep_by_space", std, byte, 0, 2) + DEFINE_ELEMENT (N_CS_PRECEDES, "n_cs_precedes", std, byte, 0, 1) + DEFINE_ELEMENT (N_SEP_BY_SPACE, "n_sep_by_space", std, byte, 0, 2) + DEFINE_ELEMENT (P_SIGN_POSN, "p_sign_posn", std, byte, 0, 4) + DEFINE_ELEMENT (N_SIGN_POSN, "n_sign_posn", std, byte, 0, 4) + DEFINE_ELEMENT (__INT_P_CS_PRECEDES, "int_p_cs_precedes", std, byte, 0, 1) + DEFINE_ELEMENT (__INT_P_SEP_BY_SPACE, "int_p_sep_by_space", std, byte, 0, 2) + DEFINE_ELEMENT (__INT_N_CS_PRECEDES, "int_n_cs_precedes", std, byte, 0, 1) + DEFINE_ELEMENT (__INT_N_SEP_BY_SPACE, "int_n_sep_by_space", std, byte, 0, 2) + DEFINE_ELEMENT (__INT_P_SIGN_POSN, "int_p_sign_posn", std, byte, 0, 4) + DEFINE_ELEMENT (__INT_N_SIGN_POSN, "int_n_sign_posn", std, byte, 0, 4) +#if 0 + DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_CURR_SYMBOL, "duo_int_curr_symbol", std, string) + DEFINE_ELEMENT (_NL_MONETARY_DUO_CURRENCY_SYMBOL, "duo_currency_symbol", std, string) + DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_FRAC_DIGITS, "duo_int_frac_digits", std, byte) + DEFINE_ELEMENT (_NL_MONETARY_DUO_FRAC_DIGITS, "duo_frac_digits", std, byte) + DEFINE_ELEMENT (_NL_MONETARY_DUO_P_CS_PRECEDES, "duo_p_cs_precedes", std, byte, 0, 1) + DEFINE_ELEMENT (_NL_MONETARY_DUO_P_SEP_BY_SPACE, "duo_p_sep_by_space", std, byte, 0, 2) + DEFINE_ELEMENT (_NL_MONETARY_DUO_N_CS_PRECEDES, "duo_n_cs_precedes", std, byte, 0, 1) + DEFINE_ELEMENT (_NL_MONETARY_DUO_N_SEP_BY_SPACE, "duo_n_sep_by_space", std, byte, 0, 2) + DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_P_CS_PRECEDES, "duo_int_p_cs_precedes", std, byte, 0, 1) + DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_P_SEP_BY_SPACE, "duo_int_p_sep_by_space", std, byte, 0, 2) + DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_N_CS_PRECEDES, "duo_int_n_cs_precedes", std, byte, 0, 1) + DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_N_SEP_BY_SPACE, "duo_int_n_sep_by_space", std, byte, 0, 2) + DEFINE_ELEMENT (_NL_MONETARY_DUO_P_SIGN_POSN, "duo_p_sign_posn", std, byte, 0, 4) + DEFINE_ELEMENT (_NL_MONETARY_DUO_N_SIGN_POSN, "duo_n_sign_posn", std, byte, 0, 4) + DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_P_SIGN_POSN, "duo_int_p_sign_posn", std, byte, 0, 4) + DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_N_SIGN_POSN, "duo_int_n_sign_posn", std, byte, 0, 4) + DEFINE_ELEMENT (_NL_MONETARY_UNO_VALID_FROM, "uno_valid_from", std, word) + DEFINE_ELEMENT (_NL_MONETARY_UNO_VALID_TO, "uno_valid_to", std, word) + DEFINE_ELEMENT (_NL_MONETARY_DUO_VALID_FROM, "duo_valid_from", std, word) + DEFINE_ELEMENT (_NL_MONETARY_DUO_VALID_TO, "duo_valid_to", std, word) + DEFINE_ELEMENT (_NL_MONETARY_CONVERSION_RATE, "conversion_rate", std, wordarray, 2, 2) + DEFINE_ELEMENT (_NL_MONETARY_DECIMAL_POINT_WC, "monetary-decimal-point-wc", std, word) + DEFINE_ELEMENT (_NL_MONETARY_THOUSANDS_SEP_WC, "monetary-thousands-sep-wc", std, word) + DEFINE_ELEMENT (_NL_MONETARY_CODESET, "monetary-codeset", std, string) +#else + DEFINE_ELEMENT (_NL_MONETARY_CRNCYSTR, "monetary-crncystr", std, string) +#endif + ), NO_POSTLOAD) + + +DEFINE_CATEGORY +( + LC_NUMERIC, "LC_NUMERIC", + ( + DEFINE_ELEMENT (DECIMAL_POINT, "decimal_point", std, string) + DEFINE_ELEMENT (THOUSANDS_SEP, "thousands_sep", std, string) + DEFINE_ELEMENT (GROUPING, "grouping", std, bytearray) +#if 0 + DEFINE_ELEMENT (_NL_NUMERIC_DECIMAL_POINT_WC, "numeric-decimal-point-wc", std, word) + DEFINE_ELEMENT (_NL_NUMERIC_THOUSANDS_SEP_WC, "numeric-thousands-sep-wc", std, word) + DEFINE_ELEMENT (_NL_NUMERIC_CODESET, "numeric-codeset", std, string) +#endif + + ), NO_POSTLOAD) + + +DEFINE_CATEGORY +( + LC_TIME, "LC_TIME", + ( + DEFINE_ELEMENT (ABDAY_1, "abday", std, stringarray, 7, 7) + DEFINE_ELEMENT (DAY_1, "day", std, stringarray, 7, 7) + DEFINE_ELEMENT (ABMON_1, "abmon", std, stringarray, 12, 12) + DEFINE_ELEMENT (MON_1, "mon", std, stringarray, 12, 12) + DEFINE_ELEMENT (AM_STR, "am_pm", std, stringarray, 2, 2) + DEFINE_ELEMENT (D_T_FMT, "d_t_fmt", std, string) + DEFINE_ELEMENT (D_FMT, "d_fmt", std, string) + DEFINE_ELEMENT (T_FMT, "t_fmt", std, string) + DEFINE_ELEMENT (T_FMT_AMPM, "t_fmt_ampm", std, string) + DEFINE_ELEMENT (ERA, "era", opt, stringlist, 0, 100) + DEFINE_ELEMENT (ERA_YEAR, "era_year", opt, string) + DEFINE_ELEMENT (ERA_D_FMT, "era_d_fmt", opt, string) + DEFINE_ELEMENT (ALT_DIGITS, "alt_digits", opt, stringlist, 100, 100) + DEFINE_ELEMENT (ERA_D_T_FMT, "era_d_t_fmt", opt, string) + DEFINE_ELEMENT (ERA_T_FMT, "era_t_fmt", opt, string) +#if 0 + DEFINE_ELEMENT (_NL_TIME_ERA_NUM_ENTRIES, "time-era-num-entries", opt, word) + DEFINE_ELEMENT (_NL_TIME_ERA_ENTRIES, "time-era-entries", opt, string) + DEFINE_ELEMENT (_NL_WABDAY_1, "wide-abday", std, wstringarray, 7, 7) + DEFINE_ELEMENT (_NL_WDAY_1, "wide-day", std, wstringarray, 7, 7) + DEFINE_ELEMENT (_NL_WABMON_1, "wide-abmon", std, wstringarray, 12, 12) + DEFINE_ELEMENT (_NL_WMON_1, "wide-mon", std, wstringarray, 12, 12) + DEFINE_ELEMENT (_NL_WAM_STR, "wide-am_pm", std, wstringarray, 2, 2) + DEFINE_ELEMENT (_NL_WD_T_FMT, "wide-d_t_fmt", std, wstring) + DEFINE_ELEMENT (_NL_WD_FMT, "wide-d_fmt", std, wstring) + DEFINE_ELEMENT (_NL_WT_FMT, "wide-t_fmt", std, wstring) + DEFINE_ELEMENT (_NL_WT_FMT_AMPM, "wide-t_fmt_ampm", std, wstring) + DEFINE_ELEMENT (_NL_WERA_YEAR, "wide-era_year", opt, wstring) + DEFINE_ELEMENT (_NL_WERA_D_FMT, "wide-era_d_fmt", opt, wstring) + DEFINE_ELEMENT (_NL_WALT_DIGITS, "wide-alt_digits", opt, wstringlist, 1000, 100) + DEFINE_ELEMENT (_NL_WERA_D_T_FMT, "wide-era_d_t_fmt", opt, wstring) + DEFINE_ELEMENT (_NL_WERA_T_FMT, "wide-era_t_fmt", opt, wstring) + DEFINE_ELEMENT (_NL_TIME_WEEK_NDAYS, "week-ndays", std, byte) + DEFINE_ELEMENT (_NL_TIME_WEEK_1STDAY, "week-1stday", std, word) + DEFINE_ELEMENT (_NL_TIME_WEEK_1STWEEK, "week-1stweek", std, byte) + DEFINE_ELEMENT (_NL_TIME_FIRST_WEEKDAY, "first_weekday", std, byte) + DEFINE_ELEMENT (_NL_TIME_FIRST_WORKDAY, "first_workday", std, byte) + DEFINE_ELEMENT (_NL_TIME_CAL_DIRECTION, "cal_direction", std, byte) + DEFINE_ELEMENT (_NL_TIME_TIMEZONE, "timezone", std, string) + DEFINE_ELEMENT (_DATE_FMT, "date_fmt", opt, string) + DEFINE_ELEMENT (_NL_W_DATE_FMT, "wide-date_fmt", opt, wstring) + DEFINE_ELEMENT (_NL_TIME_CODESET, "time-codeset", std, string) +#endif + ), NO_POSTLOAD) + + +DEFINE_CATEGORY +( + LC_MESSAGES, "LC_MESSAGES", + ( + DEFINE_ELEMENT (YESEXPR, "yesexpr", std, string) + DEFINE_ELEMENT (NOEXPR, "noexpr", std, string) + DEFINE_ELEMENT (YESSTR, "yesstr", opt, string) + DEFINE_ELEMENT (NOSTR, "nostr", opt, string) +#if 0 + DEFINE_ELEMENT (_NL_MESSAGES_CODESET, "messages-codeset", std, string) +#endif + ), NO_POSTLOAD) + +#if 0 +DEFINE_CATEGORY +( + LC_PAPER, "LC_PAPER", + ( + DEFINE_ELEMENT (_NL_PAPER_HEIGHT, "height", std, word) + DEFINE_ELEMENT (_NL_PAPER_WIDTH, "width", std, word) + DEFINE_ELEMENT (_NL_PAPER_CODESET, "paper-codeset", std, string) + ), NO_POSTLOAD) + +DEFINE_CATEGORY +( + LC_NAME, "LC_NAME", + ( + DEFINE_ELEMENT (_NL_NAME_NAME_FMT, "name_fmt", std, string) + DEFINE_ELEMENT (_NL_NAME_NAME_GEN, "name_gen", std, string) + DEFINE_ELEMENT (_NL_NAME_NAME_MR, "name_mr", std, string) + DEFINE_ELEMENT (_NL_NAME_NAME_MRS, "name_mrs", std, string) + DEFINE_ELEMENT (_NL_NAME_NAME_MISS, "name_miss", std, string) + DEFINE_ELEMENT (_NL_NAME_NAME_MS, "name_ms", std, string) + DEFINE_ELEMENT (_NL_NAME_CODESET, "name-codeset", std, string) + ), NO_POSTLOAD) + +DEFINE_CATEGORY +( + LC_ADDRESS, "LC_ADDRESS", + ( + DEFINE_ELEMENT (_NL_ADDRESS_POSTAL_FMT, "postal_fmt", std, string) + DEFINE_ELEMENT (_NL_ADDRESS_COUNTRY_NAME, "country_name", std, string) + DEFINE_ELEMENT (_NL_ADDRESS_COUNTRY_POST, "country_post", std, string) + DEFINE_ELEMENT (_NL_ADDRESS_COUNTRY_AB2, "country_ab2", std, string) + DEFINE_ELEMENT (_NL_ADDRESS_COUNTRY_AB3, "country_ab3", std, string) + DEFINE_ELEMENT (_NL_ADDRESS_COUNTRY_CAR, "country_car", std, string) + DEFINE_ELEMENT (_NL_ADDRESS_COUNTRY_NUM, "country_num", std, word) + DEFINE_ELEMENT (_NL_ADDRESS_COUNTRY_ISBN, "country_isbn", std, string) + DEFINE_ELEMENT (_NL_ADDRESS_LANG_NAME, "lang_name", std, string) + DEFINE_ELEMENT (_NL_ADDRESS_LANG_AB, "lang_ab", std, string) + DEFINE_ELEMENT (_NL_ADDRESS_LANG_TERM, "lang_term", std, string) + DEFINE_ELEMENT (_NL_ADDRESS_LANG_LIB, "lang_lib", std, string) + DEFINE_ELEMENT (_NL_ADDRESS_CODESET, "address-codeset", std, string) + ), NO_POSTLOAD) + +DEFINE_CATEGORY +( + LC_TELEPHONE, "LC_TELEPHONE", + ( + DEFINE_ELEMENT (_NL_TELEPHONE_TEL_INT_FMT, "tel_int_fmt", std, string) + DEFINE_ELEMENT (_NL_TELEPHONE_TEL_DOM_FMT, "tel_dom_fmt", std, string) + DEFINE_ELEMENT (_NL_TELEPHONE_INT_SELECT, "int_select", std, string) + DEFINE_ELEMENT (_NL_TELEPHONE_INT_PREFIX, "int_prefix", std, string) + DEFINE_ELEMENT (_NL_TELEPHONE_CODESET, "telephone-codeset", std, string) + ), NO_POSTLOAD) + +DEFINE_CATEGORY +( + LC_MEASUREMENT, "LC_MEASUREMENT", + ( + DEFINE_ELEMENT (_NL_MEASUREMENT_MEASUREMENT, "measurement", std, byte) + DEFINE_ELEMENT (_NL_MEASUREMENT_CODESET, "measurement-codeset", std, string) + ), NO_POSTLOAD) + +DEFINE_CATEGORY +( + LC_IDENTIFICATION, "LC_IDENTIFICATION", + ( + DEFINE_ELEMENT (_NL_IDENTIFICATION_TITLE, "title", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_SOURCE, "source", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_ADDRESS, "address", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_CONTACT, "contact", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_EMAIL, "email", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_TEL, "tel", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_FAX, "fax", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_LANGUAGE, "language", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_TERRITORY, "territory", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_AUDIENCE, "audience", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_APPLICATION, "application", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_ABBREVIATION, "abbreviation", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_REVISION, "revision", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_DATE, "date", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_CATEGORY, "category", std, stringarray, 13, 13) + DEFINE_ELEMENT (_NL_IDENTIFICATION_CODESET, "identification-codeset", std, string) + ), NO_POSTLOAD) +#endif Added: branches/uClibc-nptl/extra/locale/programs/locale.c =================================================================== --- branches/uClibc-nptl/extra/locale/programs/locale.c (rev 0) +++ branches/uClibc-nptl/extra/locale/programs/locale.c 2008-07-09 14:46:05 UTC (rev 22710) @@ -0,0 +1,462 @@ +/* + * + * Copyright (c) 2008 STMicroelectronics Ltd + * Filippo Arcidiacono (filippo.arcidiacono at st.com) + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + * + * A 'locale' command implementation for uClibc. + * + */ + + +#include +#include +#include +#include +#include + +typedef struct { + unsigned char idx_name; + char dot_cs; /* 0 if no codeset specified */ + char cs; + unsigned char lc_ctype_row; + unsigned char lc_numeric_row; + unsigned char lc_monetary_row; + unsigned char lc_time_row; + unsigned char lc_collate_row; + unsigned char lc_messages_row; +} locale_entry; + +/* Need to include this before locale.h and xlocale.h! */ +#include + +#undef CODESET_LIST +#define CODESET_LIST (__locale_mmap->codeset_list) +#include +#define LOCALE_NAMES (__locale_mmap->locale_names5) +#define LOCALES (__locale_mmap->locales) +#define LOCALE_AT_MODIFIERS (__locale_mmap->locale_at_modifiers) +#define CATEGORY_NAMES (__locale_mmap->lc_names) + +#define GET_CODESET_NAME(N) (CODESET_LIST + *(CODESET_LIST + N - 3)) +#define GET_LOCALE_ENTRY(R) (locale_entry *)(LOCALES + (__LOCALE_DATA_WIDTH_LOCALES * R)) +#define GET_CATEGORY_NAME(X) (CATEGORY_NAMES + *(CATEGORY_NAMES + X)) +#define GET_LOCALE_NAME(I) (const char *)(LOCALE_NAMES + 5 * (I - 1)) + +static const char utf8[] = "UTF-8"; +static const char ascii[] = "ASCII"; + +/* If set print the name of the category. */ +static int show_category_name = 0; + +/* If set print the name of the item. */ +static int show_keyword_name = 0; + +/* If set print the usage command. */ +static int show_usage = 0; + +/* Print names of all available locales. */ +static int do_all = 0; + +/* Print names of all available character maps. */ +static int do_charmaps = 0; + +static int remaining = 0; + +/* We can map the types of the entries into a few categories. */ +enum value_type { + none, + string, + stringarray, + byte, + bytearray, + word, + stringlist, + wordarray, + wstring, + wstringarray, + wstringlist +}; + +/* Definition of the data structure which represents a category and its + items. */ +struct category { + int cat_id; + const char *name; + size_t number; + struct cat_item { + int item_id; + const char *name; + enum { std, opt } status; + enum value_type value_type; + int min; + int max; + } *item_desc; +}; + +/* Simple helper macro. */ +#define NELEMS(arr) ((sizeof (arr)) / (sizeof (arr[0]))) + +/* For some tricky stuff. */ +#define NO_PAREN(Item, More...) Item, ## More + +/* We have all categories defined in `categories.def'. Now construct + the description and data structure used for all categories. */ +#define DEFINE_ELEMENT(Item, More...) { Item, ## More }, +#define DEFINE_CATEGORY(category, name, items, postload) \ + static struct cat_item category##_desc[] = \ + { \ + NO_PAREN items \ + }; + +#include "categories.def" +#undef DEFINE_CATEGORY + +static struct category category[] = { +#define DEFINE_CATEGORY(category, name, items, postload) \ + [category] = { _NL_NUM_##category, name, NELEMS (category##_desc), \ + category##_desc }, +#include "categories.def" +#undef DEFINE_CATEGORY +}; + +#define NCATEGORIES NELEMS (category) + +static void usage(const char *name); +static void usage(const char *name) +{ + const char *s; + + s = basename(name); + fprintf(stderr, + "Usage: %s [-ck] [--category-name] [--keyword-name] [--help] NAME\n" + "or: %s [OPTION...] [-a|-m] [--all-locales] [--charmaps] \n", s, + s); +} + +static int argp_parse(int argc, char *argv[]); +static int argp_parse(int argc, char *argv[]) +{ + static const struct option long_options[] = { + {"all-locales", no_argument, NULL, 'a'}, + {"charmaps", no_argument, NULL, 'm'}, + {"category-name", no_argument, NULL, 'c'}, + {"keyword-name", no_argument, NULL, 'k'}, + {"help", no_argument, NULL, 'h'}, + {NULL, 0, NULL, 0} + }; + int c; + char *progname; + + progname = *argv; + while ((c = getopt_long(argc, argv, "amckh", long_options, NULL)) >= 0) + switch (c) { + case 'a': + do_all = 1; + break; + case 'c': + show_category_name = 1; + break; + case 'm': + do_charmaps = 1; + break; + case 'k': + show_keyword_name = 1; + break; + case 'h': + show_usage = 1; + break; + case '?':