]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Rename err.h to avoid conflict with system header 2735/head
authorTim Kientzle <kientzle@acm.org>
Sat, 13 Sep 2025 19:30:03 +0000 (12:30 -0700)
committerTim Kientzle <kientzle@acm.org>
Sat, 13 Sep 2025 19:30:03 +0000 (12:30 -0700)
Depending on header search path ordering, we can easily
confuse libarchive_fe/err.h with the system header.
Rename ours to lafe_err.h to avoid the confusion.
Rename libarchive_fe/err.c to match.

28 files changed:
Makefile.am
cat/CMakeLists.txt
cat/bsdcat.c
cat/cmdline.c
contrib/android/Android.mk
cpio/CMakeLists.txt
cpio/cmdline.c
cpio/cpio.c
cpio/cpio_windows.c
cpio/test/CMakeLists.txt
cpio/test/test_owner_parse.c
libarchive_fe/lafe_err.c [moved from libarchive_fe/err.c with 99% similarity]
libarchive_fe/lafe_err.h [moved from libarchive_fe/err.h with 100% similarity]
libarchive_fe/line_reader.c
libarchive_fe/passphrase.c
tar/CMakeLists.txt
tar/bsdtar.c
tar/bsdtar_windows.c
tar/cmdline.c
tar/creation_set.c
tar/read.c
tar/subst.c
tar/util.c
tar/write.c
unzip/CMakeLists.txt
unzip/bsdunzip.c
unzip/cmdline.c
unzip/test/CMakeLists.txt

index 735a44ab91a769656190fbb1d0d64b9b95543f18..b99c4afbb0bdb5f35ccd99be1888512d8f4e1013 100644 (file)
@@ -1074,8 +1074,8 @@ libarchive_test_EXTRA_DIST=\
 # Common code for libarchive frontends (cpio, tar)
 #
 libarchive_fe_la_SOURCES= \
-       libarchive_fe/err.c \
-       libarchive_fe/err.h \
+       libarchive_fe/lafe_err.c \
+       libarchive_fe/lafe_err.h \
        libarchive_fe/lafe_platform.h \
        libarchive_fe/line_reader.c \
        libarchive_fe/line_reader.h \
index d534980b9e12bc40bfbe7bb344d3963b8c34af3e..2bf132f78febb46303d92b40ce714f8f6da2a10f 100644 (file)
@@ -13,8 +13,8 @@ IF(ENABLE_CAT)
     bsdcat.h
     bsdcat_platform.h
     cmdline.c
-    ../libarchive_fe/err.c
-    ../libarchive_fe/err.h
+    ../libarchive_fe/lafe_err.c
+    ../libarchive_fe/lafe_err.h
     ../libarchive_fe/lafe_platform.h
   )
   INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libarchive_fe)
index 40fdd04363e51bee2d0e0a68706a3373f1a26471..2e78870ae50e63dd08410178299f9c52eacbd172 100644 (file)
@@ -25,7 +25,7 @@
 #include <archive_entry.h>
 
 #include "bsdcat.h"
-#include "err.h"
+#include "lafe_err.h"
 
 #define        BYTES_PER_BLOCK (20*512)
 
index 8ecd74aa95e4d4c7459838f6bcafad754e78eefb..5a5fcaf0263fc54fb6aa0ec693f7459756be4d4d 100644 (file)
@@ -22,7 +22,7 @@
 #endif
 
 #include "bsdcat.h"
