From a772248e1a2f0886d8479b2f14392f020ea8c6e0 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 2 Apr 2020 01:07:35 +0200 Subject: Import the remaining utility files into VisualStudio project - The libcommon print verion function requires the PACKAGE_NAME and PACKAGE_VERSION defines. Those are added manually to the msvc stub of config.h. - Also, libcommon cannot directly include getopt.h - libfstree needs to change the return type for getline Signed-off-by: David Oberhollenzer --- lib/common/Makemodule.am | 2 + lib/common/comp_opt.c | 7 +- lib/common/libcommon.vcxproj | 182 +++++++++++++++++++++++++++++++++++ lib/common/libcommon.vcxproj.filters | 74 ++++++++++++++ lib/compat/Makemodule.am | 2 + lib/compat/libcompat.vcxproj | 171 ++++++++++++++++++++++++++++++++ lib/compat/libcompat.vcxproj.filters | 41 ++++++++ lib/fstree/Makemodule.am | 2 + lib/fstree/fstree_from_file.c | 2 +- lib/fstree/libfstree.vcxproj | 178 ++++++++++++++++++++++++++++++++++ lib/fstree/libfstree.vcxproj.filters | 62 ++++++++++++ lib/tar/Makemodule.am | 2 + lib/tar/libtar.vcxproj | 179 ++++++++++++++++++++++++++++++++++ lib/tar/libtar.vcxproj.filters | 65 +++++++++++++ lib/util/Makemodule.am | 2 + lib/util/libutil.vcxproj | 171 ++++++++++++++++++++++++++++++++ lib/util/libutil.vcxproj.filters | 41 ++++++++ 17 files changed, 1181 insertions(+), 2 deletions(-) create mode 100644 lib/common/libcommon.vcxproj create mode 100644 lib/common/libcommon.vcxproj.filters create mode 100644 lib/compat/libcompat.vcxproj create mode 100644 lib/compat/libcompat.vcxproj.filters create mode 100644 lib/fstree/libfstree.vcxproj create mode 100644 lib/fstree/libfstree.vcxproj.filters create mode 100644 lib/tar/libtar.vcxproj create mode 100644 lib/tar/libtar.vcxproj.filters create mode 100644 lib/util/libutil.vcxproj create mode 100644 lib/util/libutil.vcxproj.filters (limited to 'lib') diff --git a/lib/common/Makemodule.am b/lib/common/Makemodule.am index c59ab4c..5f659dd 100644 --- a/lib/common/Makemodule.am +++ b/lib/common/Makemodule.am @@ -14,3 +14,5 @@ libcommon_a_SOURCES += lib/common/comp_lzo.c endif noinst_LIBRARIES += libcommon.a + +EXTRA_DIST += lib/common/libcommon.vcxproj lib/common/libcommon.vcxproj.filters diff --git a/lib/common/comp_opt.c b/lib/common/comp_opt.c index 58a7a21..93ad1cc 100644 --- a/lib/common/comp_opt.c +++ b/lib/common/comp_opt.c @@ -8,9 +8,14 @@ #include #include -#include #include +#ifdef HAVE_GETSUBOPT +#include +#else +#include "compat.h" +#endif + typedef struct { const char *name; sqfs_u16 flag; diff --git a/lib/common/libcommon.vcxproj b/lib/common/libcommon.vcxproj new file mode 100644 index 0000000..5f2eaf2 --- /dev/null +++ b/lib/common/libcommon.vcxproj @@ -0,0 +1,182 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {4AF21B3A-E7A0-48E6-951C-CA442410231F} + libcommon + 10.0 + + + + StaticLibrary + true + v142 + Unicode + + + StaticLibrary + false + v142 + true + Unicode + + + StaticLibrary + true + v142 + Unicode + + + StaticLibrary + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + false + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + CompileAsC + $(IntDir)\%(RelativeDir) + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + CompileAsC + $(IntDir)\%(RelativeDir) + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + CompileAsC + $(IntDir)\%(RelativeDir) + + + Console + true + true + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + CompileAsC + $(IntDir)\%(RelativeDir) + + + Console + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/common/libcommon.vcxproj.filters b/lib/common/libcommon.vcxproj.filters new file mode 100644 index 0000000..1f91163 --- /dev/null +++ b/lib/common/libcommon.vcxproj.filters @@ -0,0 +1,74 @@ + + + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx + + + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + + + Headers + + + Headers + + + Headers + + + \ No newline at end of file diff --git a/lib/compat/Makemodule.am b/lib/compat/Makemodule.am index 7137f2c..a54059e 100644 --- a/lib/compat/Makemodule.am +++ b/lib/compat/Makemodule.am @@ -4,3 +4,5 @@ libcompat_a_SOURCES += lib/compat/chdir.c include/compat.h libcompat_a_SOURCES += lib/compat/path_to_windows.c noinst_LIBRARIES += libcompat.a + +EXTRA_DIST += lib/compat/libcompat.vcxproj lib/compat/libcompat.vcxproj.filters diff --git a/lib/compat/libcompat.vcxproj b/lib/compat/libcompat.vcxproj new file mode 100644 index 0000000..b77a39c --- /dev/null +++ b/lib/compat/libcompat.vcxproj @@ -0,0 +1,171 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {45DEC8F7-F154-4C3E-B616-A21FB3CA8CC2} + libcompat + 10.0 + + + + StaticLibrary + true + v142 + Unicode + + + StaticLibrary + false + v142 + true + Unicode + + + StaticLibrary + true + v142 + Unicode + + + StaticLibrary + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + true + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + false + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include\;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include\;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include\;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + true + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include\;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + true + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/compat/libcompat.vcxproj.filters b/lib/compat/libcompat.vcxproj.filters new file mode 100644 index 0000000..aa169a5 --- /dev/null +++ b/lib/compat/libcompat.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + + + Headers + + + Headers + + + \ No newline at end of file diff --git a/lib/fstree/Makemodule.am b/lib/fstree/Makemodule.am index 56394a6..31823f8 100644 --- a/lib/fstree/Makemodule.am +++ b/lib/fstree/Makemodule.am @@ -11,3 +11,5 @@ libfstree_a_CFLAGS = $(AM_CFLAGS) libfstree_a_CPPFLAGS = $(AM_CPPFLAGS) noinst_LIBRARIES += libfstree.a + +EXTRA_DIST += lib/fstree/libfstree.vcxproj lib/fstree/libfstree.vcxproj.filters diff --git a/lib/fstree/fstree_from_file.c b/lib/fstree/fstree_from_file.c index bf11755..d2f1c68 100644 --- a/lib/fstree/fstree_from_file.c +++ b/lib/fstree/fstree_from_file.c @@ -282,8 +282,8 @@ out_desc: int fstree_from_file(fstree_t *fs, const char *filename, FILE *fp) { size_t n, line_num = 0; - ssize_t ret; char *line; + int ret; for (;;) { line = NULL; diff --git a/lib/fstree/libfstree.vcxproj b/lib/fstree/libfstree.vcxproj new file mode 100644 index 0000000..baffc40 --- /dev/null +++ b/lib/fstree/libfstree.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {4AA93963-2BC8-48FA-80B8-776B1F80BBA5} + libfstree + 10.0 + + + + StaticLibrary + true + v142 + Unicode + + + StaticLibrary + false + v142 + true + Unicode + + + StaticLibrary + true + v142 + Unicode + + + StaticLibrary + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + false + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + true + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/fstree/libfstree.vcxproj.filters b/lib/fstree/libfstree.vcxproj.filters new file mode 100644 index 0000000..5e70b98 --- /dev/null +++ b/lib/fstree/libfstree.vcxproj.filters @@ -0,0 +1,62 @@ + + + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx + + + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + + + Headers + + + Headers + + + Headers + + + \ No newline at end of file diff --git a/lib/tar/Makemodule.am b/lib/tar/Makemodule.am index abc0209..b5fc109 100644 --- a/lib/tar/Makemodule.am +++ b/lib/tar/Makemodule.am @@ -8,3 +8,5 @@ libtar_a_CFLAGS = $(AM_CFLAGS) libtar_a_CPPFLAGS = $(AM_CPPFLAGS) noinst_LIBRARIES += libtar.a + +EXTRA_DIST += lib/tar/libtar.vcxproj lib/tar/libtar.vcxproj.filters diff --git a/lib/tar/libtar.vcxproj b/lib/tar/libtar.vcxproj new file mode 100644 index 0000000..3a56c3f --- /dev/null +++ b/lib/tar/libtar.vcxproj @@ -0,0 +1,179 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {73712684-0F79-4EF6-950C-943C0456FF05} + libtar + 10.0 + + + + StaticLibrary + true + v142 + Unicode + + + StaticLibrary + false + v142 + true + Unicode + + + StaticLibrary + true + v142 + Unicode + + + StaticLibrary + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + true + + + false + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/tar/libtar.vcxproj.filters b/lib/tar/libtar.vcxproj.filters new file mode 100644 index 0000000..d1154f6 --- /dev/null +++ b/lib/tar/libtar.vcxproj.filters @@ -0,0 +1,65 @@ + + + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx + + + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source + + + + + Headers + + + Headers + + + Headers + + + \ No newline at end of file diff --git a/lib/util/Makemodule.am b/lib/util/Makemodule.am index 5cff2dd..f3ce23d 100644 --- a/lib/util/Makemodule.am +++ b/lib/util/Makemodule.am @@ -6,3 +6,5 @@ libutil_a_CFLAGS = $(AM_CFLAGS) libutil_a_CPPFLAGS = $(AM_CPPFLAGS) noinst_LIBRARIES += libutil.a + +EXTRA_DIST += lib/util/libutil.vcxproj lib/util/libutil.vcxproj.filters diff --git a/lib/util/libutil.vcxproj b/lib/util/libutil.vcxproj new file mode 100644 index 0000000..f70bc3b --- /dev/null +++ b/lib/util/libutil.vcxproj @@ -0,0 +1,171 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {E25396A6-AF76-4695-BA23-01D88009B7EC} + libutil + 10.0 + + + + StaticLibrary + true + v142 + Unicode + + + StaticLibrary + false + v142 + true + Unicode + + + StaticLibrary + true + v142 + Unicode + + + StaticLibrary + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + false + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + true + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(SolutionDir)\include\win32;$(SolutionDir)\include;%(AdditionalIncludeDirectories) + $(IntDir)\%(RelativeDir) + CompileAsC + + + Console + true + true + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/util/libutil.vcxproj.filters b/lib/util/libutil.vcxproj.filters new file mode 100644 index 0000000..a1e95ff --- /dev/null +++ b/lib/util/libutil.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx + + + + + Source + + + Source + + + Source + + + Source + + + + + Headers + + + Headers + + + Headers + + + Headers + + + \ No newline at end of file -- cgit v1.2.3