summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aio.h46
-rw-r--r--assert.h25
-rw-r--r--complex.h150
-rw-r--r--cpio.h24
-rw-r--r--ctype.h75
-rw-r--r--curses.h8
-rw-r--r--dirent.h43
-rw-r--r--errno.h84
-rw-r--r--fcntl.h53
-rw-r--r--fenv.h63
-rw-r--r--float.h34
-rw-r--r--fmtmsg.h83
-rw-r--r--fnmatch.h13
-rw-r--r--ftw.h67
-rw-r--r--glob.h38
-rw-r--r--grp.h30
-rw-r--r--iconv.h30
-rw-r--r--inttypes.h240
-rw-r--r--iso646.h20
-rw-r--r--langinfo.h65
-rw-r--r--libgen.h10
-rw-r--r--limits.h106
-rw-r--r--locale.h86
-rw-r--r--signal.h2
-rw-r--r--term.h4
25 files changed, 321 insertions, 1078 deletions
diff --git a/aio.h b/aio.h
index d4b153c..6e497c2 100644
--- a/aio.h
+++ b/aio.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -54,31 +54,32 @@ SOFTWARE.
# elif (defined _XOPEN_SOURCE && _XOPEN_SOURCE >= 600)
# error XOPEN Issue 6 and later require a C99 compiler
# endif
+# define restrict /* forward compatibility */
#endif
-#if (defined _POSIX_C_SOURCE && 199309 <= _POSIX_C_SOURCE)
-/* ./src/aio/AIO_ALLDONE.c */
+#if (defined _POSIX_C_SOURCE && 199309L <= _POSIX_C_SOURCE)
#define AIO_ALLDONE 0
-/* ./src/aio/AIO_CANCELED.c */
#define AIO_CANCELED 1
-/* ./src/aio/AIO_NOTCANCELED.c */
#define AIO_NOTCANCELED 2
-/* ./src/aio/LIO_NOP.c */
#define LIO_NOP 0
-/* ./src/aio/LIO_NOWAIT.c */
#define LIO_NOWAIT 1
-/* ./src/aio/LIO_READ.c */
#define LIO_READ 2
-/* ./src/aio/LIO_WAIT.c */
#define LIO_WAIT 3
-/* ./src/aio/LIO_WRITE.c */
#define LIO_WRITE 4
+
+#if (200809L <= _POSIX_C_SOURE)
+/* from <sys/types.h> */
+typedef int off_t;
+typedef int pthread_attr_t;
+typedef int size_t;
+typedef int ssize_t;
+/* from <time.h> */
+struct timespec {};
+/* from <signal.h> */
+union sigval;
+struct sigevent;
#endif
-#if (defined _POSIX_C_SOURCE && 199309 <= _POSIX_C_SOURCE)
-/* ./src/aio/struct_aiocb.c */
-#ifndef __TYPE_struct_aiocb_DEFINED__
-#define __TYPE_struct_aiocb_DEFINED__
struct aiocb {
int aio_fildes;
off_t aio_offset;
@@ -88,32 +89,15 @@ struct aiocb {
struct sigevent aio_sigevent;
int aio_lio_opcode;
};
-#endif
-
-#endif
-#if (!defined __STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
-#define restrict
-#endif
-
-#if (defined _POSIX_C_SOURCE && 199309 <= _POSIX_C_SOURCE)
-/* ./src/aio/aio_cancel.c */
int aio_cancel(int __fildes, struct aiocb *__aiocbp);
-/* ./src/aio/aio_error.c */
int aio_error(const struct aiocb * __aiocbp);
-/* ./src/aio/aio_fsync.c */
int aio_fsync(int __op, struct aiocb * __aiocbp);
-/* ./src/aio/aio_read.c */
int aio_read(struct aiocb * __aiocbp);
-/* ./src/aio/aio_return.c */
ssize_t aio_return(struct aiocb *__aiocbp);
-/* ./src/aio/aio_suspend.c */
int aio_suspend(const struct aiocb * const list[], int __nent, const struct timespec * __timeout);
-/* ./src/aio/aio_write.c */
int aio_write(struct aiocb * __aiocbp);
-/* ./src/aio/lio_listio.c */
int lio_listio(int __mode, struct aiocb * const list[restrict], int __nent, struct sigevent * restrict __sig);
#endif
-
#endif
diff --git a/assert.h b/assert.h
index b19387d..48d4ed2 100644
--- a/assert.h
+++ b/assert.h
@@ -3,7 +3,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -24,18 +24,23 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
-/* ./src/assert/assert.c */
#undef assert
-#ifdef NDEBUG
-#define assert(__exp) ((void)0)
+
+#if defined NDEBUG
+# define assert(__exp) ((void)0)
+
#else
-#if __STDC_VERSION__ < 199901L
-#define __func__ ((char*)0)
+# if (!defined __SDTC_VERSION__) || __STDC_VERSION__ < 199901L
+# define __func__ ((char*)0)
+# endif
+
+# define assert(__exp) \
+ ((void)((__exp) || (__assert(#__exp, __FILE__, __LINE__, __func__), 0)))
+
#endif
-#define assert(__exp) \
- ((void)((__exp) || (__assert(#__exp, __FILE__, __LINE__, __func__), 0)))
+
+#if (!defined __SDTC_VERSION__) || __STDC_VERSION__ < 199901L
+#undef __func__
#endif
-/* ./src/assert/__assert.c */
void __assert(const char *__expr, const char *__file, int __line, const char *__func);
-
diff --git a/complex.h b/complex.h
index 66e0286..55a2d71 100644
--- a/complex.h
+++ b/complex.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -27,162 +27,150 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
-#if (defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
-/* ./src/complex/I.c */
-#ifdef __STDC_IEC_559_COMPLEX__
-#define I _Imaginary_I
-#else
-#define I _Complex_I
-#endif
-/* ./src/complex/_Complex_I.c */
-#define _Complex_I \
- (((union { \
- float _Complex __c; \
- float __f[2]; \
- }){ .__f = { 0.0, 1.0 } }).__c)
-/* ./src/complex/_Imaginary_I.c */
-#ifdef __STDC_IEC_559_COMPLEX__
-#define _Imaginary_I \
- (((union { \
- float _Imaginary __i; \
- float __f; \
- }){ .__f = 1.0 }).__i)
-#endif
-/* ./src/complex/complex.c */
-#define complex _Complex
-/* ./src/complex/imaginary.c */
-#ifdef __STDC_IEC_559_COMPLEX__
-#define imaginary _Imaginary
+#if !(defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__)
+#error "<complex.h> requires C99 or higher"
#endif
+
+#if (defined __STDC_NO_COMPLES__)
+#error "<complex.h> requies compiler support"
#endif
-#if (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)
-/* ./src/complex/CMPLX.c */
#ifdef __STDC_IEC_559_COMPLEX__
-#define CMPLX(__x, __y) \
- ((double complex)((double)(__x) + _Imaginary_I * (double)(__y)))
+# define I _Imaginary_I
+# define imaginary _Imaginary
+# define _Imaginary_I \
+ (((union { \
+ float _Imaginary __i; \
+ float __f; \
+ }){ .__f = 1.0 }).__i)
#else
-#define CMPLX(__x, __y) \
- (((union { \
- double complex __c; \
- double __d[2]; \
- }){ .__d = { __x, __y } }).__c)
+# define I _Complex_I
#endif
-/* ./src/complex/CMPLXF.c */
-#ifdef __STDC_IEC_559_COMPLEX__
-#define CMPLXF(__x, __y) \
- ((float complex)((float)(__x) + _Imaginary_I * (float)(__y)))
-#else
-#define CMPLXF(__x, __y) \
- (((union { \
- float complex __c; \
- float __f[2]; \
- }){ .__f = { __x, __y } }).__c)
+
+#define complex _Complex
+#define _Complex_I \
+ (((union { \
+ float _Complex __c; \
+ float __f[2]; \
+ }){ .__f = { 0.0, 1.0 } }).__c)
+#if (201112L <= __STDC_VERSION__)
+# ifdef __STDC_IEC_559_COMPLEX__
+# define CMPLX(__x, __y) \
+ ((double complex)((double)(__x) + _Imaginary_I * (double)(__y)))
+# define CMPLXF(__x, __y) \
+ ((float complex)((float)(__x) + _Imaginary_I * (float)(__y)))
+# else
+# define CMPLX(__x, __y) \
+ (((union { \
+ double complex __c; \
+ double __d[2]; \
+ }){ .__d = { __x, __y } }).__c)
+# define CMPLXF(__x, __y) \
+ (((union { \
+ float complex __c; \
+ float __f[2]; \
+ }){ .__f = { __x, __y } }).__c)
+# endif
#endif
-/* ./src/complex/CMPLXL.c */
+
#ifdef __STDC_IEC_559_COMPLEX__
-#define CMPLXL(__x, __y) \
- ((long double complex)((long double)(__x) + \
- _Imaginary_I * (long double)(__y)))
+# define CMPLXL(__x, __y) \
+ ((long double complex)((long double)(__x) + \
+ _Imaginary_I * (long double)(__y)))
#else
-#define CMPLXL(__x, __y) \
- (((union { \
- long double complex __c; \
- long double __ld[2]; \
- }){ .__ld = { __x, __y } }).__c)
-#endif
+# define CMPLXL(__x, __y) \
+ (((union { \
+ long double complex __c; \
+ long double __ld[2]; \
+ }){ .__ld = { __x, __y } }).__c)
#endif
-#if (defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
-/* ./src/complex/cabs.c */
double cabs(double complex z);
float cabsf(float complex z);
long double cabsl(long double complex z);
-/* ./src/complex/cacos.c */
+
double complex cacos(double complex z);
float complex cacosf(float complex z);
long double complex cacosl(long double complex z);
-/* ./src/complex/cacosh.c */
+
double complex cacosh(double complex z);
float complex cacoshf(float complex z);
long double complex cacoshl(long double complex z);
-/* ./src/complex/carg.c */
+
double carg(double complex z);
float cargf(float complex z);
long double cargl(long double complex z);
-/* ./src/complex/casin.c */
+
double complex casin(double complex z);
float complex casinf(float complex z);
long double complex casinl(long double complex z);
-/* ./src/complex/casinh.c */
+
double complex casinh(double complex z);
float complex casinhf(float complex z);
long double complex casinhl(long double complex z);
-/* ./src/complex/catan.c */
+
double complex catan(double complex z);
float complex catanf(float complex z);
long double complex catanl(long double complex z);
-/* ./src/complex/catanh.c */
+
double complex catanh(double complex z);
float complex catanhf(float complex z);
long double complex catanhl(long double complex z);
-/* ./src/complex/ccos.c */
+
double complex ccos(double complex z);
float complex ccosf(float complex z);
long double complex ccosl(long double complex z);
-/* ./src/complex/ccosh.c */
+
double complex ccosh(double complex z);
float complex ccoshf(float complex z);
long double complex ccoshl(long double complex z);
-/* ./src/complex/cexp.c */
+
double complex cexp(double complex z);
float complex cexpf(float complex z);
long double complex cexpl(long double complex z);
-/* ./src/complex/cimag.c */
+
double cimag(double complex z);
float cimagf(float complex z);
long double cimagl(long double complex z);
-/* ./src/complex/clog.c */
+
double complex clog(double complex z);
float complex clogf(float complex z);
long double complex clogl(long double complex z);
-/* ./src/complex/conj.c */
+
double complex conj(double complex z);
float complex conjf(float complex z);
long double complex conjl(long double complex z);
-/* ./src/complex/cpow.c */
+
double complex cpow(double complex x, double complex y);
float complex cpowf(float complex x, float complex y);
long double complex cpowl(long double complex x, long double complex y);
-/* ./src/complex/cproj.c */
+
double complex cproj(double complex z);
float complex cprojf(float complex z);
long double complex cprojl(long double complex z);
-/* ./src/complex/creal.c */
+
double creal(double complex z);
float crealf(float complex z);
long double creall(long double complex z);
-/* ./src/complex/csin.c */
+
double complex csin(double complex z);
float complex csinf(float complex z);
long double complex csinl(long double complex z);
-/* ./src/complex/csinh.c */
+
double complex csinh(double complex z);
float complex csinhf(float complex z);
long double complex csinhl(long double complex z);
-/* ./src/complex/csqrt.c */
+
double complex csqrt(double complex z);
float complex csqrtf(float complex z);
long double complex csqrtl(long double complex z);
-/* ./src/complex/ctan.c */
+
double complex ctan(double complex z);
float complex ctanf(float complex z);
long double complex ctanl(long double complex z);
-/* ./src/complex/ctanh.c */
+
double complex ctanh(double complex z);
float complex ctanhf(float complex z);
long double complex ctanhl(long double complex z);
-#endif
-
#endif
diff --git a/cpio.h b/cpio.h
index ea3354b..0972dfb 100644
--- a/cpio.h
+++ b/cpio.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -57,49 +57,27 @@ SOFTWARE.
#endif
#if (defined _POSIX_SOURCE)
-/* ./src/cpio/C_IRGRP.c */
#define C_IRGRP 0000040
-/* ./src/cpio/C_IROTH.c */
#define C_IROTH 0000004
-/* ./src/cpio/C_IRUSR.c */
#define C_IRUSR 0000400
-/* ./src/cpio/C_ISBLK.c */
#define C_ISBLK 0060000
-/* ./src/cpio/C_ISCHR.c */
#define C_ISCHR 0020000
-/* ./src/cpio/C_ISCTG.c */
#define C_ISCTG 0110000
-/* ./src/cpio/C_ISDIR.c */
#define C_ISDIR 0040000
-/* ./src/cpio/C_ISFIFO.c */
#define C_ISFIFO 0010000
-/* ./src/cpio/C_ISGID.c */
#define C_ISGID 0002000
-/* ./src/cpio/C_ISLNK.c */
#define C_ISLNK 0120000
-/* ./src/cpio/C_ISREG.c */
#define C_ISREG 0100000
-/* ./src/cpio/C_ISSOCK.c */
#define C_ISSOCK 0140000
-/* ./src/cpio/C_ISUID.c */
#define C_ISUID 0004000
-/* ./src/cpio/C_ISVTX.c */
#define C_ISVTX 0001000
-/* ./src/cpio/C_IWGRP.c */
#define C_IWGRP 0000020
-/* ./src/cpio/C_IWOTH.c */
#define C_IWOTH 0000002
-/* ./src/cpio/C_IWUSR.c */
#define C_IWUSR 0000200
-/* ./src/cpio/C_IXGRP.c */
#define C_IXGRP 0000010
-/* ./src/cpio/C_IXOTH.c */
#define C_IXOTH 0000001
-/* ./src/cpio/C_IXUSR.c */
#define C_IXUSR 0000100
-/* ./src/cpio/MAGIC.c */
#define MAGIC "070707"
#endif
-
#endif
diff --git a/ctype.h b/ctype.h
index b503a7a..71c2846 100644
--- a/ctype.h
+++ b/ctype.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -27,6 +27,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
+/* TODO: full POSIX tests */
+
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 19901L
# if (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200112L)
# error POSIX.1-2001 and later require a C99 compiler
@@ -36,50 +38,51 @@ SOFTWARE.
#endif
#if (defined _XOPEN_SOURCE)
-/* ./src/ctype/_tolower.c */
#define _tolower(__c) tolower(__c)
-/* ./src/ctype/_toupper.c */
#define _toupper(__c) toupper(__c)
#endif
-/* ./src/ctype/isalnum.c */
-int isalnum(int __c);
-/* ./src/ctype/isalpha.c */
-int isalpha(int __c);
-/* ./src/ctype/iscntrl.c */
-int iscntrl(int __c);
-/* ./src/ctype/isdigit.c */
-int isdigit(int __c);
-/* ./src/ctype/isgraph.c */
-int isgraph(int __c);
-/* ./src/ctype/islower.c */
-int islower(int __c);
-/* ./src/ctype/isprint.c */
-int isprint(int __c);
-/* ./src/ctype/ispunct.c */
-int ispunct(int __c);
-/* ./src/ctype/isspace.c */
-int isspace(int __c);
-/* ./src/ctype/isupper.c */
-int isupper(int __c);
-/* ./src/ctype/isxdigit.c */
-int isxdigit(int __c);
-/* ./src/ctype/tolower.c */
-int tolower(int __c);
-/* ./src/ctype/toupper.c */
-int toupper(int __c);
+int isalnum(int);
+int isalpha(int);
+int iscntrl(int);
+int isdigit(int);
+int isgraph(int);
+int islower(int);
+int isprint(int);
+int ispunct(int);
+int isspace(int);
+int isupper(int);
+int isxdigit(int);
+int tolower(int);
+int toupper(int);
-#if (defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
-/* ./src/ctype/isblank.c */
-int isblank(int __c);
+#if (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__)
+int isblank(int);
#endif
#if (defined _XOPEN_SOURCE)
-/* ./src/ctype/isascii.c */
-int isascii(int __c);
-/* ./src/ctype/toascii.c */
-int toascii(int __c);
+int isascii(int);
+int toascii(int);
#endif
+#if (defined _POSIX_C_SOURCE && 200809L <= _POSIX_C_SOURCE)
+/* from <locale.h> */
+typedef int locale_t;
+
+int isalnum_l(int, locale_t);
+int isalpha_l(int, locale_t);
+int isblank_l(int, locale_t);
+int iscntrl_l(int, locale_t);
+int isdigit_l(int, locale_t);
+int isgraph_l(int, locale_t);
+int islower_l(int, locale_t);
+int isprint_l(int, locale_t);
+int ispunct_l(int, locale_t);
+int isspace_l(int, locale_t);
+int isupper_l(int, locale_t);
+int isxdigit_l(int, locale_t);
+int tolower_l(int, locale_t);
+int toupper_l(int, locale_t);
+#endif
#endif
diff --git a/curses.h b/curses.h
index 5e527ed..2716c43 100644
--- a/curses.h
+++ b/curses.h
@@ -770,11 +770,11 @@ int winnstr(WINDOW * __win, char * __str, int __n);
/* ./src/curses/innwstr.c */
int winnwstr(WINDOW * __win, wchar_t * __wstr, int __n);
/* ./src/curses/ins_nwstr.c */
-int ins_nwstr(WINDOW * __win, const wchar_t * __wstr, int __n);
+int wins_nwstr(WINDOW * __win, const wchar_t * __wstr, int __n);
/* ./src/curses/ins_wch.c */
-int ins_wch(WINDOW * __win, const cchar_t * __wch);
+int wins_wch(WINDOW * __win, const cchar_t * __wch);
/* ./src/curses/ins_wstr.c */
-int ins_wstr(WINDOW * __win, const wchar_t * __wstr);
+int wins_wstr(WINDOW * __win, const wchar_t * __wstr);
/* ./src/curses/insdelln.c */
int winsdelln(WINDOW * __win, int __n);
/* ./src/curses/insnstr.c */
@@ -880,7 +880,7 @@ chtype termattrs(void);
/* ./src/curses/termname.c */
char * termname(void);
/* ./src/curses/timeout.c */
-void wtimeout(int __delay);
+void wtimeout(WINDOW * __win, int __delay);
/* ./src/curses/touchline.c */
int touchline(WINDOW * __win, int __start, int __count);
/* ./src/curses/unget_wch.c */
diff --git a/dirent.h b/dirent.h
index 1ffe922..8f34338 100644
--- a/dirent.h
+++ b/dirent.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -52,47 +52,32 @@ SOFTWARE.
#endif
#if (defined _POSIX_SOURCE)
-/* ./src/dirent/DIR.c */
-#ifndef __TYPE_DIR_DEFINED__
-#define __TYPE_DIR_DEFINED__
-typedef struct __DIR DIR;
-#endif
+typedef struct __DIR
+ DIR;
+#if (defined _XOPEN_SOURCE)
+/* from <sys/types.h> */
+typedef unsigned long long int ino_t;
#endif
-#if (defined _POSIX_SOURCE)
-/* ./src/dirent/struct_dirent.c */
-#ifndef __TYPE_struct_dirent_DEFINED__
-#define __TYPE_struct_dirent_DEFINED__
struct dirent {
#if (defined _XOPEN_SOURCE)
- ino_t d_ino;
+ ino_t d_ino;
#else
- unsigned long long int __padding;
+ unsigned long long int __padding;
#endif
char d_name[];
};
-#endif
-#endif
-
-#if (defined _POSIX_SOURCE)
-/* ./src/dirent/closedir.c */
-int closedir(DIR *__dirp);
-/* ./src/dirent/opendir.c */
-DIR * opendir(const char * __dirname);
-/* ./src/dirent/readdir.c */
-struct dirent * readdir(DIR * __dirp);
-/* ./src/dirent/rewinddir.c */
-void rewinddir(DIR * __dirp);
+int closedir(DIR *);
+DIR * opendir(const char *);
+struct dirent * readdir(DIR *);
+void rewinddir(DIR *);
#endif
#if (defined _XOPEN_SOURCE)
-/* ./src/dirent/seekdir.c */
-void seekdir(DIR * __dirp, long __loc);
-/* ./src/dirent/telldir.c */
-long telldir(DIR * __dirp);
+void seekdir(DIR *, long);
+long telldir(DIR *);
#endif
-
#endif
diff --git a/errno.h b/errno.h
index 85d862e..5c0c181 100644
--- a/errno.h
+++ b/errno.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -56,195 +56,113 @@ SOFTWARE.
# endif
#endif
-/* ./src/errno/EDOM.c */
#define EDOM (1)
-/* ./src/errno/ERANGE.c */
#define ERANGE (2)
-/* ./src/errno/errno.c */
#define errno (*__errno())
#if (defined __STDC_VERSION__ && 199409 <= __STDC_VERSION__)
-/* ./src/errno/EILSEQ.c */
#define EILSEQ (3)
#endif
#if (defined _POSIX_SOURCE)
-/* ./src/errno/E2BIG.c */
#define E2BIG (10)
-/* ./src/errno/EACCES.c */
#define EACCES (11)
-/* ./src/errno/EAGAIN.c */
#define EAGAIN (12)
-/* ./src/errno/EBADF.c */
#define EBADF (13)
-/* ./src/errno/EBUSY.c */
#define EBUSY (14)
-/* ./src/errno/ECHILD.c */
#define ECHILD (15)
-/* ./src/errno/EDEADLK.c */
#define EDEADLK (16)
-/* ./src/errno/EEXIST.c */
#define EEXIST (17)
-/* ./src/errno/EFAULT.c */
#define EFAULT (18)
-/* ./src/errno/EFBIG.c */
#define EFBIG (19)
-/* ./src/errno/EINTR.c */
#define EINTR (20)
-/* ./src/errno/EINVAL.c */
#define EINVAL (21)
-/* ./src/errno/EIO.c */
#define EIO (22)
-/* ./src/errno/EISDIR.c */
#define EISDIR (23)
-/* ./src/errno/EMFILE.c */
#define EMFILE (24)
-/* ./src/errno/EMLINK.c */
#define EMLINK (25)
-/* ./src/errno/ENAMETOOLONG.c */
#define ENAMETOOLONG (26)
-/* ./src/errno/ENFILE.c */
#define ENFILE (27)
-/* ./src/errno/ENODEV.c */
#define ENODEV (28)
-/* ./src/errno/ENOENT.c */
#define ENOENT (29)
-/* ./src/errno/ENOEXEC.c */
#define ENOEXEC (30)
-/* ./src/errno/ENOLCK.c */
#define ENOLCK (31)
-/* ./src/errno/ENOMEM.c */
#define ENOMEM (32)
-/* ./src/errno/ENOSPC.c */
#define ENOSPC (33)
-/* ./src/errno/ENOSYS.c */
#define ENOSYS (34)
-/* ./src/errno/ENOTDIR.c */
#define ENOTDIR (35)
-/* ./src/errno/ENOTEMPTY.c */
#define ENOTEMPTY (36)
-/* ./src/errno/ENOTTY.c */
#define ENOTTY (37)
-/* ./src/errno/ENXIO.c */
#define ENXIO (38)
-/* ./src/errno/EPERM.c */
#define EPERM (39)
-/* ./src/errno/EPIPE.c */
#define EPIPE (40)
-/* ./src/errno/EROFS.c */
#define EROFS (41)
-/* ./src/errno/ESRCH.c */
#define ESRCH (43)
-/* ./src/errno/EXDEV.c */
#define EXDEV (44)
#endif
#if (defined _POSIX_C_SOURCE && 199309 <= _POSIX_C_SOURCE)
-/* ./src/errno/ECANCELED.c */
#define ECANCELED (20)
-/* ./src/errno/ENOTSUP.c */
#define ENOTSUP (68)
#endif
#if (defined _POSIX_C_SOURCE && 199309 <= _POSIX_C_SOURCE) || \
(defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
-/* ./src/errno/EBADMSG.c */
#define EBADMSG (18)
-/* ./src/errno/EINPROGRESS.c */
#define EINPROGRESS (33)
-/* ./src/errno/EMSGSIZE.c */
#define EMSGSIZE (42)
#endif
#if (defined _POSIX_C_SOURCE && 199506 <= _POSIX_C_SOURCE) || \
(defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
-/* ./src/errno/ETIMEDOUT.c */
#define ETIMEDOUT (84)
#endif
#if (defined _POSIX_C_SOURCE && 200112 <= _POSIX_C_SOURCE) || \
(defined _XOPEN_SOURCE)
-/* ./src/errno/EIDRM.c */
#define EIDRM (32)
-/* ./src/errno/ENOMSG.c */
#define ENOMSG (57)
-/* ./src/errno/ETXTBSY.c */
#define ETXTBSY (85)
#endif
#if (defined _POSIX_C_SOURCE && 200112 <= _POSIX_C_SOURCE) || \
(defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
-/* ./src/errno/EADDRINUSE.c */
#define EADDRINUSE (12)
-/* ./src/errno/EADDRNOTAVAIL.c */
#define EADDRNOTAVAIL (13)
-/* ./src/errno/EAFNOSUPPORT.c */
#define EAFNOSUPPORT (14)
-/* ./src/errno/EALREADY.c */
#define EALREADY (16)
-/* ./src/errno/ECONNABORTED.c */
#define ECONNABORTED (22)
-/* ./src/errno/ECONNREFUSED.c */
#define ECONNREFUSED (23)
-/* ./src/errno/ECONNRESET.c */
#define ECONNRESET (24)
-/* ./src/errno/EDESTADDRREQ.c */
#define EDESTADDRREQ (26)
-/* ./src/errno/EDQUOT.c */
#define EDQUOT (27)
-/* ./src/errno/EHOSTUNREACH.c */
#define EHOSTUNREACH (31)
-/* ./src/errno/EISCONN.c */
#define EISCONN (37)
-/* ./src/errno/ELOOP.c */
#define ELOOP (39)
-/* ./src/errno/EMULTIHOP.c */
#define EMULTIHOP (43)
-/* ./src/errno/ENETDOWN.c */
#define ENETDOWN (45)
-/* ./src/errno/ENETUNREACH.c */
#define ENETUNREACH (47)
-/* ./src/errno/ENOBUFS.c */
#define ENOBUFS (49)
-/* ./src/errno/ENOLINK.c */
#define ENOLINK (55)
-/* ./src/errno/ENOPROTOOPT.c */
#define ENOPROTOOPT (58)
-/* ./src/errno/ENOTCONN.c */
#define ENOTCONN (63)
-/* ./src/errno/ENOTSOCK.c */
#define ENOTSOCK (67)
-/* ./src/errno/EOPNOTSUPP.c */
#define EOPNOTSUPP (71)
-/* ./src/errno/EPROTO.c */
#define EPROTO (76)
-/* ./src/errno/EPROTONOSUPPORT.c */
#define EPROTONOSUPPORT (77)
-/* ./src/errno/EPROTOTYPE.c */
#define EPROTOTYPE (78)
-/* ./src/errno/ESTALE.c */
#define ESTALE (82)
-/* ./src/errno/EWOULDBLOCK.c */
#define EWOULDBLOCK (86)
#endif
#if (defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
-/* ./src/errno/ENODATA.c */
#define ENODATA (50)
-/* ./src/errno/ENOSR.c */
#define ENOSR (60)
-/* ./src/errno/ENOSTR.c */
#define ENOSTR (61)
-/* ./src/errno/EOVERFLOW.c */
#define EOVERFLOW (72)
-/* ./src/errno/ETIME.c */
#define ETIME (83)
#endif
-/* ./src/errno/__errno.c */
int *__errno(void);
-
#endif
-
-#include <ungol/errno.h>
diff --git a/fcntl.h b/fcntl.h
index 94e3580..08fb94c 100644
--- a/fcntl.h
+++ b/fcntl.h
@@ -57,100 +57,68 @@ SOFTWARE.
#endif
#if (defined _POSIX_SOURCE)
-/* ./src/fcntl/FD_CLOEXEC.c */
#define FD_CLOEXEC (1)
-/* ./src/fcntl/F_DUPFD.c */
#define F_DUPFD (1)
-/* ./src/fcntl/F_GETFD.c */
#define F_GETFD (3)
-/* ./src/fcntl/F_GETFL.c */
#define F_GETFL (5)
-/* ./src/fcntl/F_GETLK.c */
#define F_GETLK (7)
-/* ./src/fcntl/F_RDLCK.c */
#define F_RDLCK (1)
-/* ./src/fcntl/F_SETFD.c */
#define F_SETFD (4)
-/* ./src/fcntl/F_SETFL.c */
#define F_SETFL (6)
-/* ./src/fcntl/F_SETLK.c */
#define F_SETLK (8)
-/* ./src/fcntl/F_SETLKW.c */
#define F_SETLKW (9)
-/* ./src/fcntl/F_UNLCK.c */
#define F_UNLCK (2)
-/* ./src/fcntl/F_WRLCK.c */
#define F_WRLCK (3)
-/* ./src/fcntl/O_ACCMODE.c */
#define O_ACCMODE (O_EXEC|O_RDONLY|O_RDWR|O_SEARCH|O_WRONLY)
-/* ./src/fcntl/O_APPEND.c */
#define O_APPEND (1<<8)
-/* ./src/fcntl/O_CREAT.c */
#define O_CREAT (1<<1)
-/* ./src/fcntl/O_EXCL.c */
#define O_EXCL (1<<3)
-/* ./src/fcntl/O_NOCTTY.c */
#define O_NOCTTY (1<<4)
-/* ./src/fcntl/O_NONBLOCK.c */
#define O_NONBLOCK (1<<10)
-/* ./src/fcntl/O_RDONLY.c */
#define O_RDONLY (1<<14)
-/* ./src/fcntl/O_RDWR.c */
#define O_RDWR (1<<15)
-/* ./src/fcntl/O_TRUNC.c */
#define O_TRUNC (1<<6)
-/* ./src/fcntl/O_WRONLY.c */
#define O_WRONLY (1<<17)
#endif
#if (defined _POSIX_C_SOURCE && 199309 <= _POSIX_C_SOURCE)
-/* ./src/fcntl/O_DSYNC.c */
#define O_DSYNC (1<<9)
-/* ./src/fcntl/O_RSYNC.c */
#define O_RSYNC (1<<11)
#endif
#if (defined _POSIX_C_SOURCE && 199309 <= _POSIX_C_SOURCE) || \
(defined _XOPEN_SOURCE)
-/* ./src/fcntl/O_SYNC.c */
#define O_SYNC (1<<12)
#endif
#if (defined _XOPEN_SOURCE)
-/* src/stdio/SEEK_CUR.c */
#define SEEK_CUR (1)
-/* src/stdio/SEEK_END.c */
#define SEEK_END (2)
-/* src/stdio/SEEK_SET.c */
#define SEEK_SET (3)
#endif
#if (defined _XOPEN_SOURCE)
-/* src/sys/types/mode_t.c */
-#ifndef __TYPE_mode_t_DEFINED__
-#define __TYPE_mode_t_DEFINED__
+#ifndef __mode_t_DEFINED__
+#define __mode_t_DEFINED__
typedef unsigned long int mode_t;
#endif
-/* src/sys/types/off_t.c */
-#ifndef __TYPE_off_t_DEFINED__
-#define __TYPE_off_t_DEFINED__
+#ifndef __off_t_DEFINED__
+#define __off_t_DEFINED__
typedef long int
off_t;
#endif
-/* src/sys/types/pid_t.c */
-#ifndef __TYPE_pid_t_DEFINED__
-#define __TYPE_pid_t_DEFINED__
+#ifndef __pid_t_DEFINED__
+#define __pid_t_DEFINED__
typedef long int pid_t;
#endif
#endif
#if (defined _POSIX_SOURCE)
-/* ./src/fcntl/struct_flock.c */
-#ifndef __TYPE_struct_flock_DEFINED__
-#define __TYPE_struct_flock_DEFINED__
+#ifndef __struct_flock_DEFINED__
+#define __struct_flock_DEFINED__
struct flock {
short l_type;
short l_whence;
@@ -163,14 +131,9 @@ struct flock {
#endif
#if (defined _POSIX_SOURCE)
-/* ./src/fcntl/creat.c */
int creat(const char *__path, mode_t __mode);
-/* ./src/fcntl/fcntl.c */
int fcntl(int __fildes, int __cmd, ...);
-/* ./src/fcntl/open.c */
int open(const char *__path, int __oflag, ...);
#endif
#endif
-
-#include <ungol/fcntl.h>
diff --git a/fenv.h b/fenv.h
index 6a5859e..14e4639 100644
--- a/fenv.h
+++ b/fenv.h
@@ -27,70 +27,35 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
-#if (defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
-/* ./src/fenv/FE_ALL_EXCEPT.c */
+#if !(defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
+#error "<fenv.h> requires C99 or higher"
+#endif
+
#define FE_ALL_EXCEPT (FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW)
-/* ./src/fenv/FE_DFL_ENV.c */
#define FE_DFL_ENV ((const fenv_t*)FE_DFL_ENV)
-/* ./src/fenv/FE_DIVBYZERO.c */
#define FE_DIVBYZERO (1<<0)
-/* ./src/fenv/FE_DOWNWARD.c */
#define FE_DOWNWARD (3)
-/* ./src/fenv/FE_INEXACT.c */
#define FE_INEXACT (1<<1)
-/* ./src/fenv/FE_INVALID.c */
#define FE_INVALID (1<<2)
-/* ./src/fenv/FE_OVERFLOW.c */
#define FE_OVERFLOW (1<<3)
-/* ./src/fenv/FE_TONEAREST.c */
#define FE_TONEAREST (1)
-/* ./src/fenv/FE_TOWARDZERO.c */
#define FE_TOWARDZERO (0)
-/* ./src/fenv/FE_UNDERFLOW.c */
#define FE_UNDERFLOW (1<<4)
-/* ./src/fenv/FE_UPWARD.c */
#define FE_UPWARD (2)
-#endif
-#if (defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
-/* ./src/fenv/fenv_t.c */
-#ifndef __TYPE_fenv_t_DEFINED__
-#define __TYPE_fenv_t_DEFINED__
typedef unsigned long long int fenv_t;
-#endif
-
-/* ./src/fenv/fexcept_t.c */
-#ifndef __TYPE_fexcept_t_DEFINED__
-#define __TYPE_fexcept_t_DEFINED__
typedef unsigned long long int fexcept_t;
-#endif
-
-#endif
-#if (defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
-/* ./src/fenv/feclearexcept.c */
-int feclearexcept(int __excepts);
-/* ./src/fenv/fegetenv.c */
-int fegetenv(fenv_t *__envp);
-/* ./src/fenv/fegetexceptflag.c */
-int fegetexceptflag(fexcept_t *__flagp, int __excepts);
-/* ./src/fenv/fegetround.c */
+int feclearexcept(int);
+int fegetenv(fenv_t *);
+int fegetexceptflag(fexcept_t *, int);
int fegetround(void);
-/* ./src/fenv/feholdexcept.c */
-int feholdexcept(fenv_t *__envp);
-/* ./src/fenv/feraiseexcept.c */
-int feraiseexcept(int __excepts);
-/* ./src/fenv/fesetenv.c */
-int fesetenv(const fenv_t *__envp);
-/* ./src/fenv/fesetexceptflag.c */
-int fesetexceptflag(const fexcept_t *__flagp, int __excepts);
-/* ./src/fenv/fesetround.c */
-int fesetround(int __round);
-/* ./src/fenv/fetestexcept.c */
-int fetestexcept(int __excepts);
-/* ./src/fenv/feupdateenv.c */
-int feupdateenv(const fenv_t *__envp);
-#endif
-
+int feholdexcept(fenv_t *);
+int feraiseexcept(int);
+int fesetenv(const fenv_t *);
+int fesetexceptflag(const fexcept_t *, int);
+int fesetround(int);
+int fetestexcept(int);
+int feupdateenv(const fenv_t *);
#endif
diff --git a/float.h b/float.h
index e478b02..1b78416 100644
--- a/float.h
+++ b/float.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -27,71 +27,39 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
-/* ./src/float/DBL_DIG.c */
#define DBL_DIG (15)
-/* ./src/float/DBL_EPSILON.c */
#define DBL_EPSILON (2.220446E-16)
-/* ./src/float/DBL_MANT_DIG.c */
#define DBL_MANT_DIG (53)
-/* ./src/float/DBL_MAX.c */
#define DBL_MAX (1.797693E+308)
-/* ./src/float/DBL_MAX_10_EXP.c */
#define DBL_MAX_10_EXP (308)
-/* ./src/float/DBL_MAX_EXP.c */
#define DBL_MAX_EXP (1024)
-/* ./src/float/DBL_MIN.c */
#define DBL_MIN (2.225074E-308)
-/* ./src/float/DBL_MIN_10_EXP.c */
#define DBL_MIN_10_EXP (-307)
-/* ./src/float/DBL_MIN_EXP.c */
#define DBL_MIN_EXP (-1021)
-/* ./src/float/FLT_DIG.c */
#define FLT_DIG (6)
-/* ./src/float/FLT_EPSILON.c */
#define FLT_EPSILON (1.192093E-07)
-/* ./src/float/FLT_MANT_DIG.c */
#define FLT_MANT_DIG (24)
-/* ./src/float/FLT_MAX.c */
#define FLT_MAX (3.402823E+38)
-/* ./src/float/FLT_MAX_10_EXP.c */
#define FLT_MAX_10_EXP (38)
-/* ./src/float/FLT_MAX_EXP.c */
#define FLT_MAX_EXP (128)
-/* ./src/float/FLT_MIN.c */
#define FLT_MIN (1.175494E-38)
-/* ./src/float/FLT_MIN_10_EXP.c */
#define FLT_MIN_10_EXP (-37)
-/* ./src/float/FLT_MIN_EXP.c */
#define FLT_MIN_EXP (-125)
-/* ./src/float/FLT_RADIX.c */
#define FLT_RADIX (2)
-/* ./src/float/FLT_ROUNDS.c */
#define FLT_ROUNDS fegetround()
-/* ./src/float/LDBL_DIG.c */
#define LDBL_DIG (15)
-/* ./src/float/LDBL_EPSILON.c */
#define LDBL_EPSILON (2.220446E-16)
-/* ./src/float/LDBL_MANT_DIG.c */
#define LDBL_MANT_DIG (53)
-/* ./src/float/LDBL_MAX.c */
#define LDBL_MAX (1.797693E+308)
-/* ./src/float/LDBL_MAX_10_EXP.c */
#define LDBL_MAX_10_EXP (308)
-/* ./src/float/LDBL_MAX_EXP.c */
#define LDBL_MAX_EXP (1024)
-/* ./src/float/LDBL_MIN.c */
#define LDBL_MIN (2.225074E-308)
-/* ./src/float/LDBL_MIN_10_EXP.c */
#define LDBL_MIN_10_EXP (-37)
-/* ./src/float/LDBL_MIN_EXP.c */
#define LDBL_MIN_EXP (-1021)
#if (defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
-/* ./src/float/DECIMAL_DIG.c */
#define DECIMAL_DIG (10)
-/* ./src/float/FLT_EVAL_METHOD.c */
#define FLT_EVAL_METHOD (-1)
#endif
-
#endif
diff --git a/fmtmsg.h b/fmtmsg.h
index aa7aecc..5574d5e 100644
--- a/fmtmsg.h
+++ b/fmtmsg.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -41,62 +41,33 @@ SOFTWARE.
#endif
#if (defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
-/* ./src/fmtmsg/MM_APPL.c */
-#define MM_APPL 3
-/* ./src/fmtmsg/MM_CONSOLE.c */
-#define MM_CONSOLE 14
-/* ./src/fmtmsg/MM_ERROR.c */
-#define MM_ERROR 9
-/* ./src/fmtmsg/MM_FIRM.c */
-#define MM_FIRM 2
-/* ./src/fmtmsg/MM_HALT.c */
-#define MM_HALT 8
-/* ./src/fmtmsg/MM_HARD.c */
-#define MM_HARD 0
-/* ./src/fmtmsg/MM_INFO.c */
-#define MM_INFO 11
-/* ./src/fmtmsg/MM_NOCON.c */
-#define MM_NOCON 3
-/* ./src/fmtmsg/MM_NOMSG.c */
-#define MM_NOMSG 2
-/* ./src/fmtmsg/MM_NOSEV.c */
-#define MM_NOSEV 12
-/* ./src/fmtmsg/MM_NOTOK.c */
-#define MM_NOTOK 1
-/* ./src/fmtmsg/MM_NRECOV.c */
-#define MM_NRECOV 7
-/* ./src/fmtmsg/MM_NULLACT.c */
-#define MM_NULLACT (char*)0
-/* ./src/fmtmsg/MM_NULLLBL.c */
-#define MM_NULLLBL (char*)0
-/* ./src/fmtmsg/MM_NULLMC.c */
-#define MM_NULLMC 0L
-/* ./src/fmtmsg/MM_NULLSEV.c */
-#define MM_NULLSEV 0
-/* ./src/fmtmsg/MM_NULLTAG.c */
-#define MM_NULLTAG (char*)0
-/* ./src/fmtmsg/MM_NULLTXT.c */
-#define MM_NULLTXT (char*)0
-/* ./src/fmtmsg/MM_OK.c */
-#define MM_OK 0
-/* ./src/fmtmsg/MM_OPSYS.c */
-#define MM_OPSYS 5
-/* ./src/fmtmsg/MM_PRINT.c */
-#define MM_PRINT 13
-/* ./src/fmtmsg/MM_RECOVER.c */
-#define MM_RECOVER 6
-/* ./src/fmtmsg/MM_SOFT.c */
-#define MM_SOFT 1
-/* ./src/fmtmsg/MM_UTIL.c */
-#define MM_UTIL 4
-/* ./src/fmtmsg/MM_WARNING.c */
-#define MM_WARNING 10
-#endif
+#define MM_APPL (3)
+#define MM_CONSOLE (14)
+#define MM_ERROR (9)
+#define MM_FIRM (2)
+#define MM_HALT (8)
+#define MM_HARD (0)
+#define MM_INFO (11)
+#define MM_NOCON (3)
+#define MM_NOMSG (2)
+#define MM_NOSEV (12)
+#define MM_NOTOK (1)
+#define MM_NRECOV (7)
+#define MM_NULLACT ((char*)0)
+#define MM_NULLLBL ((char*)0)
+#define MM_NULLMC (0L)
+#define MM_NULLSEV (0)
+#define MM_NULLTAG ((char*)0)
+#define MM_NULLTXT ((char*)0)
+#define MM_OK (0)
+#define MM_OPSYS (5)
+#define MM_PRINT (13)
+#define MM_RECOVER (6)
+#define MM_SOFT (1)
+#define MM_UTIL (4)
+#define MM_WARNING (10)
-#if (defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
-/* ./src/fmtmsg/fmtmsg.c */
-int fmtmsg(long __classification, const char * __label, int __severity, const char * __text, const char * __action, const char * __tag);
+int fmtmsg(long, const char *, int, const char *, const char *, const char *);
#endif
-
#endif
diff --git a/fnmatch.h b/fnmatch.h
index 2b00d38..388a1fa 100644
--- a/fnmatch.h
+++ b/fnmatch.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -57,22 +57,13 @@ SOFTWARE.
#endif
#if (defined _POSIX_C_SOURCE && 2 <= _POSIX_C_SOURCE)
-/* ./src/fnmatch/FNM_NOESCAPE.c */
#define FNM_NOESCAPE (1<<2)
-/* ./src/fnmatch/FNM_NOMATCH.c */
#define FNM_NOMATCH (-1)
-/* ./src/fnmatch/FNM_NOSYS.c */
#define FNM_NOSYS (-2)
-/* ./src/fnmatch/FNM_PATHNAME.c */
#define FNM_PATHNAME (1<<0)
-/* ./src/fnmatch/FNM_PERIOD.c */
#define FNM_PERIOD (1<<1)
-#endif
-#if (defined _POSIX_C_SOURCE && 2 <= _POSIX_C_SOURCE)
-/* ./src/fnmatch/fnmatch.c */
-int fnmatch(const char * __pattern, const char * __string, int __flags);
+int fnmatch(const char *, const char *, int);
#endif
-
#endif
diff --git a/ftw.h b/ftw.h
index 4b6c922..0d971e0 100644
--- a/ftw.h
+++ b/ftw.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -27,65 +27,37 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
-#if defined _XOPEN_SOURCE && _XOPEN_SOURCE - 1 < 0
-#undef _XOPEN_SOURCE
-#define _XOPEN_SOURCE 400
+#ifndef _XOPEN_SOURCE
+# error <ftw.h> requires _XOPEN_SOURCE
#endif
-#if defined _XOPEN_SOURCE && !defined _POSIX_C_SOURCE
-# if (_XOPEN_SOURCE >= 700)
-# define _POSIX_C_SOURCE 200809L
-# elif (_XOPEN_SOURCE >= 600)
-# define _POSIX_C_SOURCE 200112L
-# elif (_XOPEN_SOURCE >= 500)
-# define _POSIX_C_SOURCE 199506L
-# else
-# define _POSIX_C_SOURCE 2
-# endif
-#endif
-
-#if defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE
-# define _POSIX_SOURCE
+#if _XOPEN_SOURCE - 1 < 0
+#undef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 400
#endif
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 19901L
-# if (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200112L)
-# error POSIX.1-2001 and later require a C99 compiler
-# elif (defined _XOPEN_SOURCE && _XOPEN_SOURCE >= 600)
+# if (defined _XOPEN_SOURCE && _XOPEN_SOURCE >= 600)
# error XOPEN Issue 6 and later require a C99 compiler
# endif
#endif
-#if (defined _XOPEN_SOURCE)
-/* ./src/ftw/FTW_D.c */
#define FTW_D (1<<1)
-/* ./src/ftw/FTW_DNR.c */
#define FTW_DNR (1<<2)
-/* ./src/ftw/FTW_F.c */
#define FTW_F (1<<0)
-/* ./src/ftw/FTW_NS.c */
#define FTW_NS (1<<4)
-#endif
-#if (defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
-/* ./src/ftw/FTW_CHDIR.c */
+#if (((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
#define FTW_CHDIR (1<<3)
-/* ./src/ftw/FTW_DEPTH.c */
#define FTW_DEPTH (1<<2)
-/* ./src/ftw/FTW_MOUNT.c */
#define FTW_MOUNT (1<<1)
-/* ./src/ftw/FTW_PHYS.c */
#define FTW_PHYS (1<<0)
-/* ./src/ftw/FTW_SL.c */
#define FTW_SL (1<<5)
-/* ./src/ftw/FTW_SLN.c */
#define FTW_SLN (1<<6)
#endif
-#if (defined _XOPEN_SOURCE)
-/* src/sys/stat/struct_stat.c */
-#ifndef __TYPE_struct_stat_DEFINED__
-#define __TYPE_struct_stat_DEFINED__
+#ifndef __struct_stat_DEFINED__
+#define __struct_stat_DEFINED__
struct stat {
dev_t st_dev;
ino_t st_ino;
@@ -103,31 +75,20 @@ struct stat {
blkcnt_t st_blocks;
#endif
};
-#endif
#endif
-#if (defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
-/* ./src/ftw/struct_FTW.c */
-#ifndef __TYPE_struct_FTW_DEFINED__
-#define __TYPE_struct_FTW_DEFINED__
+#if (((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
struct FTW {
int base;
int level;
};
#endif
-#endif
-
-#if (defined _XOPEN_SOURCE)
-/* ./src/ftw/ftw.c */
-int ftw(const char * __path, int (*__fn) (const char *, const struct stat * __ptr, int __flag), int __ndirs);
-#endif
+int ftw(const char *, int (*)(const char *, const struct stat *, int), int);
-#if (defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
-/* ./src/ftw/nftw.c */
-int nftw(const char * __path, int (*__fn) (const char *, const struct stat *, int, struct FTW *), int __fd_limit, int __flags);
+#if (((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
+int nftw(const char *, int (*) (const char *, const struct stat *, int, struct FTW *), int, int);
#endif
-
#endif
diff --git a/glob.h b/glob.h
index 4f4b5d5..85b7dea 100644
--- a/glob.h
+++ b/glob.h
@@ -54,56 +54,32 @@ SOFTWARE.
# elif (defined _XOPEN_SOURCE && _XOPEN_SOURCE >= 600)
# error XOPEN Issue 6 and later require a C99 compiler
# endif
+# define restrict /* compatibility */
+#endif
+
+#if !(defined _POSIX_C_SOURCE && 2 <= _POSIX_C_SOURCE)
+# error <glob.h> requires _POSIX_C_SOURCE >= 2
#endif
-#if (defined _POSIX_C_SOURCE && 2 <= _POSIX_C_SOURCE)
-/* ./src/glob/GLOB_ABORTED.c */
#define GLOB_ABORTED 1
-/* ./src/glob/GLOB_APPEND.c */
#define GLOB_APPEND (1<<0)
-/* ./src/glob/GLOB_DOOFFS.c */
#define GLOB_DOOFFS (1<<1)
-/* ./src/glob/GLOB_ERR.c */
#define GLOB_ERR (1<<2)
-/* ./src/glob/GLOB_MARK.c */
#define GLOB_MARK (1<<3)
-/* ./src/glob/GLOB_NOCHECK.c */
#define GLOB_NOCHECK (1<<4)
-/* ./src/glob/GLOB_NOESCAPE.c */
#define GLOB_NOESCAPE (1<<5)
-/* ./src/glob/GLOB_NOMATCH.c */
#define GLOB_NOMATCH 2
-/* ./src/glob/GLOB_NOSORT.c */
#define GLOB_NOSORT (1<<6)
-/* ./src/glob/GLOB_NOSPACE.c */
#define GLOB_NOSPACE 3
-/* ./src/glob/GLOB_NOSYS.c */
#define GLOB_NOSYS (-2)
-#endif
-#if (defined _POSIX_C_SOURCE && 2 <= _POSIX_C_SOURCE)
-/* ./src/glob/glob_t.c */
-#ifndef __TYPE_glob_t_DEFINED__
-#define __TYPE_glob_t_DEFINED__
typedef struct {
size_t gl_pathc;
char ** gl_pathv;
size_t gl_offs;
} glob_t;
-#endif
-
-#endif
-
-#if (!defined __STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
-#define restrict
-#endif
-
-#if (defined _POSIX_C_SOURCE && 2 <= _POSIX_C_SOURCE)
-/* ./src/glob/glob.c */
-int glob(const char * restrict __pattern, int __flags, int (*__errfunc) (const char * __epath, int __eerrno), glob_t * restrict __pglob);
-/* ./src/glob/globfree.c */
-void globfree(glob_t * __pglob);
-#endif
+int glob(const char * restrict, int, int (*) (const char *, int), glob_t * restrict);
+void globfree(glob_t *);
#endif
diff --git a/grp.h b/grp.h
index 5d30dbe..cdf3917 100644
--- a/grp.h
+++ b/grp.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -56,42 +56,30 @@ SOFTWARE.
# endif
#endif
+#ifndef _POSIX_SOURCE
+# error <grp.h> requires _POSIX_SOURCE, _POSIX_C_SOURCE, or _XOPEN_SOURCE
+#define
+
#if (defined _XOPEN_SOURCE)
-/* src/sys/types/gid_t.c */
-#ifndef __TYPE_gid_t_DEFINED__
-#define __TYPE_gid_t_DEFINED__
+#ifndef __gid_t_DEFINED__
+#define __gid_t_DEFINED__
typedef unsigned long int
gid_t;
#endif
-
#endif
-#if (defined _POSIX_SOURCE)
-/* ./src/grp/struct_group.c */
-#ifndef __TYPE_struct_group_DEFINED__
-#define __TYPE_struct_group_DEFINED__
struct group {
char * gr_name;
gid_t gr_gid;
char ** gr_mem;
};
-#endif
-#endif
-
-#if (defined _POSIX_SOURCE)
-/* ./src/grp/getgrgid.c */
-struct group * getgrgid(gid_t __gid);
-/* ./src/grp/getgrnam.c */
-struct group * getgrnam(const char * __name);
-#endif
+struct group * getgrgid(gid_t);
+struct group * getgrnam(const char *);
#if (defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
-/* ./src/grp/endgrent.c */
void endgrent(void);
-/* ./src/grp/getgrent.c */
struct group * getgrent(void);
-/* ./src/grp/setgrent.c */
void setgrent(void);
#endif
diff --git a/iconv.h b/iconv.h
index e01ae93..f7425ad 100644
--- a/iconv.h
+++ b/iconv.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -54,31 +54,19 @@ SOFTWARE.
# elif (defined _XOPEN_SOURCE && _XOPEN_SOURCE >= 600)
# error XOPEN Issue 6 and later require a C99 compiler
# endif
+# define restrict /* compatibility */
#endif
-#if (defined _POSIX_C_SOURCE && 200809 <= _POSIX_C_SOURCE) || \
+#if !(defined _POSIX_C_SOURCE && 200809 <= _POSIX_C_SOURCE) || \
(defined _XOPEN_SOURCE)
-/* ./src/iconv/iconv_t.c */
-#ifndef __TYPE_iconv_t_DEFINED__
-#define __TYPE_iconv_t_DEFINED__
-typedef unsigned long int iconv_t;
-#endif
-
-#endif
-
-#if (!defined __STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
-#define restrict
+# error <iconv.h> requires _POSIX_C_SOURCE >= 200809 or _XOPEN_SOURCE
#endif
-#if (defined _POSIX_C_SOURCE && 200809 <= _POSIX_C_SOURCE) || \
- (defined _XOPEN_SOURCE)
-/* ./src/iconv/iconv.c */
-size_t iconv(iconv_t __cd, char ** restrict __inbuf, size_t * restrict __inbytesleft, char ** restrict __outbuf, size_t * restrict __outbytesleft);
-/* ./src/iconv/iconv_close.c */
-int iconv_close(iconv_t __cd);
-/* ./src/iconv/iconv_open.c */
-iconv_t iconv_open(const char * __tocode, const char * __fromcode);
-#endif
+typedef unsigned long int iconv_t;
+size_t iconv(iconv_t, char ** restrict, size_t * restrict, char ** restrict,
+ size_t * restrict);
+int iconv_close(iconv_t);
+iconv_t iconv_open(const char *, const char *);
#endif
diff --git a/inttypes.h b/inttypes.h
index 219e32e..7c24164 100644
--- a/inttypes.h
+++ b/inttypes.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -27,436 +27,264 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
-#if (defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
-/* ./src/inttypes/stdint.ref */
-#include <stdint.h>
+#if !(defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
+# error <inttypes.h> requires C99 or higher
#endif
-#if (defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
-/* ./src/inttypes/PRIX16.c */
+#include <stdint.h>
+
#define PRIX16 "hX"
-/* ./src/inttypes/PRIX32.c */
#define PRIX32 "lX"
-/* ./src/inttypes/PRIX64.c */
#define PRIX64 "llX"
-/* ./src/inttypes/PRIX8.c */
#define PRIX8 "hhX"
-/* ./src/inttypes/PRIXFAST16.c */
#define PRIXFAST16 "hX"
-/* ./src/inttypes/PRIXFAST32.c */
#define PRIXFAST32 "lX"
-/* ./src/inttypes/PRIXFAST64.c */
#define PRIXFAST64 "llX"
-/* ./src/inttypes/PRIXFAST8.c */
#define PRIXFAST8 "hhX"
-/* ./src/inttypes/PRIXLEAST16.c */
#define PRIXLEAST16 "hX"
-/* ./src/inttypes/PRIXLEAST32.c */
#define PRIXLEAST32 "lX"
-/* ./src/inttypes/PRIXLEAST64.c */
#define PRIXLEAST64 "llX"
-/* ./src/inttypes/PRIXLEAST8.c */
#define PRIXLEAST8 "hhX"
-/* ./src/inttypes/PRIXMAX.c */
#define PRIXMAX "llX"
-/* ./src/inttypes/PRIXPTR.c */
+
#if WORD_BIT == 64
#define PRIXPTR "llX"
#else
#define PRIXPTR "lX"
#endif
-/* ./src/inttypes/PRId16.c */
+
#define PRId16 "hd"
-/* ./src/inttypes/PRId32.c */
#define PRId32 "ld"
-/* ./src/inttypes/PRId64.c */
#define PRId64 "lld"
-/* ./src/inttypes/PRId8.c */
#define PRId8 "hhd"
-/* ./src/inttypes/PRIdFAST16.c */
#define PRIdFAST16 "hd"
-/* ./src/inttypes/PRIdFAST32.c */
#define PRIdFAST32 "ld"
-/* ./src/inttypes/PRIdFAST64.c */
#define PRIdFAST64 "lld"
-/* ./src/inttypes/PRIdFAST8.c */
#define PRIdFAST8 "hhd"
-/* ./src/inttypes/PRIdLEAST16.c */
#define PRIdLEAST16 "hd"
-/* ./src/inttypes/PRIdLEAST32.c */
#define PRIdLEAST32 "ld"
-/* ./src/inttypes/PRIdLEAST64.c */
#define PRIdLEAST64 "lld"
-/* ./src/inttypes/PRIdLEAST8.c */
#define PRIdLEAST8 "hhd"
-/* ./src/inttypes/PRIdMAX.c */
#define PRIdMAX "lld"
-/* ./src/inttypes/PRIdPTR.c */
+
#if WORD_BIT == 64
#define PRIdPTR "lld"
#else
#define PRIdPTR "ld"
#endif
-/* ./src/inttypes/PRIi16.c */
+
#define PRIi16 "hi"
-/* ./src/inttypes/PRIi32.c */
#define PRIi32 "li"
-/* ./src/inttypes/PRIi64.c */
#define PRIi64 "lli"
-/* ./src/inttypes/PRIi8.c */
#define PRIi8 "hhi"
-/* ./src/inttypes/PRIiFAST16.c */
#define PRIiFAST16 "hi"
-/* ./src/inttypes/PRIiFAST32.c */
#define PRIiFAST32 "li"
-/* ./src/inttypes/PRIiFAST64.c */
#define PRIiFAST64 "lli"
-/* ./src/inttypes/PRIiFAST8.c */
#define PRIiFAST8 "hhi"
-/* ./src/inttypes/PRIiLEAST16.c */
#define PRIiLEAST16 "hi"
-/* ./src/inttypes/PRIiLEAST32.c */
#define PRIiLEAST32 "li"
-/* ./src/inttypes/PRIiLEAST64.c */
#define PRIiLEAST64 "lli"
-/* ./src/inttypes/PRIiLEAST8.c */
#define PRIiLEAST8 "hhi"
-/* ./src/inttypes/PRIiMAX.c */
#define PRIiMAX "lli"
-/* ./src/inttypes/PRIiPTR.c */
+
#if WORD_BIT == 64
#define PRIiPTR "lli"
#else
#define PRIiPTR "li"
#endif
-/* ./src/inttypes/PRIo16.c */
+
#define PRIo16 "ho"
-/* ./src/inttypes/PRIo32.c */
#define PRIo32 "lo"
-/* ./src/inttypes/PRIo64.c */
#define PRIo64 "llo"
-/* ./src/inttypes/PRIo8.c */
#define PRIo8 "hho"
-/* ./src/inttypes/PRIoFAST16.c */
#define PRIoFAST16 "ho"
-/* ./src/inttypes/PRIoFAST32.c */
#define PRIoFAST32 "lo"
-/* ./src/inttypes/PRIoFAST64.c */
#define PRIoFAST64 "llo"
-/* ./src/inttypes/PRIoFAST8.c */
#define PRIoFAST8 "hho"
-/* ./src/inttypes/PRIoLEAST16.c */
#define PRIoLEAST16 "ho"
-/* ./src/inttypes/PRIoLEAST32.c */
#define PRIoLEAST32 "lo"
-/* ./src/inttypes/PRIoLEAST64.c */
#define PRIoLEAST64 "llo"
-/* ./src/inttypes/PRIoLEAST8.c */
#define PRIoLEAST8 "hho"
-/* ./src/inttypes/PRIoMAX.c */
#define PRIoMAX "llo"
-/* ./src/inttypes/PRIoPTR.c */
+
#if WORD_BIT == 64
#define PRIoPTR "llo"
#else
#define PRIoPTR "lo"
#endif
-/* ./src/inttypes/PRIu16.c */
+
#define PRIu16 "hu"
-/* ./src/inttypes/PRIu32.c */
#define PRIu32 "lu"
-/* ./src/inttypes/PRIu64.c */
#define PRIu64 "llu"
-/* ./src/inttypes/PRIu8.c */
#define PRIu8 "hhu"
-/* ./src/inttypes/PRIuFAST16.c */
#define PRIuFAST16 "hu"
-/* ./src/inttypes/PRIuFAST32.c */
#define PRIuFAST32 "lu"
-/* ./src/inttypes/PRIuFAST64.c */
#define PRIuFAST64 "llu"
-/* ./src/inttypes/PRIuFAST8.c */
#define PRIuFAST8 "hhu"
-/* ./src/inttypes/PRIuLEAST16.c */
#define PRIuLEAST16 "hu"
-/* ./src/inttypes/PRIuLEAST32.c */
#define PRIuLEAST32 "lu"
-/* ./src/inttypes/PRIuLEAST64.c */
#define PRIuLEAST64 "llu"
-/* ./src/inttypes/PRIuLEAST8.c */
#define PRIuLEAST8 "hhu"
-/* ./src/inttypes/PRIuMAX.c */
#define PRIuMAX "llu"
-/* ./src/inttypes/PRIuPTR.c */
+
#if WORD_BIT == 64
#define PRIuPTR "llu"
#else
#define PRIuPTR "lu"
#endif
-/* ./src/inttypes/PRIx16.c */
+
#define PRIx16 "hx"
-/* ./src/inttypes/PRIx32.c */
#define PRIx32 "lx"
-/* ./src/inttypes/PRIx64.c */
#define PRIx64 "llx"
-/* ./src/inttypes/PRIx8.c */
#define PRIx8 "hhx"
-/* ./src/inttypes/PRIxFAST16.c */
#define PRIxFAST16 "hx"
-/* ./src/inttypes/PRIxFAST32.c */
#define PRIxFAST32 "lx"
-/* ./src/inttypes/PRIxFAST64.c */
#define PRIxFAST64 "llx"
-/* ./src/inttypes/PRIxFAST8.c */
#define PRIxFAST8 "hhx"
-/* ./src/inttypes/PRIxLEAST16.c */
#define PRIxLEAST16 "hx"
-/* ./src/inttypes/PRIxLEAST32.c */
#define PRIxLEAST32 "lx"
-/* ./src/inttypes/PRIxLEAST64.c */
#define PRIxLEAST64 "llx"
-/* ./src/inttypes/PRIxLEAST8.c */
#define PRIxLEAST8 "hhx"
-/* ./src/inttypes/PRIxMAX.c */
#define PRIxMAX "llx"
-/* ./src/inttypes/PRIxPTR.c */
+
#if WORD_BIT == 64
#define PRIxPTR "llx"
#else
#define PRIxPTR "lx"
#endif
-/* ./src/inttypes/SCNX16.c */
+
#define SCNX16 "hX"
-/* ./src/inttypes/SCNX32.c */
#define SCNX32 "lX"
-/* ./src/inttypes/SCNX64.c */
#define SCNX64 "llX"
-/* ./src/inttypes/SCNX8.c */
#define SCNX8 "hhX"
-/* ./src/inttypes/SCNXFAST16.c */
#define SCNXFAST16 "hX"
-/* ./src/inttypes/SCNXFAST32.c */
#define SCNXFAST32 "lX"
-/* ./src/inttypes/SCNXFAST64.c */
#define SCNXFAST64 "llX"
-/* ./src/inttypes/SCNXFAST8.c */
#define SCNXFAST8 "hhX"
-/* ./src/inttypes/SCNXLEAST16.c */
#define SCNXLEAST16 "hX"
-/* ./src/inttypes/SCNXLEAST32.c */
#define SCNXLEAST32 "lX"
-/* ./src/inttypes/SCNXLEAST64.c */
#define SCNXLEAST64 "llX"
-/* ./src/inttypes/SCNXLEAST8.c */
#define SCNXLEAST8 "hhX"
-/* ./src/inttypes/SCNXMAX.c */
#define SCNXMAX "llX"
-/* ./src/inttypes/SCNXPTR.c */
+
#if WORD_BIT == 64
#define SCNXPTR "llX"
#else
#define SCNXPTR "lX"
#endif
-/* ./src/inttypes/SCNd16.c */
+
#define SCNd16 "hd"
-/* ./src/inttypes/SCNd32.c */
#define SCNd32 "ld"
-/* ./src/inttypes/SCNd64.c */
#define SCNd64 "lld"
-/* ./src/inttypes/SCNd8.c */
#define SCNd8 "hhd"
-/* ./src/inttypes/SCNdFAST16.c */
#define SCNdFAST16 "hd"
-/* ./src/inttypes/SCNdFAST32.c */
#define SCNdFAST32 "ld"
-/* ./src/inttypes/SCNdFAST64.c */
#define SCNdFAST64 "lld"
-/* ./src/inttypes/SCNdFAST8.c */
#define SCNdFAST8 "hhd"
-/* ./src/inttypes/SCNdLEAST16.c */
#define SCNdLEAST16 "hd"
-/* ./src/inttypes/SCNdLEAST32.c */
#define SCNdLEAST32 "ld"
-/* ./src/inttypes/SCNdLEAST64.c */
#define SCNdLEAST64 "lld"
-/* ./src/inttypes/SCNdLEAST8.c */
#define SCNdLEAST8 "hhd"
-/* ./src/inttypes/SCNdMAX.c */
#define SCNdMAX "lld"
-/* ./src/inttypes/SCNdPTR.c */
+
#if WORD_BIT == 64
#define SCNdPTR "lld"
#else
#define SCNdPTR "ld"
#endif
-/* ./src/inttypes/SCNi16.c */
+
#define SCNi16 "hi"
-/* ./src/inttypes/SCNi32.c */
#define SCNi32 "li"
-/* ./src/inttypes/SCNi64.c */
#define SCNi64 "lli"
-/* ./src/inttypes/SCNi8.c */
#define SCNi8 "hhi"
-/* ./src/inttypes/SCNiFAST16.c */
#define SCNiFAST16 "hi"
-/* ./src/inttypes/SCNiFAST32.c */
#define SCNiFAST32 "li"
-/* ./src/inttypes/SCNiFAST64.c */
#define SCNiFAST64 "lli"
-/* ./src/inttypes/SCNiFAST8.c */
#define SCNiFAST8 "hhi"
-/* ./src/inttypes/SCNiLEAST16.c */
#define SCNiLEAST16 "hi"
-/* ./src/inttypes/SCNiLEAST32.c */
#define SCNiLEAST32 "li"
-/* ./src/inttypes/SCNiLEAST64.c */
#define SCNiLEAST64 "lli"
-/* ./src/inttypes/SCNiLEAST8.c */
#define SCNiLEAST8 "hhi"
-/* ./src/inttypes/SCNiMAX.c */
#define SCNiMAX "lli"
-/* ./src/inttypes/SCNiPTR.c */
+
#if WORD_BIT == 64
#define SCNiPTR "lli"
#else
#define SCNiPTR "li"
#endif
-/* ./src/inttypes/SCNo16.c */
+
#define SCNo16 "ho"
-/* ./src/inttypes/SCNo32.c */
#define SCNo32 "lo"
-/* ./src/inttypes/SCNo64.c */
#define SCNo64 "llo"
-/* ./src/inttypes/SCNo8.c */
#define SCNo8 "hho"
-/* ./src/inttypes/SCNoFAST16.c */
#define SCNoFAST16 "ho"
-/* ./src/inttypes/SCNoFAST32.c */
#define SCNoFAST32 "lo"
-/* ./src/inttypes/SCNoFAST64.c */
#define SCNoFAST64 "llo"
-/* ./src/inttypes/SCNoFAST8.c */
#define SCNoFAST8 "hho"
-/* ./src/inttypes/SCNoLEAST16.c */
#define SCNoLEAST16 "ho"
-/* ./src/inttypes/SCNoLEAST32.c */
#define SCNoLEAST32 "lo"
-/* ./src/inttypes/SCNoLEAST64.c */
#define SCNoLEAST64 "llo"
-/* ./src/inttypes/SCNoLEAST8.c */
#define SCNoLEAST8 "hho"
-/* ./src/inttypes/SCNoMAX.c */
#define SCNoMAX "llo"
-/* ./src/inttypes/SCNoPTR.c */
+
#if WORD_BIT == 64
#define SCNoPTR "llo"
#else
#define SCNoPTR "lo"
#endif
-/* ./src/inttypes/SCNu16.c */
+
#define SCNu16 "hu"
-/* ./src/inttypes/SCNu32.c */
#define SCNu32 "lu"
-/* ./src/inttypes/SCNu64.c */
#define SCNu64 "llu"
-/* ./src/inttypes/SCNu8.c */
#define SCNu8 "hhu"
-/* ./src/inttypes/SCNuFAST16.c */
#define SCNuFAST16 "hu"
-/* ./src/inttypes/SCNuFAST32.c */
#define SCNuFAST32 "lu"
-/* ./src/inttypes/SCNuFAST64.c */
#define SCNuFAST64 "llu"
-/* ./src/inttypes/SCNuFAST8.c */
#define SCNuFAST8 "hhu"
-/* ./src/inttypes/SCNuLEAST16.c */
#define SCNuLEAST16 "hu"
-/* ./src/inttypes/SCNuLEAST32.c */
#define SCNuLEAST32 "lu"
-/* ./src/inttypes/SCNuLEAST64.c */
#define SCNuLEAST64 "llu"
-/* ./src/inttypes/SCNuLEAST8.c */
#define SCNuLEAST8 "hhu"
-/* ./src/inttypes/SCNuMAX.c */
#define SCNuMAX "llu"
-/* ./src/inttypes/SCNuPTR.c */
+
#if WORD_BIT == 64
#define SCNuPTR "llu"
#else
#define SCNuPTR "lu"
#endif
-/* ./src/inttypes/SCNx16.c */
+
#define SCNx16 "hx"
-/* ./src/inttypes/SCNx32.c */
#define SCNx32 "lx"
-/* ./src/inttypes/SCNx64.c */
#define SCNx64 "llx"
-/* ./src/inttypes/SCNx8.c */
#define SCNx8 "hhx"
-/* ./src/inttypes/SCNxFAST16.c */
#define SCNxFAST16 "hx"
-/* ./src/inttypes/SCNxFAST32.c */
#define SCNxFAST32 "lx"
-/* ./src/inttypes/SCNxFAST64.c */
#define SCNxFAST64 "llx"
-/* ./src/inttypes/SCNxFAST8.c */
#define SCNxFAST8 "hhx"
-/* ./src/inttypes/SCNxLEAST16.c */
#define SCNxLEAST16 "hx"
-/* ./src/inttypes/SCNxLEAST32.c */
#define SCNxLEAST32 "lx"
-/* ./src/inttypes/SCNxLEAST64.c */
#define SCNxLEAST64 "llx"
-/* ./src/inttypes/SCNxLEAST8.c */
#define SCNxLEAST8 "hhx"
-/* ./src/inttypes/SCNxMAX.c */
#define SCNxMAX "llx"
-/* ./src/inttypes/SCNxPTR.c */
+
#if WORD_BIT == 64
#define SCNxPTR "llx"
#else
#define SCNxPTR "lx"
#endif
-#endif
-#if (defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
-/* ./src/inttypes/imaxdiv_t.c */
-#ifndef __TYPE_imaxdiv_t_DEFINED__
-#define __TYPE_imaxdiv_t_DEFINED__
typedef struct {
intmax_t quot;
intmax_t rem;
} imaxdiv_t;
-#endif
-
-/* ./src/inttypes/intmax_t.c */
-#ifndef __TYPE_intmax_t_DEFINED__
-#define __TYPE_intmax_t_DEFINED__
typedef long long int intmax_t;
-#endif
-
-/* ./src/inttypes/uintmax_t.c */
-#ifndef __TYPE_uintmax_t_DEFINED__
-#define __TYPE_uintmax_t_DEFINED__
typedef unsigned long long int uintmax_t;
-#endif
-
-#endif
-
-#if (defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
-/* ./src/inttypes/imaxabs.c */
-intmax_t imaxabs(intmax_t __j);
-/* ./src/inttypes/imaxdiv.c */
-imaxdiv_t imaxdiv(intmax_t __numer, intmax_t __denom);
-/* ./src/inttypes/strtoimax.c */
-intmax_t strtoimax(const char * restrict __nptr, char ** restrict __endptr, int __base);
-/* ./src/inttypes/strtoumax.c */
-uintmax_t strtoumax(const char *restrict __nptr, char ** restrict __endptr, int __base);
-/* ./src/inttypes/wcstoimax.c */
-intmax_t wcstoimax(const wchar_t * restrict __nptr, wchar_t ** restrict __endptr, int __base);
-/* ./src/inttypes/wcstoumax.c */
-uintmax_t wcstoumax(const wchar_t * restrict __nptr, wchar_t ** restrict __endptr, int __base);
-#endif
+intmax_t imaxabs(intmax_t);
+imaxdiv_t imaxdiv(intmax_t, intmax_t);
+intmax_t strtoimax(const char * restrict, char ** restrict, int);
+uintmax_t strtoumax(const char *restrict, char ** restrict, int);
+intmax_t wcstoimax(const wchar_t * restrict, wchar_t ** restrict, int);
+uintmax_t wcstoumax(const wchar_t * restrict, wchar_t ** restrict, int);
#endif
diff --git a/iso646.h b/iso646.h
index 61656b8..d68f021 100644
--- a/iso646.h
+++ b/iso646.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -27,30 +27,20 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
-#if (defined __STDC_VERSION__ && 199409 <= __STDC_VERSION__)
-/* ./src/iso646/and.c */
+#if !(defined __STDC_VERSION__ && 199409 <= __STDC_VERSION__)
+# error <iso646.h> requires C95 or higher
+#endif
+
#define and &&
-/* ./src/iso646/and_eq.c */
#define and_eq &=
-/* ./src/iso646/bitand.c */
#define bitand &
-/* ./src/iso646/bitor.c */
#define bitor |
-/* ./src/iso646/compl.c */
#define compl ~
-/* ./src/iso646/not.c */
#define not !
-/* ./src/iso646/not_eq.c */
#define not_eq !=
-/* ./src/iso646/or.c */
#define or ||
-/* ./src/iso646/or_eq.c */
#define or_eq |=
-/* ./src/iso646/xor.c */
#define xor ^
-/* ./src/iso646/xor_eq.c */
#define xor_eq ^=
-#endif
-
#endif
diff --git a/langinfo.h b/langinfo.h
index 5b0a85a..3d0bc74 100644
--- a/langinfo.h
+++ b/langinfo.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -58,130 +58,73 @@ SOFTWARE.
#if (defined _POSIX_C_SOURCE && 200809 <= _POSIX_C_SOURCE) || \
(defined _XOPEN_SOURCE)
-/* ./src/langinfo/ABDAY_1.c */
#define ABDAY_1 ((nl_item)15)
-/* ./src/langinfo/ABDAY_2.c */
#define ABDAY_2 ((nl_item)16)
-/* ./src/langinfo/ABDAY_3.c */
#define ABDAY_3 ((nl_item)17)
-/* ./src/langinfo/ABDAY_4.c */
#define ABDAY_4 ((nl_item)18)
-/* ./src/langinfo/ABDAY_5.c */
#define ABDAY_5 ((nl_item)19)
-/* ./src/langinfo/ABDAY_6.c */
#define ABDAY_6 ((nl_item)20)
-/* ./src/langinfo/ABDAY_7.c */
#define ABDAY_7 ((nl_item)21)
-/* ./src/langinfo/ABMON_1.c */
#define ABMON_1 ((nl_item)34)
-/* ./src/langinfo/ABMON_10.c */
#define ABMON_10 ((nl_item)43)
-/* ./src/langinfo/ABMON_11.c */
#define ABMON_11 ((nl_item)44)
-/* ./src/langinfo/ABMON_12.c */
#define ABMON_12 ((nl_item)45)
-/* ./src/langinfo/ABMON_2.c */
#define ABMON_2 ((nl_item)35)
-/* ./src/langinfo/ABMON_3.c */
#define ABMON_3 ((nl_item)36)
-/* ./src/langinfo/ABMON_4.c */
#define ABMON_4 ((nl_item)37)
-/* ./src/langinfo/ABMON_5.c */
#define ABMON_5 ((nl_item)38)
-/* ./src/langinfo/ABMON_6.c */
#define ABMON_6 ((nl_item)39)
-/* ./src/langinfo/ABMON_7.c */
#define ABMON_7 ((nl_item)40)
-/* ./src/langinfo/ABMON_8.c */
#define ABMON_8 ((nl_item)41)
-/* ./src/langinfo/ABMON_9.c */
#define ABMON_9 ((nl_item)42)
-/* ./src/langinfo/ALT_DIGITS.c */
#define ALT_DIGITS ((nl_item)50)
-/* ./src/langinfo/AM_STR.c */
#define AM_STR ((nl_item)6)
-/* ./src/langinfo/CODESET.c */
#define CODESET ((nl_item)1)
-/* ./src/langinfo/CRNCYSTR.c */
#define CRNCYSTR ((nl_item)55)
-/* ./src/langinfo/DAY_1.c */
#define DAY_1 ((nl_item)8)
-/* ./src/langinfo/DAY_2.c */
#define DAY_2 ((nl_item)9)
-/* ./src/langinfo/DAY_3.c */
#define DAY_3 ((nl_item)10)
-/* ./src/langinfo/DAY_4.c */
#define DAY_4 ((nl_item)11)
-/* ./src/langinfo/DAY_5.c */
#define DAY_5 ((nl_item)12)
-/* ./src/langinfo/DAY_6.c */
#define DAY_6 ((nl_item)13)
-/* ./src/langinfo/DAY_7.c */
#define DAY_7 ((nl_item)14)
-/* ./src/langinfo/D_FMT.c */
#define D_FMT ((nl_item)3)
-/* ./src/langinfo/D_T_FMT.c */
#define D_T_FMT ((nl_item)2)
-/* ./src/langinfo/ERA.c */
#define ERA ((nl_item)46)
-/* ./src/langinfo/ERA_D_FMT.c */
#define ERA_D_FMT ((nl_item)47)
-/* ./src/langinfo/ERA_D_T_FMT.c */
#define ERA_D_T_FMT ((nl_item)48)
-/* ./src/langinfo/ERA_T_FMT.c */
#define ERA_T_FMT ((nl_item)49)
-/* ./src/langinfo/MON_1.c */
#define MON_1 ((nl_item)22)
-/* ./src/langinfo/MON_10.c */
#define MON_10 ((nl_item)31)
-/* ./src/langinfo/MON_11.c */
#define MON_11 ((nl_item)32)
-/* ./src/langinfo/MON_12.c */
#define MON_12 ((nl_item)33)
-/* ./src/langinfo/MON_2.c */
#define MON_2 ((nl_item)23)
-/* ./src/langinfo/MON_3.c */
#define MON_3 ((nl_item)24)
-/* ./src/langinfo/MON_4.c */
#define MON_4 ((nl_item)25)
-/* ./src/langinfo/MON_5.c */
#define MON_5 ((nl_item)26)
-/* ./src/langinfo/MON_6.c */
#define MON_6 ((nl_item)27)
-/* ./src/langinfo/MON_7.c */
#define MON_7 ((nl_item)28)
-/* ./src/langinfo/MON_8.c */
#define MON_8 ((nl_item)29)
-/* ./src/langinfo/MON_9.c */
#define MON_9 ((nl_item)30)
-/* ./src/langinfo/NOEXPR.c */
#define NOEXPR ((nl_item)54)
-/* ./src/langinfo/PM_STR.c */
#define PM_STR ((nl_item)7)
-/* ./src/langinfo/RADIXCHAR.c */
#define RADIXCHAR ((nl_item)51)
-/* ./src/langinfo/THOUSEP.c */
#define THOUSEP ((nl_item)52)
-/* ./src/langinfo/T_FMT.c */
#define T_FMT ((nl_item)4)
-/* ./src/langinfo/T_FMT_AMPM.c */
#define T_FMT_AMPM ((nl_item)5)
-/* ./src/langinfo/YESEXPR.c */
#define YESEXPR ((nl_item)53)
#endif
+/* TODO: locale_t, nl_item */
+
#if (defined _XOPEN_SOURCE && _XOPEN_SOURCE < 600)
-/* ./src/langinfo/NOSTR.c */
#define NOSTR /* TODO */
-/* ./src/langinfo/YESSTR.c */
#define YESSTR /* TODO */
#endif
#if (defined _POSIX_C_SOURCE && 200809 <= _POSIX_C_SOURCE) || \
(defined _XOPEN_SOURCE)
-/* ./src/langinfo/nl_langinfo.c */
-char * nl_langinfo(nl_item __item);
+char * nl_langinfo(nl_item);
#endif
-
#endif
diff --git a/libgen.h b/libgen.h
index c38acf7..e7d3f58 100644
--- a/libgen.h
+++ b/libgen.h
@@ -40,22 +40,14 @@ SOFTWARE.
# endif
#endif
-#if (defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE) && _XOPEN_SOURCE < 600)
-/* ./src/libgen/__loc1.c */
-extern char *__loc1;
-#endif
-
#if (defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
-/* ./src/libgen/basename.c */
char * basename(char * __path);
-/* ./src/libgen/dirname.c */
char * dirname(char * __path);
#endif
#if (defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE) && _XOPEN_SOURCE < 600)
-/* ./src/libgen/regcmp.c */
+extern char *__loc1;
char *regcmp(const char *__string1, ... /*, (char*)0 */);
-/* ./src/libgen/regex.c */
char *regex(const char *__re, const char *__subject, ...);
#endif
diff --git a/limits.h b/limits.h
index a79cfc3..88d77dd 100644
--- a/limits.h
+++ b/limits.h
@@ -6,7 +6,7 @@ UNG's Not GNU
MIT License
-Copyright (c) 2011-2020 Jakob Kaivo <jkk@ung.org>
+Copyright (c) 2011-2022 Jakob Kaivo <jkk@ung.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -56,21 +56,17 @@ SOFTWARE.
# endif
#endif
-/* ./src/limits/CHAR_BIT.c */
#define CHAR_BIT (8)
-/* ./src/limits/CHAR_MAX.c */
#ifdef __CHAR_IS_UNSIGNED__
#define CHAR_MAX (255)
#else
#define CHAR_MAX (127)
#endif
-/* ./src/limits/CHAR_MIN.c */
#ifdef __CHAR_IS_UNSIGNED__
#define CHAR_MIN (0)
#else
#define CHAR_MIN (-128)
#endif
-/* ./src/limits/INT_MAX.c */
#if defined __LP32__
#define INT_MAX (32767)
#elif defined __ILP32__ || defined __LLP64__ || defined __LP64__
@@ -78,29 +74,19 @@ SOFTWARE.
#elif defined __ILP64__
#define INT_MAX (9223372036854775807)
#endif
-/* ./src/limits/INT_MIN.c */
#define INT_MIN (-INT_MAX -1)
-/* ./src/limits/LONG_MAX.c */
#if defined __LP32__ || defined __ILP32__ || defined __LLP64__
#define LONG_MAX (2147483647L)
#elif defined __ILP64__ || defined __LP64__
#define LONG_MAX (9223372036854775807L)
#endif
-/* ./src/limits/LONG_MIN.c */
#define LONG_MIN (-LONG_MAX - 1L)
-/* ./src/limits/MB_LEN_MAX.c */
#define MB_LEN_MAX (4)
-/* ./src/limits/SCHAR_MAX.c */
#define SCHAR_MAX (127)
-/* ./src/limits/SCHAR_MIN.c */
#define SCHAR_MIN (-128)
-/* ./src/limits/SHRT_MAX.c */
#define SHRT_MAX (32767)
-/* ./src/limits/SHRT_MIN.c */
#define SHRT_MIN (-32768)
-/* ./src/limits/UCHAR_MAX.c */
#define UCHAR_MAX (255)
-/* ./src/limits/UINT_MAX.c */
#if defined __LP32__
#define UINT_MAX (65535U)
#elif defined __ILP32__ || defined __LLP64__ || defined __LP64__
@@ -108,200 +94,110 @@ SOFTWARE.
#elif defined __ILP64__
#define UINT_MAX (18446744073709551616U)
#endif
-/* ./src/limits/ULONG_MAX.c */
#if defined __LP32__ || defined __ILP32__ || defined __LLP64__
#define ULONG_MAX (4294967295UL)
#elif defined __ILP64__ || defined __LP64__
#define ULONG_MAX (18446744073709551615UL)
#endif
-/* ./src/limits/USHRT_MAX.c */
#define USHRT_MAX (65535)
#if (defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
-/* ./src/limits/LLONG_MAX.c */
#define LLONG_MAX (9223372036854775807LL)
-/* ./src/limits/LLONG_MIN.c */
#define LLONG_MIN (-LLONG_MAX - 1LL)
-/* ./src/limits/ULLONG_MAX.c */
#define ULLONG_MAX (18446744073709551615ULL)
#endif
#if (defined _POSIX_SOURCE)
-/* ./src/limits/ARG_MAX.c */
-/* ./src/limits/CHILD_MAX.c */
-/* ./src/limits/LINK_MAX.c */
-/* ./src/limits/MAX_CANON.c */
-/* ./src/limits/MAX_INPUT.c */
-/* ./src/limits/NAME_MAX.c */
-/* ./src/limits/NGROUPS_MAX.c */
#define NGROUPS_MAX _POSIX_NGROUPS_MAX
-/* ./src/limits/OPEN_MAX.c */
-/* ./src/limits/PATH_MAX.c */
-/* ./src/limits/PIPE_BUF.c */
-/* ./src/limits/SSIZE_MAX.c */
#define SSIZE_MAX (2147483647)
-/* ./src/limits/STREAM_MAX.c */
-/* ./src/limits/TZNAME_MAX.c */
-/* ./src/limits/_POSIX_ARG_MAX.c */
#define _POSIX_ARG_MAX (4096)
-/* ./src/limits/_POSIX_CHILD_MAX.c */
#define _POSIX_CHILD_MAX (6)
-/* ./src/limits/_POSIX_LINK_MAX.c */
#define _POSIX_LINK_MAX (8)
-/* ./src/limits/_POSIX_MAX_CANON.c */
#define _POSIX_MAX_CANON (255)
-/* ./src/limits/_POSIX_MAX_INPUT.c */
#define _POSIX_MAX_INPUT (255)
-/* ./src/limits/_POSIX_NAME_MAX.c */
#define _POSIX_NAME_MAX (14)
-/* ./src/limits/_POSIX_NGROUPS_MAX.c */
#define _POSIX_NGROUPS_MAX (0)
-/* ./src/limits/_POSIX_OPEN_MAX.c */
#define _POSIX_OPEN_MAX (16)
-/* ./src/limits/_POSIX_PATH_MAX.c */
#define _POSIX_PATH_MAX (256)
-/* ./src/limits/_POSIX_PIPE_BUF.c */
#define _POSIX_PIPE_BUF (512)
-/* ./src/limits/_POSIX_SSIZE_MAX.c */
#define _POSIX_SSIZE_MAX (32767)
-/* ./src/limits/_POSIX_STREAM_MAX.c */
#define _POSIX_STREAM_MAX (8)
-/* ./src/limits/_POSIX_TZNAME_MAX.c */
#define _POSIX_TZNAME_MAX (3)
#endif
#if (defined _POSIX_C_SOURCE && 199309 <= _POSIX_C_SOURCE)
-/* ./src/limits/AIO_LISTIO_MAX.c */
-/* ./src/limits/AIO_MAX.c */
-/* ./src/limits/AIO_PRIO_DELTA_MAX.c */
-/* ./src/limits/DELAYTIMER_MAX.c */
-/* ./src/limits/MQ_OPEN_MAX.c */
-/* ./src/limits/MQ_PRIO_MAX.c */
-/* ./src/limits/RTSIG_MAX.c */
-/* ./src/limits/SEM_NSEMS_MAX.c */
-/* ./src/limits/SEM_VALUE_MAX.c */
-/* ./src/limits/SIGQUEUE_MAX.c */
-/* ./src/limits/TIMER_MAX.c */
-/* ./src/limits/_POSIX_AIO_LISTIO_MAX.c */
#define _POSIX_AIO_LISTIO_MAX (2)
-/* ./src/limits/_POSIX_AIO_MAX.c */
#define _POSIX_AIO_MAX (1)
-/* ./src/limits/_POSIX_CLOCKRES_MIN.c */
#define _POSIX_CLOCKRES_MIN (20000000)
-/* ./src/limits/_POSIX_DELAYTIMER_MAX.c */
#define _POSIX_DELAYTIMER_MAX (32)
-/* ./src/limits/_POSIX_MQ_OPEN_MAX.c */
#define _POSIX_MQ_OPEN_MAX (8)
-/* ./src/limits/_POSIX_MQ_PRIO_MAX.c */
#define _POSIX_MQ_PRIO_MAX (32)
-/* ./src/limits/_POSIX_RTSIG_MAX.c */
#define _POSIX_RTSIG_MAX (8)
-/* ./src/limits/_POSIX_SEM_NSEMS_MAX.c */
#define _POSIX_SEM_NSEMS_MAX (256)
-/* ./src/limits/_POSIX_SEM_VALUE_MAX.c */
#define _POSIX_SEM_VALUE_MAX (32767)
-/* ./src/limits/_POSIX_SIGQUEUE_MAX.c */
#define _POSIX_SIGQUEUE_MAX (32)
-/* ./src/limits/_POSIX_TIMER_MAX.c */
#define _POSIX_TIMER_MAX (32)
#endif
#if (defined _POSIX_C_SOURCE && 199309 <= _POSIX_C_SOURCE) || \
(defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
-/* ./src/limits/PAGESIZE.c */
#define PAGESIZE /* TODO */
#endif
#if (defined _POSIX_C_SOURCE && 2 <= _POSIX_C_SOURCE)
-/* ./src/limits/BC_BASE_MAX.c */
#define BC_BASE_MAX _POSIX2_BC_BASE_MAX
-/* ./src/limits/BC_DIM_MAX.c */
#define BC_DIM_MAX _POSIX2_BC_DIM_MAX
-/* ./src/limits/BC_SCALE_MAX.c */
#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX
-/* ./src/limits/BC_STRING_MAX.c */
#define BC_STRING_MAX _POSIX2_BC_STRING_MAX
-/* ./src/limits/COLL_WEIGHTS_MAX.c */
#define COLL_WEIGHTS_MAX _POSIX2_COLL_WEIGHTS_MAX
-/* ./src/limits/EXPR_NEST_MAX.c */
#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX
-/* ./src/limits/LINE_MAX.c */
#define LINE_MAX _POSIX2_LINE_MAX
-/* ./src/limits/RE_DUP_MAX.c */
#define RE_DUP_MAX _POSIX2_RE_DUP_MAX
-/* ./src/limits/_POSIX2_BC_BASE_MAX.c */
#define _POSIX2_BC_BASE_MAX (99)
-/* ./src/limits/_POSIX2_BC_DIM_MAX.c */
#define _POSIX2_BC_DIM_MAX (2048)
-/* ./src/limits/_POSIX2_BC_SCALE_MAX.c */
#define _POSIX2_BC_SCALE_MAX (99)
-/* ./src/limits/_POSIX2_BC_STRING_MAX.c */
#define _POSIX2_BC_STRING_MAX (1000)
-/* ./src/limits/_POSIX2_COLL_WEIGHTS_MAX.c */
#define _POSIX2_COLL_WEIGHTS_MAX (2)
-/* ./src/limits/_POSIX2_EXPR_NEST_MAX.c */
#define _POSIX2_EXPR_NEST_MAX (32)
-/* ./src/limits/_POSIX2_LINE_MAX.c */
#define _POSIX2_LINE_MAX (2048)
-/* ./src/limits/_POSIX2_RE_DUP_MAX.c */
#define _POSIX2_RE_DUP_MAX (255)
#endif
#if (defined _POSIX_C_SOURCE && 200112 <= _POSIX_C_SOURCE) || \
(defined _XOPEN_SOURCE)
-/* ./src/limits/CHARCLASS_NAME_MAX.c */
#define CHARCLASS_NAME_MAX _POSIX2_CHARCLASS_NAME_MAX
#endif
#if (defined _POSIX_C_SOURCE && 200809 <= _POSIX_C_SOURCE) || \
(defined _XOPEN_SOURCE)
-/* ./src/limits/LONG_BIT.c */
#define LONG_BIT (32)
-/* ./src/limits/NL_ARGMAX.c */
#define NL_ARGMAX (9)
-/* ./src/limits/NL_LANGMAX.c */
#define NL_LANGMAX (14)
-/* ./src/limits/NL_MSGMAX.c */
#define NL_MSGMAX (32767)
-/* ./src/limits/NL_SETMAX.c */
#define NL_SETMAX (255)
-/* ./src/limits/NL_TEXTMAX.c */
#define NL_TEXTMAX _POSIX2_LINE_MAX
-/* ./src/limits/WORD_BIT.c */
#define WORD_BIT (32)
#endif
#if (defined _POSIX_C_SOURCE && 200809 <= _POSIX_C_SOURCE) || \
(defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
-/* ./src/limits/ATEXIT_MAX.c */
#endif
#if (defined _XOPEN_SOURCE)
-/* ./src/limits/NZERO.c */
#define NZERO (20)
#endif
#if (defined _XOPEN_SOURCE && _XOPEN_SOURCE < 600)
-/* ./src/limits/PASS_MAX.c */
-/* ./src/limits/TMP_MAX.c */
#define TMP_MAX (10000)
#endif
-/* ./src/limits/NL_NMAX.c */
#define NL_NMAX (1)
-/* src/float/DBL_DIG.c */
#define DBL_DIG (15)
-/* src/float/DBL_MAX.c */
#define DBL_MAX (1.797693E+308)
-/* src/float/FLT_DIG.c */
#define FLT_DIG (6)
-/* src/float/FLT_MAX.c */
#define FLT_MAX (3.402823E+38)
#if (defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
-/* ./src/limits/IOV_MAX.c */
-/* ./src/limits/PAGE_SIZE.c */
-/* ./src/limits/_XOPEN_IOV_MAX.c */
#define _XOPEN_IOV_MAX (16)
#endif
diff --git a/locale.h b/locale.h
index bafd130..ec89287 100644
--- a/locale.h
+++ b/locale.h
@@ -56,79 +56,44 @@ SOFTWARE.
# endif
#endif
-/* ./src/locale/LC_ALL.c */
#define LC_ALL (0)
-/* ./src/locale/LC_COLLATE.c */
#define LC_COLLATE (1)
-/* ./src/locale/LC_CTYPE.c */
#define LC_CTYPE (2)
-/* ./src/locale/LC_MONETARY.c */
#define LC_MONETARY (3)
-/* ./src/locale/LC_NUMERIC.c */
#define LC_NUMERIC (4)
-/* ./src/locale/LC_TIME.c */
#define LC_TIME (5)
-/* src/stddef/NULL.c */
#define NULL ((void*)0)
#if (defined _POSIX_C_SOURCE && 2 <= _POSIX_C_SOURCE)
-/* ./src/locale/LC_MESSAGES.c */
#define LC_MESSAGES (6)
#endif
-/* ./src/locale/struct_lconv.c */
-#ifndef __TYPE_struct_lconv_DEFINED__
-#define __TYPE_struct_lconv_DEFINED__
struct lconv {
- /** The character that separates the whole and decimal portions of non-monetary values **/
- char *decimal_point; /* "." */
- /** The character that separates groups of digits in the whole portion of non-monetary values **/
- char *thousands_sep; /* "" */
- /** A string indicating how to group digits of monetary values */
- char *grouping; /* "" */
- /** The three character ISO 4217 currency symbol of the current locale, followed by a fourth separating character **/
- char *int_curr_symbol; /* "" */
- /** The locale currency symbol in the current locale **/
- char *currency_symbol; /* "" */
- /** The character used for decimal points in monetary values **/
- char *mon_decimal_point; /* "" */
- /** The character separating digit groups in monetary values **/
- char *mon_thousands_sep; /* "" */
- /** A string indicating how to group digits in monetary values **/
- char *mon_grouping; /* "" */
- /** A string to indicate positive monetary values **/
- char *positive_sign; /* "" */
- /** A string to indicate negative monetary values **/
- char *negative_sign; /* "" */
- /** The number of digits after the decimal point in international monetary values **/
- char int_frac_digits; /* CHAR_MAX */
- /** The number of digits after the decimal point in monetary values **/
- char frac_digits; /* CHAR_MAX */
- /** Whether field(currency_symbol) precedes (1) or follows (0) positive monetary values **/
- char p_cs_precedes; /* CHAR_MAX */
- /** Whether field(currency_symbol) is (1) or is not (0) separated from positive monetary values by a space **/
- char p_sep_by_space; /* CHAR_MAX */
- /** Whether field(currency_symbol) precedes (1) or follows (0) negative monetary values **/
- char n_cs_precedes; /* CHAR_MAX */
- /** Whether field(currency_symbol) is (1) or is not(0) separated from negative monetary values by a space **/
- char n_sep_by_space; /* CHAR_MAX */
- /** The position of field(positive_sign) for positive monetary values **/
- char p_sign_posn; /* CHAR_MAX */
- /** The position of field(positive_sign) for negative monetary values **/
- char n_sign_posn; /* CHAR_MAX */
+ char *decimal_point;
+ char *thousands_sep;
+ char *grouping;
+ char *int_curr_symbol;
+ char *currency_symbol;
+ char *mon_decimal_point;
+ char *mon_thousands_sep;
+ char *mon_grouping;
+ char *positive_sign;
+ char *negative_sign;
+ char int_frac_digits;
+ char frac_digits;
+ char p_cs_precedes;
+ char p_sep_by_space;
+ char n_cs_precedes;
+ char n_sep_by_space;
+ char p_sign_posn;
+ char n_sign_posn;
#if __STDC_VERSION__ >= 199901L
- /** Whether field(currency_symbol) precedes (1) or follows (0) positive international monetary values **/
- char int_p_cs_precedes; /* CHAR_MAX */
- /** Whether field(currency_symbol) is (1) or is not (0) separated from positive international monetary values by a space **/
- char int_p_sep_by_space; /* CHAR_MAX */
- /** Whether field(currency_symbol) precedes (1) or follows (0) negative international monetary values **/
- char int_n_cs_precedes; /* CHAR_MAX */
- /** Whether field(currency_symbol) is (1) or is not(0) separated from negative international monetary values by a space **/
- char int_n_sep_by_space; /* CHAR_MAX */
- /** The position of field(positive_sign) for positive international monetary values **/
- char int_p_sign_posn; /* CHAR_MAX */
- /** The position of field(positive_sign) for negative international monetary values **/
- char int_n_sign_posn; /* CHAR_MAX */
+ char int_p_cs_precedes;
+ char int_p_sep_by_space;
+ char int_n_cs_precedes;
+ char int_n_sep_by_space;
+ char int_p_sign_posn;
+ char int_n_sign_posn;
#else
char __int_p_cs_precedes;
char __int_p_sep_by_space;
@@ -138,12 +103,9 @@ struct lconv {
char __int_n_sign_posn;
#endif
};
-#endif
-/* ./src/locale/localeconv.c */
struct lconv * localeconv(void);
-/* ./src/locale/setlocale.c */
char * setlocale(int __category, const char *__locale);
diff --git a/signal.h b/signal.h
index e1ffe81..134c631 100644
--- a/signal.h
+++ b/signal.h
@@ -269,7 +269,7 @@ typedef volatile int sig_atomic_t;
/* ./src/signal/sigset_t.c */
#ifndef __TYPE_sigset_t_DEFINED__
#define __TYPE_sigset_t_DEFINED__
-typedef unsigned int sigset_t;
+typedef struct { __bits[32] } sigset_t;
#endif
#endif
diff --git a/term.h b/term.h
index 7edfee7..fa01ffd 100644
--- a/term.h
+++ b/term.h
@@ -986,7 +986,7 @@ typedef int bool;
#if (defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
/* ./src/term/TERMINAL.c */
-extern typdef struct __TERMINAL TERMINAL;
+typedef struct __TERMINAL TERMINAL;
/* ./src/term/cur_term.c */
extern TERMINAL * cur_term;
#endif
@@ -1011,7 +1011,7 @@ char * tigetstr(const char * __capname);
/* ./src/term/tiparm.c */
char * tiparm(const char * __cap, ...);
/* ./src/term/tparm.c */
-char * tiparm(const char * __cap, long __p1, long __p2, long __p3, long __p4, long __p5, long __p6, long __p7, long __p8, long __p9);
+char * tparm(const char * __cap, long __p1, long __p2, long __p3, long __p4, long __p5, long __p6, long __p7, long __p8, long __p9);
/* ./src/term/tputs.c */
int tputs(const char * __str, int __affcnt, int (*__putfunc)(int));
#endif