diff options
-rw-r--r-- | .appveyor.yml | 20 | ||||
-rwxr-xr-x | build.sh | 5 | ||||
-rw-r--r-- | build_common.sh | 15 | ||||
-rw-r--r-- | funcattrs.h | 5 | ||||
-rw-r--r-- | print-ip6.c | 2 |
5 files changed, 32 insertions, 15 deletions
diff --git a/.appveyor.yml b/.appveyor.yml index bb2ec362..582df42d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -12,8 +12,8 @@ matrix: install: - appveyor DownloadFile https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip - 7z x .\WpdPack_4_1_2.zip -oc:\projects\libpcap\Win32 - - appveyor DownloadFile https://npcap.com/dist/npcap-sdk-1.12.zip - - 7z x .\npcap-sdk-1.12.zip -oc:\projects\libpcap\Win32\npcap-sdk-1.12 + - appveyor DownloadFile https://npcap.com/dist/npcap-sdk-1.13.zip + - 7z x .\npcap-sdk-1.13.zip -oc:\projects\libpcap\Win32\npcap-sdk-1.13 environment: matrix: @@ -25,10 +25,10 @@ environment: SDK: WpdPack - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 GENERATOR: "Visual Studio 14 2015" - SDK: npcap-sdk-1.12 + SDK: npcap-sdk-1.13 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 GENERATOR: "Visual Studio 14 2015 Win64" - SDK: npcap-sdk-1.12 + SDK: npcap-sdk-1.13 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 GENERATOR: "Visual Studio 15 2017" SDK: WpdPack @@ -37,10 +37,10 @@ environment: SDK: WpdPack - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 GENERATOR: "Visual Studio 15 2017" - SDK: npcap-sdk-1.12 + SDK: npcap-sdk-1.13 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 GENERATOR: "Visual Studio 15 2017 Win64" - SDK: npcap-sdk-1.12 + SDK: npcap-sdk-1.13 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 GENERATOR: "Visual Studio 16 2019" PLATFORM: Win32 @@ -52,11 +52,11 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 GENERATOR: "Visual Studio 16 2019" PLATFORM: Win32 - SDK: npcap-sdk-1.12 + SDK: npcap-sdk-1.13 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 GENERATOR: "Visual Studio 16 2019" PLATFORM: x64 - SDK: npcap-sdk-1.12 + SDK: npcap-sdk-1.13 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 GENERATOR: "Visual Studio 17 2022" PLATFORM: Win32 @@ -68,11 +68,11 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 GENERATOR: "Visual Studio 17 2022" PLATFORM: Win32 - SDK: npcap-sdk-1.12 + SDK: npcap-sdk-1.13 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 GENERATOR: "Visual Studio 17 2022" PLATFORM: x64 - SDK: npcap-sdk-1.12 + SDK: npcap-sdk-1.13 build_script: # @@ -47,6 +47,11 @@ suncc-5.1[45]/SunOS-5.11) # Various E_STATEMENT_NOT_REACHED and E_DEPRECATED_ATT warnings. TCPDUMP_TAINTED=yes ;; +tcc-*/*) + # print-802_11.c:3317: warning: assignment discards qualifiers from pointer + # target type + TCPDUMP_TAINTED=yes + ;; *) ;; esac diff --git a/build_common.sh b/build_common.sh index 516c90cc..ce9349ed 100644 --- a/build_common.sh +++ b/build_common.sh @@ -63,7 +63,7 @@ print_sysinfo() { cc_version_nocache() { : "${CC:?}" case `basename "$CC"` in - gcc*|egcc*|clang*) + gcc*|egcc*|clang*|tcc*) # GCC and Clang recognize --version, print to stdout and exit with 0. "$CC" --version ;; @@ -151,6 +151,17 @@ cc_id_nocache() { return fi + # Examples of installed packages: + # "tcc version 0.9.27 (x86_64 Linux)" + # "tcc version 0.9.27 2023-07-05 mob@5b28165 (x86_64 OpenBSD)" + # Example of a development version: + # "tcc version 0.9.28rc 2024-04-28 mob@0aca8611 (x86_64 Linux)" + cc_id_guessed=`echo "$cc_id_firstline" | sed 's/^.*tcc version \([0-9\.rc]*\).*$/tcc-\1/'` + if [ "$cc_id_firstline" != "$cc_id_guessed" ]; then + echo "$cc_id_guessed" + return + fi + # OpenBSD default GCC: # "gcc (GCC) 4.2.1 20070719" # RedHat GCC: @@ -187,7 +198,7 @@ discard_cc_cache() { # warnings as errors. cc_werr_cflags() { case `cc_id` in - gcc-*|clang-*) + gcc-*|clang-*|tcc-*) echo '-Werror' ;; xlc-*) diff --git a/funcattrs.h b/funcattrs.h index 21f3cc1d..28e4108b 100644 --- a/funcattrs.h +++ b/funcattrs.h @@ -52,13 +52,14 @@ || ND_IS_AT_LEAST_GNUC_VERSION(2,5) \ || ND_IS_AT_LEAST_SUNC_VERSION(5,9) \ || ND_IS_AT_LEAST_XL_C_VERSION(10,1) \ - || ND_IS_AT_LEAST_HP_C_VERSION(6,10) + || ND_IS_AT_LEAST_HP_C_VERSION(6,10) \ + || __TINYC__ /* * Compiler with support for __attribute((noreturn)), or GCC 2.5 and * later, or some compiler asserting compatibility with GCC 2.5 and * later, or Solaris Studio 12 (Sun C 5.9) and later, or IBM XL C 10.1 * and later (do any earlier versions of XL C support this?), or HP aCC - * A.06.10 and later. + * A.06.10 and later, or current TinyCC. */ #define NORETURN __attribute((noreturn)) diff --git a/print-ip6.c b/print-ip6.c index bc91cb87..dc4aa268 100644 --- a/print-ip6.c +++ b/print-ip6.c @@ -385,7 +385,7 @@ ip6_print(netdissect_options *ndo, const u_char *bp, u_int length) case IPPROTO_MOBILITY_OLD: case IPPROTO_MOBILITY: /* - * XXX - we don't use "advance"; RFC 3775 says that + * RFC 3775 says that * the next header field in a mobility header * should be IPPROTO_NONE, but speaks of * the possibility of a future extension in |