summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 16:35:30 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 16:35:30 +0000
commit8a8d4b95c50316e31c15b68ed349233d5db28292 (patch)
tree585c088bb8df4739f5db46e63c854477083b9f84 /include
parent6622bc38bc3ed737fbd41e1c620a2dc27f1376f7 (diff)
downloaduClibc-alpine-8a8d4b95c50316e31c15b68ed349233d5db28292.tar.bz2
uClibc-alpine-8a8d4b95c50316e31c15b68ed349233d5db28292.tar.xz
Merge from trunk.
Diffstat (limited to 'include')
-rw-r--r--include/elf.h6
-rw-r--r--include/errno.h2
-rw-r--r--include/error.h4
-rw-r--r--include/fcntl.h3
-rw-r--r--include/features.h122
-rw-r--r--include/libc-symbols.h7
-rw-r--r--include/libintl.h14
-rw-r--r--include/link.h12
-rw-r--r--include/netinet/in.h150
-rw-r--r--include/printf.h2
-rw-r--r--include/rpc/xdr.h31
-rw-r--r--include/sched.h25
-rw-r--r--include/signal.h4
-rw-r--r--include/stdlib.h13
-rw-r--r--include/sys/cdefs.h2
-rw-r--r--include/sys/epoll.h107
-rw-r--r--include/sys/mman.h2
-rw-r--r--include/sys/prctl.h32
-rw-r--r--include/sys/sendfile.h10
-rw-r--r--include/sys/syscall.h1
-rw-r--r--include/sys/types.h3
-rw-r--r--include/time.h10
-rw-r--r--include/unistd.h58
23 files changed, 357 insertions, 263 deletions
diff --git a/include/elf.h b/include/elf.h
index e1dae0962..44fcb2370 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -2591,6 +2591,12 @@ typedef Elf32_Addr Elf32_Conflict;
#define R_390_NUM 61
+/* CRIS flags. */
+#define EF_CRIS_VARIANT_MASK 0x0000000e
+#define EF_CRIS_VARIANT_ANY_V0_V10 0x00000000
+#define EF_CRIS_VARIANT_V32 0x00000002
+#define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004
+
/* CRIS relocations. */
#define R_CRIS_NONE 0
#define R_CRIS_8 1
diff --git a/include/errno.h b/include/errno.h
index 527326b17..91d78df95 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -82,7 +82,7 @@ extern int *__errno_location (void) __THROW __attribute__ ((__const__));
that printing `error_t' values in the debugger shows the names. We
might need this definition sometimes even if this file was included
before. */
-#if defined __USE_GNU || defined __need_error_t
+#if ( defined __USE_GNU || defined __need_error_t ) && !defined __ASSEMBLER__
# ifndef __error_t_defined
typedef int error_t;
# define __error_t_defined 1
diff --git a/include/error.h b/include/error.h
index 3638bc6e9..ef97ff2c7 100644
--- a/include/error.h
+++ b/include/error.h
@@ -53,12 +53,12 @@ extern void error_at_line (int __status, int __errnum, const char *__fname,
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this
function without parameters instead. */
-extern void (*error_print_progname) (void);
+/* extern void (*error_print_progname) (void); */
#else
void error ();
void error_at_line ();
-extern void (*error_print_progname) ();
+/* extern void (*error_print_progname) (); */
#endif
/* This variable is incremented each time `error' is called. */
diff --git a/include/fcntl.h b/include/fcntl.h
index b7b62ae33..a43890215 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -79,6 +79,9 @@ extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
# define fcntl fcntl64
# endif
#endif
+#ifdef __USE_LARGEFILE64
+extern int fcntl64 (int __fd, int __cmd, ...);
+#endif
/* Open FILE and return a new file descriptor for it, or -1 on error.
OFLAG determines the type of access used. If O_CREAT is on OFLAG,
diff --git a/include/features.h b/include/features.h
index ec807d523..c690e7ec2 100644
--- a/include/features.h
+++ b/include/features.h
@@ -19,6 +19,23 @@
#ifndef _FEATURES_H
#define _FEATURES_H 1
+/* This macro indicates that the installed library is uClibc. Use
+ * __UCLIBC_MAJOR__ and __UCLIBC_MINOR__ to test for the features in
+ * specific releases. */
+#define __UCLIBC__ 1
+
+/* Load up the current set of uClibc supported features along
+ * with the current uClibc major and minor version numbers.
+ * For uClibc release 0.9.26, these numbers would be:
+ * #define __UCLIBC_MAJOR__ 0
+ * #define __UCLIBC_MINOR__ 9
+ * #define __UCLIBC_SUBLEVEL__ 26
+ */
+#define __need_uClibc_config_h
+#include <bits/uClibc_config.h>
+#undef __need_uClibc_config_h
+#include <bits/uClibc_arch_features.h>
+
/* For uClibc, always optimize for size -- this should disable
* a lot of expensive inlining... */
#define __OPTIMIZE_SIZE__ 1
@@ -42,6 +59,7 @@
_FILE_OFFSET_BITS=N Select default filesystem interface.
_BSD_SOURCE ISO C, POSIX, and 4.3BSD things.
_SVID_SOURCE ISO C, POSIX, and SVID things.
+ _ATFILE_SOURCE Additional *at interfaces.
_GNU_SOURCE All of the above, plus GNU extensions.
_REENTRANT Select additionally reentrant object.
_THREAD_SAFE Same as _REENTRANT, often used by other systems.
@@ -73,6 +91,7 @@
__USE_BSD Define 4.3BSD things.
__USE_SVID Define SVID things.
__USE_MISC Define things common to BSD and System V Unix.
+ __USE_ATFILE Define *at interfaces and AT_* constants for them.
__USE_GNU Define GNU extensions.
__USE_REENTRANT Define reentrant/thread-safe *_r functions.
__USE_FORTIFY_LEVEL Additional security measures used, according to level.
@@ -106,6 +125,7 @@
#undef __USE_BSD
#undef __USE_SVID
#undef __USE_MISC
+#undef __USE_ATFILE
#undef __USE_GNU
#undef __USE_REENTRANT
#undef __USE_FORTIFY_LEVEL
@@ -162,6 +182,8 @@
# define _BSD_SOURCE 1
# undef _SVID_SOURCE
# define _SVID_SOURCE 1
+# undef _ATFILE_SOURCE
+# define _ATFILE_SOURCE 1
#endif
/* If nothing (other than _GNU_SOURCE) is defined,
@@ -258,6 +280,10 @@
# define __USE_SVID 1
#endif
+#ifdef _ATFILE_SOURCE
+# define __USE_ATFILE 1
+#endif
+
#ifdef _GNU_SOURCE
# define __USE_GNU 1
#endif
@@ -266,37 +292,23 @@
# define __USE_REENTRANT 1
#endif
-#if _FORTIFY_SOURCE > 0 && __GNUC_PREREQ (4, 1) && defined(__OPTIMIZE__)
-# if _FORTIFY_SOURCE == 1
-# define __USE_FORTIFY_LEVEL 1
-# elif _FORTIFY_SOURCE > 1
+#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
+ && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
+# if _FORTIFY_SOURCE > 1
# define __USE_FORTIFY_LEVEL 2
+# else
+# define __USE_FORTIFY_LEVEL 1
# endif
+#else
+# define __USE_FORTIFY_LEVEL 0
#endif
/* We do support the IEC 559 math functionality, real and complex. */
#define __STDC_IEC_559__ 1
#define __STDC_IEC_559_COMPLEX__ 1
-/* This macro indicates that the installed library is uClibc. Use
- * __UCLIBC_MAJOR__ and __UCLIBC_MINOR__ to test for the features in
- * specific releases. */
-#define __UCLIBC__ 1
-
-/* Load up the current set of uClibc supported features along
- * with the current uClibc major and minor version numbers.
- * For uClibc release 0.9.26, these numbers would be:
- * #define __UCLIBC_MAJOR__ 0
- * #define __UCLIBC_MINOR__ 9
- * #define __UCLIBC_SUBLEVEL__ 26
- */
-#define __need_uClibc_config_h
-#include <bits/uClibc_config.h>
-#undef __need_uClibc_config_h
-#include <bits/uClibc_arch_features.h>
-
#ifdef __UCLIBC_HAS_WCHAR__
-/* wchar_t uses ISO 10646-1 (2nd ed., published 2000-09-15) / Unicode 3.0. */
+/* wchar_t uses ISO 10646-1 (2nd ed., published 2000-09-15) / Unicode 3.1. */
# define __STDC_ISO_10646__ 200009L
#endif
@@ -308,14 +320,32 @@
* are not really intended to check for the presence of a particular library,
* but rather are used to define an _interface_. */
#if !defined __FORCE_NOGLIBC && (!defined _LIBC || defined __FORCE_GLIBC)
-# define __GNU_LIBRARY__ 6
-# define __GLIBC__ 2
-# define __GLIBC_MINOR__ 2
+/* This macro indicates that the installed library is the GNU C Library.
+ For historic reasons the value now is 6 and this will stay from now
+ on. The use of this variable is deprecated. */
+# undef __GNU_LIBRARY__
+# define __GNU_LIBRARY__ 6
+
+/* Major and minor version number of the GNU C library package. Use
+ these macros to test for features in specific releases. */
+/* Don't do it, if you want to keep uClibc happy. */
+# define __GLIBC__ 2
+# define __GLIBC_MINOR__ 2
#endif
#define __GLIBC_PREREQ(maj, min) \
((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
+#ifndef __UCLIBC__
+/* Decide whether a compiler supports the long long datatypes. */
+#if defined __GNUC__ \
+ || (defined __PGI && defined __i386__ ) \
+ || (defined __INTEL_COMPILER && (defined __i386__ || defined __ia64__)) \
+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
+# define __GLIBC_HAVE_LONG_LONG 1
+#endif
+#endif
+
/* This is here only because every header file already includes this one. */
#ifndef __ASSEMBLER__
# ifndef _SYS_CDEFS_H
@@ -342,35 +372,39 @@
#ifndef __UCLIBC_HAS_LFS__
/* If uClibc was built without large file support, output an error if
- * and 64-bit file offsets were requested, output an error.
+ * 64-bit file offsets were requested.
* NOTE: This is probably incorrect on a 64-bit arch... */
-#ifdef __USE_FILE_OFFSET64
-#error It appears you have defined _FILE_OFFSET_BITS=64. Unfortunately, \
+# ifdef __USE_FILE_OFFSET64
+# error It appears you have defined _FILE_OFFSET_BITS=64. Unfortunately, \
uClibc was built without large file support enabled.
-#endif
+# endif
/* If uClibc was built without large file support and _LARGEFILE64_SOURCE
* is defined, undefine it. */
-#if defined(_LARGEFILE64_SOURCE)
-#undef _LARGEFILE64_SOURCE
-#undef __USE_LARGEFILE64
-#endif
+# ifdef _LARGEFILE64_SOURCE
+# undef _LARGEFILE64_SOURCE
+# undef __USE_LARGEFILE64
+# endif
/* If we're actually building uClibc with large file support,
* define __USE_LARGEFILE64 and __USE_LARGEFILE. */
-#elif defined(_LIBC)
-#undef _LARGEFILE_SOURCE
-#undef _LARGEFILE64_SOURCE
-#undef _FILE_OFFSET_BITS
-#undef __USE_LARGEFILE
-#undef __USE_LARGEFILE64
-#undef __USE_FILE_OFFSET64
-#define _LARGEFILE_SOURCE 1
-#define _LARGEFILE64_SOURCE 1
-#define __USE_LARGEFILE 1
-#define __USE_LARGEFILE64 1
+#elif defined _LIBC
+# undef _LARGEFILE_SOURCE
+# undef _LARGEFILE64_SOURCE
+# undef _FILE_OFFSET_BITS
+# undef __USE_LARGEFILE
+# undef __USE_LARGEFILE64
+# undef __USE_FILE_OFFSET64
+# define _LARGEFILE_SOURCE 1
+# define _LARGEFILE64_SOURCE 1
+# define __USE_LARGEFILE 1
+# define __USE_LARGEFILE64 1
#endif
+/* uClibc does not support *at interfaces. */
+#undef _ATFILE_SOURCE
+#undef __USE_ATFILE
+
#ifdef _LIBC
# include <libc-internal.h>
#endif
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index e363ab641..c5ec2814f 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -55,11 +55,6 @@
# define IS_IN_libc 1
#endif
-/* need this to unset defaults in libpthread for files that get added to libc */
-#ifdef IS_IN_libc
-# undef NOT_IN_libc
-#endif
-
#ifdef __UCLIBC_NO_UNDERSCORES__
# define NO_UNDERSCORES
#else
@@ -320,7 +315,7 @@
}
libc_hidden_weak (foo)
- Simularly for global data. If references to foo within libc.so should
+ Similarly for global data. If references to foo within libc.so should
always go to foo defined in libc.so, then in include/foo.h you add:
libc_hidden_proto (foo)
diff --git a/include/libintl.h b/include/libintl.h
index fd009c3d6..ba57f1698 100644
--- a/include/libintl.h
+++ b/include/libintl.h
@@ -1,5 +1,5 @@
/* Message catalogs for internationalization.
- Copyright (C) 1995-1999, 2000-2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1995-2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This file is derived from the file libgettext.h in the GNU gettext package.
@@ -42,22 +42,28 @@ __BEGIN_DECLS
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
-extern char *gettext (__const char *__msgid) __THROW;
+extern char *gettext (__const char *__msgid)
+ __THROW __attribute_format_arg__ (1);
/* Look up MSGID in the DOMAINNAME message catalog for the current
LC_MESSAGES locale. */
extern char *dgettext (__const char *__domainname, __const char *__msgid)
- __THROW;
+ __THROW __attribute_format_arg__ (2);
+#if 0 /* uClibc: disabled */
extern char *__dgettext (__const char *__domainname, __const char *__msgid)
__THROW __attribute_format_arg__ (2);
+#endif
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
extern char *dcgettext (__const char *__domainname,
- __const char *__msgid, int __category) __THROW;
+ __const char *__msgid, int __category)
+ __THROW __attribute_format_arg__ (2);
+#if 0 /* uClibc: disabled */
extern char *__dcgettext (__const char *__domainname,
__const char *__msgid, int __category)
__THROW __attribute_format_arg__ (2);
+#endif
/* Similar to `gettext' but select the plural form corresponding to the
diff --git a/include/link.h b/include/link.h
index 1dd1c4c46..afff90d99 100644
--- a/include/link.h
+++ b/include/link.h
@@ -78,6 +78,10 @@ extern struct r_debug _r_debug;
*/
extern ElfW(Dyn) _DYNAMIC[];
+#ifdef __FRV_FDPIC__
+# include <bits/elf-fdpic.h>
+#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.
@@ -89,7 +93,11 @@ struct link_map
/* These first few members are part of the protocol with the debugger.
This is the same format used in SVR4. */
+#ifdef __FRV_FDPIC__
+ struct elf32_fdpic_loadaddr l_addr;
+#else
ElfW(Addr) l_addr; /* Base address shared object is loaded at. */
+#endif
char *l_name; /* Absolute file name object was found in. */
ElfW(Dyn) *l_ld; /* Dynamic section of the shared object. */
struct link_map *l_next, *l_prev; /* Chain of loaded objects. */
@@ -123,7 +131,11 @@ struct link_map
struct dl_phdr_info
{
+#ifdef __FRV_FDPIC__
+ struct elf32_fdpic_loadaddr dlpi_addr;
+#else
ElfW(Addr) dlpi_addr;
+#endif
const char *dlpi_name;
const ElfW(Phdr) *dlpi_phdr;
ElfW(Half) dlpi_phnum;
diff --git a/include/netinet/in.h b/include/netinet/in.h
index 85f780c47..935886eda 100644
--- a/include/netinet/in.h
+++ b/include/netinet/in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2001, 2003, 2004 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
@@ -21,6 +21,7 @@
#include <features.h>
#include <stdint.h>
+#include <sys/socket.h>
#include <bits/types.h>
@@ -79,6 +80,8 @@ enum
#define IPPROTO_PIM IPPROTO_PIM
IPPROTO_COMP = 108, /* Compression Header Protocol. */
#define IPPROTO_COMP IPPROTO_COMP
+ IPPROTO_SCTP = 132, /* Stream Control Transmission Protocol. */
+#define IPPROTO_SCTP IPPROTO_SCTP
IPPROTO_RAW = 255, /* Raw IP packets. */
#define IPPROTO_RAW IPPROTO_RAW
IPPROTO_MAX
@@ -236,7 +239,30 @@ struct sockaddr_in6
uint32_t sin6_scope_id; /* IPv6 scope-id */
};
-/* IPv6 multicast request. */
+
+/* IPv4 multicast request. */
+struct ip_mreq
+ {
+ /* IP multicast address of group. */
+ struct in_addr imr_multiaddr;
+
+ /* Local IP address of interface. */
+ struct in_addr imr_interface;
+ };
+
+struct ip_mreq_source
+ {
+ /* IP multicast address of group. */
+ struct in_addr imr_multiaddr;
+
+ /* IP address of source. */
+ struct in_addr imr_interface;
+
+ /* IP address of interface. */
+ struct in_addr imr_sourceaddr;
+ };
+
+/* Likewise, for IPv6. */
struct ipv6_mreq
{
/* IPv6 multicast address of group */
@@ -246,6 +272,75 @@ struct ipv6_mreq
unsigned int ipv6mr_interface;
};
+
+/* Multicast group request. */
+struct group_req
+ {
+ /* Interface index. */
+ uint32_t gr_interface;
+
+ /* Group address. */
+ struct sockaddr_storage gr_group;
+ };
+
+struct group_source_req
+ {
+ /* Interface index. */
+ uint32_t gsr_interface;
+
+ /* Group address. */
+ struct sockaddr_storage gsr_group;
+
+ /* Source address. */
+ struct sockaddr_storage gsr_source;
+ };
+
+
+/* Full-state filter operations. */
+struct ip_msfilter
+ {
+ /* IP multicast address of group. */
+ struct in_addr imsf_multiaddr;
+
+ /* Local IP address of interface. */
+ struct in_addr imsf_interface;
+
+ /* Filter mode. */
+ uint32_t imsf_fmode;
+
+ /* Number of source addresses. */
+ uint32_t imsf_numsrc;
+ /* Source addresses. */
+ struct in_addr imsf_slist[1];
+ };
+
+#define IP_MSFILTER_SIZE(numsrc) (sizeof (struct ip_msfilter) \
+ - sizeof (struct in_addr) \
+ + (numsrc) * sizeof (struct in_addr))
+
+struct group_filter
+ {
+ /* Interface index. */
+ uint32_t gf_interface;
+
+ /* Group address. */
+ struct sockaddr_storage gf_group;
+
+ /* Filter mode. */
+ uint32_t gf_fmode;
+
+ /* Number of source addresses. */
+ uint32_t gf_numsrc;
+ /* Source addresses. */
+ struct sockaddr_storage gf_slist[1];
+};
+
+#define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) \
+ - sizeof (struct sockaddr_storage) \
+ + ((numsrc) \
+ * sizeof (struct sockaddr_storage)))
+
+
/* Get system-specific definitions. */
#include <bits/in.h>
@@ -269,9 +364,6 @@ extern uint16_t htons (uint16_t __hostshort)
/* Get machine dependent optimized versions of byte swapping functions. */
#include <bits/byteswap.h>
-#ifndef __OPTIMIZE__
-#define __OPTIMIZE__
-#endif
#ifdef __OPTIMIZE__
/* We can optimize calls to the conversion functions. Either nothing has
to be done or we are using directly the byte-swapping functions which
@@ -367,6 +459,54 @@ struct in6_pktinfo
unsigned int ipi6_ifindex; /* send/recv interface index */
};
+
+#if 0 /*def __USE_GNU*/
+/* Hop-by-Hop and Destination Options Processing. */
+extern int inet6_option_space (int __nbytes) __THROW;
+extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp,
+ int __type) __THROW;
+extern int inet6_option_append (struct cmsghdr *__cmsg,
+ __const uint8_t *__typep, int __multx,
+ int __plusy) __THROW;
+extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen,
+ int __multx, int __plusy) __THROW;
+extern int inet6_option_next (__const struct cmsghdr *__cmsg,
+ uint8_t **__tptrp) __THROW;
+extern int inet6_option_find (__const struct cmsghdr *__cmsg,
+ uint8_t **__tptrp, int __type) __THROW;
+
+
+/* Multicast source filter support. */
+
+/* Get IPv4 source filter. */
+extern int getipv4sourcefilter (int __s, struct in_addr __interface_addr,
+ struct in_addr __group, uint32_t *__fmode,
+ uint32_t *__numsrc, struct in_addr *__slist)
+ __THROW;
+
+/* Set IPv4 source filter. */
+extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr,
+ struct in_addr __group, uint32_t __fmode,
+ uint32_t __numsrc,
+ __const struct in_addr *__slist)
+ __THROW;
+
+
+/* Get source filter. */
+extern int getsourcefilter (int __s, uint32_t __interface_addr,
+ __const struct sockaddr *__group,
+ socklen_t __grouplen, uint32_t *__fmode,
+ uint32_t *__numsrc,
+ struct sockaddr_storage *__slist) __THROW;
+
+/* Set source filter. */
+extern int setsourcefilter (int __s, uint32_t __interface_addr,
+ __const struct sockaddr *__group,
+ socklen_t __grouplen, uint32_t __fmode,
+ uint32_t __numsrc,
+ __const struct sockaddr_storage *__slist) __THROW;
+#endif /* use GNU */
+
__END_DECLS
#endif /* netinet/in.h */
diff --git a/include/printf.h b/include/printf.h
index 340b6cb9c..569397cd2 100644
--- a/include/printf.h
+++ b/include/printf.h
@@ -154,6 +154,7 @@ struct printf_info
The function should return the number of characters written,
or -1 for errors. */
+#ifdef __UCLIBC_HAS_GLIBC_CUSTOM_PRINTF__
typedef int (*printf_function) (FILE *__stream,
__const struct printf_info *__info,
__const void *__const *__args);
@@ -172,6 +173,7 @@ typedef int printf_arginfo_function (__const struct printf_info *__info,
extern int register_printf_function (int __spec, printf_function __func,
printf_arginfo_function __arginfo);
+#endif
/* Parse FMT, and fill in N elements of ARGTYPES with the
diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h
index 4b2bb0e97..25dd214ee 100644
--- a/include/rpc/xdr.h
+++ b/include/rpc/xdr.h
@@ -39,13 +39,10 @@
#ifdef _LIBC
/* Some adjustments to make the libc source from glibc
* compile more easily with uClibc... */
-#ifndef __FORCE_GLIBC
-#define __FORCE_GLIBC
-#endif
-#ifndef _GNU_SOUCE
-#define _GNU_SOUCE
-#endif
-#define _(X) X
+# ifndef __FORCE_GLIBC
+# define __FORCE_GLIBC
+# endif
+# define _(X) X
#endif
#include <features.h>
#include <sys/types.h>
@@ -137,7 +134,7 @@ struct XDR
/* returns bytes off from beginning */
bool_t (*x_setpostn) (XDR *__xdrs, u_int __pos);
/* lets you reposition the stream */
- int32_t *(*x_inline) (XDR *__xdrs, int __len);
+ int32_t *(*x_inline) (XDR *__xdrs, u_int __len);
/* buf quick ptr to buffered data */
void (*x_destroy) (XDR *__xdrs);
/* free privates of this xdr_stream */
@@ -150,7 +147,7 @@ struct XDR
caddr_t x_public; /* users' data */
caddr_t x_private; /* pointer to private data */
caddr_t x_base; /* private used for position info */
- int x_handy; /* extra private word */
+ u_int x_handy; /* extra private word */
};
/*
@@ -273,20 +270,8 @@ struct xdr_discrim
* and shouldn't be used any longer. Code which use this defines or longs
* in the RPC code will not work on 64bit Solaris platforms !
*/
-/* #define IXDR_GET_LONG(buf) \ */
-/* ((long)ntohl((u_long)*(*(u_int32_t**)&(buf))++)) */
-/* #define IXDR_PUT_LONG(buf, v) \ */
-/* (*(*(u_int32_t**)&(buf))++ = (long)htonl((u_long)(v))) */
-
-/* WARNING: These macros are not safe against side effects for the 'buf'
- * argument. But the old versions they're replacing took the address of
- * 'buf' and were probably not safe in that situation either. */
-#define IXDR_GET_LONG(buf) \
- ((long) ntohl((u_long) (((u_int32_t *)(buf = (void *)(((char *) buf) + sizeof(u_int32_t))))[-1]) ))
-#define IXDR_PUT_LONG(buf, v) \
- (((u_int32_t *)(buf = (void *)(((char *) buf) + sizeof(u_int32_t))))[-1]) = (long)htonl((u_long)(v))
-
-
+#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf))
+#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v)))
#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf))
#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG(buf, (long)(v))
diff --git a/include/sched.h b/include/sched.h
index 9ed13b10c..9693cc0d1 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface.
- Copyright (C) 1996, 1997, 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1999,2001-2003,2004 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
@@ -62,12 +62,31 @@ extern int sched_get_priority_min (int __algorithm) __THROW;
/* Get the SCHED_RR interval for the named process. */
extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
+
+#if 0 /*def __USE_GNU*/
+/* Access macros for `cpu_set'. */
+#define CPU_SETSIZE __CPU_SETSIZE
+#define CPU_SET(cpu, cpusetp) __CPU_SET (cpu, cpusetp)
+#define CPU_CLR(cpu, cpusetp) __CPU_CLR (cpu, cpusetp)
+#define CPU_ISSET(cpu, cpusetp) __CPU_ISSET (cpu, cpusetp)
+#define CPU_ZERO(cpusetp) __CPU_ZERO (cpusetp)
+
+
+/* Set the CPU affinity for a task */
+extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
+ __const cpu_set_t *__cpuset) __THROW;
+
+/* Get the CPU affinity for a task */
+extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
+ cpu_set_t *__cpuset) __THROW;
+#endif
+
+__END_DECLS
+
/* These are Linux specific. */
extern int __clone (int (*__fn) (void *__arg), void *__child_stack,
int __flags, void *__arg, ...);
extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base,
size_t __child_stack_size, int __flags, void *__arg, ...);
-__END_DECLS
-
#endif /* sched.h */
diff --git a/include/signal.h b/include/signal.h
index e4e5a10a8..288febd01 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -93,8 +93,8 @@ extern __sighandler_t signal (int __sig, __sighandler_t __handler)
__THROW;
#else
/* Make sure the used `signal' implementation is the SVID version. */
-# ifdef __REDIRECT
-extern __sighandler_t __REDIRECT (signal,
+# ifdef __REDIRECT_NTH
+extern __sighandler_t __REDIRECT_NTH (signal,
(int __sig, __sighandler_t __handler),
__sysv_signal);
# else
diff --git a/include/stdlib.h b/include/stdlib.h
index 1f0b19b0a..3ed029c07 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -693,10 +693,11 @@ __END_NAMESPACE_C99
#endif
-#if 0 /* defined __USE_SVID || defined __USE_XOPEN_EXTENDED */
+#if defined __USE_SVID || defined __USE_XOPEN_EXTENDED
/* Convert floating point numbers to strings. The returned values are
valid only until another call to the same function. */
+#if 0
/* Convert VALUE to a string with NDIGIT digits and return a pointer to
this. Set *DECPT with the position of the decimal character and *SIGN
with the sign of the number. */
@@ -708,6 +709,7 @@ extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
the number. */
extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur;
+#endif
/* If possible convert VALUE to a string with NDIGIT significant digits.
Otherwise use exponential representation. The resulting string will
@@ -716,7 +718,7 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
__THROW __nonnull ((3)) __wur;
-# ifdef __USE_MISC
+# if 0 /*def __USE_MISC*/
/* Long double versions of above functions. */
extern char *qecvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign)
@@ -845,6 +847,13 @@ extern int getloadavg (double __loadavg[], int __nelem)
__THROW __nonnull ((1));
#endif
+#ifdef __UCLIBC_HAS_ARC4RANDOM__
+#include <stdint.h>
+extern uint32_t arc4random(void);
+extern void arc4random_stir(void);
+extern void arc4random_addrandom(unsigned char *, int);
+#endif
+
#endif /* don't just need malloc and calloc */
#undef __need_malloc_and_calloc
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h
index eb192cca4..fb53924e9 100644
--- a/include/sys/cdefs.h
+++ b/include/sys/cdefs.h
@@ -219,7 +219,7 @@
#endif
/* gcc allows marking deprecated functions. */
-#if __GNUC_PREREQ (3,2)
+#if __GNUC_PREREQ (3,2) && !defined(__UCLIBC_HIDE_DEPRECATED__)
# define __attribute_deprecated__ __attribute__ ((__deprecated__))
#else
# define __attribute_deprecated__ /* Ignore */
diff --git a/include/sys/epoll.h b/include/sys/epoll.h
deleted file mode 100644
index 6c310bcff..000000000
--- a/include/sys/epoll.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Copyright (C) 2002, 2003, 2004 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. */
-
-#ifndef _SYS_EPOLL_H
-#define _SYS_EPOLL_H 1
-
-#include <stdint.h>
-#include <sys/types.h>
-
-
-enum EPOLL_EVENTS
- {
- EPOLLIN = 0x001,
-#define EPOLLIN EPOLLIN
- EPOLLPRI = 0x002,
-#define EPOLLPRI EPOLLPRI
- EPOLLOUT = 0x004,
-#define EPOLLOUT EPOLLOUT
- EPOLLRDNORM = 0x040,
-#define EPOLLRDNORM EPOLLRDNORM
- EPOLLRDBAND = 0x080,
-#define EPOLLRDBAND EPOLLRDBAND
- EPOLLWRNORM = 0x100,
-#define EPOLLWRNORM EPOLLWRNORM
- EPOLLWRBAND = 0x200,
-#define EPOLLWRBAND EPOLLWRBAND
- EPOLLMSG = 0x400,
-#define EPOLLMSG EPOLLMSG
- EPOLLERR = 0x008,
-#define EPOLLERR EPOLLERR
- EPOLLHUP = 0x010,
-#define EPOLLHUP EPOLLHUP
- EPOLLONESHOT = (1 << 30),
-#define EPOLLONESHOT EPOLLONESHOT
- EPOLLET = (1 << 31)
-#define EPOLLET EPOLLET
- };
-
-
-/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */
-#define EPOLL_CTL_ADD 1 /* Add a file decriptor to the interface. */
-#define EPOLL_CTL_DEL 2 /* Remove a file decriptor from the interface. */
-#define EPOLL_CTL_MOD 3 /* Change file decriptor epoll_event structure. */
-
-
-typedef union epoll_data
-{
- void *ptr;
- int fd;
- uint32_t u32;
- uint64_t u64;
-} epoll_data_t;
-
-struct epoll_event
-{
- uint32_t events; /* Epoll events */
- epoll_data_t data; /* User data variable */
-};
-
-
-__BEGIN_DECLS
-
-/* Creates an epoll instance. Returns an fd for the new instance.
- The "size" parameter is a hint specifying the number of file
- descriptors to be associated with the new instance. The fd
- returned by epoll_create() should be closed with close(). */
-extern int epoll_create (int __size) __THROW;
-
-
-/* Manipulate an epoll instance "epfd". Returns 0 in case of success,
- -1 in case of error ( the "errno" variable will contain the
- specific error code ) The "op" parameter is one of the EPOLL_CTL_*
- constants defined above. The "fd" parameter is the target of the
- operation. The "event" parameter describes which events the caller
- is interested in and any associated user data. */
-extern int epoll_ctl (int __epfd, int __op, int __fd,
- struct epoll_event *__event) __THROW;
-
-
-/* Wait for events on an epoll instance "epfd". Returns the number of
- triggered events returned in "events" buffer. Or -1 in case of
- error with the "errno" variable set to the specific error code. The
- "events" parameter is a buffer that will contain triggered
- events. The "maxevents" is the maximum number of events to be
- returned ( usually size of "events" ). The "timeout" parameter
- specifies the maximum wait time in milliseconds (-1 == infinite). */
-extern int epoll_wait (int __epfd, struct epoll_event *__events,
- int __maxevents, int __timeout) __THROW;
-
-__END_DECLS
-
-#endif /* sys/epoll.h */
diff --git a/include/sys/mman.h b/include/sys/mman.h
index 587dff60d..6ad3b9d75 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -99,7 +99,7 @@ extern int madvise (void *__addr, size_t __len, int __advice) __THROW;
extern int posix_madvise (void *__addr, size_t __len, int __advice) __THROW;
#endif
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
/* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to
be memory resident. */
extern int mlock (__const void *__addr, size_t __len) __THROW;
diff --git a/include/sys/prctl.h b/include/sys/prctl.h
deleted file mode 100644
index 7e9b72d3a..000000000
--- a/include/sys/prctl.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (C) 1997, 1999 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. */
-
-#ifndef _SYS_PRCTL_H
-#define _SYS_PRCTL_H 1
-
-#include <features.h>
-#include <linux/prctl.h> /* The magic values come from here */
-
-__BEGIN_DECLS
-
-/* Control process execution. */
-extern int prctl (int __option, ...) __THROW;
-
-__END_DECLS
-
-#endif /* sys/prctl.h */
diff --git a/include/sys/sendfile.h b/include/sys/sendfile.h
index 5fcfffbbc..4c1367b6b 100644
--- a/include/sys/sendfile.h
+++ b/include/sys/sendfile.h
@@ -32,19 +32,19 @@ __BEGIN_DECLS
case of error. */
#ifndef __USE_FILE_OFFSET64
extern ssize_t sendfile (int __out_fd, int __in_fd, off_t *__offset,
- size_t __count) __THROW __nonnull ((3));
+ size_t __count) __THROW;
#else
-# ifdef __REDIRECT
-extern ssize_t __REDIRECT (sendfile,
+# ifdef __REDIRECT_NTH
+extern ssize_t __REDIRECT_NTH (sendfile,
(int __out_fd, int __in_fd, __off64_t *__offset,
- size_t __count), sendfile64) __nonnull ((3));
+ size_t __count), sendfile64);
# else
# define sendfile sendfile64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern ssize_t sendfile64 (int __out_fd, int __in_fd, __off64_t *__offset,
- size_t __count) __THROW __nonnull ((3));
+ size_t __count) __THROW;
#endif
__END_DECLS
diff --git a/include/sys/syscall.h b/include/sys/syscall.h
index 703188683..aef1f998f 100644
--- a/include/sys/syscall.h
+++ b/include/sys/syscall.h
@@ -20,6 +20,7 @@
#define _SYSCALL_H 1
/* This file provides us with the nicely useful _syscall[0-5] macros. */
+#include <features.h>
#if defined _LIBC && (defined IS_IN_libc || defined NOT_IN_libc)
# include <bits/syscalls.h>
#else
diff --git a/include/sys/types.h b/include/sys/types.h
index 666681453..087819b02 100644
--- a/include/sys/types.h
+++ b/include/sys/types.h
@@ -262,8 +262,7 @@ typedef __fsfilcnt64_t fsfilcnt64_t; /* Type to count file system inodes. */
/* Now add the thread types. */
-#include <features.h>
-#if (defined __USE_POSIX199506 || defined __USE_UNIX98) && defined UCLIBC_HAS_THREADS
+#if (defined __USE_POSIX199506 || defined __USE_UNIX98) && defined __UCLIBC_HAS_THREADS__
# include <bits/pthreadtypes.h>
#endif
diff --git a/include/time.h b/include/time.h
index 22e6c4b58..da226d5e5 100644
--- a/include/time.h
+++ b/include/time.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991-1999,2000,2001,2002,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999,2000,2001,2002,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
@@ -113,6 +114,8 @@ typedef __timer_t timer_t;
defined __need_timespec)
# define __timespec_defined 1
+# include <bits/types.h> /* This defines __time_t for us. */
+
/* POSIX.1b structure for a time value. This is like a `struct timeval' but
has nanoseconds instead of microseconds. */
struct timespec
@@ -343,7 +346,8 @@ extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW;
extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
/* Set clock CLOCK_ID to value TP. */
-extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) __THROW;
+extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
+ __THROW;
#ifdef __UCLIBC_MJN3_ONLY__
#warning "mjn3 FIXME: a bunch of unimplemented function prototypes."
@@ -359,6 +363,7 @@ extern int clock_nanosleep (clockid_t __clock_id, int __flags,
/* Return clock ID for CPU-time clock. */
extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
# endif
+#endif /* __UCLIBC_MJN3_ONLY__ */
/* Create new per-process timer using CLOCK_ID. */
@@ -380,7 +385,6 @@ extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
/* Get expiration overrun for timer TIMERID. */
extern int timer_getoverrun (timer_t __timerid) __THROW;
-#endif /* __UCLIBC_MJN3_ONLY__ */
# endif
diff --git a/include/unistd.h b/include/unistd.h
index 9ccb0e80f..299283382 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -260,8 +260,20 @@ extern int access (__const char *__name, int __type) __THROW __nonnull ((1));
(as normal file operations use). */
extern int euidaccess (__const char *__name, int __type)
__THROW __nonnull ((1));
+
+/* An alias for `euidaccess', used by some other systems. */
+extern int eaccess (__const char *__name, int __type)
+ __THROW __nonnull ((1));
#endif
+#ifdef __USE_ATFILE
+/* Test for access to FILE relative to the directory FD is open on.
+ If AT_EACCESS is set in FLAG, then use effective IDs like `eaccess',
+ otherwise use real IDs like `access'. */
+extern int faccessat (int __fd, __const char *__file, int __type, int __flag)
+ __THROW __nonnull ((2)) __wur;
+#endif /* Use GNU. */
+
/* Values for the WHENCE argument to lseek. */
#ifndef _STDIO_H /* <stdio.h> has the same definitions. */
@@ -337,16 +349,18 @@ extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
__off_t __offset) __wur;
# else
-# ifdef __REDIRECT
+# ifdef __UCLIBC_HAS_THREADS_NATIVE__
+# ifdef __REDIRECT
extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes,
__off64_t __offset),
pread64) __wur;
extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf,
size_t __nbytes, __off64_t __offset),
pwrite64) __wur;
-# else
-# define pread pread64
-# define pwrite pwrite64
+# else
+# define pread pread64
+# define pwrite pwrite64
+# endif
# endif
# endif
@@ -431,7 +445,7 @@ extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
#endif /* Use BSD || X/Open Unix. */
-#if 0 /*def __USE_GNU*/
+#ifdef __USE_ATFILE
/* Change the owner and group of FILE relative to the directory FD is open
on. */
extern int fchownat (int __fd, __const char *__file, __uid_t __owner,
@@ -681,29 +695,29 @@ extern int setegid (__gid_t __gid) __THROW;
#endif /* Use BSD. */
#ifdef __USE_GNU
-/* Fetch the effective user ID, real user ID, and saved-set user ID,
+/* Fetch the real user ID, effective user ID, and saved-set user ID,
of the calling process. */
-extern int getresuid (__uid_t *__euid, __uid_t *__ruid, __uid_t *__suid)
+extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
__THROW;
-/* Fetch the effective group ID, real group ID, and saved-set group ID,
+/* Fetch the real group ID, effective group ID, and saved-set group ID,
of the calling process. */
-extern int getresgid (__gid_t *__egid, __gid_t *__rgid, __gid_t *__sgid)
+extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
__THROW;
-/* Set the effective user ID, real user ID, and saved-set user ID,
- of the calling process to EUID, RUID, and SUID, respectively. */
-extern int setresuid (__uid_t __euid, __uid_t __ruid, __uid_t __suid)
+/* Set the real user ID, effective user ID, and saved-set user ID,
+ of the calling process to RUID, EUID, and SUID, respectively. */
+extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
__THROW;
-/* Set the effective group ID, real group ID, and saved-set group ID,
- of the calling process to EGID, RGID, and SGID, respectively. */
-extern int setresgid (__gid_t __egid, __gid_t __rgid, __gid_t __sgid)
+/* Set the real group ID, effective group ID, and saved-set group ID,
+ of the calling process to RGID, EGID, and SGID, respectively. */
+extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
__THROW;
#endif
-#ifdef __ARCH_HAS_MMU__
+#ifdef __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. */
@@ -718,6 +732,9 @@ extern __pid_t fork (void) __THROW;
extern __pid_t vfork (void) __THROW;
#endif /* Use BSD. */
+/* Special exit function which only terminates the current thread. */
+extern void __exit_thread (int val) __attribute__ ((noreturn));
+
/* Return the pathname of the terminal FD is open on, or NULL on errors.
The returned storage is good only until the next call to this function. */
@@ -744,7 +761,7 @@ extern int ttyslot (void) __THROW;
extern int link (__const char *__from, __const char *__to)
__THROW __nonnull ((1, 2)) __wur;
-#if 0 /*def __USE_GNU*/
+#ifdef __USE_ATFILE
/* Like link but relative paths in TO and FROM are interpreted relative
to FROMFD and TOFD respectively. */
extern int linkat (int __fromfd, __const char *__from, int __tofd,
@@ -763,7 +780,7 @@ extern int readlink (__const char *__restrict __path, char *__restrict __buf,
size_t __len) __THROW __nonnull ((1, 2)) __wur;
#endif /* Use BSD. */
-#if 0 /*def __USE_GNU*/
+#ifdef __USE_ATFILE
/* Like symlink but a relative path in TO is interpreted relative to TOFD. */
extern int symlinkat (__const char *__from, int __tofd,
__const char *__to) __THROW __nonnull ((1, 3)) __wur;
@@ -777,7 +794,7 @@ extern int readlinkat (int __fd, __const char *__restrict __path,
/* Remove the link NAME. */
extern int unlink (__const char *__name) __THROW __nonnull ((1));
-#if 0 /*def __USE_GNU*/
+#ifdef __USE_ATFILE
/* Remove the link NAME relative to FD. */
extern int unlinkat (int __fd, __const char *__name, int __flag)
__THROW __nonnull ((2));
@@ -820,6 +837,7 @@ extern int setlogin (__const char *__name) __THROW __nonnull ((1));
arguments in ARGV (ARGC of them, minus the program name) for
options given in OPTS. */
# define __need_getopt
+/* keep this for uClibc in bits/, we need it when GNU_GETOPT is disabled */
# include <bits/getopt.h>
#endif
@@ -885,7 +903,7 @@ extern void endusershell (void) __THROW; /* Discard cached info. */
extern void setusershell (void) __THROW; /* Rewind and re-read the file. */
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
/* Put the program in the background, and dissociate from the controlling
terminal. If NOCHDIR is zero, do `chdir ("/")'. If NOCLOSE is zero,
redirects stdin, stdout, and stderr to /dev/null. */