]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Don't #undef stat and #define stat(). stat is one of those unfortunate 1076/head
authorJoel Uckelman <juckelman@strozfriedberg.co.uk>
Thu, 18 Oct 2018 15:02:47 +0000 (16:02 +0100)
committerJoel Uckelman <juckelman@strozfriedberg.co.uk>
Thu, 18 Oct 2018 15:25:14 +0000 (16:25 +0100)
commitbf234723494dfd847bf7b030f2227c7bbd99b36b
treee0c3ea7bbd9a6e475b48ed9aac2e2f908920d449
parentd5f35a90a4cb1eeb918213bff9d78e8b0471dc0a
Don't #undef stat and #define stat(). stat is one of those unfortunate
identifiers for which there is both a struct and a function. MinGW uses
a #define for setting struct stat to be the right struct, so doing #undef
stat to clear the way for a #define for stat() the function
inadvertantly clobbers the selected stat struct. To avoid this, we
define la_stat() to _la_stat on Windows and stat() elsewhere, and then
use la_stat() instead of stat().
libarchive/archive_match.c
libarchive/archive_platform.h
libarchive/archive_read_disk_entry_from_file.c
libarchive/archive_read_disk_posix.c
libarchive/archive_util.c
libarchive/archive_windows.h
libarchive/archive_write_disk_posix.c