Browse Source

update some headers

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Peter S. Mazinger 13 years ago
parent
commit
152e66242f

+ 4 - 3
include/langinfo.h

@@ -1,5 +1,5 @@
 /* Access to locale-dependent parameters.
 /* 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.
    This file is part of the GNU C Library.
 
 
    The GNU C Library is free software; you can redistribute it and/or
    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_LEN,
   _NL_CTYPE_TRANSLIT_IGNORE,
   _NL_CTYPE_TRANSLIT_IGNORE,
   _NL_CTYPE_MAP_TO_NONASCII,
   _NL_CTYPE_MAP_TO_NONASCII,
+  _NL_CTYPE_NONASCII_CASE,
   _NL_CTYPE_EXTRA_MAP_1,
   _NL_CTYPE_EXTRA_MAP_1,
   _NL_CTYPE_EXTRA_MAP_2,
   _NL_CTYPE_EXTRA_MAP_2,
   _NL_CTYPE_EXTRA_MAP_3,
   _NL_CTYPE_EXTRA_MAP_3,
@@ -620,7 +621,7 @@ extern char *nl_langinfo (nl_item __item) __THROW;
 libc_hidden_proto(nl_langinfo)
 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 <locale.h> for
 /* This interface is for the extended locale model.  See <locale.h> for
    more information.  */
    more information.  */
 
 
@@ -628,7 +629,7 @@ libc_hidden_proto(nl_langinfo)
 # include <xlocale.h>
 # include <xlocale.h>
 
 
 /* Just like nl_langinfo but get the information from the locale object L.  */
 /* 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)
 libc_hidden_proto(nl_langinfo_l)
 #endif
 #endif
 
 

+ 6 - 8
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.
    This file is part of the GNU C Library.
 
 
    The GNU C Library is free software; you can redistribute it and/or
    The GNU C Library is free software; you can redistribute it and/or
@@ -133,7 +133,7 @@ libc_hidden_proto(localeconv)
 __END_NAMESPACE_STD
 __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
 /* The concept of one static locale per category is not very well
    thought out.  Many applications will need to process its data using
    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 application is
@@ -145,12 +145,13 @@ __END_NAMESPACE_STD
    Attention: all these functions are *not* standardized in any form.
    Attention: all these functions are *not* standardized in any form.
    This is a proof-of-concept implementation.  */
    This is a proof-of-concept implementation.  */
 
 
-#ifdef __UCLIBC_HAS_XLOCALE__
+#if 0
 /* Get locale datatype definition.  */
 /* Get locale datatype definition.  */
 # include <xlocale.h>
 # include <xlocale.h>
-#endif
-
+#else
+/* POSIX 2008 makes locale_t official.  */
 typedef __locale_t locale_t;
 typedef __locale_t locale_t;
+#endif
 
 
 /* Return a reference to a data structure representing a set of locale
 /* Return a reference to a data structure representing a set of locale
    datasets.  Unlike for the CATEGORY parameter for `setlocale' the
    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_COLLATE_MASK	(1 << __LC_COLLATE)
 # define LC_MONETARY_MASK	(1 << __LC_MONETARY)
 # define LC_MONETARY_MASK	(1 << __LC_MONETARY)
 # define LC_MESSAGES_MASK	(1 << __LC_MESSAGES)
 # 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
 #ifdef LC_PAPER
 # define LC_PAPER_MASK		(1 << __LC_PAPER)
 # define LC_PAPER_MASK		(1 << __LC_PAPER)
 # define LC_NAME_MASK		(1 << __LC_NAME)
 # define LC_NAME_MASK		(1 << __LC_NAME)

+ 3 - 1
include/net/if_arp.h

@@ -1,5 +1,5 @@
 /* Definitions for Address Resolution Protocol.
 /* 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.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
 
@@ -128,6 +128,8 @@ struct arphdr
 #define ARPHRD_IEEE80211 801		/* IEEE 802.11.  */
 #define ARPHRD_IEEE80211 801		/* IEEE 802.11.  */
 #define ARPHRD_IEEE80211_PRISM 802	/* IEEE 802.11 + Prism2 header.  */
 #define ARPHRD_IEEE80211_PRISM 802	/* IEEE 802.11 + Prism2 header.  */
 #define ARPHRD_IEEE80211_RADIOTAP 803	/* IEEE 802.11 + radiotap 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_VOID	  0xFFFF	/* Void type, nothing is known.  */
 #define ARPHRD_NONE	  0xFFFE	/* Zero header length.  */
 #define ARPHRD_NONE	  0xFFFE	/* Zero header length.  */

+ 0 - 1
include/netinet/ether.h

@@ -45,7 +45,6 @@ extern struct ether_addr *ether_aton_r (__const char *__asc,
 					struct ether_addr *__addr) __THROW;
 					struct ether_addr *__addr) __THROW;
 libc_hidden_proto(ether_aton_r)
 libc_hidden_proto(ether_aton_r)
 
 
-
 /* Map 48 bit Ethernet number ADDR to HOSTNAME.  */
 /* Map 48 bit Ethernet number ADDR to HOSTNAME.  */
 extern int ether_ntohost (char *__hostname, __const struct ether_addr *__addr)
 extern int ether_ntohost (char *__hostname, __const struct ether_addr *__addr)
      __THROW;
      __THROW;

+ 2 - 2
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.
    This file is part of the GNU C Library.
 
 
    The GNU C Library is free software; you can redistribute it and/or
    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_type;
     uint8_t   nd_opt_home_agent_info_len;
     uint8_t   nd_opt_home_agent_info_len;
     uint16_t  nd_opt_home_agent_info_reserved;
     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;
     uint16_t  nd_opt_home_agent_info_lifetime;
   };
   };
 
 