-#include "err.h"
+#include "lafe_err.h"
 
 /*
  * Short options for bsdcat.  Please keep this sorted.
index 8e7fbdacefe96db6c9a7c6e73e5877b077f39cd3..2e9d9a399ad8b2fa292920a81a181bac84ff279f 100644 (file)
@@ -151,7 +151,7 @@ else
 libarchive_host_src_files :=
 endif
 
-libarchive_fe_src_files :=  libarchive_fe/err.c \
+libarchive_fe_src_files :=  libarchive_fe/lafe_err.c \
                                                        libarchive_fe/line_reader.c \
                                                        libarchive_fe/passphrase.c
 
index 2fee053bd4816d58a58574c342e338ecf9874c54..7678ed658ae77ea9070d0f5b63f37a8ea491c6fc 100644 (file)
@@ -13,8 +13,8 @@ IF(ENABLE_CPIO)
     cpio.c
     cpio.h
     cpio_platform.h
-    ../libarchive_fe/err.c
-    ../libarchive_fe/err.h
+    ../libarchive_fe/lafe_err.c
+    ../libarchive_fe/lafe_err.h
     ../libarchive_fe/lafe_platform.h
     ../libarchive_fe/line_reader.c
     ../libarchive_fe/line_reader.h
index c67519947dbcebd36ab8ab13c347075473eec3a2..db06c03c011de4faa83468245788f6a325605234 100644 (file)
@@ -26,7 +26,7 @@
 #endif
 
 #include "cpio.h"
-#include "err.h"
+#include "lafe_err.h"
 
 /*
  * Short options for cpio.  Please keep this sorted.
index cd88d416e861d06712348a916f726a917e6c9f95..262db510568b8dc368254d5bee3888b9f8e81d0e 100644 (file)
@@ -60,7 +60,7 @@
 #endif
 
 #include "cpio.h"
-#include "err.h"
+#include "lafe_err.h"
 #include "line_reader.h"
 #include "passphrase.h"
 
index 267b379753d90a64b65a1ccb192ebc3a2a1dd101..144814186a1f2e3fcf518a5d66a4bc3368d431b2 100644 (file)
@@ -24,7 +24,7 @@
 #include <sddl.h>
 
 #include "cpio.h"
-#include "err.h"
+#include "lafe_err.h"
 
 #define EPOC_TIME      (116444736000000000ULL)
 
index 2c530661cfa788fb2a3c7ab41f12783dbb7cfe88..fe6ab968d3dd01c155133713ad4a155908322dee 100644 (file)
@@ -9,7 +9,7 @@
 IF(ENABLE_CPIO AND ENABLE_TEST)
   SET(bsdcpio_test_SOURCES
     ../cmdline.c
-    ../../libarchive_fe/err.c
+    ../../libarchive_fe/lafe_err.c
     ../../test_utils/test_utils.c
     ../../test_utils/test_main.c
     test.h
index dfc78ca77aec71bbcbe49e5aedb47447167ea8b8..bd68f21cec9b96921faa748d1d5f13896cd176ce 100644 (file)
@@ -7,7 +7,7 @@
 #include "test.h"
 
 #include "../cpio.h"
-#include "err.h"
+#include "lafe_err.h"
 
 #if !defined(_WIN32)
 #define ROOT "root"
similarity index 99%
rename from libarchive_fe/err.c
rename to libarchive_fe/lafe_err.c
index f6dcf44af347b12dcec69d60a4eafe724bbed62d..b108b9b1fea757e92c20976d6f9479e6318fb7ee 100644 (file)
@@ -36,7 +36,7 @@
 #include <string.h>
 #endif
 
-#include "err.h"
+#include "lafe_err.h"
 
 static void lafe_vwarnc(int, const char *, va_list) __LA_PRINTFLIKE(2, 0);
 
similarity index 100%
rename from libarchive_fe/err.h
rename to libarchive_fe/lafe_err.h
index 7f0429ece3cf3655405a9ba72cc96fda6373db93..0af9db53c0a27beb3394a13427b2fe23b7e62bbf 100644 (file)
@@ -31,7 +31,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "err.h"
+#include "lafe_err.h"
 #include "line_reader.h"
 
 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__BORLANDC__)
index 527ad2d63654b70fba45ab53f01ed7f44aa2451a..1b7a504536642afca2f6126496e29b522d557829 100644 (file)
@@ -61,7 +61,7 @@
 #include <readpassphrase.h>
 #endif
 
-#include "err.h"
+#include "lafe_err.h"
 #include "passphrase.h"
 
 #ifndef HAVE_READPASSPHRASE
index b09426945b9458aeddd3bcb8e956ec99a151fc8c..c082c66e4b0575714807c402e3bc8b4d7bc4a1aa 100644 (file)
@@ -18,8 +18,8 @@ IF(ENABLE_TAR)
     subst.c
     util.c
     write.c
-    ../libarchive_fe/err.c
-    ../libarchive_fe/err.h
+    ../libarchive_fe/lafe_err.c
+    ../libarchive_fe/lafe_err.h
     ../libarchive_fe/lafe_platform.h
     ../libarchive_fe/line_reader.c
     ../libarchive_fe/line_reader.h
index c80c1a1b68896b8573b7031e8b1c35f3cbe98820..92e86fd6bd9414d6d297297b4556779e34d983fe 100644 (file)
@@ -55,7 +55,7 @@
 #endif
 
 #include "bsdtar.h"
-#include "err.h"
+#include "lafe_err.h"
 
 #if ARCHIVE_VERSION_NUMBER < 4000000 && !defined(_PATH_DEFTAPE)
 // Libarchive 4.0 and later will NOT define _PATH_DEFTAPE
index a63f27e50532300fcf83c0cb11c1800674f3542c..da49b4363b47f5d126441338ace369cdf7429273 100644 (file)
@@ -24,7 +24,7 @@
 #include <sddl.h>
 
 #include "bsdtar.h"
-#include "err.h"
+#include "lafe_err.h"
 
 /* This may actually not be needed anymore.
  * TODO: Review the error handling for chdir() failures and
index c766c1a52dbb794700352f44bf9018616e99aeca..309be312c94818bd8801efe40f6c01198576edd6 100644 (file)
@@ -22,7 +22,7 @@
 #endif
 
 #include "bsdtar.h"
-#include "err.h"
+#include "lafe_err.h"
 
 /*
  * Short options for tar.  Please keep this sorted.
index 6883090418b076d5634301ea9ba673d84acbd560..51f803354a5d8dde70cbd3ecc078cd01c3acfbf7 100644 (file)
@@ -15,7 +15,7 @@
 #endif
 
 #include "bsdtar.h"
-#include "err.h"
+#include "lafe_err.h"
 
 struct creation_set {
        char             *create_format;
index 8563fe714f9afd968d3a0ebd2105aec3a4572fa2..7cbcfb19ff0ac3e70f596512f2f0df46f77dc7b1 100644 (file)
@@ -57,7 +57,7 @@
 #endif
 
 #include "bsdtar.h"
-#include "err.h"
+#include "lafe_err.h"
 
 struct progress_data {
        struct bsdtar *bsdtar;
index 5546b5f93b12640d9c5706817c8916c1b2935765..a5d644dc5a70ccfcc7c5519e082c5a2fd24db044 100644 (file)
@@ -25,7 +25,7 @@
 #define        REG_BASIC 0
 #endif
 
-#include "err.h"
+#include "lafe_err.h"
 
 struct subst_rule {
        struct subst_rule *next;
index 5bad4345e24264d23258880b9649840c203a9be6..fc5e15cb039f202858007df304db90df9073f4dd 100644 (file)
@@ -41,7 +41,7 @@
 #endif
 
 #include "bsdtar.h"
-#include "err.h"
+#include "lafe_err.h"
 #include "passphrase.h"
 
 static size_t  bsdtar_expand_char(char *, size_t, size_t, char);
index 92cc0ce574013409c7db44f9e2ea48f20a1e47c7..9e6c97b580b7304b5c7fbea8f9ed7d64ec836c99 100644 (file)
@@ -58,7 +58,7 @@
 #endif
 
 #include "bsdtar.h"
-#include "err.h"
+#include "lafe_err.h"
 #include "line_reader.h"
 
 #ifndef O_BINARY
index 586245b67fd747bf720afe4e61fdd521480c0669..f3c62cb339c6b7e450aad3adecc7a1d56468b77f 100644 (file)
@@ -16,8 +16,8 @@ IF(ENABLE_UNZIP)
     la_getline.c
     la_getline.h
     la_queue.h
-    ../libarchive_fe/err.c
-    ../libarchive_fe/err.h
+    ../libarchive_fe/lafe_err.c
+    ../libarchive_fe/lafe_err.h
     ../libarchive_fe/lafe_platform.h
     ../libarchive_fe/passphrase.c
     ../libarchive_fe/passphrase.h
index 0559a0ddce8b34466075f766eb6a23f98c481b21..1b520e8416908d819b3c7c43c00bb18d55901303 100644 (file)
@@ -57,7 +57,7 @@
 
 #include "bsdunzip.h"
 #include "passphrase.h"
-#include "err.h"
+#include "lafe_err.h"
 
 /* command-line options */
 static int              a_opt;         /* convert EOL */
index 8afddedd5eaddfacb0f4072443aa037fad12cf72..8e6eedd2321c74651ea479f8e9b05efa07d04bca 100644 (file)
@@ -21,7 +21,7 @@
 #endif
 
 #include "bsdunzip.h"
-#include "err.h"
+#include "lafe_err.h"
 
 /*
  * Short options for bsdunzip.  Please keep this sorted.
index 789cfb7e492e1f375bdb6902c37fa3d290036bac..57ed651a58b07c59977965841aea31c3c627d0a3 100644 (file)
@@ -5,7 +5,7 @@
 ############################################
 IF(ENABLE_UNZIP AND ENABLE_TEST)
   SET(bsdunzip_test_SOURCES
-    ../../libarchive_fe/err.c
+    ../../libarchive_fe/lafe_err.c
     ../../test_utils/test_utils.c
     ../../test_utils/test_main.c
     test.h