summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-13 13:48:50 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-13 13:48:50 -0400
commit489bef2ace3c3c617f5bf78ded45a5b81fe2fd46 (patch)
treef7df0cd2678ebe868356e9a00952555a28a75214
parent3e282018ffb5806cafafeb5d0d6f8d67c9bb86e8 (diff)
add src/ to -I and exorcise ../ from #include
-rw-r--r--.deps.mk2
-rw-r--r--mk.sh2
-rw-r--r--src/ctype/_ctype.h4
-rw-r--r--src/ctype/isalnum.c2
-rw-r--r--src/ctype/isalpha.c2
-rw-r--r--src/ctype/iscntrl.c2
-rw-r--r--src/ctype/isdigit.c2
-rw-r--r--src/ctype/isgraph.c2
-rw-r--r--src/ctype/islower.c2
-rw-r--r--src/ctype/isprint.c2
-rw-r--r--src/ctype/ispunct.c2
-rw-r--r--src/ctype/isspace.c2
-rw-r--r--src/ctype/isupper.c2
-rw-r--r--src/ctype/isxdigit.c2
-rw-r--r--src/dirent/closedir.c2
-rw-r--r--src/dirent/readdir.c2
-rw-r--r--src/fcntl/fcntl.c2
-rw-r--r--src/fcntl/open.c2
-rw-r--r--src/fnmatch/fnmatch.c5
-rw-r--r--src/glob/glob.c2
-rw-r--r--src/math/atan2.c6
-rw-r--r--src/signal/kill.c2
-rw-r--r--src/signal/raise.c2
-rw-r--r--src/stdio/feof.c2
-rw-r--r--src/stdio/ferror.c2
-rw-r--r--src/stdio/fileno.c2
-rw-r--r--src/stdio/getc_unlocked.c2
-rw-r--r--src/stdio/popen.c2
-rw-r--r--src/stdio/putc_unlocked.c2
-rw-r--r--src/stdio/rename.c2
-rw-r--r--src/stdlib/_Exit.c2
-rw-r--r--src/stdlib/exit.c2
-rw-r--r--src/string/memchr.c2
-rw-r--r--src/string/memcmp.c2
-rw-r--r--src/string/memcpy.c2
-rw-r--r--src/string/memmove.c2
-rw-r--r--src/string/memset.c2
-rw-r--r--src/string/strcat.c2
-rw-r--r--src/string/strchr.c2
-rw-r--r--src/string/strcmp.c2
-rw-r--r--src/string/strcoll.c2
-rw-r--r--src/string/strcpy.c2
-rw-r--r--src/string/strcspn.c2
-rw-r--r--src/string/strlen.c2
-rw-r--r--src/string/strncat.c2
-rw-r--r--src/string/strncmp.c2
-rw-r--r--src/string/strncpy.c2
-rw-r--r--src/string/strpbrk.c2
-rw-r--r--src/string/strrchr.c2
-rw-r--r--src/string/strspn.c2
-rw-r--r--src/string/strstr.c2
-rw-r--r--src/string/strtok.c2
-rw-r--r--src/string/strxfrm.c2
-rw-r--r--src/sys/mman/mmap.c2
-rw-r--r--src/sys/stat/chmod.c2
-rw-r--r--src/sys/stat/fstat.c2
-rw-r--r--src/sys/stat/mkdir.c2
-rw-r--r--src/sys/stat/mkfifo.c2
-rw-r--r--src/sys/stat/stat.c4
-rw-r--r--src/sys/stat/umask.c2
-rw-r--r--src/sys/utsname/uname.c8
-rw-r--r--src/termios/cfgetispeed.c2
-rw-r--r--src/termios/cfgetospeed.c2
-rw-r--r--src/termios/cfsetispeed.c2
-rw-r--r--src/termios/cfsetospeed.c2
-rw-r--r--src/time/gmtime.c2
-rw-r--r--src/time/localtime.c2
-rw-r--r--src/time/nanosleep.c2
-rw-r--r--src/time/strftime.c12
-rw-r--r--src/time/time.c2
-rw-r--r--src/unistd/_exit.c2
-rw-r--r--src/unistd/alarm.c2
-rw-r--r--src/unistd/chdir.c2
-rw-r--r--src/unistd/chown.c2
-rw-r--r--src/unistd/close.c2
-rw-r--r--src/unistd/confstr.c2
-rw-r--r--src/unistd/execve.c2
-rw-r--r--src/unistd/fork.c2
-rw-r--r--src/unistd/getcwd.c4
-rw-r--r--src/unistd/getegid.c2
-rw-r--r--src/unistd/geteuid.c2
-rw-r--r--src/unistd/getgid.c2
-rw-r--r--src/unistd/getgroups.c4
-rw-r--r--src/unistd/getpgrp.c2
-rw-r--r--src/unistd/getpid.c2
-rw-r--r--src/unistd/getppid.c2
-rw-r--r--src/unistd/getuid.c2
-rw-r--r--src/unistd/link.c2
-rw-r--r--src/unistd/lseek.c2
-rw-r--r--src/unistd/pause.c2
-rw-r--r--src/unistd/pipe.c4
-rw-r--r--src/unistd/read.c2
-rw-r--r--src/unistd/rmdir.c2
-rw-r--r--src/unistd/setgid.c2
-rw-r--r--src/unistd/setpgid.c2
-rw-r--r--src/unistd/setsid.c2
-rw-r--r--src/unistd/setuid.c2
-rw-r--r--src/unistd/unlink.c4
-rw-r--r--src/unistd/write.c4
-rw-r--r--src/wchar/fgetws.c2
-rw-r--r--src/wchar/fwide.c4
-rw-r--r--src/wchar/wcscmp.c2
-rw-r--r--src/wchar/wcscspn.c2
-rw-r--r--src/wchar/wcsncmp.c2
-rw-r--r--src/wchar/wmemchr.c2
-rw-r--r--src/wchar/wmemmove.c2
-rw-r--r--src/wctype/iswalnum.c2
-rw-r--r--src/wctype/iswalpha.c2
-rw-r--r--src/wctype/iswblank.c2
-rw-r--r--src/wctype/iswcntrl.c2
-rw-r--r--src/wctype/iswctype.c2
-rw-r--r--src/wctype/iswdigit.c2
-rw-r--r--src/wctype/iswgraph.c2
-rw-r--r--src/wctype/iswlower.c2
-rw-r--r--src/wctype/iswprint.c2
-rw-r--r--src/wctype/iswpunct.c2
-rw-r--r--src/wctype/iswspace.c2
-rw-r--r--src/wctype/iswupper.c2
-rw-r--r--src/wctype/iswxdigit.c2
-rw-r--r--src/wctype/towlower.c2
-rw-r--r--src/wctype/towupper.c2
-rw-r--r--src/wctype/wctrans.c2
-rw-r--r--src/wctype/wctype.c2
123 files changed, 144 insertions, 141 deletions
diff --git a/.deps.mk b/.deps.mk
index d3b3c33a..87a92bc8 100644
--- a/.deps.mk
+++ b/.deps.mk
@@ -4,7 +4,7 @@ default: all
include .config.mk
-BASE_CFLAGS=-I$(INCDIR) -fno-builtin -nostdinc
+BASE_CFLAGS=-I$(INCDIR) -Isrc -fno-builtin -nostdinc
libc.a($(OBJDIR)/_sys.$(ARCHITECTURE)-$(WORDSIZE).o): $(OBJDIR)/_sys.$(ARCHITECTURE)-$(WORDSIZE).o
$(OBJDIR)/_sys.$(ARCHITECTURE)-$(WORDSIZE).o: ./src/_sys.$(ARCHITECTURE)-$(WORDSIZE).s
diff --git a/mk.sh b/mk.sh
index 7a37861d..bbf8c8c1 100644
--- a/mk.sh
+++ b/mk.sh
@@ -192,7 +192,7 @@ make_deps_mk() {
printf '.POSIX:\n.SILENT:\ndefault: all\n\n' > "${TOPDIR}/.deps.mk"
printf 'include .config.mk\n\n' >> "${TOPDIR}/.deps.mk"
- printf 'BASE_CFLAGS=-I$(INCDIR) -fno-builtin -nostdinc\n' >> "${TOPDIR}/.deps.mk"
+ printf 'BASE_CFLAGS=-I$(INCDIR) -Isrc -fno-builtin -nostdinc\n' >> "${TOPDIR}/.deps.mk"
printf '\n' >> "${TOPDIR}/.deps.mk"
printf '.POSIX:\nlibc_C_0_OBJS=' > "${DEPS}/libc.C_0"
diff --git a/src/ctype/_ctype.h b/src/ctype/_ctype.h
index be3e8401..f0ff0e5a 100644
--- a/src/ctype/_ctype.h
+++ b/src/ctype/_ctype.h
@@ -1,8 +1,8 @@
#ifndef ___CTYPE_H__
#define ___CTYPE_H__
-#include "../_assert.h"
-#include "../locale/_locale.h"
+#include "_assert.h"
+#include "locale/_locale.h"
typedef enum {
CT_ALPHA = (1 << 0),
diff --git a/src/ctype/isalnum.c b/src/ctype/isalnum.c
index 67ade0a2..d60efaeb 100644
--- a/src/ctype/isalnum.c
+++ b/src/ctype/isalnum.c
@@ -1,6 +1,6 @@
#include <ctype.h>
#include "limits.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a character is alphanumeric **/
diff --git a/src/ctype/isalpha.c b/src/ctype/isalpha.c
index b87817c8..876662ad 100644
--- a/src/ctype/isalpha.c
+++ b/src/ctype/isalpha.c
@@ -1,6 +1,6 @@
#include <ctype.h>
#include "limits.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a character is alphabetic **/
diff --git a/src/ctype/iscntrl.c b/src/ctype/iscntrl.c
index d90803e5..06046732 100644
--- a/src/ctype/iscntrl.c
+++ b/src/ctype/iscntrl.c
@@ -1,6 +1,6 @@
#include <ctype.h>
#include "limits.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "_ctype.h"
/** test whether a character is a control character */
diff --git a/src/ctype/isdigit.c b/src/ctype/isdigit.c
index 0f91a7d3..beb689a1 100644
--- a/src/ctype/isdigit.c
+++ b/src/ctype/isdigit.c
@@ -1,6 +1,6 @@
#include <ctype.h>
#include "limits.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a character is a digit **/
diff --git a/src/ctype/isgraph.c b/src/ctype/isgraph.c
index 72be27b3..4ff0c92e 100644
--- a/src/ctype/isgraph.c
+++ b/src/ctype/isgraph.c
@@ -1,6 +1,6 @@
#include <ctype.h>
#include "limits.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "_ctype.h"
/** test whether a character is graphic **/
diff --git a/src/ctype/islower.c b/src/ctype/islower.c
index 6dfedcc6..fe65b034 100644
--- a/src/ctype/islower.c
+++ b/src/ctype/islower.c
@@ -1,6 +1,6 @@
#include <ctype.h>
#include "limits.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "_ctype.h"
/** test whether a character is a lowercase letter **/
diff --git a/src/ctype/isprint.c b/src/ctype/isprint.c
index e4b5a531..62d24126 100644
--- a/src/ctype/isprint.c
+++ b/src/ctype/isprint.c
@@ -1,6 +1,6 @@
#include <ctype.h>
#include "limits.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "_ctype.h"
/** test whether a character is printable **/
diff --git a/src/ctype/ispunct.c b/src/ctype/ispunct.c
index e73461e1..9a7656c5 100644
--- a/src/ctype/ispunct.c
+++ b/src/ctype/ispunct.c
@@ -1,6 +1,6 @@
#include <ctype.h>
#include "limits.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "_ctype.h"
/** test whether a character is punctuation **/
diff --git a/src/ctype/isspace.c b/src/ctype/isspace.c
index d4eeb134..b2bcb553 100644
--- a/src/ctype/isspace.c
+++ b/src/ctype/isspace.c
@@ -1,6 +1,6 @@
#include <ctype.h>
#include "limits.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "_ctype.h"
/** test whether a character is white-space **/
diff --git a/src/ctype/isupper.c b/src/ctype/isupper.c
index e0eb545e..1d06124f 100644
--- a/src/ctype/isupper.c
+++ b/src/ctype/isupper.c
@@ -1,6 +1,6 @@
#include <ctype.h>
#include "limits.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "_ctype.h"
/** test whether a character is an uppercase letter **/
diff --git a/src/ctype/isxdigit.c b/src/ctype/isxdigit.c
index 9d73d662..9d6d7c6c 100644
--- a/src/ctype/isxdigit.c
+++ b/src/ctype/isxdigit.c
@@ -1,6 +1,6 @@
#include <ctype.h>
#include "limits.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "_ctype.h"
/** test whether a character is a hexadecimal digit **/
diff --git a/src/dirent/closedir.c b/src/dirent/closedir.c
index 24cf31dd..558fe228 100644
--- a/src/dirent/closedir.c
+++ b/src/dirent/closedir.c
@@ -2,7 +2,7 @@
#include "sys/types.h"
#include "unistd.h"
#include "stdlib.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "_dirent.h"
int closedir(DIR *dirp)
diff --git a/src/dirent/readdir.c b/src/dirent/readdir.c
index f8198169..fce8811b 100644
--- a/src/dirent/readdir.c
+++ b/src/dirent/readdir.c
@@ -5,7 +5,7 @@
#include "stddef.h"
#include "_dirent.h"
#include "unistd.h"
-#include "../_syscall.h"
+#include "_syscall.h"
#ifndef NAME_MAX
#define NAME_MAX _POSIX_NAME_MAX
diff --git a/src/fcntl/fcntl.c b/src/fcntl/fcntl.c
index a588ef54..6f888bf1 100644
--- a/src/fcntl/fcntl.c
+++ b/src/fcntl/fcntl.c
@@ -2,7 +2,7 @@
#include <fcntl.h>
#include "errno.h"
#include "stdarg.h"
-#include "../_syscall.h"
+#include "_syscall.h"
int fcntl(int fildes, int cmd, ...)
{
diff --git a/src/fcntl/open.c b/src/fcntl/open.c
index 15cee2e4..14c12e1b 100644
--- a/src/fcntl/open.c
+++ b/src/fcntl/open.c
@@ -3,7 +3,7 @@
#include "sys/stat.h" /* OH */
#include "errno.h"
#include "stdarg.h"
-#include "../_syscall.h"
+#include "_syscall.h"
int open(const char *path, int oflag, ...)
{
diff --git a/src/fnmatch/fnmatch.c b/src/fnmatch/fnmatch.c
index 97c17071..09559c96 100644
--- a/src/fnmatch/fnmatch.c
+++ b/src/fnmatch/fnmatch.c
@@ -1,8 +1,11 @@
#include <fnmatch.h>
-#include "../_assert.h"
+#include "_assert.h"
int fnmatch(const char * pattern, const char * string, int flags)
{
+ (void)pattern;
+ (void)string;
+ (void)flags;
ASSERT_NONNULL(pattern);
ASSERT_NONNULL(string);
/* __ASSERT_FLAGS(flags, FNM_PATHNAME | FNM_NOESCAPE | FNM_PERIOD); */
diff --git a/src/glob/glob.c b/src/glob/glob.c
index 153f8046..ef94d919 100644
--- a/src/glob/glob.c
+++ b/src/glob/glob.c
@@ -6,7 +6,7 @@
#include "fnmatch.h"
#include "errno.h"
#include "unistd.h"
-#include "../_assert.h"
+#include "_assert.h"
int glob(const char * restrict pattern, int flags, int (*errfunc) (const char * epath, int eerrno), glob_t * restrict pglob)
{
diff --git a/src/math/atan2.c b/src/math/atan2.c
index f54c4cf7..38ba944e 100644
--- a/src/math/atan2.c
+++ b/src/math/atan2.c
@@ -2,11 +2,15 @@
#include <math.h>
#include "_tgmath.h"
#include "errno.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "M_PI.c"
#include "M_PI_2.c"
+#ifndef copysign
+#define copysign(_x, _y) _x
+#endif
+
/** arc tangent **/
TYPE TGFN(atan2)(TYPE y, TYPE x)
{
diff --git a/src/signal/kill.c b/src/signal/kill.c
index ccbb6123..856dfc36 100644
--- a/src/signal/kill.c
+++ b/src/signal/kill.c
@@ -1,6 +1,6 @@
#include "sys/types.h"
#include <signal.h>
-#include "../_syscall.h"
+#include "_syscall.h"
int kill(pid_t pid, int sig)
{
diff --git a/src/signal/raise.c b/src/signal/raise.c
index f61ddbdc..04bed498 100644
--- a/src/signal/raise.c
+++ b/src/signal/raise.c
@@ -2,7 +2,7 @@
#include "sys/types.h"
#include "unistd.h"
#else
-#include "../_syscall.h"
+#include "_syscall.h"
#define kill(pid, sig) __syscall(__syscall_lookup(kill), pid, sig)
#define getpid() __syscall(__syscall_lookup(getpid))
#endif
diff --git a/src/stdio/feof.c b/src/stdio/feof.c
index 8b2455bd..80f4ddca 100644
--- a/src/stdio/feof.c
+++ b/src/stdio/feof.c
@@ -1,6 +1,6 @@
#include <stdio.h>
#include "_stdio.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test for end-of-file **/
int feof(FILE *stream)
diff --git a/src/stdio/ferror.c b/src/stdio/ferror.c
index d4e014d4..66f76a67 100644
--- a/src/stdio/ferror.c
+++ b/src/stdio/ferror.c
@@ -1,5 +1,5 @@
#include <stdio.h>
-#include "../_assert.h"
+#include "_assert.h"
#include "_stdio.h"
/** tests the file stream error indicator **/
diff --git a/src/stdio/fileno.c b/src/stdio/fileno.c
index 969f572c..19b89fc8 100644
--- a/src/stdio/fileno.c
+++ b/src/stdio/fileno.c
@@ -1,6 +1,6 @@
#include <stdio.h>
#include "_stdio.h"
-#include "../_assert.h"
+#include "_assert.h"
int fileno(FILE * stream)
{
diff --git a/src/stdio/getc_unlocked.c b/src/stdio/getc_unlocked.c
index c5186bcc..e78a5853 100644
--- a/src/stdio/getc_unlocked.c
+++ b/src/stdio/getc_unlocked.c
@@ -5,7 +5,7 @@
#include "sys/types.h"
#include "unistd.h"
#else
-#include "../_syscall.h"
+#include "_syscall.h"
#define read(_fd, _buf, _size) __syscall(__syscall_lookup(read), _fd, _buf, _size)
#endif
diff --git a/src/stdio/popen.c b/src/stdio/popen.c
index 0e0fc663..0e3ee7dd 100644
--- a/src/stdio/popen.c
+++ b/src/stdio/popen.c
@@ -5,7 +5,7 @@
#include "sys/types.h"
#include "unistd.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "_stdio.h"
#ifdef __STDC_VERSION__
diff --git a/src/stdio/putc_unlocked.c b/src/stdio/putc_unlocked.c
index 99af7b39..8741b3c1 100644
--- a/src/stdio/putc_unlocked.c
+++ b/src/stdio/putc_unlocked.c
@@ -5,7 +5,7 @@
#include "sys/types.h"
#include "unistd.h"
#else
-#include "../_syscall.h"
+#include "_syscall.h"
#define write(_fd, _buf, _size) __syscall(__syscall_lookup(write), _fd, _buf, _size)
#endif
diff --git a/src/stdio/rename.c b/src/stdio/rename.c
index d213707b..589b3690 100644
--- a/src/stdio/rename.c
+++ b/src/stdio/rename.c
@@ -1,6 +1,6 @@
#include <stdio.h>
#include "errno.h"
-#include "../_syscall.h"
+#include "_syscall.h"
/** rename a file **/
int rename(const char *old, const char *new)
diff --git a/src/stdlib/_Exit.c b/src/stdlib/_Exit.c
index b4f6f1a8..3f7e48a6 100644
--- a/src/stdlib/_Exit.c
+++ b/src/stdlib/_Exit.c
@@ -1,5 +1,5 @@
#include <stdlib.h>
-#include "../_syscall.h"
+#include "_syscall.h"
/** cause normal program termination without handlers **/
_Noreturn void _Exit(int status)
diff --git a/src/stdlib/exit.c b/src/stdlib/exit.c
index 64b627eb..2953f3ec 100644
--- a/src/stdlib/exit.c
+++ b/src/stdlib/exit.c
@@ -1,7 +1,7 @@
#include <stdlib.h>
#include "limits.h"
#include "stddef.h"
-#include "../_syscall.h"
+#include "_syscall.h"
#include "_stdlib.h"
/** cause normal program termination **/
diff --git a/src/string/memchr.c b/src/string/memchr.c
index 9b795e9b..02fdfcdc 100644
--- a/src/string/memchr.c
+++ b/src/string/memchr.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** search memory **/
void * memchr(const void *s, int c, size_t n)
diff --git a/src/string/memcmp.c b/src/string/memcmp.c
index eaf4cf40..20cb6df5 100644
--- a/src/string/memcmp.c
+++ b/src/string/memcmp.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** compare memory regions **/
int memcmp(const void *s1, const void *s2, size_t n)
diff --git a/src/string/memcpy.c b/src/string/memcpy.c
index 43ac292e..835411f3 100644
--- a/src/string/memcpy.c
+++ b/src/string/memcpy.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** copy memory **/
void * memcpy(void * restrict s1, const void * restrict s2, size_t n)
diff --git a/src/string/memmove.c b/src/string/memmove.c
index ec8e785d..5d72c862 100644
--- a/src/string/memmove.c
+++ b/src/string/memmove.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** move memory **/
void * memmove(void *s1, const void *s2, size_t n)
diff --git a/src/string/memset.c b/src/string/memset.c
index 2fdb8551..9addc413 100644
--- a/src/string/memset.c
+++ b/src/string/memset.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** fill memory **/
void * memset(void *s, int c, size_t n)
diff --git a/src/string/strcat.c b/src/string/strcat.c
index 75364ad3..51737787 100644
--- a/src/string/strcat.c
+++ b/src/string/strcat.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** concatenate strings **/
char * strcat(char * restrict s1, const char * restrict s2)
diff --git a/src/string/strchr.c b/src/string/strchr.c
index 2ee80c9b..f8a65bab 100644
--- a/src/string/strchr.c
+++ b/src/string/strchr.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** string search **/
char * strchr(const char *s, int c)
diff --git a/src/string/strcmp.c b/src/string/strcmp.c
index f8863fba..8925d1be 100644
--- a/src/string/strcmp.c
+++ b/src/string/strcmp.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** compare strings **/
int strcmp(const char *s1, const char *s2)
diff --git a/src/string/strcoll.c b/src/string/strcoll.c
index afdf868e..a6a44e8d 100644
--- a/src/string/strcoll.c
+++ b/src/string/strcoll.c
@@ -1,6 +1,6 @@
#include <string.h>
#include "stdlib.h"
-#include "../_assert.h"
+#include "_assert.h"
/** collate strings **/
int strcoll(const char *s1, const char *s2)
diff --git a/src/string/strcpy.c b/src/string/strcpy.c
index 915701d9..ea8a9a1f 100644
--- a/src/string/strcpy.c
+++ b/src/string/strcpy.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** copy string **/
char * strcpy(char * restrict s1, const char * restrict s2)
diff --git a/src/string/strcspn.c b/src/string/strcspn.c
index 5ae42e04..49f7d92b 100644
--- a/src/string/strcspn.c
+++ b/src/string/strcspn.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** count non-matching characters **/
size_t strcspn(const char *s1, const char *s2)
diff --git a/src/string/strlen.c b/src/string/strlen.c
index 3405b252..53e62e98 100644
--- a/src/string/strlen.c
+++ b/src/string/strlen.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** find string length **/
size_t strlen(const char *s)
diff --git a/src/string/strncat.c b/src/string/strncat.c
index 17ed6b40..e2a64ad5 100644
--- a/src/string/strncat.c
+++ b/src/string/strncat.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** concatenate bounded string **/
char * strncat(char * restrict s1, const char * restrict s2, size_t n)
diff --git a/src/string/strncmp.c b/src/string/strncmp.c
index f5647d33..340ac6b8 100644
--- a/src/string/strncmp.c
+++ b/src/string/strncmp.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** compare bound strings **/
int strncmp(const char *s1, const char *s2, size_t n)
diff --git a/src/string/strncpy.c b/src/string/strncpy.c
index 290d36c3..0ecd19fc 100644
--- a/src/string/strncpy.c
+++ b/src/string/strncpy.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** copy bounded string **/
char * strncpy(char * restrict s1, const char * restrict s2, size_t n)
diff --git a/src/string/strpbrk.c b/src/string/strpbrk.c
index e5dfc52d..096917ff 100644
--- a/src/string/strpbrk.c
+++ b/src/string/strpbrk.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** count matching characters **/
char * strpbrk(const char *s1, const char *s2)
diff --git a/src/string/strrchr.c b/src/string/strrchr.c
index fe40c5db..799fb3dd 100644
--- a/src/string/strrchr.c
+++ b/src/string/strrchr.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** search string from end **/
char * strrchr(const char *s, int c)
diff --git a/src/string/strspn.c b/src/string/strspn.c
index 677d43c2..450b541f 100644
--- a/src/string/strspn.c
+++ b/src/string/strspn.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** count matching characters **/
size_t strspn(const char *s1, const char *s2)
diff --git a/src/string/strstr.c b/src/string/strstr.c
index 7aaad5ad..bdcabc9e 100644
--- a/src/string/strstr.c
+++ b/src/string/strstr.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** search for substring **/
char * strstr(const char *s1, const char *s2)
diff --git a/src/string/strtok.c b/src/string/strtok.c
index b4d77305..141d3982 100644
--- a/src/string/strtok.c
+++ b/src/string/strtok.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** split string into tokens **/
char * strtok(char * restrict s1, const char * restrict s2)
diff --git a/src/string/strxfrm.c b/src/string/strxfrm.c
index 4c640a26..eb4a6d15 100644
--- a/src/string/strxfrm.c
+++ b/src/string/strxfrm.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include "../_assert.h"
+#include "_assert.h"
/** transform string **/
size_t strxfrm(char * restrict s1, const char * restrict s2, size_t n)
diff --git a/src/sys/mman/mmap.c b/src/sys/mman/mmap.c
index e76e2439..e0e2998a 100644
--- a/src/sys/mman/mmap.c
+++ b/src/sys/mman/mmap.c
@@ -1,6 +1,6 @@
#include "sys/types.h"
#include <sys/mman.h>
-#include "../../_syscall.h"
+#include "_syscall.h"
#ifndef MAP_FAILED
#include "MAP_FAILED.c"
diff --git a/src/sys/stat/chmod.c b/src/sys/stat/chmod.c
index 975cf01a..16aa6f5a 100644
--- a/src/sys/stat/chmod.c
+++ b/src/sys/stat/chmod.c
@@ -1,6 +1,6 @@
#include "sys/types.h"
#include <sys/stat.h>
-#include "../../_syscall.h"
+#include "_syscall.h"
int chmod(const char *path, mode_t mode)
{
diff --git a/src/sys/stat/fstat.c b/src/sys/stat/fstat.c
index c0276eda..33634dd0 100644
--- a/src/sys/stat/fstat.c
+++ b/src/sys/stat/fstat.c
@@ -1,6 +1,6 @@
#include "sys/types.h"
#include <sys/stat.h>
-#include "../../_syscall.h"
+#include "_syscall.h"
int fstat(int fildes, struct stat *buf)
{
diff --git a/src/sys/stat/mkdir.c b/src/sys/stat/mkdir.c
index 479faeca..ac46d907 100644
--- a/src/sys/stat/mkdir.c
+++ b/src/sys/stat/mkdir.c
@@ -1,6 +1,6 @@
#include "sys/types.h"
#include <sys/stat.h>
-#include "../../_syscall.h"
+#include "_syscall.h"
int mkdir(const char *path, mode_t mode)
{
diff --git a/src/sys/stat/mkfifo.c b/src/sys/stat/mkfifo.c
index e34079e7..13469d6f 100644
--- a/src/sys/stat/mkfifo.c
+++ b/src/sys/stat/mkfifo.c
@@ -1,6 +1,6 @@
#include "sys/types.h"
#include <sys/stat.h>
-#include "../../_syscall.h"
+#include "_syscall.h"
#ifndef S_IFIFO
#include "S_IFIFO.c"
diff --git a/src/sys/stat/stat.c b/src/sys/stat/stat.c
index 233a0587..a4442bbe 100644
--- a/src/sys/stat/stat.c
+++ b/src/sys/stat/stat.c
@@ -1,8 +1,8 @@
#include "sys/types.h"
#include <sys/stat.h>
#include "stdlib.h"
-#include "../../_assert.h"
-#include "../../_syscall.h"
+#include "_assert.h"
+#include "_syscall.h"
int stat(const char * restrict path, struct stat * restrict buf)
{
diff --git a/src/sys/stat/umask.c b/src/sys/stat/umask.c
index 601f67f2..e3f14b73 100644
--- a/src/sys/stat/umask.c
+++ b/src/sys/stat/umask.c
@@ -1,6 +1,6 @@
#include "sys/types.h"
#include <sys/stat.h>
-#include "../../_syscall.h"
+#include "_syscall.h"
mode_t umask(mode_t cmask)
{
diff --git a/src/sys/utsname/uname.c b/src/sys/utsname/uname.c
index e5a4b83e..a6972637 100644
--- a/src/sys/utsname/uname.c
+++ b/src/sys/utsname/uname.c
@@ -1,6 +1,6 @@
#include <sys/utsname.h>
#include "string.h"
-#include "../../_assert.h"
+#include "_assert.h"
# define __PLATFORM__ "x86"
@@ -8,12 +8,14 @@ int uname(struct utsname *name)
{
ASSERT_NONNULL(name);
- strcpy(name->sysname, "UNG");
+ strcpy(name->sysname, "UNGOL");
+
#if 0
gethostname(name->nodename, sizeof(name->nodename));
#else
- strcpy(name->sysname, "localhost");
+ strcpy(name->nodename, "localhost");
#endif
+
strcpy(name->release, "YYYY-MM-DD");
strcpy(name->version, "MM.mm.pp");
strcpy(name->machine, __PLATFORM__);
diff --git a/src/termios/cfgetispeed.c b/src/termios/cfgetispeed.c
index 6ba31775..dba550ef 100644
--- a/src/termios/cfgetispeed.c
+++ b/src/termios/cfgetispeed.c
@@ -1,5 +1,5 @@
#include <termios.h>
-#include "../_assert.h"
+#include "_assert.h"
speed_t cfgetispeed(const struct termios *termios_p)
{
diff --git a/src/termios/cfgetospeed.c b/src/termios/cfgetospeed.c
index 7ccab1f2..f4a9e3e3 100644
--- a/src/termios/cfgetospeed.c
+++ b/src/termios/cfgetospeed.c
@@ -1,5 +1,5 @@
#include <termios.h>
-#include "../_assert.h"
+#include "_assert.h"
speed_t cfgetospeed(const struct termios *termios_p)
{
diff --git a/src/termios/cfsetispeed.c b/src/termios/cfsetispeed.c
index 3fbf0836..a1e3ec5b 100644
--- a/src/termios/cfsetispeed.c
+++ b/src/termios/cfsetispeed.c
@@ -1,6 +1,6 @@
#include <termios.h>
#include "errno.h"
-#include "../_assert.h"
+#include "_assert.h"
int cfsetispeed(struct termios *termios_p, speed_t speed)
{
diff --git a/src/termios/cfsetospeed.c b/src/termios/cfsetospeed.c
index 62558b08..a2b36d6b 100644
--- a/src/termios/cfsetospeed.c
+++ b/src/termios/cfsetospeed.c
@@ -1,6 +1,6 @@
#include <termios.h>
#include "errno.h"
-#include "../_assert.h"
+#include "_assert.h"
int cfsetospeed(struct termios *termios_p, speed_t speed)
{
diff --git a/src/time/gmtime.c b/src/time/gmtime.c
index 4953d2f0..9850e839 100644
--- a/src/time/gmtime.c
+++ b/src/time/gmtime.c
@@ -1,5 +1,5 @@
#include <time.h>
-#include "../_assert.h"
+#include "_assert.h"
# define SEC_PER_MIN (60L)
# define MIN_PER_HR (60L)
diff --git a/src/time/localtime.c b/src/time/localtime.c
index 80ac9bfa..72040d00 100644
--- a/src/time/localtime.c
+++ b/src/time/localtime.c
@@ -1,5 +1,5 @@
#include <time.h>
-#include "../_assert.h"
+#include "_assert.h"
/** convert arithmetic time to broken down time **/
diff --git a/src/time/nanosleep.c b/src/time/nanosleep.c
index cb1cfef7..5b722ae6 100644
--- a/src/time/nanosleep.c
+++ b/src/time/nanosleep.c
@@ -1,5 +1,5 @@
#include <time.h>
-#include "../_syscall.h"
+#include "_syscall.h"
int nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
{
diff --git a/src/time/strftime.c b/src/time/strftime.c
index 4d306789..4d3f78c8 100644
--- a/src/time/strftime.c
+++ b/src/time/strftime.c
@@ -1,9 +1,8 @@
#include <time.h>
#include "stdio.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "locale.h"
-#include "../locale/_locale.h"
-#include "../_nonstd.h"
+#include "locale/_locale.h"
/** convert time to a formatted string **/
@@ -11,17 +10,12 @@ size_t strftime(char * restrict s, size_t maxsize, const char * restrict format,
{
size_t converted = 0, i, j;
char buf[64];
- struct __locale_t *lc;
+ struct __locale_t *lc = __get_locale();
ASSERT_NONNULL(s);
ASSERT_NONNULL(format);
ASSERT_NONNULL(timeptr);
- lc = __libc(THREAD_LOCALE);
- if (lc->time[0] == '\0') {
- lc = __libc(GLOBAL_LOCALE);
- }
-
for (i = 0; format[i] != '\0' && converted < maxsize; i++) {
if (format[i] != '%') {
s[converted++] = format[i];
diff --git a/src/time/time.c b/src/time/time.c
index 96e8ed19..ca99964f 100644
--- a/src/time/time.c
+++ b/src/time/time.c
@@ -1,6 +1,6 @@
#include <time.h>
#include "errno.h"
-#include "../_syscall.h"
+#include "_syscall.h"
/** get current time **/
diff --git a/src/unistd/_exit.c b/src/unistd/_exit.c
index f892dd59..efdc7059 100644
--- a/src/unistd/_exit.c
+++ b/src/unistd/_exit.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
void _exit(int status)
{
diff --git a/src/unistd/alarm.c b/src/unistd/alarm.c
index 2adaff7c..c34d04e2 100644
--- a/src/unistd/alarm.c
+++ b/src/unistd/alarm.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
unsigned alarm(unsigned seconds)
{
diff --git a/src/unistd/chdir.c b/src/unistd/chdir.c
index e4061feb..8b80651b 100644
--- a/src/unistd/chdir.c
+++ b/src/unistd/chdir.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
int chdir(const char *path)
{
diff --git a/src/unistd/chown.c b/src/unistd/chown.c
index 9f931765..b1c5569b 100644
--- a/src/unistd/chown.c
+++ b/src/unistd/chown.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
int chown(const char *path, uid_t owner, gid_t group)
{
diff --git a/src/unistd/close.c b/src/unistd/close.c
index e3e038cc..69739c29 100644
--- a/src/unistd/close.c
+++ b/src/unistd/close.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
int close(int fildes)
{
diff --git a/src/unistd/confstr.c b/src/unistd/confstr.c
index c6fd1523..bd66bd67 100644
--- a/src/unistd/confstr.c
+++ b/src/unistd/confstr.c
@@ -2,7 +2,7 @@
#include <unistd.h>
#include "errno.h"
#include "string.h"
-#include "../_assert.h"
+#include "_assert.h"
size_t confstr(int name, char *buf, size_t len)
{
diff --git a/src/unistd/execve.c b/src/unistd/execve.c
index 81e39b93..504fd0d5 100644
--- a/src/unistd/execve.c
+++ b/src/unistd/execve.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
int execve(const char *path, char *const argv[], char *const envp[])
{
diff --git a/src/unistd/fork.c b/src/unistd/fork.c
index 298de865..8a03bf32 100644
--- a/src/unistd/fork.c
+++ b/src/unistd/fork.c
@@ -2,7 +2,7 @@
#include "sys/types.h"
#include <unistd.h>
#include "errno.h"
-#include "../_syscall.h"
+#include "_syscall.h"
pid_t fork(void)
{
diff --git a/src/unistd/getcwd.c b/src/unistd/getcwd.c
index 61f9c573..202b8992 100644
--- a/src/unistd/getcwd.c
+++ b/src/unistd/getcwd.c
@@ -1,7 +1,7 @@
#include "sys/types.h"
#include <unistd.h>
-#include "../_assert.h"
-#include "../_syscall.h"
+#include "_assert.h"
+#include "_syscall.h"
char * getcwd(char *buf, size_t size)
{
diff --git a/src/unistd/getegid.c b/src/unistd/getegid.c
index 0c39a84a..0469abb0 100644
--- a/src/unistd/getegid.c
+++ b/src/unistd/getegid.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
gid_t getegid(void)
{
diff --git a/src/unistd/geteuid.c b/src/unistd/geteuid.c
index 9ccb56de..20110eb4 100644
--- a/src/unistd/geteuid.c
+++ b/src/unistd/geteuid.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
uid_t geteuid(void)
{
diff --git a/src/unistd/getgid.c b/src/unistd/getgid.c
index 28888be0..09e9611f 100644
--- a/src/unistd/getgid.c
+++ b/src/unistd/getgid.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
gid_t getgid(void)
{
diff --git a/src/unistd/getgroups.c b/src/unistd/getgroups.c
index 5e7b3ff5..356adaa3 100644
--- a/src/unistd/getgroups.c
+++ b/src/unistd/getgroups.c
@@ -2,8 +2,8 @@
#include "sys/types.h"
#include <unistd.h>
#include "errno.h"
-#include "../_syscall.h"
-#include "../_assert.h"
+#include "_syscall.h"
+#include "_assert.h"
int getgroups(int gidsetsize, gid_t grouplist[])
{
diff --git a/src/unistd/getpgrp.c b/src/unistd/getpgrp.c
index 7654afcb..91db3ed5 100644
--- a/src/unistd/getpgrp.c
+++ b/src/unistd/getpgrp.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
pid_t getpgrp(void)
{
diff --git a/src/unistd/getpid.c b/src/unistd/getpid.c
index 2c638c3c..09a16120 100644
--- a/src/unistd/getpid.c
+++ b/src/unistd/getpid.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
pid_t getpid(void)
{
diff --git a/src/unistd/getppid.c b/src/unistd/getppid.c
index 642501f0..931ea41c 100644
--- a/src/unistd/getppid.c
+++ b/src/unistd/getppid.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
pid_t getppid(void)
{
diff --git a/src/unistd/getuid.c b/src/unistd/getuid.c
index baccfa34..02d2143d 100644
--- a/src/unistd/getuid.c
+++ b/src/unistd/getuid.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
uid_t getuid(void)
{
diff --git a/src/unistd/link.c b/src/unistd/link.c
index 93726cb3..99e2b508 100644
--- a/src/unistd/link.c
+++ b/src/unistd/link.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
int link(const char *path1, const char *path2)
{
diff --git a/src/unistd/lseek.c b/src/unistd/lseek.c
index a277efbd..5f5eb78c 100644
--- a/src/unistd/lseek.c
+++ b/src/unistd/lseek.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
off_t lseek(int fildes, off_t offset, int whence)
{
diff --git a/src/unistd/pause.c b/src/unistd/pause.c
index d69900f9..06080010 100644
--- a/src/unistd/pause.c
+++ b/src/unistd/pause.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
int pause(void)
{
diff --git a/src/unistd/pipe.c b/src/unistd/pipe.c
index 394b1846..4c09d22c 100644
--- a/src/unistd/pipe.c
+++ b/src/unistd/pipe.c
@@ -1,8 +1,8 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_assert.h"
-#include "../_syscall.h"
+#include "_assert.h"
+#include "_syscall.h"
int pipe(int fildes[2])
{
diff --git a/src/unistd/read.c b/src/unistd/read.c
index f7b91a9b..b275c789 100644
--- a/src/unistd/read.c
+++ b/src/unistd/read.c
@@ -2,7 +2,7 @@
#include "sys/types.h"
#include <unistd.h>
#include "errno.h"
-#include "../_syscall.h"
+#include "_syscall.h"
ssize_t read(int fildes, void *buf, size_t nbyte)
{
diff --git a/src/unistd/rmdir.c b/src/unistd/rmdir.c
index b1944f80..828767c0 100644
--- a/src/unistd/rmdir.c
+++ b/src/unistd/rmdir.c
@@ -2,7 +2,7 @@
#include "sys/types.h"
#include <unistd.h>
#include "errno.h"
-#include "../_syscall.h"
+#include "_syscall.h"
int rmdir(const char *path)
{
diff --git a/src/unistd/setgid.c b/src/unistd/setgid.c
index 30aa5223..ecef806d 100644
--- a/src/unistd/setgid.c
+++ b/src/unistd/setgid.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
int setgid(gid_t gid)
{
diff --git a/src/unistd/setpgid.c b/src/unistd/setpgid.c
index 2206446e..ee9aa2f4 100644
--- a/src/unistd/setpgid.c
+++ b/src/unistd/setpgid.c
@@ -2,7 +2,7 @@
#include "sys/types.h"
#include <unistd.h>
#include "errno.h"
-#include "../_syscall.h"
+#include "_syscall.h"
int setpgid(pid_t pid, pid_t pgid)
{
diff --git a/src/unistd/setsid.c b/src/unistd/setsid.c
index 8dbc9d1c..f43731a9 100644
--- a/src/unistd/setsid.c
+++ b/src/unistd/setsid.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
pid_t setsid(void)
{
diff --git a/src/unistd/setuid.c b/src/unistd/setuid.c
index 4599b083..9f13e543 100644
--- a/src/unistd/setuid.c
+++ b/src/unistd/setuid.c
@@ -1,7 +1,7 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_syscall.h"
+#include "_syscall.h"
int setuid(uid_t uid)
{
diff --git a/src/unistd/unlink.c b/src/unistd/unlink.c
index 0ce396bf..46f3183a 100644
--- a/src/unistd/unlink.c
+++ b/src/unistd/unlink.c
@@ -1,8 +1,8 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_assert.h"
-#include "../_syscall.h"
+#include "_assert.h"
+#include "_syscall.h"
int unlink(const char *path)
{
diff --git a/src/unistd/write.c b/src/unistd/write.c
index a58bdc78..1d95b807 100644
--- a/src/unistd/write.c
+++ b/src/unistd/write.c
@@ -1,8 +1,8 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "../_assert.h"
-#include "../_syscall.h"
+#include "_assert.h"
+#include "_syscall.h"
ssize_t write(int fildes, const void *buf, size_t nbyte)
{
diff --git a/src/wchar/fgetws.c b/src/wchar/fgetws.c
index 40d41cec..b4d66a71 100644
--- a/src/wchar/fgetws.c
+++ b/src/wchar/fgetws.c
@@ -1,6 +1,6 @@
#include <wchar.h>
#include "stdio.h"
-#include "../_assert.h"
+#include "_assert.h"
wchar_t * fgetws(wchar_t * restrict s, int n, FILE * restrict stream)
{
diff --git a/src/wchar/fwide.c b/src/wchar/fwide.c
index 17da898b..ddf322b5 100644
--- a/src/wchar/fwide.c
+++ b/src/wchar/fwide.c
@@ -1,7 +1,7 @@
#include <wchar.h>
#include "stdio.h"
-#include "../stdio/_stdio.h"
-#include "../_assert.h"
+#include "stdio/_stdio.h"
+#include "_assert.h"
int fwide(FILE * stream, int mode)
{
diff --git a/src/wchar/wcscmp.c b/src/wchar/wcscmp.c
index 67ef7432..25508509 100644
--- a/src/wchar/wcscmp.c
+++ b/src/wchar/wcscmp.c
@@ -1,5 +1,5 @@
#include <wchar.h>
-#include "../_assert.h"
+#include "_assert.h"
int wcscmp(const wchar_t * s1, const wchar_t * s2)
{
diff --git a/src/wchar/wcscspn.c b/src/wchar/wcscspn.c
index 1c4f5cf2..0586bf2f 100644
--- a/src/wchar/wcscspn.c
+++ b/src/wchar/wcscspn.c
@@ -1,5 +1,5 @@
#include <wchar.h>
-#include "../_assert.h"
+#include "_assert.h"
size_t wcscspn(const wchar_t * s1, const wchar_t * s2)
{
diff --git a/src/wchar/wcsncmp.c b/src/wchar/wcsncmp.c
index 06edf836..f5c56c28 100644
--- a/src/wchar/wcsncmp.c
+++ b/src/wchar/wcsncmp.c
@@ -1,5 +1,5 @@
#include <wchar.h>
-#include "../_assert.h"
+#include "_assert.h"
int wcsncmp(const wchar_t * s1, const wchar_t * s2, size_t n)
{
diff --git a/src/wchar/wmemchr.c b/src/wchar/wmemchr.c
index 28ad085d..f8939319 100644
--- a/src/wchar/wmemchr.c
+++ b/src/wchar/wmemchr.c
@@ -1,5 +1,5 @@
#include <wchar.h>
-#include "../_assert.h"
+#include "_assert.h"
wchar_t * wmemchr(const wchar_t * s, wchar_t c, size_t n)
{
diff --git a/src/wchar/wmemmove.c b/src/wchar/wmemmove.c
index 7667e3c4..98ae7b96 100644
--- a/src/wchar/wmemmove.c
+++ b/src/wchar/wmemmove.c
@@ -1,6 +1,6 @@
#include <wchar.h>
#include "stdlib.h"
-#include "../_assert.h"
+#include "_assert.h"
wchar_t * wmemmove(wchar_t * s1, const wchar_t * s2, size_t n)
{
diff --git a/src/wctype/iswalnum.c b/src/wctype/iswalnum.c
index 42f0df4a..d385fd1c 100644
--- a/src/wctype/iswalnum.c
+++ b/src/wctype/iswalnum.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "limits.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "wchar.h"
/** test whether a wide character is alphanumeric **/
diff --git a/src/wctype/iswalpha.c b/src/wctype/iswalpha.c
index 0d3e6d57..99448d54 100644
--- a/src/wctype/iswalpha.c
+++ b/src/wctype/iswalpha.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "wchar.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a wide character is alphabetic **/
int iswalpha(wint_t wc)
diff --git a/src/wctype/iswblank.c b/src/wctype/iswblank.c
index 753f9b41..1709a7a6 100644
--- a/src/wctype/iswblank.c
+++ b/src/wctype/iswblank.c
@@ -1,5 +1,5 @@
#include <wctype.h>
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a wide character is blank **/
int iswblank(wint_t wc)
diff --git a/src/wctype/iswcntrl.c b/src/wctype/iswcntrl.c
index acec5785..571318cc 100644
--- a/src/wctype/iswcntrl.c
+++ b/src/wctype/iswcntrl.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "wchar.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a wide character is a control character */
int iswcntrl(wint_t wc)
diff --git a/src/wctype/iswctype.c b/src/wctype/iswctype.c
index db05e919..a1ca4c77 100644
--- a/src/wctype/iswctype.c
+++ b/src/wctype/iswctype.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "wchar.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a wide character is part of a character class **/
int iswctype(wint_t wc, wctype_t desc)
diff --git a/src/wctype/iswdigit.c b/src/wctype/iswdigit.c
index 7dc13755..3b92a8b3 100644
--- a/src/wctype/iswdigit.c
+++ b/src/wctype/iswdigit.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "wchar.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a wide character is a digit **/
int iswdigit(wint_t wc)
diff --git a/src/wctype/iswgraph.c b/src/wctype/iswgraph.c
index dba00813..4602bd7f 100644
--- a/src/wctype/iswgraph.c
+++ b/src/wctype/iswgraph.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "wchar.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a wide character is graphic **/
int iswgraph(wint_t wc)
diff --git a/src/wctype/iswlower.c b/src/wctype/iswlower.c
index 5bd19e2e..3d3a1b6e 100644
--- a/src/wctype/iswlower.c
+++ b/src/wctype/iswlower.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "wchar.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a character is a lowercase letter **/
int iswlower(wint_t wc)
diff --git a/src/wctype/iswprint.c b/src/wctype/iswprint.c
index 51730c5e..cd2392ea 100644
--- a/src/wctype/iswprint.c
+++ b/src/wctype/iswprint.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "wchar.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a wide character is printable **/
int iswprint(wint_t wc)
diff --git a/src/wctype/iswpunct.c b/src/wctype/iswpunct.c
index 5896f8bb..2ef6c246 100644
--- a/src/wctype/iswpunct.c
+++ b/src/wctype/iswpunct.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "wchar.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a wide character is punctuation **/
int iswpunct(wint_t wc)
diff --git a/src/wctype/iswspace.c b/src/wctype/iswspace.c
index feb22b5e..7c1c6b01 100644
--- a/src/wctype/iswspace.c
+++ b/src/wctype/iswspace.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "wchar.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a wide character is white-space **/
int iswspace(wint_t wc)
diff --git a/src/wctype/iswupper.c b/src/wctype/iswupper.c
index b56e4214..5702579c 100644
--- a/src/wctype/iswupper.c
+++ b/src/wctype/iswupper.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "wchar.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a wide character is an uppercase letter **/
int iswupper(wint_t wc)
diff --git a/src/wctype/iswxdigit.c b/src/wctype/iswxdigit.c
index 2b255a40..a4fc4d80 100644
--- a/src/wctype/iswxdigit.c
+++ b/src/wctype/iswxdigit.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "wchar.h"
-#include "../_assert.h"
+#include "_assert.h"
/** test whether a wide character is a hexadecimal digit **/
int iswxdigit(wint_t wc)
diff --git a/src/wctype/towlower.c b/src/wctype/towlower.c
index fe0c632e..2b38a1cd 100644
--- a/src/wctype/towlower.c
+++ b/src/wctype/towlower.c
@@ -1,7 +1,7 @@
#include <wctype.h>
#include "wchar.h"
#include "stdlib.h"
-#include "../_assert.h"
+#include "_assert.h"
/** convert a wide uppercase letter to lowercase **/
wint_t towlower(wint_t wc)
diff --git a/src/wctype/towupper.c b/src/wctype/towupper.c
index 0f1a40be..9c683b20 100644
--- a/src/wctype/towupper.c
+++ b/src/wctype/towupper.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "wchar.h"
-#include "../_assert.h"
+#include "_assert.h"
/** convert a wide lowercase letter to uppercase **/
wint_t towupper(wint_t wc)
diff --git a/src/wctype/wctrans.c b/src/wctype/wctrans.c
index 4380467e..c19a8548 100644
--- a/src/wctype/wctrans.c
+++ b/src/wctype/wctrans.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "string.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "_wctype.h"
/** lookup character translation **/
diff --git a/src/wctype/wctype.c b/src/wctype/wctype.c
index c2ec3460..976e7f05 100644
--- a/src/wctype/wctype.c
+++ b/src/wctype/wctype.c
@@ -1,6 +1,6 @@
#include <wctype.h>
#include "string.h"
-#include "../_assert.h"
+#include "_assert.h"
#include "_wctype.h"
/** lookup character class **/