Summary:
========
This PR makes `devs/expertise/native-windows` compile on linux.
lua was a little problematic:
luajit is a default option to bindings in `master` but at
`devs/expertise/native-windows` it was changed to lua, This PR brings
luajit back as a default option, but make a Windows build always use
lua - semantically equal to what happened at
`devs/expertise/native-windows`
Ref Issue #38
Linux Test plan:
================
- `meson` configured with `-Dbindigns=cxx,mono`;
- `ninja` should return every warning that `master` does, nothing else;
- `meson test -C <build dir>` should pass in everything that `master`
does;
Windows Test plan:
==================
- Run `configure.bat` normally;
- Run `build.bat` it should yield the same erros/warnigs that
`devs/expertise/native-windows` does;
As implicit-function-declaration is a really important error for who is
reviewing/creating PR's I suggest to disable
`Wno-implicit-function-declaration` at meson build. The ones who need
the warning disabled can do it themselves.
Summary:
Remove the following linking error:
```
[18/1920] Linking target src/lib/evil/unposix/sys/evil_unposix_sys-1.dll.
FAILED: src/lib/evil/unposix/sys/evil_unposix_sys-1.dll
lld-link @src/lib/evil/unposix/sys/evil_unposix_sys-1.dll.rsp
lld-link: error: undefined symbol: localtime_s
>>> referenced by src/lib/evil/unposix/sys/f1142d4@@evil_unposix_sys@sha/time.c.obj:(l
ocaltime_r)
```
`localtime_t` is from `ucrt/time.h`. `#include <time.h>` was not picking
`UCRT` implementation of `time.h`, now it is changed to `#include
<../ucrt/time.h>`, forcing `UCRT`'s implementation.
If at some point `time.h` (`time.h` not `sys/time.h`) is add to
`unposix` this should be changed to `#include <../time.h>` as there
shoud be a `#include_next <time.h>`.
Test Plan:
- added -k0 to NINJAFLAGS at build.bat;
- there should not be any errors/warnings about sys/time.h.
- there will be a lot of other linkge errors, but none about finding
methods defined at `sys/time.{h,c}`.
It does so by:
- including definitions that Windows already has;
- `typedef` the ones that Windows doesn't have, following `sys/types.h`
manual guidelines;
- `pid_t` is a process id, so on this implementation is
`typedef` as an `DWORD`, the type returned by `GetCurrentProcessId`
function, and thus it is an `unsigned long`. `sys\types.h` manual
establishes that it should be a `signed int` and when changed, it
should not be larger than a `long`;
Test Plan:
- merged #PR16 then reset to my last commit, doing so to use
`src/lib/evil/unposix/{meson.build,sys/meson.build};
- comment `-Wno-missing-variable-declarations` at `meson.build`;
- added `-k0` to `NINJAFLAGS` at `build.bat`;
- there should not be any errors/warnings about sys/types.h.
Summary:
The way sys/time.h was added it was not being compiled in the right way.
PR#16 makes possible to compile unposix/sys, so it was possible to
detect some errors.
The errors were about fault includes.
Now there should be no compile errors at sys/time.h.
Depends on PR#16
Test Plan:
- comment -Wno-missing-variable-declarations at meson.build;
- added -k0 to NINJAFLAGS at build.bat;
- there should not be any errors/warnings about sys/types.h.
- a project version was described, enabling the library version to
be used in the same way others meson.build from EFL describes it.
- another (but compatible) variable is used here to set the value
of 'automatic_pkgfile' because 'sys_windows' wasn't declared.
- `src/lib/evil/unposix/sys/time.c` was add to `src/lib/evil/meson.build`;
- .c and .h were separeted;
- Faulty timezone structure implemented
Test plan:
- Ninja with `-k0` flag compiles as much as with
`src/lib/evil/unposix/sys/time.c` as with the stub and there is no
aditional error.
Tested %vcvarsx64%:
1. `@echo %vcvarsx64% > test1`
2. run `build.bat` may times
3. `@echo %vcvarsx64% > test2`
4. `diff test1 test2` there should be no diference
Tested %path%:
1. `@echo %path% > test1`
2. run `build.bat` may times
3. `@echo %path% > test2`
4. `diff test1 test2` there should be no diference