These patches fixes building libconfig on mingw@Linux in static + shared configuration.
The following warnings are left when building with mingw:
[ 32%] Building C object lib/CMakeFiles/config.dir/libconfig.c.obj
/home/maarten/programming/libconfig/lib/libconfig.c: In function '__config_locale_override':
/home/maarten/programming/libconfig/lib/libconfig.c:100:2: warning: #warning "No way to modify calling thread's locale!" [-Wcpp]
100 | #warning "No way to modify calling thread's locale!"
| ^~~~~~~
/home/maarten/programming/libconfig/lib/libconfig.c: In function '__config_locale_restore':
/home/maarten/programming/libconfig/lib/libconfig.c:121:2: warning: #warning "No way to modify calling thread's locale!" [-Wcpp]
121 | #warning "No way to modify calling thread's locale!"
| ^~~~~~~
[ 91%] Building C object tinytest/CMakeFiles/libtinytest.dir/tinytest.c.obj
/home/maarten/programming/libconfig/tinytest/tinytest.c:30: warning: "F_OK" redefined
30 | #define F_OK 4 // Windows doesn't have F_OK
|
In file included from /home/maarten/programming/libconfig/tinytest/tinytest.c:29:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/io.h:182: note: this is the location of the previous definition
182 | #define F_OK 0 /* Check for file existence */
|
FYI, documentation of _commit (=Windows's counterpart of fsync)
Update: all warnings on mingw are fixed (when building without -Wall.
There are some more when adding -Wall -Wextra, but I think these are out of scope for this pr.
These patches fixes building libconfig on mingw@Linux in static + shared configuration.
The following warnings are left when building with mingw:
FYI, documentation of _commit (=Windows's counterpart of fsync)
Update: all warnings on mingw are fixed (when building without
-Wall
. There are some more when adding-Wall -Wextra
, but I think these are out of scope for this pr.