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