Commit Graph

18 Commits

Author SHA1 Message Date
Lassi Kortela 248840df1f Get rid of LLT malloc wrappers 2019-08-27 01:25:11 +03:00
Lassi Kortela 934bf9d859 Replace typedef bool_t with int 2019-08-27 01:17:52 +03:00
Lassi Kortela a02557230b Consolidate (almost) all #include's into new "scheme.h" 2019-08-26 22:12:15 +03:00
Lassi Kortela 2b9e15920b Fix off-by-one error 2019-08-23 00:40:41 +03:00
Lassi Kortela 9d4bf19367 Fix regression in ios_printf implementation
There was some problem with the way the varargs are handled. We had to
need to make (at least one) copy of them with va_copy(). The code is
brittle and I don't understand it, so just rip it all out and replace
with a fixed-size static buffer. It's a hack but we'll soon get rid of
printf completely so this will get us through the day until then.
2019-08-23 00:38:10 +03:00
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 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 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 023937e5ea Use backward compatible variable initializers 2019-08-19 01:14:09 +03:00
Lassi Kortela 7025b8cd32 Split fl_path_exists() into Unix and Windows 2019-08-18 13:39:08 +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 08027cac9b Add some missing system includes
Uncovered by Linux build
2019-08-10 01:02:27 +03:00
Lassi Kortela e9d6ca265c Unify preprocessor checks for win32
<https://sourceforge.net/p/predef/wiki/OperatingSystems/> says that _WIN32 is
always defined for both 32-bit and 64-bit versions of Windows.
2019-08-10 00:12:33 +03:00
Lassi Kortela 95a1c1032c Remove ifdef about memrchr() on MacOS
MacOS doesn't have memrchr() so there was an ifdef with a custom
implementation for it. Get rid of the ifdef by always using the custom
implementation.
2019-08-10 00:02:14 +03:00
Lassi Kortela bb78dc0634 Fix compiler warnings (clang -Wextra) 2019-08-09 19:53:35 +03:00
Lassi Kortela f2fb37e520 Replace ios_t with struct 2019-08-09 19:26:20 +03:00
Lassi Kortela d6f54bc13c Consolidate all C files into a "c" subdirectory 2019-08-09 15:02:58 +03:00