$ wget ftp://ftp.info-zip.org/pub/infozip/src/zip30.zip
$ unzip zip30.zip
$ curl -fsSL https://gist.githubusercontent.com/marslo/70a3f6728633c49bed865da684378b31/raw/cf402112315ededbfb58c0e17629e9a74708e370/zipinfo.patch
$ cd zip30
$ patch -u zipnote.c -i ../zipinfo.patch
$ make -f unix/Makefile generic
sh unix/configure "cc" "-I. -DUNIX " ""
Check C compiler type (optimization options)
GNU C (-O3)
Check bzip2 support
Check for bzip2 in bzip2 directory
Check if OS already has bzip2 library installed
-- OS supports bzip2 - linking in bzip2
Check for the C preprocessor
Check if we can use asm code
Check for ANSI options
Check for prototypes
Check the handling of const
Check for time_t
Check for size_t
Check for off_t
Check size of UIDs and GIDs
(Now zip stores variable size UIDs/GIDs using a new extra field. This
tests if this OS uses 16-bit UIDs/GIDs and so if the old 16-bit storage
should also be used for backward compatibility.)
s.st_uid is 4 bytes
s.st_gid is 4 bytes
-- UID not 2 bytes - disabling old 16-bit UID/GID support
Check for Large File Support
off_t is 8 bytes
-- yes we have Large File Support!
Check for wide char support
-- have wchar_t - enabling Unicode support
Check for gcc no-builtin flag
Check for rmdir
Check for strchr
Check for strrchr
Check for rename
Check for mktemp
Check for mktime
Check for mkstemp
Check for memset
Check for memmove
Check for strerror
Check for errno declaration
Check for directory libraries
Check for readlink
Check for directory include file
Check for nonexistent include files
Check for term I/O include file
Check for valloc
Check for /usr/local/bin and /usr/local/man
Check for OS-specific flags
Check for symbolic links
eval /Applications/Xcode.app/Contents/Developer/usr/bin/make -f unix/Makefile zips `cat flags`
cc -c -I. -DUNIX -O3 -DBZIP2_SUPPORT -DUIDGID_NOT_16BIT -DLARGE_FILE_SUPPORT -DUNICODE_SUPPORT -DNO_RMDIR -DNO_STRCHR -DNO_STRRCHR -DNO_RENAME -DNO_MKTEMP -DNO_MKTIME -DNO_MKSTEMP -DZMEM -DNO_ERRNO -DNO_DIR -DHAVE_DIRENT_H -DHAVE_TERMIOS_H -DNO_VALLOC zip.c
In file included from zip.c:16:
./zip.h:726:10: error: conflicting types for 'memset'
726 | char *memset OF((char *, int, unsigned int));
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_string.h:74:7: note: previous declaration is here
74 | void *memset(void *__b, int __c, size_t __len);
| ^
In file included from zip.c:16:
./zip.h:727:10: error: conflicting types for 'memcpy'
727 | char *memcpy OF((char *, char *, unsigned int));
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_string.h:72:7: note: previous declaration is here
72 | void *memcpy(void *__dst, const void *__src, size_t __n);
| ^
In file included from zip.c:16:
./zip.h:728:8: error: conflicting types for 'memcmp'
728 | int memcmp OF((char *, char *, unsigned int));
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_string.h:71:6: note: previous declaration is here
71 | int memcmp(const void *__s1, const void *__s2, size_t __n);
| ^
zip.c:239:11: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
239 | local int finish(e)
| ^
zip.c:330:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
330 | void ziperr(c, h)
| ^
zip.c:440:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
440 | void error(h)
| ^
zip.c:448:12: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
448 | local void handler(s)
| ^
zip.c:466:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
466 | void zipmessage_nl(a, nl)
| ^
zip.c:505:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
505 | void zipmessage(a, b)
| ^
zip.c:526:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
526 | void zipwarn(a, b)
| ^
zip.c:1031:12: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
1031 | printf(text[i]);
| ^~~~~~~
zip.c:1031:12: note: treat the string as an argument to avoid this
1031 | printf(text[i]);
| ^
| "%s",
zip.c:1228:12: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
1228 | printf(cryptnote[i]);
| ^~~~~~~~~~~~
zip.c:1228:12: note: treat the string as an argument to avoid this
1228 | printf(cryptnote[i]);
| ^
| "%s",
zip.c:1282:11: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
1282 | local int check_unzip_version(unzippath)
| ^
zip.c:1326:12: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
1326 | local void check_zipfile(zipname, zippath)
| ^
zip.c:1531:11: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
1531 | local int add_filter(flag, pattern)
| ^
zip.c:1646:12: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
1646 | local long add_name(filearg)
| ^
zip.c:1786:5: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
1786 | int encr_passwd(modeflag, pwbuf, size, zfn)
| ^
zip.c:1825:5: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
1825 | int rename_split(temp_name, out_path)
| ^
zip.c:1845:5: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
1845 | int set_filetype(out_path)
| ^
zip.c:2119:5: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
2119 | int main(argc, argv)
| ^
17 warnings and 3 errors generated.
make[1]: *** [zip.o] Error 1
make: *** [generic] Error 2