From 41615c3fe7fe4bbcdd83975876e0108a09301f4a Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 18:15:29 +0100 Subject: include features.h include features.h to make the next ifdef work. Signed-off-by: Peter S. Mazinger --- include/protocols/timed.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/protocols/timed.h b/include/protocols/timed.h index 8101e9924..f50061cc1 100644 --- a/include/protocols/timed.h +++ b/include/protocols/timed.h @@ -32,6 +32,7 @@ #ifndef _PROTOCOLS_TIMED_H #define _PROTOCOLS_TIMED_H 1 +#include #ifdef __UCLIBC_HAS_RPC__ #include #endif -- cgit v1.2.3 From 9fa4711e364e9aa779d6b8d12220bbb63dbb1f3d Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 18:45:19 +0100 Subject: guard IPv6 stuff disable IPv6 related stuff if feature is disabled. Signed-off-by: Peter S. Mazinger --- include/net/route.h | 4 ++++ include/netinet/in.h | 17 +++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/net/route.h b/include/net/route.h index da5c810c7..ea6c9b941 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -55,6 +55,7 @@ struct rtentry #define rt_mss rt_mtu +#if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ struct in6_rtmsg { struct in6_addr rtmsg_dst; @@ -68,6 +69,7 @@ struct in6_rtmsg u_int32_t rtmsg_flags; int rtmsg_ifindex; }; +#endif #define RTF_UP 0x0001 /* Route usable. */ @@ -129,6 +131,7 @@ struct in6_rtmsg #define RT_CLASS_MAX 255 +#if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ #define RTMSG_ACK NLMSG_ACK #define RTMSG_OVERRUN NLMSG_OVERRUN @@ -141,5 +144,6 @@ struct in6_rtmsg #define RTMSG_CONTROL 0x40 #define RTMSG_AR_FAILED 0x51 /* Address Resolution failed. */ +#endif #endif /* net/route.h */ diff --git a/include/netinet/in.h b/include/netinet/in.h index 6327001ee..235194bbe 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -194,6 +194,7 @@ struct in_addr #define INADDR_MAX_LOCAL_GROUP ((in_addr_t) 0xe00000ff) /* 224.0.0.255 */ +#if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ /* IPv6 address */ struct in6_addr { @@ -218,8 +219,10 @@ libc_hidden_proto(in6addr_loopback) #define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } #define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } -#define INET_ADDRSTRLEN 16 #define INET6_ADDRSTRLEN 46 +#endif + +#define INET_ADDRSTRLEN 16 #if 1 /*def __UCLIBC_HAS_IPV4__*/ @@ -238,6 +241,7 @@ struct sockaddr_in }; #endif +#if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ /* Ditto, for IPv6. */ struct sockaddr_in6 { @@ -247,6 +251,7 @@ struct sockaddr_in6 struct in6_addr sin6_addr; /* IPv6 address */ uint32_t sin6_scope_id; /* IPv6 scope-id */ }; +#endif #if defined __USE_MISC || defined __USE_GNU @@ -274,6 +279,7 @@ struct ip_mreq_source #endif +#if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ /* Likewise, for IPv6. */ struct ipv6_mreq { @@ -283,6 +289,7 @@ struct ipv6_mreq /* local interface */ unsigned int ipv6mr_interface; }; +#endif #if defined __USE_MISC || defined __USE_GNU @@ -403,6 +410,7 @@ libc_hidden_proto(htons) # endif #endif +#if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ #define IN6_IS_ADDR_UNSPECIFIED(a) \ (((__const uint32_t *) (a))[0] == 0 \ && ((__const uint32_t *) (a))[1] == 0 \ @@ -441,6 +449,7 @@ libc_hidden_proto(htons) && (((__const uint32_t *) (a))[1] == ((__const uint32_t *) (b))[1]) \ && (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2]) \ && (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3])) +#endif #if defined __USE_MISC || defined __USE_GNU /* Bind socket to a privileged IP port. */ @@ -455,6 +464,7 @@ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) #endif +#if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ #define IN6_IS_ADDR_MC_NODELOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ && ((((__const uint8_t *) (a))[1] & 0xf) == 0x1)) @@ -476,13 +486,14 @@ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe)) -#if defined __USE_GNU && defined __UCLIBC_HAS_IPV6__ +#ifdef __USE_GNU /* IPv6 packet information. */ struct in6_pktinfo { struct in6_addr ipi6_addr; /* src/dst IPv6 address */ unsigned int ipi6_ifindex; /* send/recv interface index */ }; +#endif /* IPv6 MTU information. */ struct ip6_mtuinfo @@ -493,6 +504,7 @@ struct ip6_mtuinfo #endif #if 0 /*def __USE_GNU*/ +#ifdef __UCLIBC_HAS_IPV6__ /* Obsolete hop-by-hop and Destination Options Processing (RFC 2292). */ extern int inet6_option_space (int __nbytes) __THROW __attribute_deprecated__; @@ -540,6 +552,7 @@ extern int inet6_rth_reverse (__const void *__in, void *__out) __THROW; extern int inet6_rth_segments (__const void *__bp) __THROW; extern struct in6_addr *inet6_rth_getaddr (__const void *__bp, int __index) __THROW; +#endif /* Multicast source filter support. */ -- cgit v1.2.3 From de71e42c04a7d35cf663b1c84ac1de5b6b93b052 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 19:26:30 +0100 Subject: syntax fixes Avoid compile warnings about the use of undefined constants Signed-off-by: Peter S. Mazinger --- include/ftw.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/ftw.h b/include/ftw.h index 84f3e14a8..c79924dc8 100644 --- a/include/ftw.h +++ b/include/ftw.h @@ -129,7 +129,7 @@ typedef int (*__nftw64_func_t) (__const char *__filename, # endif #endif -#if __UCLIBC_HAS_FTW__ +#ifdef __UCLIBC_HAS_FTW__ /* Call a function on every element in a directory tree. This function is a possible cancellation point and therefore not @@ -151,7 +151,7 @@ extern int ftw64 (__const char *__dir, __ftw64_func_t __func, # endif #endif -#if __UCLIBC_HAS_NFTW__ && defined __USE_XOPEN_EXTENDED +#if defined __UCLIBC_HAS_NFTW__ && defined __USE_XOPEN_EXTENDED /* Call a function on every element in a directory tree. FLAG allows to specify the behaviour more detailed. -- cgit v1.2.3 From 1fc68eae4846de4a1e276e68aee743ef731f3e91 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 19:31:39 +0100 Subject: add missing prototypes Add some missing prototypes Signed-off-by: Peter S. Mazinger --- include/alloca.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/alloca.h b/include/alloca.h index 2565b4835..4790b300b 100644 --- a/include/alloca.h +++ b/include/alloca.h @@ -67,6 +67,8 @@ extern void *alloca (size_t __size) __THROW; # define extend_alloca(buf, len, newlen) \ alloca (((len) = (newlen))) # endif + +extern int __libc_alloca_cutoff (size_t size); #endif __END_DECLS -- cgit v1.2.3 From f00e553e4b084007781df5e4b5accc2e152da231 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 19:41:29 +0100 Subject: add missing prototypes Add some missing prototypes Signed-off-by: Peter S. Mazinger --- include/signal.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/signal.h b/include/signal.h index 0a09c7ad4..80e4edee0 100644 --- a/include/signal.h +++ b/include/signal.h @@ -310,6 +310,9 @@ extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) __THROW. */ extern int sigwaitinfo (__const sigset_t *__restrict __set, siginfo_t *__restrict __info) __nonnull ((1)); +#ifdef _LIBC +extern __typeof(sigwaitinfo) __sigwaitinfo attribute_hidden; +#endif libc_hidden_proto(sigwaitinfo) /* Select any of pending signals from SET and place information in INFO. @@ -321,6 +324,9 @@ extern int sigtimedwait (__const sigset_t *__restrict __set, siginfo_t *__restrict __info, __const struct timespec *__restrict __timeout) __nonnull ((1)); +#ifdef _LIBC +extern __typeof(sigtimedwait) __sigtimedwait attribute_hidden; +#endif libc_hidden_proto(sigtimedwait) /* Send signal SIG to the process PID. Associate data in VAL with the -- cgit v1.2.3 From 5e22e71adfef5ad46119cea98fccf4ae998ad0d8 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 2 Mar 2011 21:59:58 +0100 Subject: remove ucontext.h and guard sigstack structure with SUSV4_LEGACY and STRICT_HEADERS Remove ucontext.h if SUSV4_LEGACY is not set and fix it's references. Guard sigstack structure with SUSV4_LEGACY and STRICT_HEADERS. Disable sigstack function prototype, it is not provided by uClibc. Signed-off-by: Peter S. Mazinger --- include/signal.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/signal.h b/include/signal.h index 80e4edee0..37ed29780 100644 --- a/include/signal.h +++ b/include/signal.h @@ -392,14 +392,17 @@ extern int siginterrupt (int __sig, int __interrupt) __THROW; # include # ifdef __USE_XOPEN /* This will define `ucontext_t' and `mcontext_t'. */ -# include +/* SuSv4 obsoleted include/ucontext.h */ +# include # endif +# if 0 /* Run signals handlers on the stack specified by SS (if not NULL). If OSS is not NULL, it is filled in with the old signal stack status. This interface is obsolete and on many platform not implemented. */ extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) __THROW __attribute_deprecated__; +# endif /* Alternate signal handler stack interface. This interface should always be preferred over `sigstack'. */ -- cgit v1.2.3 From 587d7092180a5f2053906b87ea2b25b2bf6b34c6 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 2 Mar 2011 22:42:47 +0100 Subject: make it possible to compile with -std=gnu99/c99 and use extern inlines When compiled with -std=gnu99/c99 __GNUC_GNU_INLINE__ is not defined Signed-off-by: Peter S. Mazinger --- include/features.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/features.h b/include/features.h index 1d47b5660..f4d70d70f 100644 --- a/include/features.h +++ b/include/features.h @@ -433,7 +433,7 @@ uClibc was built without large file support enabled. */ #if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \ && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \ - && (defined __extern_inline || defined __GNUC_GNU_INLINE__) + && (defined __extern_inline || defined __GNUC_GNU_INLINE__ || defined __GNUC_STDC_INLINE__) # define __USE_EXTERN_INLINES 1 #endif -- cgit v1.2.3 From 152e66242f2af7cd26e29d59a31f8bb8479595e5 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 3 Mar 2011 00:37:29 +0100 Subject: update some headers Signed-off-by: Peter S. Mazinger --- include/langinfo.h | 7 ++++--- include/locale.h | 14 ++++++-------- include/net/if_arp.h | 4 +++- include/netinet/ether.h | 1 - include/netinet/icmp6.h | 4 ++-- include/netinet/in.h | 13 ++++++++----- include/netinet/ip.h | 38 +++++++++++++++++++++++++++++++++++++- include/netinet/udp.h | 12 +++++++++++- include/xlocale.h | 31 +++++++++---------------------- 9 files changed, 80 insertions(+), 44 deletions(-) (limited to 'include') diff --git a/include/langinfo.h b/include/langinfo.h index 2e2ee4ec8..c7cddc0fc 100644 --- a/include/langinfo.h +++ b/include/langinfo.h @@ -1,5 +1,5 @@ /* Access to locale-dependent parameters. - Copyright (C) 1995-2002,2003,2004,2005 Free Software Foundation, Inc. + Copyright (C) 1995-2002,2003,2004,2005,2009 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 @@ -352,6 +352,7 @@ enum _NL_CTYPE_TRANSLIT_IGNORE_LEN, _NL_CTYPE_TRANSLIT_IGNORE, _NL_CTYPE_MAP_TO_NONASCII, + _NL_CTYPE_NONASCII_CASE, _NL_CTYPE_EXTRA_MAP_1, _NL_CTYPE_EXTRA_MAP_2, _NL_CTYPE_EXTRA_MAP_3, @@ -620,7 +621,7 @@ extern char *nl_langinfo (nl_item __item) __THROW; libc_hidden_proto(nl_langinfo) -#if defined __USE_GNU && defined __UCLIBC_HAS_XLOCALE__ +#if defined __USE_XOPEN2K && defined __UCLIBC_HAS_XLOCALE__ /* This interface is for the extended locale model. See for more information. */ @@ -628,7 +629,7 @@ libc_hidden_proto(nl_langinfo) # include /* Just like nl_langinfo but get the information from the locale object L. */ -extern char *nl_langinfo_l (nl_item __item, __locale_t l); +extern char *nl_langinfo_l (nl_item __item, __locale_t __l); libc_hidden_proto(nl_langinfo_l) #endif diff --git a/include/locale.h b/include/locale.h index b740908f0..fa8d9e2d8 100644 --- a/include/locale.h +++ b/include/locale.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,95-99,2000,01,02 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1995-2002,2007,2009 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 @@ -133,7 +133,7 @@ libc_hidden_proto(localeconv) __END_NAMESPACE_STD -#if defined __USE_GNU && defined __UCLIBC_HAS_LOCALE__ +#if defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_LOCALE__ /* The concept of one static locale per category is not very well thought out. Many applications will need to process its data using information from several different locales. Another application is @@ -145,12 +145,13 @@ __END_NAMESPACE_STD Attention: all these functions are *not* standardized in any form. This is a proof-of-concept implementation. */ -#ifdef __UCLIBC_HAS_XLOCALE__ +#if 0 /* Get locale datatype definition. */ # include -#endif - +#else +/* POSIX 2008 makes locale_t official. */ typedef __locale_t locale_t; +#endif /* Return a reference to a data structure representing a set of locale datasets. Unlike for the CATEGORY parameter for `setlocale' the @@ -170,9 +171,6 @@ libc_hidden_proto(newlocale) # define LC_COLLATE_MASK (1 << __LC_COLLATE) # define LC_MONETARY_MASK (1 << __LC_MONETARY) # define LC_MESSAGES_MASK (1 << __LC_MESSAGES) -#ifdef L_newlocale -#warning mask defines for extra locale categories -#endif /* L_newlocale - uClibc note */ #ifdef LC_PAPER # define LC_PAPER_MASK (1 << __LC_PAPER) # define LC_NAME_MASK (1 << __LC_NAME) diff --git a/include/net/if_arp.h b/include/net/if_arp.h index 9608652ee..97cb61f62 100644 --- a/include/net/if_arp.h +++ b/include/net/if_arp.h @@ -1,5 +1,5 @@ /* Definitions for Address Resolution Protocol. - Copyright (C) 1997,1999,2001,2006 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2001,2006,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -128,6 +128,8 @@ struct arphdr #define ARPHRD_IEEE80211 801 /* IEEE 802.11. */ #define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header. */ #define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header. */ +#define ARPHRD_IEEE802154 804 /* IEEE 802.15.4 header. */ +#define ARPHRD_IEEE802154_PHY 805 /* IEEE 802.15.4 PHY header. */ #define ARPHRD_VOID 0xFFFF /* Void type, nothing is known. */ #define ARPHRD_NONE 0xFFFE /* Zero header length. */ diff --git a/include/netinet/ether.h b/include/netinet/ether.h index 2e52679fa..bd9aa982b 100644 --- a/include/netinet/ether.h +++ b/include/netinet/ether.h @@ -45,7 +45,6 @@ extern struct ether_addr *ether_aton_r (__const char *__asc, struct ether_addr *__addr) __THROW; libc_hidden_proto(ether_aton_r) - /* Map 48 bit Ethernet number ADDR to HOSTNAME. */ extern int ether_ntohost (char *__hostname, __const struct ether_addr *__addr) __THROW; diff --git a/include/netinet/icmp6.h b/include/netinet/icmp6.h index 225e49e07..8662cca8a 100644 --- a/include/netinet/icmp6.h +++ b/include/netinet/icmp6.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1997,2000,2006 Free Software Foundation, Inc. +/* Copyright (C) 1991-1997,2000,2006,2009 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 @@ -339,7 +339,7 @@ struct nd_opt_home_agent_info uint8_t nd_opt_home_agent_info_type; uint8_t nd_opt_home_agent_info_len; uint16_t nd_opt_home_agent_info_reserved; - int16_t nd_opt_home_agent_info_preference; + uint16_t nd_opt_home_agent_info_preference; uint16_t nd_opt_home_agent_info_lifetime; }; diff --git a/include/netinet/in.h b/include/netinet/in.h index 235194bbe..ce5afa513 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -484,16 +484,17 @@ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) #define IN6_IS_ADDR_MC_GLOBAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe)) +#endif #ifdef __USE_GNU +# if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ /* IPv6 packet information. */ struct in6_pktinfo { struct in6_addr ipi6_addr; /* src/dst IPv6 address */ unsigned int ipi6_ifindex; /* send/recv interface index */ }; -#endif /* IPv6 MTU information. */ struct ip6_mtuinfo @@ -501,10 +502,9 @@ struct ip6_mtuinfo struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */ uint32_t ip6m_mtu; /* path MTU in host byte order */ }; -#endif -#if 0 /*def __USE_GNU*/ -#ifdef __UCLIBC_HAS_IPV6__ + +# if 0 /* Obsolete hop-by-hop and Destination Options Processing (RFC 2292). */ extern int inet6_option_space (int __nbytes) __THROW __attribute_deprecated__; @@ -552,9 +552,11 @@ extern int inet6_rth_reverse (__const void *__in, void *__out) __THROW; extern int inet6_rth_segments (__const void *__bp) __THROW; extern struct in6_addr *inet6_rth_getaddr (__const void *__bp, int __index) __THROW; -#endif +# endif +# endif +# if 0 /* Multicast source filter support. */ /* Get IPv4 source filter. */ @@ -584,6 +586,7 @@ extern int setsourcefilter (int __s, uint32_t __interface_addr, socklen_t __grouplen, uint32_t __fmode, uint32_t __numsrc, __const struct sockaddr_storage *__slist) __THROW; +# endif #endif /* use GNU */ __END_DECLS diff --git a/include/netinet/ip.h b/include/netinet/ip.h index fc9144052..38bd7556d 100644 --- a/include/netinet/ip.h +++ b/include/netinet/ip.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1991,92,93,95,96,97,98,99,2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,95,96,97,98,99,2000,2009 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 @@ -152,6 +153,41 @@ struct ip_timestamp #define IPVERSION 4 /* IP version number */ #define IP_MAXPACKET 65535 /* maximum packet size */ +/* + * Definitions for Explicit Congestion Notification (ECN) + * + * Taken from RFC-3168, Section 5. + */ + +#define IPTOS_ECN_MASK 0x03 +#define IPTOS_ECN(x) ((x) & IPTOS_ECN_MASK) +#define IPTOS_ECN_NOT_ECT 0x00 +#define IPTOS_ECN_ECT1 0x01 +#define IPTOS_ECN_ECT0 0x02 +#define IPTOS_ECN_CE 0x03 + +/* + * Definitions for IP differentiated services code points (DSCP) + * + * Taken from RFC-2597, Section 6 and RFC-2598, Section 2.3. + */ + +#define IPTOS_DSCP_MASK 0xfc +#define IPTOS_DSCP(x) ((x) & IPTOS_DSCP_MASK) +#define IPTOS_DSCP_AF11 0x28 +#define IPTOS_DSCP_AF12 0x30 +#define IPTOS_DSCP_AF13 0x38 +#define IPTOS_DSCP_AF21 0x48 +#define IPTOS_DSCP_AF22 0x50 +#define IPTOS_DSCP_AF23 0x58 +#define IPTOS_DSCP_AF31 0x68 +#define IPTOS_DSCP_AF32 0x70 +#define IPTOS_DSCP_AF33 0x78 +#define IPTOS_DSCP_AF41 0x88 +#define IPTOS_DSCP_AF42 0x90 +#define IPTOS_DSCP_AF43 0x98 +#define IPTOS_DSCP_EF 0xb8 + /* * Definitions for IP type of service (ip_tos) */ diff --git a/include/netinet/udp.h b/include/netinet/udp.h index 45b69f749..ae1beb9e1 100644 --- a/include/netinet/udp.h +++ b/include/netinet/udp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 95, 96, 97, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1991-1993,1995-1997,2004,2009 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 @@ -74,6 +74,16 @@ struct udphdr }; #endif +/* UDP socket options */ +#define UDP_CORK 1 /* Never send partially complete segments. */ +#define UDP_ENCAP 100 /* Set the socket to accept + encapsulated packets. */ + +/* UDP encapsulation types */ +#define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ +#define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ +#define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ + #define SOL_UDP 17 /* sockopt level for UDP */ #endif /* netinet/udp.h */ diff --git a/include/xlocale.h b/include/xlocale.h index 51a787f14..e3def347d 100644 --- a/include/xlocale.h +++ b/include/xlocale.h @@ -1,5 +1,5 @@ /* Definition of locale datatype. - Copyright (C) 1997,2000,02 Free Software Foundation, Inc. + Copyright (C) 1997,2000,2002,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -21,15 +21,6 @@ #ifndef _XLOCALE_H #define _XLOCALE_H 1 -#include - -#ifndef __UCLIBC_HAS_XLOCALE__ -#error Attempted to include xlocale.h when uClibc built without extended locale support. -#endif - -#include -/* #include */ - #if 0 /* Structure for reentrant locale using functions. This is an (almost) opaque type for the user level programs. The file and @@ -37,26 +28,22 @@ go away without warning. */ typedef struct __locale_struct { -#if 0 /* Note: LC_ALL is not a valid index into this array. */ struct locale_data *__locales[13]; /* 13 = __LC_LAST. */ -#endif /* To increase the speed of this solution we add some special members. */ -/* const unsigned short int *__ctype_b; */ -/* const int *__ctype_tolower; */ -/* const int *__ctype_toupper; */ - const __uint16_t *__ctype_b; - const __ctype_touplow_t *__ctype_tolower; - const __ctype_touplow_t *__ctype_toupper; - - struct __uclibc_locale_struct *__locale_ptr; + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; -#if 0 /* Note: LC_ALL is not a valid index into this array. */ const char *__names[13]; -#endif } *__locale_t; +#else +# include #endif +/* POSIX 2008 makes locale_t official. */ +typedef __locale_t locale_t; + #endif /* xlocale.h */ -- cgit v1.2.3 From a37f5fd55332b72c7e8ca5436ab6cd04617985a7 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 3 Mar 2011 11:37:16 +0100 Subject: update some headers Sync some headers with glibc. realpath is an XSI extension in SuSv4, add back guard and update comment, since it seems to allow != NULL in second arg. Signed-off-by: Peter S. Mazinger --- include/stdint.h | 1 + include/stdlib.h | 42 ++++++++++++++++++++++++++---------------- include/sys/wait.h | 30 +++++++++++++----------------- 3 files changed, 40 insertions(+), 33 deletions(-) (limited to 'include') diff --git a/include/stdint.h b/include/stdint.h index 465a1b5bc..a0d7da947 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -238,6 +238,7 @@ typedef unsigned long long int uintmax_t; # define UINTPTR_MAX (4294967295U) # endif + #if !defined(__H8300H__) && !defined(__H8300S__) /* Minimum for largest signed integral type. */ # define INTMAX_MIN (-__INT64_C(9223372036854775807)-1) diff --git a/include/stdlib.h b/include/stdlib.h index 300edf04a..00bba5f54 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -50,9 +50,9 @@ __BEGIN_DECLS as well as POSIX.1 use of `int' for the status word. */ # if defined __GNUC__ && !defined __cplusplus -# define __WAIT_INT(status) \ - (__extension__ ({ union { __typeof(status) __in; int __i; } __u; \ - __u.__in = (status); __u.__i; })) +# define __WAIT_INT(status) \ + (__extension__ (((union { __typeof(status) __in; int __i; }) \ + { .__in = (status) }).__i)) # else # define __WAIT_INT(status) (*(int *) &(status)) # endif @@ -244,14 +244,14 @@ __END_NAMESPACE_C99 #if defined __USE_GNU && defined __UCLIBC_HAS_XLOCALE__ /* The concept of one static locale per category is not very well thought out. Many applications will need to process its data using - information from several different locales. Another application is + information from several different locales. Another problem is the implementation of the internationalization handling in the - upcoming ISO C++ standard library. To support this another set of - the functions using locale data exist which have an additional + ISO C++ standard library. To support this another set of + the functions using locale data exist which take an additional argument. - Attention: all these functions are *not* standardized in any form. - This is a proof-of-concept implementation. */ + Attention: even though several *_l interfaces are part of POSIX:2008, + these are not. */ /* Structure for reentrant locale using functions. This is an (almost) opaque type for the user level programs. */ @@ -347,10 +347,16 @@ struct random_data int32_t *fptr; /* Front pointer. */ int32_t *rptr; /* Rear pointer. */ int32_t *state; /* Array of state values. */ +#if 0 + int rand_type; /* Type of random number generator. */ + int rand_deg; /* Degree of random number generator. */ + int rand_sep; /* Distance between front and rear. */ +#else /* random_r.c, TYPE_x, DEG_x, SEP_x - small enough for int8_t */ int8_t rand_type; /* Type of random number generator. */ int8_t rand_deg; /* Degree of random number generator. */ int8_t rand_sep; /* Distance between front and rear. */ +#endif int32_t *end_ptr; /* Pointer behind state table. */ }; @@ -540,7 +546,7 @@ extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) __BEGIN_NAMESPACE_STD /* Call all functions registered with `atexit' and `on_exit', - in the reverse of the order in which they were registered + in the reverse of the order in which they were registered, perform stdio cleanup, and terminate program execution with STATUS. */ extern void exit (int __status) __THROW __attribute__ ((__noreturn__)); libc_hidden_proto(exit) @@ -619,7 +625,7 @@ extern char *mktemp (char *__template) __THROW __nonnull ((1)) __wur; Returns a file descriptor open on the file for reading and writing, or -1 if it cannot create a uniquely-named file. - This function is a possible cancellation points and therefore not + This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int mkstemp (char *__template) __nonnull ((1)) __wur; @@ -636,7 +642,7 @@ extern int mkstemp64 (char *__template) __nonnull ((1)) __wur; # endif #endif -#ifdef __USE_BSD +#if defined __USE_BSD || defined __USE_XOPEN2K8 /* Create a unique temporary directory from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the directory name unique. @@ -662,14 +668,17 @@ extern char *canonicalize_file_name (__const char *__name) __THROW __nonnull ((1)) __wur; #endif -/* Return the canonical absolute name of file NAME. If the - canonical name is PATH_MAX chars or more, returns null - with `errno' set to ENAMETOOLONG; if the name fits in - fewer than PATH_MAX chars, returns the name in RESOLVED. */ -/* we choose to handle __resolved==NULL as crash :) */ +#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +/* Return the canonical absolute name of file NAME. If RESOLVED is + null, the result is malloc'd; otherwise, if the canonical name is + PATH_MAX chars or more, returns null with `errno' set to + ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, + returns the name in RESOLVED. */ extern char *realpath (__const char *__restrict __name, char *__restrict __resolved) __THROW __wur; libc_hidden_proto(realpath) +#endif + /* Shorthand for type of comparison functions. */ #ifndef __COMPAR_FN_T @@ -852,6 +861,7 @@ libc_hidden_proto(posix_openpt) #ifdef __USE_XOPEN /* The next four functions all take a master pseudo-tty fd and perform an operation on the associated slave: */ + #ifdef __UCLIBC_HAS_PTY__ /* Chown the slave to the calling user. */ extern int grantpt (int __fd) __THROW; diff --git a/include/sys/wait.h b/include/sys/wait.h index f283fe228..16893c0b9 100644 --- a/include/sys/wait.h +++ b/include/sys/wait.h @@ -1,5 +1,5 @@ -/* Copyright (C) 1991-1994,1996-2001,2003,2004,2005 - Free Software Foundation, Inc. +/* Copyright (C) 1991-1994,1996-2001,2003,2004,2005,2007,2009 + 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 @@ -51,7 +51,7 @@ __BEGIN_DECLS # endif /* This is the type of the argument to `wait'. The funky union - causes redeclarations with ether `int *' or `union wait *' to be + causes redeclarations with either `int *' or `union wait *' to be allowed without complaint. __WAIT_STATUS_DEFN is the type used in the actual function definitions. */ @@ -79,22 +79,22 @@ typedef union /* This will define all the `__W*' macros. */ # include -# define WEXITSTATUS(status) __WEXITSTATUS(__WAIT_INT(status)) -# define WTERMSIG(status) __WTERMSIG(__WAIT_INT(status)) -# define WSTOPSIG(status) __WSTOPSIG(__WAIT_INT(status)) -# define WIFEXITED(status) __WIFEXITED(__WAIT_INT(status)) -# define WIFSIGNALED(status) __WIFSIGNALED(__WAIT_INT(status)) -# define WIFSTOPPED(status) __WIFSTOPPED(__WAIT_INT(status)) +# define WEXITSTATUS(status) __WEXITSTATUS (__WAIT_INT (status)) +# define WTERMSIG(status) __WTERMSIG (__WAIT_INT (status)) +# define WSTOPSIG(status) __WSTOPSIG (__WAIT_INT (status)) +# define WIFEXITED(status) __WIFEXITED (__WAIT_INT (status)) +# define WIFSIGNALED(status) __WIFSIGNALED (__WAIT_INT (status)) +# define WIFSTOPPED(status) __WIFSTOPPED (__WAIT_INT (status)) # ifdef __WIFCONTINUED -# define WIFCONTINUED(status) __WIFCONTINUED(__WAIT_INT(status)) +# define WIFCONTINUED(status) __WIFCONTINUED (__WAIT_INT (status)) # endif #endif /* not included. */ #ifdef __USE_BSD # define WCOREFLAG __WCOREFLAG -# define WCOREDUMP(status) __WCOREDUMP(__WAIT_INT(status)) -# define W_EXITCODE(ret, sig) __W_EXITCODE(ret, sig) -# define W_STOPCODE(sig) __W_STOPCODE(sig) +# define WCOREDUMP(status) __WCOREDUMP (__WAIT_INT (status)) +# define W_EXITCODE(ret, sig) __W_EXITCODE (ret, sig) +# define W_STOPCODE(sig) __W_STOPCODE (sig) #endif /* The following values are used by the `waitid' function. */ @@ -172,10 +172,6 @@ extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options, #endif #ifdef __USE_BSD -/* This being here makes the prototypes valid whether or not - we have already included to define `struct rusage'. */ -struct rusage; - /* PID is like waitpid. Other args are like wait3. */ extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options, struct rusage *__usage) __THROW; -- cgit v1.2.3 From b776a692f8cc95c03853fcaf43833f9477ad8c36 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 3 Mar 2011 12:35:29 +0100 Subject: better guard of IPV6 related stuff Function prototypes are visible whenever IPV6 option is enabled. Structures and constants are visible either if IPV6 is enabled or STRICT_HEADERS is disabled. Signed-off-by: Peter S. Mazinger --- include/netinet/in.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/netinet/in.h b/include/netinet/in.h index ce5afa513..b42121ae3 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -213,15 +213,18 @@ struct in6_addr #endif }; -extern const struct in6_addr in6addr_any; /* :: */ -extern const struct in6_addr in6addr_loopback; /* ::1 */ -libc_hidden_proto(in6addr_loopback) #define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } #define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } #define INET6_ADDRSTRLEN 46 #endif +#ifdef __UCLIBC_HAS_IPV6__ +extern const struct in6_addr in6addr_any; /* :: */ +extern const struct in6_addr in6addr_loopback; /* ::1 */ +libc_hidden_proto(in6addr_loopback) +#endif + #define INET_ADDRSTRLEN 16 -- cgit v1.2.3 From 63a16d7e6832b65769e7c2be0aed39b8ff8cf741 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 3 Mar 2011 12:44:18 +0100 Subject: guard nl_catd structure and related constants with STRICT_HEADERS Signed-off-by: Peter S. Mazinger --- include/nl_types.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/nl_types.h b/include/nl_types.h index d6d48ecd9..e54612af7 100644 --- a/include/nl_types.h +++ b/include/nl_types.h @@ -21,11 +21,13 @@ #include +#ifndef __UCLIBC_STRICT_HEADERS__ /* The default message set used by the gencat program. */ #define NL_SETD 1 /* Value for FLAG parameter of `catgets' to say we want XPG4 compliance. */ #define NL_CAT_LOCALE 1 +#endif __BEGIN_DECLS @@ -34,8 +36,10 @@ __BEGIN_DECLS #warning "mjn3 FIXME: None of these prototypes have implementations." #endif +#ifndef __UCLIBC_STRICT_HEADERS__ /* Message catalog descriptor type. */ typedef void *nl_catd; +#endif /* Type used by `nl_langinfo'. */ typedef int nl_item; -- cgit v1.2.3 From fae4a5832519033c8c378e4cb4dadb96e5be1692 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 3 Mar 2011 13:08:54 +0100 Subject: paths.h: add _PATH_GSHADOW Signed-off-by: Peter S. Mazinger --- include/paths.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/paths.h b/include/paths.h index 305937fc5..0b4035d22 100644 --- a/include/paths.h +++ b/include/paths.h @@ -44,6 +44,7 @@ #define _PATH_DEVDB "/var/run/dev.db" #define _PATH_DEVNULL "/dev/null" #define _PATH_DRUM "/dev/drum" +#define _PATH_GSHADOW "/etc/gshadow" #define _PATH_KLOG "/proc/kmsg" #define _PATH_KMEM "/dev/kmem" #define _PATH_LASTLOG "/var/log/lastlog" -- cgit v1.2.3 From a36065a4fe6dcd6fc1847da9d063894e45c4a71e Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 3 Mar 2011 13:20:21 +0100 Subject: sgtty.h is useless, remove it on STRICT_HEADERS Signed-off-by: Peter S. Mazinger --- include/sgtty.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/sgtty.h b/include/sgtty.h index 5b2bc4184..f773c3123 100644 --- a/include/sgtty.h +++ b/include/sgtty.h @@ -19,21 +19,27 @@ #ifndef _SGTTY_H #define _SGTTY_H 1 +#warning useless header on uClibc + #include #include +#ifndef __UCLIBC_STRICT_HEADERS__ /* On some systems this type is not defined by ; in that case, the functions are just stubs that return ENOSYS. */ struct sgttyb; +#endif __BEGIN_DECLS +#if 0 /* Fill in *PARAMS with terminal parameters associated with FD. */ extern int gtty (int __fd, struct sgttyb *__params) __THROW; /* Set the terminal parameters associated with FD to *PARAMS. */ extern int stty (int __fd, __const struct sgttyb *__params) __THROW; +#endif __END_DECLS -- cgit v1.2.3 From 96c9a8f7d00cdf6bb7968a2390b9d87da8a45e2d Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 3 Mar 2011 15:06:47 +0100 Subject: add _dl_errno support to errno.h, cleanup Add support to use errno.h in ldso. Move __set_errno into _LIBC guard. Remove uClibc_errno.h, unused. Signed-off-by: Peter S. Mazinger --- include/errno.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/errno.h b/include/errno.h index 85268f053..7e1f583a8 100644 --- a/include/errno.h +++ b/include/errno.h @@ -58,7 +58,12 @@ extern const char *program_invocation_name, *program_invocation_short_name; __END_DECLS -#if defined _LIBC && defined __UCLIBC_HAS_TLS__ +#ifdef _LIBC +#ifdef IS_IN_rtld +# undef errno +# define errno _dl_errno +extern int _dl_errno; /* attribute_hidden */ +#elif defined __UCLIBC_HAS_TLS__ # if !defined NOT_IN_libc || defined IS_IN_libpthread # undef errno # ifndef NOT_IN_libc @@ -73,10 +78,7 @@ extern __thread int errno attribute_tls_model_ie; #ifndef __set_errno #define __set_errno(val) (errno = (val)) #endif - -#ifndef __ASSEMBLER__ -extern int *__errno_location (void) __THROW __attribute__ ((__const__)); -#endif +#endif /* _LIBC */ #endif /* _ERRNO_H */ -- cgit v1.2.3 From 5ebef433698a13e5171f4b7dca04f2006bd92468 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 3 Mar 2011 16:04:03 +0100 Subject: provide internal hidden version of __fcntl_nocancel guard the prototype with _LIBC, it is only for internal use Signed-off-by: Peter S. Mazinger --- include/fcntl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/fcntl.h b/include/fcntl.h index 3a9873461..26ad1fe6d 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -234,7 +234,10 @@ extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len); # endif #endif +#ifdef _LIBC extern int __fcntl_nocancel (int fd, int cmd, ...); +libc_hidden_proto(__fcntl_nocancel) +#endif __END_DECLS -- cgit v1.2.3 From 4e431d5f5cbdde5e4330c2961b084471de14c101 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 3 Mar 2011 16:23:05 +0100 Subject: remove obsoleted and incorrect comment Signed-off-by: Peter S. Mazinger --- include/libintl.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include') diff --git a/include/libintl.h b/include/libintl.h index ba57f1698..be3969fff 100644 --- a/include/libintl.h +++ b/include/libintl.h @@ -34,11 +34,6 @@ __BEGIN_DECLS -#ifdef __UCLIBC_MJN3_ONLY__ -#warning "mjn3 FIXME: gettext has a prototype but isn't defined." -#warning "mjn3 FIXME: __OPTIMIZE__ is never defined." -#endif - /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ -- cgit v1.2.3 From 2a0c568ddc7b6b142dc049d8cc9cf32eb38e2321 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Fri, 4 Mar 2011 18:28:26 +0100 Subject: fix locale build make xlocale.h a dummy, locale_t is needed without it and uClibc_locale.h is already included by locale.h Signed-off-by: Peter S. Mazinger --- include/locale.h | 6 +++--- include/xlocale.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/locale.h b/include/locale.h index fa8d9e2d8..d04c42ff6 100644 --- a/include/locale.h +++ b/include/locale.h @@ -145,13 +145,13 @@ __END_NAMESPACE_STD Attention: all these functions are *not* standardized in any form. This is a proof-of-concept implementation. */ -#if 0 +#ifdef __UCLIBC_HAS_XLOCALE__ /* Get locale datatype definition. */ # include -#else +#endif + /* POSIX 2008 makes locale_t official. */ typedef __locale_t locale_t; -#endif /* Return a reference to a data structure representing a set of locale datasets. Unlike for the CATEGORY parameter for `setlocale' the diff --git a/include/xlocale.h b/include/xlocale.h index e3def347d..82dabdfda 100644 --- a/include/xlocale.h +++ b/include/xlocale.h @@ -39,11 +39,11 @@ typedef struct __locale_struct /* Note: LC_ALL is not a valid index into this array. */ const char *__names[13]; } *__locale_t; -#else -# include -#endif /* POSIX 2008 makes locale_t official. */ typedef __locale_t locale_t; +#else +# include +#endif #endif /* xlocale.h */ -- cgit v1.2.3 From 95adc01517efce365da4e40e0d2a081ec4497928 Mon Sep 17 00:00:00 2001 From: Mark Salter Date: Wed, 23 Feb 2011 12:56:43 +0100 Subject: Add support for DSBT ELF to ld.so This adds support for DSBT ELF to ld.so. This uses loadmaps like FD-PIC. Some code is added in ld.so to initialize the DSBT tables, and there's also a new target macro FINISH_BOOTSTRAP_RELOC. Signed-off-by: Mark Salter Signed-off-by: Aurelien Jacquiot Signed-off-by: Bernd Schmidt --- include/link.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/link.h b/include/link.h index cbef6165a..185ee701e 100644 --- a/include/link.h +++ b/include/link.h @@ -1,6 +1,6 @@ /* Data structure for communication from the run-time dynamic linker for loaded ELF shared objects. - Copyright (C) 1995-2001, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1995-2001, 2004, 2005, 2006, 2010 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 @@ -83,6 +83,9 @@ extern ElfW(Dyn) _DYNAMIC[]; #ifdef __FDPIC__ # include #endif +#ifdef __DSBT__ +# include +#endif /* Structure describing a loaded shared object. The `l_next' and `l_prev' members form a chain of all the shared objects loaded at startup. @@ -97,8 +100,12 @@ struct link_map #ifdef __FDPIC__ struct elf32_fdpic_loadaddr l_addr; +#else +#ifdef __DSBT__ + struct elf32_dsbt_loadaddr l_addr; #else ElfW(Addr) l_addr; /* Base address shared object is loaded at. */ +#endif #endif char *l_name; /* Absolute file name object was found in. */ ElfW(Dyn) *l_ld; /* Dynamic section of the shared object. */ @@ -177,8 +184,12 @@ struct dl_phdr_info { #ifdef __FDPIC__ struct elf32_fdpic_loadaddr dlpi_addr; +#else +#ifdef __DSBT__ + struct elf32_dsbt_loadaddr dlpi_addr; #else ElfW(Addr) dlpi_addr; +#endif #endif const char *dlpi_name; const ElfW(Phdr) *dlpi_phdr; -- cgit v1.2.3 From 46d6a24872b7fa2717f8f71b5e0598a14d38e1f6 Mon Sep 17 00:00:00 2001 From: Aurelien Jacquiot Date: Wed, 23 Feb 2011 13:04:59 +0100 Subject: The C6X port This adds support for the TI C6X family of processors. Signed-off-by: Mark Salter Signed-off-by: Aurelien Jacquiot Signed-off-by: Bernd Schmidt --- include/elf.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'include') diff --git a/include/elf.h b/include/elf.h index b86aa52be..d71691eb3 100644 --- a/include/elf.h +++ b/include/elf.h @@ -268,6 +268,7 @@ typedef struct #define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */ #define EM_CRX 114 /* National Semiconductor CRX */ #define EM_NUM 95 +#define EM_TI_C6000 140 /* If it is necessary to assign new unofficial EM_* values, please pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision @@ -3063,6 +3064,50 @@ typedef Elf32_Addr Elf32_Conflict; /* Keep this the last entry. */ #define R_XTENSA_NUM 50 +/* C6X specific relocs */ +#define R_C6000_NONE 0 +#define R_C6000_ABS32 1 +#define R_C6000_ABS16 2 +#define R_C6000_ABS8 3 +#define R_C6000_PCR_S21 4 +#define R_C6000_PCR_S12 5 +#define R_C6000_PCR_S10 6 +#define R_C6000_PCR_S7 7 +#define R_C6000_ABS_S16 8 +#define R_C6000_ABS_L16 9 +#define R_C6000_ABS_H16 10 +#define R_C6000_SBR_U15_B 11 +#define R_C6000_SBR_U15_H 12 +#define R_C6000_SBR_U15_W 13 +#define R_C6000_SBR_S16 14 +#define R_C6000_SBR_L16_B 15 +#define R_C6000_SBR_L16_H 16 +#define R_C6000_SBR_L16_W 17 +#define R_C6000_SBR_H16_B 18 +#define R_C6000_SBR_H16_H 19 +#define R_C6000_SBR_H16_W 20 +#define R_C6000_SBR_GOT_U15_W 21 +#define R_C6000_SBR_GOT_L16_W 22 +#define R_C6000_SBR_GOT_H16_W 23 +#define R_C6000_DSBT_INDEX 24 +#define R_C6000_PREL31 25 +#define R_C6000_COPY 26 +#define R_C6000_JUMP_SLOT 27 +#define R_C6000_SBR_GOT32 28 +#define R_C6000_PCR_H16 29 +#define R_C6000_PCR_L16 30 +#define R_C6000_ALIGN 253 +#define R_C6000_FPHEAD 254 +#define R_C6000_NOCMP 255 + +/* C6x specific values for the Dyn d_tag field. */ +#define DT_C6000_DSBT_BASE (DT_LOPROC + 0) +#define DT_C6000_DSBT_SIZE (DT_LOPROC + 1) +#define DT_C6000_PREEMPTMAP (DT_LOPROC + 2) +#define DT_C6000_DSBT_INDEX (DT_LOPROC + 3) + +#define DT_C6000_NUM 4 + #ifdef __cplusplus } #endif -- cgit v1.2.3 From 2a19c1339d6bf46fe0f90fbd4e8dca6646d111ed Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Wed, 23 Feb 2011 00:14:42 +0100 Subject: Implement ffsl and ffsll. This imports and adapts ffsll.c from glibc. The same mechanism as in glibc is used to choose between ffs and ffsll to implement ffsl. The single user in libc is changed to use the hidden version __libc_ffs. Signed-off-by: Bernd Schmidt Acked-by: Bernhard Reutner-Fischer --- include/string.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/string.h b/include/string.h index ca22055ed..66f64e7d1 100644 --- a/include/string.h +++ b/include/string.h @@ -374,11 +374,10 @@ extern char *rindex (__const char *__s, int __c) /* Return the position of the first bit set in I, or 0 if none are set. The least-significant bit is position 1, the most-significant 32. */ extern int ffs (int __i) __THROW __attribute__ ((__const__)); -libc_hidden_proto(ffs) /* The following two functions are non-standard but necessary for non-32 bit platforms. */ -# if 0 /*#ifdef __USE_GNU*/ +#ifdef __USE_GNU extern int ffsl (long int __l) __THROW __attribute__ ((__const__)); # ifdef __GNUC__ __extension__ extern int ffsll (long long int __ll) @@ -386,6 +385,13 @@ __extension__ extern int ffsll (long long int __ll) # endif # endif +#ifdef _LIBC +extern __typeof(ffs) __libc_ffs; +libc_hidden_proto(__libc_ffs); +extern __typeof(ffsll) __libc_ffsll; +libc_hidden_proto(__libc_ffsll) +#endif + /* Compare S1 and S2, ignoring case. */ extern int strcasecmp (__const char *__s1, __const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); -- cgit v1.2.3 From cda3f2658389330999ad35390ed2676a7dc37325 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sun, 6 Mar 2011 17:08:38 +0100 Subject: simplify ffs* code Remove __libc_ffs*, unneeded Signed-off-by: Peter S. Mazinger --- include/string.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'include') diff --git a/include/string.h b/include/string.h index 66f64e7d1..c71a85c9f 100644 --- a/include/string.h +++ b/include/string.h @@ -374,6 +374,7 @@ extern char *rindex (__const char *__s, int __c) /* Return the position of the first bit set in I, or 0 if none are set. The least-significant bit is position 1, the most-significant 32. */ extern int ffs (int __i) __THROW __attribute__ ((__const__)); +libc_hidden_proto(ffs) /* The following two functions are non-standard but necessary for non-32 bit platforms. */ @@ -385,13 +386,6 @@ __extension__ extern int ffsll (long long int __ll) # endif # endif -#ifdef _LIBC -extern __typeof(ffs) __libc_ffs; -libc_hidden_proto(__libc_ffs); -extern __typeof(ffsll) __libc_ffsll; -libc_hidden_proto(__libc_ffsll) -#endif - /* Compare S1 and S2, ignoring case. */ extern int strcasecmp (__const char *__s1, __const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); -- cgit v1.2.3 From 19373021defb3b917ba9617c3f45b22ab8da26dd Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Mon, 7 Mar 2011 17:28:57 +0100 Subject: locale.c, locale.h: no need for hidden duplocale Signed-off-by: Peter S. Mazinger --- include/locale.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/locale.h b/include/locale.h index d04c42ff6..b79626a46 100644 --- a/include/locale.h +++ b/include/locale.h @@ -204,7 +204,6 @@ libc_hidden_proto(newlocale) /* Return a duplicate of the set of locale in DATASET. All usage counters are increased if necessary. */ extern __locale_t duplocale (__locale_t __dataset) __THROW; -libc_hidden_proto(duplocale) /* Free the data associated with a locale dataset previously returned by a call to `setlocale_r'. */ -- cgit v1.2.3 From 094e03a6600f0029aa045431f9bac1bd32b3193d Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Tue, 8 Mar 2011 14:01:04 +0100 Subject: resolv.h: disable unneeded prototypes Signed-off-by: Peter S. Mazinger --- include/resolv.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include') diff --git a/include/resolv.h b/include/resolv.h index b9ce1e2a2..cba26f004 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -282,46 +282,61 @@ extern struct __res_state *__res_state(void) __attribute__ ((__const__)); __END_DECLS #define _res (*__res_state()) +#if 0 #define fp_nquery __fp_nquery #define fp_query __fp_query #define hostalias __hostalias #define p_query __p_query +#endif #define res_close __res_close #define res_init __res_init +#if 0 #define res_isourserver __res_isourserver #define res_mkquery __res_mkquery +#endif #define res_query __res_query #define res_querydomain __res_querydomain #define res_search __res_search +#if 0 #define res_send __res_send +#endif __BEGIN_DECLS +#if 0 void fp_nquery (const u_char *, int, FILE *) __THROW; void fp_query (const u_char *, FILE *) __THROW; const char * hostalias (const char *) __THROW; void p_query (const u_char *) __THROW; +#endif #ifdef __UCLIBC_HAS_BSD_RES_CLOSE__ void res_close (void) __THROW; #endif int res_init (void) __THROW; libc_hidden_proto(res_init) +#if 0 int res_isourserver (const struct sockaddr_in *) __THROW; int res_mkquery (int, const char *, int, int, const u_char *, int, const u_char *, u_char *, int) __THROW; +#endif int res_query (const char *, int, int, u_char *, int) __THROW; libc_hidden_proto(res_query) int res_querydomain (const char *, const char *, int, int, u_char *, int) __THROW; libc_hidden_proto(res_querydomain) int res_search (const char *, int, int, u_char *, int) __THROW; +#if 0 int res_send (const u_char *, int, u_char *, int) __THROW; +#endif __END_DECLS +#if 0 #define b64_ntop __b64_ntop #define b64_pton __b64_pton #define dn_comp __dn_comp #define dn_count_labels __dn_count_labels +#endif #define dn_expand __dn_expand +#if 0 #define dn_skipname __dn_skipname #define fp_resstat __fp_resstat #define loc_aton __loc_aton @@ -359,7 +374,9 @@ __END_DECLS #define sym_ntop __sym_ntop #define sym_ntos __sym_ntos #define sym_ston __sym_ston +#endif __BEGIN_DECLS +#if 0 int res_hnok (const char *) __THROW; int res_ownok (const char *) __THROW; int res_mailok (const char *) __THROW; @@ -389,8 +406,10 @@ char * p_secstodate (u_long) __THROW; int dn_count_labels (const char *) __THROW; int dn_comp (const char *, u_char *, int, u_char **, u_char **) __THROW; +#endif int dn_expand (const u_char *, const u_char *, const u_char *, char *, int) __THROW; +#if 0 u_int res_randomid (void) __THROW; int res_nameinquery (const char *, int, int, const u_char *, const u_char *) __THROW; @@ -418,6 +437,7 @@ int res_nmkquery (res_state, int, const char *, int, int, int res_nsend (res_state, const u_char *, int, u_char *, int) __THROW; void res_nclose (res_state) __THROW; +#endif __END_DECLS # if _LIBC -- cgit v1.2.3 From 82098ab9b853c33ee8ade61c9510b295cc696de1 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 09:23:48 +0100 Subject: guard *_chk() related stuff with UCLIBC_HAS_FORTIFY Guard x86_64 memset_chk/memcpy_chk be guarded by UCLIBC_HAS_FORTIFY. Compile ssp.c if one of SSP/FORTIFY is defined. Guard __chk_fail() with UCLIBC_HAS_FORTIFY and move its prototype to libc-internal.h. Disable _FORTIFY_SOURCE if UCLIBC_HAS_FORTIFY is not set. The config option itself is omitted on purpose, headers need to be reviewed and generic *_chk() functions need to be first provided. Signed-off-by: Peter S. Mazinger --- include/features.h | 5 ++++- include/libc-internal.h | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/features.h b/include/features.h index f4d70d70f..41e83a93f 100644 --- a/include/features.h +++ b/include/features.h @@ -198,9 +198,12 @@ # define __OPTIMIZE_SIZE__ 1 /* disable unsupported features */ -# undef _FORTIFY_SOURCE # undef __LDBL_COMPAT +# ifndef __UCLIBC_HAS_FORTIFY__ +# undef _FORTIFY_SOURCE +# endif + # ifndef __UCLIBC_HAS_THREADS__ # if defined _REENTRANT || defined _THREAD_SAFE # warning requested reentrant code, but thread support was disabled diff --git a/include/libc-internal.h b/include/libc-internal.h index 443b1fc50..3ac0b0509 100644 --- a/include/libc-internal.h +++ b/include/libc-internal.h @@ -65,6 +65,11 @@ libc_hidden_proto(__glibc_strerror_r) /* internal access to program name */ extern const char *__uclibc_progname attribute_hidden; +# ifdef __UCLIBC_HAS_FORTIFY__ +extern void __chk_fail(void) attribute_noreturn; +libc_hidden_proto(__chk_fail) +# endif + # endif /* IS_IN_libc */ #endif /* __ASSEMBLER__ */ -- cgit v1.2.3 From 65e4d45a77ca147fe0988e2b3c452196c490a11c Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 13:36:36 +0100 Subject: disable _POSIX2_LOCALEDEF uClibc does not provide the localedef utility Signed-off-by: Peter S. Mazinger --- include/unistd.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/unistd.h b/include/unistd.h index 5d3a4cb8f..c421cb308 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -51,9 +51,11 @@ __BEGIN_DECLS Software Development Utilities Option. */ #define _POSIX2_SW_DEV 200112L +#if 0 /* uClibc does not provide the utility */ /* If defined, the implementation supports the creation of locales with the localedef utility. */ #define _POSIX2_LOCALEDEF 200112L +#endif /* X/Open version number to which the library conforms. It is selectable. */ #ifdef __USE_UNIX98 -- cgit v1.2.3 From 7aea441c8a240bd5a0717ec09ae8efc4878cd377 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 14:48:45 +0100 Subject: move prototype for __drand48_iterate and __libc_drand48_data to stdlib.h Move them to a common header guarded by _LIBC Signed-off-by: Peter S. Mazinger --- include/stdlib.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/stdlib.h b/include/stdlib.h index 00bba5f54..6afc321e6 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -908,6 +908,13 @@ libc_hidden_proto(arc4random_stir) extern void arc4random_addrandom(unsigned char *, int); #endif +#ifdef _LIBC +extern int __drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer) attribute_hidden; + +/* Global state for non-reentrant functions. */ +extern struct drand48_data __libc_drand48_data attribute_hidden; +#endif + #endif /* don't just need malloc and calloc */ #undef __need_malloc_and_calloc -- cgit v1.2.3 From d57b631e82529b2c880f5d7e4fbcd88042803f80 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 15:05:00 +0100 Subject: stdlib.h: move MB_CUR_MAX = 1 from wchar-stub.h Signed-off-by: Peter S. Mazinger --- include/stdlib.h | 4 +++- include/wchar-stub.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/stdlib.h b/include/stdlib.h index 6afc321e6..c533bd57a 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -143,9 +143,11 @@ __END_NAMESPACE_C99 extern size_t __ctype_get_mb_cur_max (void) __THROW __wur; #else #ifdef __UCLIBC_HAS_WCHAR__ -#define MB_CUR_MAX (_stdlib_mb_cur_max ()) +# define MB_CUR_MAX (_stdlib_mb_cur_max ()) extern size_t _stdlib_mb_cur_max (void) __THROW __wur; libc_hidden_proto(_stdlib_mb_cur_max) +#else +# define MB_CUR_MAX 1 #endif #endif diff --git a/include/wchar-stub.h b/include/wchar-stub.h index 0b0aa29aa..918c78dd4 100644 --- a/include/wchar-stub.h +++ b/include/wchar-stub.h @@ -7,7 +7,6 @@ #ifndef _WCHAR_H #define _WCHAR_H -#define MB_CUR_MAX 1 typedef unsigned int wint_t; #define WEOF (0xffffffffu) -- cgit v1.2.3 From dad0315108b60d47af25aa46a7f11084c15d821f Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 15:19:10 +0100 Subject: arc4random.c, stdlib.h: get rid of hidden arc4random_stir The function is used only in one file, make an internal static version for this Signed-off-by: Peter S. Mazinger --- include/stdlib.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/stdlib.h b/include/stdlib.h index c533bd57a..18657277a 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -906,7 +906,6 @@ extern int getloadavg (double __loadavg[], int __nelem) #include extern uint32_t arc4random(void); extern void arc4random_stir(void); -libc_hidden_proto(arc4random_stir) extern void arc4random_addrandom(unsigned char *, int); #endif -- cgit v1.2.3 From 98538deba691281535e3dc0839710b8630e02ac8 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 20:19:49 +0100 Subject: stdlib.c, _strtod.c, stdlib.h: remove unused hidden functions Signed-off-by: Peter S. Mazinger --- include/stdlib.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/stdlib.h b/include/stdlib.h index 18657277a..e9a8b84c2 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -165,7 +165,6 @@ libc_hidden_proto(atoi) /* Convert a string to a long integer. */ extern long int atol (__const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; -libc_hidden_proto(atol) __END_NAMESPACE_STD #if defined __USE_ISOC99 || defined __USE_MISC -- cgit v1.2.3 From f4ec824864b8ea68af8953669f789656cc05143d Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 21:11:47 +0100 Subject: ctype.c, _collate.c, str[n]casecmp.c, strlcpy.c: remove unused hidden functions Signed-off-by: Peter S. Mazinger --- include/ctype.h | 1 - include/string.h | 1 - include/wchar.h | 5 ----- 3 files changed, 7 deletions(-) (limited to 'include') diff --git a/include/ctype.h b/include/ctype.h index dcfeb1b3e..6ad17a781 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -354,7 +354,6 @@ libc_hidden_proto(tolower_l) /* Return the uppercase version of C. */ /*extern int __toupper_l (int __c, __locale_t __l) __THROW; */ extern int toupper_l (int __c, __locale_t __l) __THROW; -libc_hidden_proto(toupper_l) # if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus # define tolower_l(c, locale) __tobody(c, tolower_l, (locale)->__ctype_tolower, (c, locale)) diff --git a/include/string.h b/include/string.h index c71a85c9f..6632e5f4a 100644 --- a/include/string.h +++ b/include/string.h @@ -124,7 +124,6 @@ libc_hidden_proto(strcoll) extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) __THROW __nonnull ((2)); -libc_hidden_proto(strxfrm) __END_NAMESPACE_STD #if defined __USE_GNU && defined __UCLIBC_HAS_XLOCALE__ diff --git a/include/wchar.h b/include/wchar.h index 3795998a5..ddbb55912 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -170,12 +170,10 @@ __END_NAMESPACE_C99 #ifdef __USE_GNU /* Compare S1 and S2, ignoring case. */ extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) __THROW; -libc_hidden_proto(wcscasecmp) /* Compare no more than N chars of S1 and S2, ignoring case. */ extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) __THROW; -libc_hidden_proto(wcsncasecmp) #ifdef __UCLIBC_HAS_XLOCALE__ /* Similar to the two functions above but take the information from @@ -184,11 +182,9 @@ libc_hidden_proto(wcsncasecmp) extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, __locale_t __loc) __THROW; -libc_hidden_proto(wcscasecmp_l) extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n, __locale_t __loc) __THROW; -libc_hidden_proto(wcsncasecmp_l) #endif /* __UCLIBC_HAS_XLOCALE__ */ #endif @@ -202,7 +198,6 @@ libc_hidden_proto(wcscoll) `wcscoll' to the original strings. */ extern size_t wcsxfrm (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) __THROW; -libc_hidden_proto(wcsxfrm) __END_NAMESPACE_C99 #ifdef __USE_GNU -- cgit v1.2.3 From 1350fdff4b950d42771d6ea7b246e2d269e2bd72 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 21:30:53 +0100 Subject: wchar.h, _collate.c, strlcpy.c: use a common prototype of __wcslcpy Signed-off-by: Peter S. Mazinger --- include/wchar.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/wchar.h b/include/wchar.h index ddbb55912..0603089f1 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -783,6 +783,11 @@ libc_hidden_proto(wcsftime_l) # include #endif +#ifdef _LIBC +extern size_t __wcslcpy(wchar_t *__restrict dst, + const wchar_t *__restrict src, size_t n) attribute_hidden; +#endif + __END_DECLS #endif /* _WCHAR_H defined */ -- cgit v1.2.3 From e60342da428076ae6d3097950a3c5454bab84160 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 21:55:39 +0100 Subject: memmem.c, string.h: remove unused hidden memmem It is used only by gen_collate, not included into libc. Signed-off-by: Peter S. Mazinger --- include/string.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/string.h b/include/string.h index 6632e5f4a..cfd423b9f 100644 --- a/include/string.h +++ b/include/string.h @@ -256,7 +256,6 @@ libc_hidden_proto(strcasestr) extern void *memmem (__const void *__haystack, size_t __haystacklen, __const void *__needle, size_t __needlelen) __THROW __attribute_pure__ __nonnull ((1, 3)); -libc_hidden_proto(memmem) /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ -- cgit v1.2.3 From abd6c6c29f82ddcc7c86c67519b79d2381622ed9 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 23:20:16 +0100 Subject: remove unused hidden functions Signed-off-by: Peter S. Mazinger --- include/stdio.h | 1 - include/string.h | 1 - include/wchar.h | 3 --- 3 files changed, 5 deletions(-) (limited to 'include') diff --git a/include/stdio.h b/include/stdio.h index 3c86f256b..45d3e4991 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -450,7 +450,6 @@ libc_hidden_proto(vfscanf) marked with __THROW. */ extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) __wur; -libc_hidden_proto(vscanf) /* Read formatted input from S into argument list ARG. */ extern int vsscanf (__const char *__restrict __s, diff --git a/include/string.h b/include/string.h index cfd423b9f..f11a7269c 100644 --- a/include/string.h +++ b/include/string.h @@ -447,7 +447,6 @@ extern char *__stpncpy (char *__restrict __dest, extern char *stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); -libc_hidden_proto(stpncpy) # if 0 /* uClibc does not support strfry or memfrob. */ /* Sautee STRING briskly. */ diff --git a/include/wchar.h b/include/wchar.h index 0603089f1..53959e0cb 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -228,7 +228,6 @@ __BEGIN_NAMESPACE_C99 /* Find the first occurrence of WC in WCS. */ extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) __THROW __attribute_pure__; -libc_hidden_proto(wcschr) /* Find the last occurrence of WC in WCS. */ extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) __THROW __attribute_pure__; @@ -239,7 +238,6 @@ __END_NAMESPACE_C99 the closing NUL wide character in case C is not found in S. */ extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) __THROW __attribute_pure__; -libc_hidden_proto(wcschrnul) #endif __BEGIN_NAMESPACE_C99 @@ -544,7 +542,6 @@ extern int fwide (__FILE *__fp, int __mode) __THROW; extern int fwprintf (__FILE *__restrict __stream, __const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */; -libc_hidden_proto(fwprintf) /* Write formatted output to stdout. This function is a possible cancellation point and therefore not -- cgit v1.2.3 From 5ab9845ea03ba2c356e58617daeab6b306959380 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 10 Mar 2011 00:49:01 +0100 Subject: time.c, wchar.h: remove unused hidden wcsftime Signed-off-by: Peter S. Mazinger --- include/wchar.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/wchar.h b/include/wchar.h index 53959e0cb..650c39975 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -754,7 +754,6 @@ __BEGIN_NAMESPACE_C99 extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, __const wchar_t *__restrict __format, __const struct tm *__restrict __tp) __THROW; -libc_hidden_proto(wcsftime) __END_NAMESPACE_C99 # if defined __USE_GNU && defined __UCLIBC_HAS_XLOCALE__ -- cgit v1.2.3 From 3e223e6c18912091bf75b77f9c7ae2ded0063037 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 10 Mar 2011 10:50:01 +0100 Subject: _wctype.c, wctype.h: remove unused isw* and wctype_l hidden functions Signed-off-by: Peter S. Mazinger --- include/wctype.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/wctype.h b/include/wctype.h index 7b697d2b0..79f36eb8c 100644 --- a/include/wctype.h +++ b/include/wctype.h @@ -305,7 +305,6 @@ extern int iswblank_l (wint_t __wc, __locale_t __locale) __THROW; by the string argument PROPERTY. */ extern wctype_t wctype_l (__const char *__property, __locale_t __locale) __THROW; -libc_hidden_proto(wctype_l) /* Determine whether the wide-character WC has the property described by DESC. */ -- cgit v1.2.3 From 14b0a648ca751773fe28dd98f2c031bf6287e52a Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 10 Mar 2011 11:06:25 +0100 Subject: ctype.c, ctype.h: remove commented parts that were banned for removal after 0.9.31 Signed-off-by: Peter S. Mazinger --- include/ctype.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'include') diff --git a/include/ctype.h b/include/ctype.h index 6ad17a781..d09f0526b 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -345,21 +345,15 @@ libc_hidden_proto(isascii_l) # endif /* Return the lowercase version of C in locale L. */ -/* "ordinary" ctype.h has no __tolower, why we try to have it? - * remove after 0.9.31 - *extern int __tolower_l (int __c, __locale_t __l) __THROW; */ extern int tolower_l (int __c, __locale_t __l) __THROW; libc_hidden_proto(tolower_l) /* Return the uppercase version of C. */ -/*extern int __toupper_l (int __c, __locale_t __l) __THROW; */ extern int toupper_l (int __c, __locale_t __l) __THROW; # if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus # define tolower_l(c, locale) __tobody(c, tolower_l, (locale)->__ctype_tolower, (c, locale)) # define toupper_l(c, locale) __tobody(c, toupper_l, (locale)->__ctype_toupper, (c, locale)) -/*# define __tolower_l(c, locale) tolower_l((c), (locale)) */ -/*# define __toupper_l(c, locale) toupper_l((c), (locale)) */ # endif /* Optimizing gcc */ -- cgit v1.2.3 From 24a14a0bb867f02ba87b498ee64e3ed6ce33b27a Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 10 Mar 2011 11:34:38 +0100 Subject: time.c, time.h: remove unused hidden strftime/strptime Signed-off-by: Peter S. Mazinger --- include/time.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/time.h b/include/time.h index 7fcdf68e6..65071a908 100644 --- a/include/time.h +++ b/include/time.h @@ -207,7 +207,6 @@ extern time_t mktime (struct tm *__tp) __THROW; extern size_t strftime (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp) __THROW; -libc_hidden_proto(strftime) __END_NAMESPACE_STD # ifdef __USE_XOPEN @@ -216,7 +215,6 @@ __END_NAMESPACE_STD extern char *strptime (__const char *__restrict __s, __const char *__restrict __fmt, struct tm *__tp) __THROW; -libc_hidden_proto(strptime) # endif #ifdef __UCLIBC_HAS_XLOCALE__ -- cgit v1.2.3 From 6fb9aa575e35f59c224acd48006b9c7a7063099c Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 10 Mar 2011 13:13:26 +0100 Subject: add libc_hidden_proto for wcs[n]casecmp_l Signed-off-by: Peter S. Mazinger --- include/wchar.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/wchar.h b/include/wchar.h index 650c39975..3d477ba23 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -182,9 +182,11 @@ extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, __locale_t __loc) __THROW; +libc_hidden_proto(wcscasecmp_l) extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n, __locale_t __loc) __THROW; +libc_hidden_proto(wcsncasecmp_l) #endif /* __UCLIBC_HAS_XLOCALE__ */ #endif -- cgit v1.2.3 From 1b3f056d4aa2726f872f2ee85f3f391a784e19e4 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 10 Mar 2011 13:15:10 +0100 Subject: wctype.h: fix libc_hidden_proto for iswupper and add it for iswspace Old typo, became visible due to other changes. Signed-off-by: Peter S. Mazinger --- include/wctype.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/wctype.h b/include/wctype.h index 79f36eb8c..3ae682191 100644 --- a/include/wctype.h +++ b/include/wctype.h @@ -157,12 +157,13 @@ extern int iswpunct (wint_t __wc) __THROW; set of wide characters for which none of `iswalnum', `iswgraph', or `iswpunct' is true. */ extern int iswspace (wint_t __wc) __THROW; +libc_hidden_proto(iswspace) /* Test for any wide character that corresponds to an uppercase letter or is one of a locale-specific set of wide character for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ extern int iswupper (wint_t __wc) __THROW; -libc_hidden_proto(iswspace) +libc_hidden_proto(iswupper) /* Test for any wide character that corresponds to a hexadecimal-digit character equivalent to that performed be the functions described -- cgit v1.2.3