summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/__FEATURE_TEST_MACROS__/_POSIX_C_SOURCE.c (renamed from src/nonstd/_FTM/_POSIX_C_SOURCE.c)0
-rw-r--r--src/__FEATURE_TEST_MACROS__/_POSIX_SOURCE.c (renamed from src/nonstd/_FTM/_POSIX_SOURCE.c)0
-rw-r--r--src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE.c (renamed from src/nonstd/_FTM/_XOPEN_SOURCE.c)0
-rw-r--r--src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE_EXTENDED.c (renamed from src/nonstd/_FTM/_XOPEN_SOURCE_EXTENDED.c)0
-rw-r--r--src/__PREDEFINED_MACROS__/__DATE__.c (renamed from src/nonstd/_PREDEF/__DATE__.c)0
-rw-r--r--src/__PREDEFINED_MACROS__/__FILE__.c (renamed from src/nonstd/_PREDEF/__FILE__.c)0
-rw-r--r--src/__PREDEFINED_MACROS__/__LINE__.c (renamed from src/nonstd/_PREDEF/__LINE__.c)0
-rw-r--r--src/__PREDEFINED_MACROS__/__STDC_HOSTED__.c (renamed from src/nonstd/_PREDEF/__STDC_HOSTED__.c)0
-rw-r--r--src/__PREDEFINED_MACROS__/__STDC_IEC_559_COMPLEX__.c (renamed from src/nonstd/_PREDEF/__STDC_IEC_559_COMPLEX__.c)0
-rw-r--r--src/__PREDEFINED_MACROS__/__STDC_IEC_559__.c (renamed from src/nonstd/_PREDEF/__STDC_IEC_559__.c)0
-rw-r--r--src/__PREDEFINED_MACROS__/__STDC_ISO_10646__.c (renamed from src/nonstd/_PREDEF/__STDC_ISO_10646__.c)0
-rw-r--r--src/__PREDEFINED_MACROS__/__STDC_VERSION__.c (renamed from src/nonstd/_PREDEF/__STDC_VERSION__.c)0
-rw-r--r--src/__PREDEFINED_MACROS__/__STDC__.c (renamed from src/nonstd/_PREDEF/__STDC__.c)0
-rw-r--r--src/__PREDEFINED_MACROS__/__TIME__.c (renamed from src/nonstd/_PREDEF/__TIME__.c)0
-rw-r--r--src/__main.c (renamed from src/nonstd/__libc_start.c)16
-rw-r--r--src/_sys.x86-32.s (renamed from src/nonstd/x86-32.s)0
-rw-r--r--src/_sys.x86-64.s (renamed from src/nonstd/x86-64.s)2
17 files changed, 10 insertions, 8 deletions
diff --git a/src/nonstd/_FTM/_POSIX_C_SOURCE.c b/src/__FEATURE_TEST_MACROS__/_POSIX_C_SOURCE.c
index e69de29b..e69de29b 100644
--- a/src/nonstd/_FTM/_POSIX_C_SOURCE.c
+++ b/src/__FEATURE_TEST_MACROS__/_POSIX_C_SOURCE.c
diff --git a/src/nonstd/_FTM/_POSIX_SOURCE.c b/src/__FEATURE_TEST_MACROS__/_POSIX_SOURCE.c
index b594f3d9..b594f3d9 100644
--- a/src/nonstd/_FTM/_POSIX_SOURCE.c
+++ b/src/__FEATURE_TEST_MACROS__/_POSIX_SOURCE.c
diff --git a/src/nonstd/_FTM/_XOPEN_SOURCE.c b/src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE.c
index e69de29b..e69de29b 100644
--- a/src/nonstd/_FTM/_XOPEN_SOURCE.c
+++ b/src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE.c
diff --git a/src/nonstd/_FTM/_XOPEN_SOURCE_EXTENDED.c b/src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE_EXTENDED.c
index e69de29b..e69de29b 100644
--- a/src/nonstd/_FTM/_XOPEN_SOURCE_EXTENDED.c
+++ b/src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE_EXTENDED.c
diff --git a/src/nonstd/_PREDEF/__DATE__.c b/src/__PREDEFINED_MACROS__/__DATE__.c
index 14e40fcb..14e40fcb 100644
--- a/src/nonstd/_PREDEF/__DATE__.c
+++ b/src/__PREDEFINED_MACROS__/__DATE__.c
diff --git a/src/nonstd/_PREDEF/__FILE__.c b/src/__PREDEFINED_MACROS__/__FILE__.c
index 257ae89b..257ae89b 100644
--- a/src/nonstd/_PREDEF/__FILE__.c
+++ b/src/__PREDEFINED_MACROS__/__FILE__.c
diff --git a/src/nonstd/_PREDEF/__LINE__.c b/src/__PREDEFINED_MACROS__/__LINE__.c
index c6acb1b1..c6acb1b1 100644
--- a/src/nonstd/_PREDEF/__LINE__.c
+++ b/src/__PREDEFINED_MACROS__/__LINE__.c
diff --git a/src/nonstd/_PREDEF/__STDC_HOSTED__.c b/src/__PREDEFINED_MACROS__/__STDC_HOSTED__.c
index 48fe28b7..48fe28b7 100644
--- a/src/nonstd/_PREDEF/__STDC_HOSTED__.c
+++ b/src/__PREDEFINED_MACROS__/__STDC_HOSTED__.c
diff --git a/src/nonstd/_PREDEF/__STDC_IEC_559_COMPLEX__.c b/src/__PREDEFINED_MACROS__/__STDC_IEC_559_COMPLEX__.c
index a8d1f810..a8d1f810 100644
--- a/src/nonstd/_PREDEF/__STDC_IEC_559_COMPLEX__.c
+++ b/src/__PREDEFINED_MACROS__/__STDC_IEC_559_COMPLEX__.c
diff --git a/src/nonstd/_PREDEF/__STDC_IEC_559__.c b/src/__PREDEFINED_MACROS__/__STDC_IEC_559__.c
index bdc441c4..bdc441c4 100644
--- a/src/nonstd/_PREDEF/__STDC_IEC_559__.c
+++ b/src/__PREDEFINED_MACROS__/__STDC_IEC_559__.c
diff --git a/src/nonstd/_PREDEF/__STDC_ISO_10646__.c b/src/__PREDEFINED_MACROS__/__STDC_ISO_10646__.c
index 3379c855..3379c855 100644
--- a/src/nonstd/_PREDEF/__STDC_ISO_10646__.c
+++ b/src/__PREDEFINED_MACROS__/__STDC_ISO_10646__.c
diff --git a/src/nonstd/_PREDEF/__STDC_VERSION__.c b/src/__PREDEFINED_MACROS__/__STDC_VERSION__.c
index 56a23d90..56a23d90 100644
--- a/src/nonstd/_PREDEF/__STDC_VERSION__.c
+++ b/src/__PREDEFINED_MACROS__/__STDC_VERSION__.c
diff --git a/src/nonstd/_PREDEF/__STDC__.c b/src/__PREDEFINED_MACROS__/__STDC__.c
index 5bcfe7aa..5bcfe7aa 100644
--- a/src/nonstd/_PREDEF/__STDC__.c
+++ b/src/__PREDEFINED_MACROS__/__STDC__.c
diff --git a/src/nonstd/_PREDEF/__TIME__.c b/src/__PREDEFINED_MACROS__/__TIME__.c
index 472e42c0..472e42c0 100644
--- a/src/nonstd/_PREDEF/__TIME__.c
+++ b/src/__PREDEFINED_MACROS__/__TIME__.c
diff --git a/src/nonstd/__libc_start.c b/src/__main.c
index d8fd5875..14e71594 100644
--- a/src/nonstd/__libc_start.c
+++ b/src/__main.c
@@ -1,25 +1,27 @@
#include "stdlib.h"
#include "stdio.h"
#include "locale.h"
-#include "../stdio/_stdio.h"
+#include "stdio/_stdio.h"
#ifdef _POSIX_SOURCE
#define DEFAULT_LOCALE "POSIX"
#include "unistd.h"
#else
#define DEFAULT_LOCALE "C"
-#include "../_syscall.h"
-#include "../termios/NCCS.c"
-#include "../termios/cc_t.c"
-#include "../termios/tcflag_t.c"
-#include "../termios/struct_termios.c"
+#include "_syscall.h"
+#include "termios/NCCS.c"
+#include "termios/cc_t.c"
+#include "termios/tcflag_t.c"
+#include "termios/struct_termios.c"
static struct termios __tios;
#define isatty(fd) (__syscall(__syscall_lookup(tcgetattr), fd, &__tios) == 0)
#endif
-void __libc_start(int argc, char **argv)
+void __main(int argc, char **argv)
{
extern int main(int, char*[]);
+ extern char **environ;
+ environ = argv + argc + 1;
stdin = __stdio.FILES + 0;
stdin->fd = 0;
diff --git a/src/nonstd/x86-32.s b/src/_sys.x86-32.s
index ad60201d..ad60201d 100644
--- a/src/nonstd/x86-32.s
+++ b/src/_sys.x86-32.s
diff --git a/src/nonstd/x86-64.s b/src/_sys.x86-64.s
index 87ff1637..415a8084 100644
--- a/src/nonstd/x86-64.s
+++ b/src/_sys.x86-64.s
@@ -14,7 +14,7 @@ __syscall:
_start:
popq %rdi
movq %rsp, %rsi
- call __libc_start
+ call __main
.global __stack_chk_fail
__stack_chk_fail: