TYPEDEF unsigned long long uintmax_t;
TYPEDEF long time_t;
-TYPEDEF unsigned int useconds_t;
+TYPEDEF unsigned useconds_t;
TYPEDEF int suseconds_t;
-STRUCT timeval { time_t tv_sec; long tv_usec; };
+STRUCT timeval { time_t tv_sec; int tv_usec; };
STRUCT timespec { time_t tv_sec; long tv_nsec; };
TYPEDEF int pid_t;
TYPEDEF struct __locale * locale_t;
+STRUCT iovec { void *iov_base; size_t iov_len; };
EOF
-struct iovec;
-
struct msghdr
{
void *msg_name;
off_t st_size;
blksize_t st_blksize;
blkcnt_t st_blocks;
- time_t st_atime;
- unsigned long __st_atime_nsec;
- time_t st_mtime;
- unsigned long __st_mtime_nsec;
- time_t st_ctime;
- unsigned long __st_ctime_nsec;
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
ino_t st_ino;
};
+++ /dev/null
-struct iovec {
- void *iov_base;
- size_t iov_len;
-};
#define WCONTINUED 8
#define WNOWAIT 0x1000000
+#if defined(__XOPEN_SOURCE) || defined(__GNU_SOURCE)
#define P_ALL 0
#define P_PID 1
#define P_PGID 2
+#endif
int tolower(int);
int toupper(int);
-int isascii(int);
-int toascii(int);
-
-#define _tolower(a) ((a)|0x20)
-#define _toupper(a) ((a)&0x5f)
-
#define isalpha(a) ((unsigned)(((a)|32)-'a') < 26)
#define isdigit(a) ((unsigned)((a)-'0') < 10)
#define islower(a) ((unsigned)((a)-'a') < 26)
#define isprint(a) ((unsigned)((a)-0x20) < 0x5f)
#define isgraph(a) ((unsigned)((a)-0x21) < 0x5e)
-#if 1
+
+
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
#define __NEED_locale_t
#include <bits/alltypes.h>
int isxdigit_l(int, locale_t);
int tolower_l(int, locale_t);
int toupper_l(int, locale_t);
+
+int isascii(int);
+int toascii(int);
+#define _tolower(a) ((a)|0x20)
+#define _toupper(a) ((a)&0x5f)
+
#endif
#endif
#endif
#define __NEED_nl_item
+#define __NEED_locale_t
#include <bits/alltypes.h>
#define NOSTR 0x50003
char *nl_langinfo(nl_item);
+char *nl_langinfo_l(nl_item, locale_t);
#ifdef __cplusplus
}
#define NL_SETMAX 255
#define NL_TEXTMAX 2048
+#endif
+
/* POSIX/SUS requirements follow. These numbers come directly
* from SUS and have nothing to do with the host system. */
#define _POSIX_AIO_MAX 1
#define _POSIX_ARG_MAX 4096
#define _POSIX_CHILD_MAX 25
+#define _POSIX_CLOCKRES_MIN 20000000
#define _POSIX_DELAYTIMER_MAX 32
#define _POSIX_HOST_NAME_MAX 255
#define _POSIX_LINK_MAX 8
#define _XOPEN_PATH_MAX 1024
#endif
-
-#endif
#define __NEED___uint64_t
#include <bits/alltypes.h>
-#define M_E 2.7182818284590452354 /* e */
-#define M_LOG2E 1.4426950408889634074 /* log_2 e */
-#define M_LOG10E 0.43429448190325182765 /* log_10 e */
-#define M_LN2 0.69314718055994530942 /* log_e 2 */
-#define M_LN10 2.30258509299404568402 /* log_e 10 */
-#define M_PI 3.14159265358979323846 /* pi */
-#define M_PI_2 1.57079632679489661923 /* pi/2 */
-#define M_PI_4 0.78539816339744830962 /* pi/4 */
-#define M_1_PI 0.31830988618379067154 /* 1/pi */
-#define M_2_PI 0.63661977236758134308 /* 2/pi */
-#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
-#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
-#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
-
#define __MAKE_FLOAT(i) (((union { int __i; float __f; }){ .__i = i }).__f)
#define NAN __MAKE_FLOAT(0x7fc00000)
float truncf(float);
long double truncl(long double);
-/* XSI stuff */
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#define M_E 2.7182818284590452354 /* e */
+#define M_LOG2E 1.4426950408889634074 /* log_2 e */
+#define M_LOG10E 0.43429448190325182765 /* log_10 e */
+#define M_LN2 0.69314718055994530942 /* log_e 2 */
+#define M_LN10 2.30258509299404568402 /* log_e 10 */
+#define M_PI 3.14159265358979323846 /* pi */
+#define M_PI_2 1.57079632679489661923 /* pi/2 */
+#define M_PI_4 0.78539816339744830962 /* pi/4 */
+#define M_1_PI 0.31830988618379067154 /* 1/pi */
+#define M_2_PI 0.63661977236758134308 /* 2/pi */
+#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
+#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
+#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
double j0(double);
double j1(double);
double jn(int, double);
-double scalb(double, double);
double y0(double);
double y1(double);
double yn(int, double);
-
extern int signgam;
+#endif
+
+#ifdef _GNU_SOURCE
+double scalb(double, double);
+#endif
#endif
#endif
#include <bits/setjmp.h>
-typedef unsigned long sigjmp_buf[(1024+sizeof(jmp_buf))/sizeof(long)];
+
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+typedef unsigned long sigjmp_buf[(1024+sizeof(jmp_buf))/sizeof(long)];
#ifdef _GNU_SOURCE
#define jmp_buf sigjmp_buf
#endif
+int sigsetjmp (sigjmp_buf, int);
+void siglongjmp (sigjmp_buf, int);
+#endif
-int setjmp (jmp_buf);
+
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
int _setjmp (jmp_buf);
-int sigsetjmp (sigjmp_buf, int);
+void _longjmp (jmp_buf, int);
+#endif
+
+int setjmp (jmp_buf);
void longjmp (jmp_buf, int);
-void _longjmp (jmp_buf, int);
-void siglongjmp (sigjmp_buf, int);
#define setjmp setjmp
#define longjmp longjmp
extern "C" {
#endif
-#undef NULL
-#ifdef __cplusplus
-#define NULL 0
-#else
-#define NULL ((void*)0)
-#endif
-
#define __NEED_size_t
#include <bits/alltypes.h>
#define __NEED_uid_t
#define __NEED_pid_t
#define __NEED_gid_t
+#define __NEED_struct_iovec
#include <bits/alltypes.h>
#define __NEED_time_t
#define __NEED_blksize_t
#define __NEED_blkcnt_t
+#define __NEED_struct_timespec
#include <bits/alltypes.h>
#include <bits/stat.h>
+#define st_atime st_atim.tv_sec
+#define st_mtime st_mtim.tv_sec
+#define st_ctime st_ctim.tv_sec
+
#define S_IFMT 0170000
#define S_IFDIR 0040000
#define __NEED_time_t
#define __NEED_suseconds_t
-#define __NEED_timeval
+#define __NEED_struct_timeval
#include <bits/alltypes.h>
#define __NEED_size_t
#define __NEED_ssize_t
+#define __NEED_struct_iovec
#include <bits/alltypes.h>
-#include <bits/uio.h>
-
ssize_t readv (int, const struct iovec *, int);
ssize_t writev (int, const struct iovec *, int);