From 4a4dbe027a082e546512b5ccb2999753651a9a28 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 26 Nov 2021 13:53:43 +0100 Subject: Add a wrapper for the main function on Windows A macro and forward declaration are added to compat.h that rename the main() function programs using compat.h into sqfs_tools_main. An actual main() function is added to libcompat.a, that uses the shell API to get the UTF-16 command line arguments, convert them to UTF-8 and call sqfs_tools_main. Signed-off-by: David Oberhollenzer --- lib/compat/Makemodule.am | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/compat/Makemodule.am') diff --git a/lib/compat/Makemodule.am b/lib/compat/Makemodule.am index 6ea0750..f9dce2e 100644 --- a/lib/compat/Makemodule.am +++ b/lib/compat/Makemodule.am @@ -3,6 +3,7 @@ libcompat_a_SOURCES += lib/compat/strndup.c lib/compat/mockups.c libcompat_a_SOURCES += lib/compat/chdir.c include/compat.h libcompat_a_SOURCES += lib/compat/path_to_windows.c libcompat_a_SOURCES += lib/compat/w32_perror.c +libcompat_a_SOURCES += lib/compat/w32_wmain.c libcompat_a_SOURCES += lib/compat/fnmatch.c libcompat_a_SOURCES += lib/compat/getopt.c libcompat_a_SOURCES += lib/compat/getopt_long.c -- cgit v1.2.3