From b6e0f20a2e20eb735af612002cea9827d8f0b9b9 Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Sat, 15 Apr 2017 15:27:11 +0100 Subject: advance to Windows XP --- mkfiles/mkfile-Nt-386 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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\ -- cgit v1.2.3 From 128369f1bb02022b2f5f59fca37f2025c49e2651 Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Sat, 15 Apr 2017 15:28:59 +0100 Subject: MS compiler now messes up true as a variable --- tools/libstyx/styxserver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- cgit v1.2.3 From 9f87c1613c0385e8264a2e5eca8f503cc446fbf1 Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Sat, 15 Apr 2017 15:35:40 +0100 Subject: MS include files now #define environ, which messes up its use as field of struct, so undef it, unless needed for Windows interface, as controlled by INFERNO_KEEPENVIRON. Only rc and mk need extern char**environ --- Nt/386/include/lib9.h | 4 ++++ utils/mk/Nt.c | 1 + utils/rcsh/rc.h | 1 + 3 files changed, 6 insertions(+) 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/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 #include 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 #define Lock Rclock -- cgit v1.2.3 From a87b37fb7a99f66068cb7dbe7e1aaa0343ef4ded Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Sat, 15 Apr 2017 15:36:53 +0100 Subject: Windows' system() library function can malfunction with "Access Denied" when crossing 32/64 barrier, so define our own --- utils/awk/missing95.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) 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 +#include +#include + +/* 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; +} -- cgit v1.2.3 From 5539dabbad0884a29e4e5520f19d2484ba0a0927 Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Sat, 15 Apr 2017 15:37:51 +0100 Subject: recompiled versions of Windows executable (root set to C:/inferno as before) --- Nt/386/bin/awk.exe | Bin 167936 -> 272896 bytes Nt/386/bin/c2l.exe | Bin 254464 -> 284672 bytes Nt/386/bin/cat.exe | Bin 52224 -> 95744 bytes Nt/386/bin/cp.exe | Bin 69120 -> 108032 bytes Nt/386/bin/data2c.exe | Bin 55808 -> 98304 bytes Nt/386/bin/echo.exe | Bin 46592 -> 89088 bytes Nt/386/bin/format.exe | Bin 79872 -> 118272 bytes Nt/386/bin/iyacc.exe | Bin 97792 -> 135168 bytes Nt/386/bin/mk.exe | Bin 124416 -> 166912 bytes Nt/386/bin/mkdir.exe | Bin 48128 -> 91136 bytes Nt/386/bin/mkext.exe | Bin 80384 -> 118784 bytes Nt/386/bin/mv.exe | Bin 72704 -> 110080 bytes Nt/386/bin/rcsh.exe | Bin 133120 -> 176640 bytes Nt/386/bin/rm.exe | Bin 69120 -> 101888 bytes Nt/386/bin/sed.exe | Bin 80896 -> 124416 bytes Nt/386/bin/test.exe | Bin 71168 -> 105472 bytes Nt/386/bin/tr.exe | Bin 52224 -> 95744 bytes 17 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Nt/386/bin/awk.exe b/Nt/386/bin/awk.exe index 77711a2c..6cfc878e 100755 Binary files a/Nt/386/bin/awk.exe and b/Nt/386/bin/awk.exe differ diff --git a/Nt/386/bin/c2l.exe b/Nt/386/bin/c2l.exe index c3e2e950..71baae87 100755 Binary files a/Nt/386/bin/c2l.exe and b/Nt/386/bin/c2l.exe differ diff --git a/Nt/386/bin/cat.exe b/Nt/386/bin/cat.exe index e9eb0d6c..ebd1b62d 100755 Binary files a/Nt/386/bin/cat.exe and b/Nt/386/bin/cat.exe differ diff --git a/Nt/386/bin/cp.exe b/Nt/386/bin/cp.exe index 1d8c6efe..849a5a63 100755 Binary files a/Nt/386/bin/cp.exe and b/Nt/386/bin/cp.exe differ diff --git a/Nt/386/bin/data2c.exe b/Nt/386/bin/data2c.exe index 9dfd90dd..7f8c6674 100755 Binary files a/Nt/386/bin/data2c.exe and b/Nt/386/bin/data2c.exe differ diff --git a/Nt/386/bin/echo.exe b/Nt/386/bin/echo.exe index c2fcf3d8..442b7110 100755 Binary files a/Nt/386/bin/echo.exe and b/Nt/386/bin/echo.exe differ diff --git a/Nt/386/bin/format.exe b/Nt/386/bin/format.exe index 3b99b70f..cd921c82 100755 Binary files a/Nt/386/bin/format.exe and b/Nt/386/bin/format.exe differ diff --git a/Nt/386/bin/iyacc.exe b/Nt/386/bin/iyacc.exe index d0d21e30..204e4643 100755 Binary files a/Nt/386/bin/iyacc.exe and b/Nt/386/bin/iyacc.exe differ diff --git a/Nt/386/bin/mk.exe b/Nt/386/bin/mk.exe index 1674cbe8..20a11aff 100755 Binary files a/Nt/386/bin/mk.exe and b/Nt/386/bin/mk.exe differ diff --git a/Nt/386/bin/mkdir.exe b/Nt/386/bin/mkdir.exe index 29dad0b4..ea938e56 100755 Binary files a/Nt/386/bin/mkdir.exe and b/Nt/386/bin/mkdir.exe differ diff --git a/Nt/386/bin/mkext.exe b/Nt/386/bin/mkext.exe index e49a5376..41a03d1a 100755 Binary files a/Nt/386/bin/mkext.exe and b/Nt/386/bin/mkext.exe differ diff --git a/Nt/386/bin/mv.exe b/Nt/386/bin/mv.exe index c664c77e..dd3a6c70 100755 Binary files a/Nt/386/bin/mv.exe and b/Nt/386/bin/mv.exe differ diff --git a/Nt/386/bin/rcsh.exe b/Nt/386/bin/rcsh.exe index 0af9618b..947e3cb0 100755 Binary files a/Nt/386/bin/rcsh.exe and b/Nt/386/bin/rcsh.exe differ diff --git a/Nt/386/bin/rm.exe b/Nt/386/bin/rm.exe index a7f85e7d..34f05b54 100755 Binary files a/Nt/386/bin/rm.exe and b/Nt/386/bin/rm.exe differ diff --git a/Nt/386/bin/sed.exe b/Nt/386/bin/sed.exe index 8aa45f0e..d086fffa 100755 Binary files a/Nt/386/bin/sed.exe and b/Nt/386/bin/sed.exe differ diff --git a/Nt/386/bin/test.exe b/Nt/386/bin/test.exe index d90a0ba1..14d92c5d 100755 Binary files a/Nt/386/bin/test.exe and b/Nt/386/bin/test.exe differ diff --git a/Nt/386/bin/tr.exe b/Nt/386/bin/tr.exe index a079480e..eaf728aa 100755 Binary files a/Nt/386/bin/tr.exe and b/Nt/386/bin/tr.exe differ -- cgit v1.2.3 From 5da01da38fbf2fd583ece152e95e70885d54d4d3 Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Sat, 15 Apr 2017 16:17:51 +0100 Subject: commit the .dis for the switch from Keyring to Crypt --- dis/limbo.dis | Bin 343624 -> 343658 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/dis/limbo.dis b/dis/limbo.dis index 0bf51ff0..76c2dfb4 100644 Binary files a/dis/limbo.dis and b/dis/limbo.dis differ -- cgit v1.2.3 From 4e0175e0216902b6ee8500115e222c774ec7f4d9 Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Sun, 16 Apr 2017 18:52:31 +0100 Subject: do not include Quicktime.h that is not currently needed and might not exist --- emu/MacOSX/win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -#include // for full screen +//#include // for full screen #undef Rect #undef Point -- cgit v1.2.3 From 75762b265ad6efb5f353e0c21737a105b21a74a3 Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Sun, 16 Apr 2017 18:54:53 +0100 Subject: recompiled for MacOSX sierra --- MacOSX/386/bin/data2c | Bin 18596 -> 18624 bytes MacOSX/386/bin/iyacc | Bin 50912 -> 50880 bytes MacOSX/386/bin/mk | Bin 65152 -> 61052 bytes MacOSX/386/bin/mkext | Bin 32252 -> 32276 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/MacOSX/386/bin/data2c b/MacOSX/386/bin/data2c index 897fab5a..011c76f6 100755 Binary files a/MacOSX/386/bin/data2c and b/MacOSX/386/bin/data2c differ diff --git a/MacOSX/386/bin/iyacc b/MacOSX/386/bin/iyacc index d5b0636d..39dc058f 100755 Binary files a/MacOSX/386/bin/iyacc and b/MacOSX/386/bin/iyacc differ diff --git a/MacOSX/386/bin/mk b/MacOSX/386/bin/mk index 543e8a25..da668229 100755 Binary files a/MacOSX/386/bin/mk and b/MacOSX/386/bin/mk differ diff --git a/MacOSX/386/bin/mkext b/MacOSX/386/bin/mkext index e0eceb79..7640e95c 100755 Binary files a/MacOSX/386/bin/mkext and b/MacOSX/386/bin/mkext differ -- cgit v1.2.3 From 905c4a20d8772e52a3871cc5fb6a2172ae5a2f51 Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Sun, 16 Apr 2017 20:34:27 +0100 Subject: change from Aaron R Robinson to fix interface generation when exception types appear --- appl/cmd/limbo/typecheck.b | 4 +++- dis/limbo.dis | Bin 343658 -> 343678 bytes limbo/typecheck.c | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) 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 index 76c2dfb4..b4e3acac 100644 Binary files a/dis/limbo.dis and b/dis/limbo.dis differ 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) -- cgit v1.2.3