Add a shared "port" directory for POSIX functions needed by multiple host tools ...
authorColin Finck <colin@reactos.org>
Sat, 27 Apr 2019 14:19:26 +0000 (16:19 +0200)
committerColin Finck <colin@reactos.org>
Sun, 28 Apr 2019 21:23:06 +0000 (23:23 +0200)
commit2c11c411153eea31d10025dddf7332ce641be629
tree24ea2ffa976ef9f0be5318f8c55ef8bd96c12e67
parentc02257ef57858bfe91f106e8c91c669e4a141293
Add a shared "port" directory for POSIX functions needed by multiple host tools (getopt/mkstemps) and import the one and only getopt from glibc.

This finally fixes our duplicated getopt functions from different sources and gives us an up to date and the most compatible implementation.
isohybrid actually relies on a glibc-specific getopt behavior that we previously hacked into the reactos_support_code.c implementation derived from BSD/mingw-w64.
widl also needs getopt and previously used an even older BSD-derived code.
18 files changed:
sdk/tools/hhpcomp/CMakeLists.txt
sdk/tools/hhpcomp/chmc/chmc.c
sdk/tools/hhpcomp/port/config.h [deleted file]
sdk/tools/isohybrid/CMakeLists.txt
sdk/tools/isohybrid/reactos_support_code.c
sdk/tools/isohybrid/reactos_support_code.h
sdk/tools/port/bits/getopt_core.h [new file with mode: 0644]
sdk/tools/port/bits/getopt_ext.h [new file with mode: 0644]
sdk/tools/port/getopt.c [new file with mode: 0644]
sdk/tools/port/getopt.h [new file with mode: 0644]
sdk/tools/port/getopt1.c [new file with mode: 0644]
sdk/tools/port/getopt_int.h [new file with mode: 0644]
sdk/tools/port/mkstemps.c [moved from sdk/tools/hhpcomp/port/mkstemps.c with 95% similarity]
sdk/tools/port/port.h [new file with mode: 0644]
sdk/tools/widl/CMakeLists.txt
sdk/tools/widl/getopt.c [deleted file]
sdk/tools/widl/port/config.h [deleted file]
sdk/tools/widl/port/mkstemps.c [deleted file]