Commit Graph

584 Commits

Author SHA1 Message Date
Lassi Kortela da02e9e554 Add missing sys/stat.h
Fixes failed OpenBSD build. How did it work before?
2019-08-22 00:05:57 +03:00
Lassi Kortela 862a2c9d68 Add Windows build script using Open Watcom C compiler 2019-08-21 22:22:39 +03:00
Lassi Kortela 34d417b4fc Change library name to (upscheme 2019 unstable)
The "unstable" is a new addition.
2019-08-21 22:18:53 +03:00
Lassi Kortela 682cbf2400 Add builtin_spawn stub for Windows 2019-08-21 22:18:20 +03:00
Lassi Kortela 1e306391a7 Add compiler name to build directory name 2019-08-21 22:18:01 +03:00
Lassi Kortela 2ff16a0182 Add Windows ID functions
Mostly of them are dummy placeholders that return false
2019-08-21 22:17:06 +03:00
Lassi Kortela b2027fe023 Split setenv/unsetenv by platform
Windows apparently doesn't have unsetenv() at all, so use the WinAPI
native envar functions instead of the usual C ones.
2019-08-21 22:16:07 +03:00
Lassi Kortela 5caf337589 Stub builtin_environment_stack for Windows 2019-08-21 22:15:19 +03:00
Lassi Kortela 0d95c386ac Fix socket includes 2019-08-21 22:14:04 +03:00
Lassi Kortela ebefb2a519 Stub time functions for Windows
Need to rethink all time stuff and read the relevant SRFIs.
2019-08-21 22:12:19 +03:00
Lassi Kortela 6ffe6bf174 Add truly sinful float hacks for Watcom 2019-08-21 22:11:05 +03:00
Lassi Kortela 439eeb2b06 Use vsnprintf() instead of vasprintf()
Windows doesn't reliably offer *asprintf() (sprintf functions that
automatically malloc as much memory as they need) so hand-roll the
equivalent on all platforms.
2019-08-21 22:10:13 +03:00
Lassi Kortela c76379e6f5 Brace try/except in main() for Watcom 2019-08-21 22:08:21 +03:00
Lassi Kortela 60ff06fb6d Reorganize error functions and includes
These functions are complicated because they need to be marked
"noreturn" for the compiler. There are several fundamentally
incompatible ways of doing that. Since we have only a few "noreturn"
functions, let's just list all of those in one header file of which
there is a completely different version for each compiler.
2019-08-21 22:06:13 +03:00
Lassi Kortela debbcdf857 Add missing #endif 2019-08-19 09:49:14 +03:00
Lassi Kortela ddb6116df9 Add bits and endian for Watcom compiler 2019-08-19 01:20:40 +03:00
Lassi Kortela a6fd653000 Add missing includes for Windows 2019-08-19 01:20:02 +03:00
Lassi Kortela 69f46bd4c2 Do not use special _fileno for windows 2019-08-19 01:19:03 +03:00
Lassi Kortela d12fd5cea7 Split _enonfatal() for Windows 2019-08-19 01:18:36 +03:00
Lassi Kortela 35acc782d9 Remove asm byteswap implementations 2019-08-19 01:17:54 +03:00
Lassi Kortela e2dffd97fe Remove time.now and parsetime functions 2019-08-19 01:15:28 +03:00
Lassi Kortela 023937e5ea Use backward compatible variable initializers 2019-08-19 01:14:09 +03:00
Lassi Kortela 486ec48a76 Remove spurious time includes 2019-08-18 13:44:06 +03:00
Lassi Kortela d065a0039d Define float_t and double_t for Watcom C 2019-08-18 13:40:25 +03:00
Lassi Kortela 9571262535 Use backward compatible variable initializers 2019-08-18 13:40:04 +03:00
Lassi Kortela 7025b8cd32 Split fl_path_exists() into Unix and Windows 2019-08-18 13:39:08 +03:00
Lassi Kortela 3448e8f150 Include missing <stdarg.h> 2019-08-18 13:36:43 +03:00
Lassi Kortela 3dc58baa4a Include <sys/types.h> to get off_t
This header is even shipped by Windows compilers. The iostream stuff
uses off_t.
2019-08-18 00:09:43 +03:00
Lassi Kortela baea23ab29 Switch to portable noreturn attributes 2019-08-18 00:07:46 +03:00
Lassi Kortela edf7c991f4 Remove unneeded DLLEXPORT and STDCALL macros 2019-08-17 22:55:25 +03:00
Lassi Kortela 3f0a44ad7e Add aliases.scm into the system image 2019-08-15 23:05:23 +03:00
Lassi Kortela b60d330df1 Add hacky subprocess spawn procedure 2019-08-14 20:31:39 +03:00
Lassi Kortela 2d0add09d5 Add color-name->rgb24 procedure 2019-08-14 20:02:48 +03:00
Lassi Kortela cfdb8f2928 Add get-ID procedures from draft SRFI 170 2019-08-14 17:48:13 +03:00
Lassi Kortela ca8e23c079 Add builtins.h file missing from last commit 2019-08-14 13:54:50 +03:00
Lassi Kortela 78a04430ce Add read-ini-file procedure
Reads a .ini file into an association list. No [section] parsing yet.
2019-08-14 13:49:56 +03:00
Lassi Kortela 50c9fb2448 Sort .c and .o files in build.sh 2019-08-14 13:48:53 +03:00
Lassi Kortela 7ac23c6f0b Add scanner interface to "struct buf"
Can be used to easily write simple parsers in C.
2019-08-14 13:46:50 +03:00
Lassi Kortela 44a8208d38 Add buf_put_ios() utility function
Fills a "struct buf" with the entire remainder of a stream.
2019-08-14 13:39:11 +03:00
Lassi Kortela a6ecac95e1 Rename fs*.c -> os*.c
I planned to put just the file system routines into these files, but
there are starting to be so many of them that I don't want to
duplicate the same set for networking, subprocesses etc.
2019-08-14 01:15:29 +03:00
Lassi Kortela 1e0a6350b5 Echo unittest command in build.sh 2019-08-14 00:58:52 +03:00
Lassi Kortela 83cc9b21b1 Add blank lines to ease reading build.sh 2019-08-14 00:56:31 +03:00
Lassi Kortela 2048ac0d45 Remove duplicate -lm switches from build.sh 2019-08-14 00:55:05 +03:00
Lassi Kortela 6c8a10155d Remove spurious echo from build.sh 2019-08-14 00:54:22 +03:00
Lassi Kortela d781c65862 Fix oversight in the bootstrap procedure
Stage 0 is supposed to emit compiled versions of system.scm and
compiler.scm. The compiler.scm bytecode wasn't emitted properly
because the emitter put the two files' bytecode in two separate C
variables instead of concatenating them into the same variable as they
should be.
2019-08-14 00:44:24 +03:00
Lassi Kortela cccbe54bb5 Finally fix the default cflags for real 2019-08-14 00:05:10 +03:00
Lassi Kortela bf11066313 Add stubs for Haiku, Minix and Solaris 2019-08-14 00:01:26 +03:00
Lassi Kortela d69ad59126 Expand here-document
Debian /bin/sh cannot handle it.
2019-08-13 23:47:43 +03:00
Lassi Kortela c14c723859 Update temp boot image paths 2019-08-13 23:20:47 +03:00
Lassi Kortela 5ced8d91f6 Store boot image inside main executable
Previously the boot image was kept in the separate file "flisp.boot".
This caused all kinds of problems, as bootstrapping is wont to do. The
biggest problem was finding a portable and convenient pathname for it.

Instead of dealing with all that stuff about how to find the file,
just store the image in a huge C string constant that goes into the
main executable. This necessitates adding a C-string hex dumper into
the Lisp system, and making build.sh slightly more complicated, but
that's a small price to pay for not having to carry a separate file
everywhere we go. Also, flmain.c is a lot simpler now and we don't
have to play around with symlinks.
2019-08-13 23:07:44 +03:00