+ 8 - 5
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) \
 #define IN6_IS_ADDR_MC_GLOBAL(a) \
 	(IN6_IS_ADDR_MULTICAST(a)					      \
 	(IN6_IS_ADDR_MULTICAST(a)					      \
 	 && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe))
 	 && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe))
+#endif
 
 
 
 
 #ifdef __USE_GNU
 #ifdef __USE_GNU
+# if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__
 /* IPv6 packet information.  */
 /* IPv6 packet information.  */
 struct in6_pktinfo
 struct in6_pktinfo
   {
   {
     struct in6_addr ipi6_addr;	/* src/dst IPv6 address */
     struct in6_addr ipi6_addr;	/* src/dst IPv6 address */
     unsigned int ipi6_ifindex;	/* send/recv interface index */
     unsigned int ipi6_ifindex;	/* send/recv interface index */
   };
   };
-#endif
 
 
 /* IPv6 MTU information.  */
 /* IPv6 MTU information.  */
 struct ip6_mtuinfo
 struct ip6_mtuinfo
@@ -501,10 +502,9 @@ struct ip6_mtuinfo
     struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
     struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
     uint32_t ip6m_mtu;		   /* path MTU in host byte order */
     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).  */
 /* Obsolete hop-by-hop and Destination Options Processing (RFC 2292).  */
 extern int inet6_option_space (int __nbytes)
 extern int inet6_option_space (int __nbytes)
      __THROW __attribute_deprecated__;
      __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 int inet6_rth_segments (__const void *__bp) __THROW;
 extern struct in6_addr *inet6_rth_getaddr (__const void *__bp, int __index)
 extern struct in6_addr *inet6_rth_getaddr (__const void *__bp, int __index)
      __THROW;
      __THROW;
-#endif
+#  endif
+# endif
 
 
 
 
+# if 0
 /* Multicast source filter support.  */
 /* Multicast source filter support.  */
 
 
 /* Get IPv4 source filter.  */
 /* Get IPv4 source filter.  */
@@ -584,6 +586,7 @@ extern int setsourcefilter (int __s, uint32_t __interface_addr,
 			    socklen_t __grouplen, uint32_t __fmode,
 			    socklen_t __grouplen, uint32_t __fmode,
 			    uint32_t __numsrc,
 			    uint32_t __numsrc,
 			    __const struct sockaddr_storage *__slist) __THROW;
 			    __const struct sockaddr_storage *__slist) __THROW;
+# endif
 #endif	/* use GNU */
 #endif	/* use GNU */
 
 
 __END_DECLS
 __END_DECLS

+ 37 - 1
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.
    This file is part of the GNU C Library.
 
 
    The GNU C Library is free software; you can redistribute it and/or
    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	IPVERSION	4               /* IP version number */
 #define	IP_MAXPACKET	65535		/* maximum packet size */
 #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)
  * Definitions for IP type of service (ip_tos)
  */
  */

+ 11 - 1
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.
    This file is part of the GNU C Library.
 
 
    The GNU C Library is free software; you can redistribute it and/or
    The GNU C Library is free software; you can redistribute it and/or
@@ -74,6 +74,16 @@ struct udphdr
 };
 };
 #endif
 #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 */
 #define SOL_UDP            17      /* sockopt level for UDP */
 
 
 #endif /* netinet/udp.h */
 #endif /* netinet/udp.h */

+ 9 - 22
include/xlocale.h

@@ -1,5 +1,5 @@
 /* Definition of locale datatype.
 /* 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.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
 
@@ -21,15 +21,6 @@
 #ifndef _XLOCALE_H
 #ifndef _XLOCALE_H
 #define _XLOCALE_H	1
 #define _XLOCALE_H	1
 
 
-#include <features.h>
-
-#ifndef __UCLIBC_HAS_XLOCALE__
-#error Attempted to include xlocale.h when uClibc built without extended locale support.
-#endif
-
-#include <bits/uClibc_locale.h>
-/* #include <bits/uClibc_touplow.h> */
-
 #if 0
 #if 0
 /* Structure for reentrant locale using functions.  This is an
 /* Structure for reentrant locale using functions.  This is an
    (almost) opaque type for the user level programs.  The file and
    (almost) opaque type for the user level programs.  The file and
@@ -37,26 +28,22 @@
    go away without warning.  */
    go away without warning.  */
 typedef struct __locale_struct
 typedef struct __locale_struct
 {
 {
-#if 0
   /* Note: LC_ALL is not a valid index into this array.  */
   /* Note: LC_ALL is not a valid index into this array.  */
   struct locale_data *__locales[13]; /* 13 = __LC_LAST. */
   struct locale_data *__locales[13]; /* 13 = __LC_LAST. */
-#endif
 
 
   /* To increase the speed of this solution we add some special members.  */
   /* 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.  */
   /* Note: LC_ALL is not a valid index into this array.  */
   const char *__names[13];
   const char *__names[13];
-#endif
 } *__locale_t;
 } *__locale_t;
+#else
+# include <bits/uClibc_locale.h>
 #endif
 #endif
 
 
+/* POSIX 2008 makes locale_t official.  */
+typedef __locale_t locale_t;
+
 #endif /* xlocale.h */
 #endif /* xlocale.h */

+ 1 - 0
libc/misc/locale/locale.c

@@ -1057,6 +1057,7 @@ libc_hidden_def(__XL_NPP(nl_langinfo))
 /**********************************************************************/
 /**********************************************************************/
 #ifdef L_newlocale
 #ifdef L_newlocale
 
 
+#warning mask defines for extra locale categories
 
 
 #ifdef __UCLIBC_MJN3_ONLY__
 #ifdef __UCLIBC_MJN3_ONLY__
 #warning TODO: Move posix and utf8 strings.
 #warning TODO: Move posix and utf8 strings.