diff options
-rwxr-xr-x | MacOSX/386/bin/data2c | bin | 18596 -> 18624 bytes | |||
-rwxr-xr-x | MacOSX/386/bin/iyacc | bin | 50912 -> 50880 bytes | |||
-rwxr-xr-x | MacOSX/386/bin/mk | bin | 65152 -> 61052 bytes | |||
-rwxr-xr-x | MacOSX/386/bin/mkext | bin | 32252 -> 32276 bytes | |||
-rwxr-xr-x | Nt/386/bin/awk.exe | bin | 167936 -> 272896 bytes | |||
-rwxr-xr-x | Nt/386/bin/c2l.exe | bin | 254464 -> 284672 bytes | |||
-rwxr-xr-x | Nt/386/bin/cat.exe | bin | 52224 -> 95744 bytes | |||
-rwxr-xr-x | Nt/386/bin/cp.exe | bin | 69120 -> 108032 bytes | |||
-rwxr-xr-x | Nt/386/bin/data2c.exe | bin | 55808 -> 98304 bytes | |||
-rwxr-xr-x | Nt/386/bin/echo.exe | bin | 46592 -> 89088 bytes | |||
-rwxr-xr-x | Nt/386/bin/format.exe | bin | 79872 -> 118272 bytes | |||
-rwxr-xr-x | Nt/386/bin/iyacc.exe | bin | 97792 -> 135168 bytes | |||
-rwxr-xr-x | Nt/386/bin/mk.exe | bin | 124416 -> 166912 bytes | |||
-rwxr-xr-x | Nt/386/bin/mkdir.exe | bin | 48128 -> 91136 bytes | |||
-rwxr-xr-x | Nt/386/bin/mkext.exe | bin | 80384 -> 118784 bytes | |||
-rwxr-xr-x | Nt/386/bin/mv.exe | bin | 72704 -> 110080 bytes | |||
-rwxr-xr-x | Nt/386/bin/rcsh.exe | bin | 133120 -> 176640 bytes | |||
-rwxr-xr-x | Nt/386/bin/rm.exe | bin | 69120 -> 101888 bytes | |||
-rwxr-xr-x | Nt/386/bin/sed.exe | bin | 80896 -> 124416 bytes | |||
-rwxr-xr-x | Nt/386/bin/test.exe | bin | 71168 -> 105472 bytes | |||
-rwxr-xr-x | Nt/386/bin/tr.exe | bin | 52224 -> 95744 bytes | |||
-rwxr-xr-x | Nt/386/include/lib9.h | 4 | ||||
-rw-r--r-- | appl/cmd/limbo/typecheck.b | 4 | ||||
-rw-r--r-- | dis/limbo.dis | bin | 343624 -> 343678 bytes | |||
-rw-r--r-- | emu/MacOSX/win.c | 2 | ||||
-rw-r--r-- | limbo/typecheck.c | 4 | ||||
-rw-r--r-- | mkfiles/mkfile-Nt-386 | 2 | ||||
-rw-r--r-- | tools/libstyx/styxserver.c | 4 | ||||
-rw-r--r-- | utils/awk/missing95.c | 42 | ||||
-rw-r--r-- | utils/mk/Nt.c | 1 | ||||
-rw-r--r-- | utils/rcsh/rc.h | 1 |
31 files changed, 58 insertions, 6 deletions
diff --git a/MacOSX/386/bin/data2c b/MacOSX/386/bin/data2c Binary files differindex 897fab5a..011c76f6 100755 --- a/MacOSX/386/bin/data2c +++ b/MacOSX/386/bin/data2c diff --git a/MacOSX/386/bin/iyacc b/MacOSX/386/bin/iyacc Binary files differindex d5b0636d..39dc058f 100755 --- a/MacOSX/386/bin/iyacc +++ b/MacOSX/386/bin/iyacc diff --git a/MacOSX/386/bin/mk b/MacOSX/386/bin/mk Binary files differindex 543e8a25..da668229 100755 --- a/MacOSX/386/bin/mk +++ b/MacOSX/386/bin/mk diff --git a/MacOSX/386/bin/mkext b/MacOSX/386/bin/mkext Binary files differindex e0eceb79..7640e95c 100755 --- a/MacOSX/386/bin/mkext +++ b/MacOSX/386/bin/mkext diff --git a/Nt/386/bin/awk.exe b/Nt/386/bin/awk.exe Binary files differindex 77711a2c..6cfc878e 100755 --- a/Nt/386/bin/awk.exe +++ b/Nt/386/bin/awk.exe diff --git a/Nt/386/bin/c2l.exe b/Nt/386/bin/c2l.exe Binary files differindex c3e2e950..71baae87 100755 --- a/Nt/386/bin/c2l.exe +++ b/Nt/386/bin/c2l.exe diff --git a/Nt/386/bin/cat.exe b/Nt/386/bin/cat.exe Binary files differindex e9eb0d6c..ebd1b62d 100755 --- a/Nt/386/bin/cat.exe +++ b/Nt/386/bin/cat.exe diff --git a/Nt/386/bin/cp.exe b/Nt/386/bin/cp.exe Binary files differindex 1d8c6efe..849a5a63 100755 --- a/Nt/386/bin/cp.exe +++ b/Nt/386/bin/cp.exe diff --git a/Nt/386/bin/data2c.exe b/Nt/386/bin/data2c.exe Binary files differindex 9dfd90dd..7f8c6674 100755 --- a/Nt/386/bin/data2c.exe +++ b/Nt/386/bin/data2c.exe diff --git a/Nt/386/bin/echo.exe b/Nt/386/bin/echo.exe Binary files differindex c2fcf3d8..442b7110 100755 --- a/Nt/386/bin/echo.exe +++ b/Nt/386/bin/echo.exe diff --git a/Nt/386/bin/format.exe b/Nt/386/bin/format.exe Binary files differindex 3b99b70f..cd921c82 100755 --- a/Nt/386/bin/format.exe +++ b/Nt/386/bin/format.exe diff --git a/Nt/386/bin/iyacc.exe b/Nt/386/bin/iyacc.exe Binary files differindex d0d21e30..204e4643 100755 --- a/Nt/386/bin/iyacc.exe +++ b/Nt/386/bin/iyacc.exe diff --git a/Nt/386/bin/mk.exe b/Nt/386/bin/mk.exe Binary files differindex 1674cbe8..20a11aff 100755 --- a/Nt/386/bin/mk.exe +++ b/Nt/386/bin/mk.exe diff --git a/Nt/386/bin/mkdir.exe b/Nt/386/bin/mkdir.exe Binary files differindex 29dad0b4..ea938e56 100755 --- a/Nt/386/bin/mkdir.exe +++ b/Nt/386/bin/mkdir.exe diff --git a/Nt/386/bin/mkext.exe b/Nt/386/bin/mkext.exe Binary files differindex e49a5376..41a03d1a 100755 --- a/Nt/386/bin/mkext.exe +++ b/Nt/386/bin/mkext.exe diff --git a/Nt/386/bin/mv.exe b/Nt/386/bin/mv.exe Binary files differindex c664c77e..dd3a6c70 100755 --- a/Nt/386/bin/mv.exe +++ b/Nt/386/bin/mv.exe diff --git a/Nt/386/bin/rcsh.exe b/Nt/386/bin/rcsh.exe Binary files differindex 0af9618b..947e3cb0 100755 --- a/Nt/386/bin/rcsh.exe +++ b/Nt/386/bin/rcsh.exe diff --git a/Nt/386/bin/rm.exe b/Nt/386/bin/rm.exe Binary files differindex a7f85e7d..34f05b54 100755 --- a/Nt/386/bin/rm.exe +++ b/Nt/386/bin/rm.exe diff --git a/Nt/386/bin/sed.exe b/Nt/386/bin/sed.exe Binary files differindex 8aa45f0e..d086fffa 100755 --- a/Nt/386/bin/sed.exe +++ b/Nt/386/bin/sed.exe diff --git a/Nt/386/bin/test.exe b/Nt/386/bin/test.exe Binary files differindex d90a0ba1..14d92c5d 100755 --- a/Nt/386/bin/test.exe +++ b/Nt/386/bin/test.exe diff --git a/Nt/386/bin/tr.exe b/Nt/386/bin/tr.exe Binary files differindex a079480e..eaf728aa 100755 --- a/Nt/386/bin/tr.exe +++ b/Nt/386/bin/tr.exe diff --git a/Nt/386/include/lib9.h b/Nt/386/include/lib9.h index d10c51ed..fd48f043 100755 --- a/Nt/386/include/lib9.h +++ b/Nt/386/include/lib9.h @@ -16,7 +16,11 @@ #define strtod infstrtod #define strtoll infstrtoll #define strtoull infstrtoull +#ifndef INFERNO_KEEPENVIRON +/* environ is perfectly legal as the name of a local, field name or struct, but windows redefines it */ +/* the extern char** environ is only needed by two programs, so #undef it for everything else */ #undef environ +#endif /* do-it-yourself isinf and isnan */ #ifndef isnan diff --git a/appl/cmd/limbo/typecheck.b b/appl/cmd/limbo/typecheck.b index 5629500b..88060840 100644 --- a/appl/cmd/limbo/typecheck.b +++ b/appl/cmd/limbo/typecheck.b @@ -759,9 +759,11 @@ concheck(n: ref Node, isglobal: int) exname(d: ref Decl): string { s := ""; - m := impmods.sym; + m: ref Sym; if(d.dot != nil) m = d.dot.sym; + else if(impmods != nil) + m = impmods.sym; if(m != nil) s += m.name+"."; if(fndec != nil) diff --git a/dis/limbo.dis b/dis/limbo.dis Binary files differindex 0bf51ff0..b4e3acac 100644 --- a/dis/limbo.dis +++ b/dis/limbo.dis diff --git a/emu/MacOSX/win.c b/emu/MacOSX/win.c index ffe54a6b..6f8a7e52 100644 --- a/emu/MacOSX/win.c +++ b/emu/MacOSX/win.c @@ -4,7 +4,7 @@ #define Rect _Rect #include <Carbon/Carbon.h> -#include <QuickTime/QuickTime.h> // for full screen +//#include <QuickTime/QuickTime.h> // for full screen #undef Rect #undef Point diff --git a/limbo/typecheck.c b/limbo/typecheck.c index 52e0295d..ce3da87b 100644 --- a/limbo/typecheck.c +++ b/limbo/typecheck.c @@ -873,9 +873,11 @@ exname(Decl *d) n = 0; sprint(buf, "%d", scope-ScopeGlobal); - m = impmods->sym; + m = nil; if(d->dot) m = d->dot->sym; + else if(impmods) + m = impmods->sym; if(m) n += strlen(m->name)+1; if(fndec) diff --git a/mkfiles/mkfile-Nt-386 b/mkfiles/mkfile-Nt-386 index 8bfe66d1..90fdb256 100644 --- a/mkfiles/mkfile-Nt-386 +++ b/mkfiles/mkfile-Nt-386 @@ -24,7 +24,7 @@ CFLAGS= -c\ -W3\ -Zi\ -MT\ - -D_WIN32_WINNT=0x0400\ + -D_WIN32_WINNT=0x0600\ -I$ROOT/Nt/386/include\ -I$ROOT/include\ $XCFLAGS\ diff --git a/tools/libstyx/styxserver.c b/tools/libstyx/styxserver.c index 34257349..96700280 100644 --- a/tools/libstyx/styxserver.c +++ b/tools/libstyx/styxserver.c @@ -72,9 +72,9 @@ styxfatal(char *fmt, ...) } static void -styxassert(int true, char *reason) +styxassert(int vtrue, char *reason) { - if(!true) + if(!vtrue) styxfatal("assertion failed: %s\n", reason); } diff --git a/utils/awk/missing95.c b/utils/awk/missing95.c index 64138ade..4daa8d2e 100644 --- a/utils/awk/missing95.c +++ b/utils/awk/missing95.c @@ -10,3 +10,45 @@ FILE *popen(char *s, char *m) { int pclose(FILE *f) { return _pclose(f); /* return NULL; */ } + +#include <windows.h> +#include <winbase.h> +#include <winsock.h> + +/* system doesn't work properly in some 32/64 (WoW64) combinations */ +int system(char *s) { + int status, n; + PROCESS_INFORMATION pinfo; + STARTUPINFO si; + char *cmd; + char app[256]; + static char cmdexe[] = "\\cmd.exe"; + + memset(&si, 0, sizeof(si)); + si.cb = sizeof(si); +// si.dwFlags = STARTF_USESHOWWINDOW; +// si.wShowWindow = SW_SHOW; + + n = GetSystemDirectory(app, sizeof(app)-sizeof(cmdexe)); + if(n > sizeof(app)) + return -1; + strcat_s(app, sizeof(app), cmdexe); + n = strlen(s)+20; + cmd = malloc(n); + if(cmd == NULL) + return -1; + strcpy_s(cmd, n, "cmd.exe /c"); + strcat_s(cmd, n, s); + if(!CreateProcess(app, cmd, NULL, NULL, TRUE, CREATE_DEFAULT_ERROR_MODE, NULL/* env*/, NULL /*wdir*/, &si, &pinfo)){ + fprintf(stderr, "can't create process %s %d\n", s, GetLastError()); + free(cmd); + return -1; + } + free(cmd); + if(WaitForSingleObject(pinfo.hProcess, INFINITE) == WAIT_FAILED) + return -1; + if(!GetExitCodeProcess(pinfo.hProcess, &status)) + status = 1; + //fprintf(stderr, "status %d\n", status); + return status; +} diff --git a/utils/mk/Nt.c b/utils/mk/Nt.c index c2250762..93955f9a 100644 --- a/utils/mk/Nt.c +++ b/utils/mk/Nt.c @@ -1,3 +1,4 @@ +#define INFERNO_KEEPENVIRON #include "mk.h" #include <signal.h> #include <sys/utime.h> diff --git a/utils/rcsh/rc.h b/utils/rcsh/rc.h index f7d56746..d01150a6 100644 --- a/utils/rcsh/rc.h +++ b/utils/rcsh/rc.h @@ -1,3 +1,4 @@ +#define INFERNO_KEEPENVIRON #include <lib9.h> #define Lock Rclock |