diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-07-19 00:23:37 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-07-19 07:24:01 +0000 |
commit | f724cae763a9090000980340525bfc8c855a15b5 (patch) | |
tree | b453808075af9b69bf9efc246ae4076ca0e67a71 /wsutil | |
parent | bf514a5b3d40c66277db16e7435ac46536e98054 (diff) |
Only ABI-check strncasecmp.h if strncasecmp() is part of the API/ABI.
Some routines Wireshark uses are present in some, but not all,
platforms; for routines that would be used on all platforms, libwsutil
provides its own implementations on platforms that lack them.
On platforms that provide a routine, that routine will not be part of
the API and ABI, and, if we do an API or ABI check using the header
libwsutil provides to declare the function on platforms that lack it, we
may have a collision between the declaration in our header and the
declaration in a system header.
There's no guarantee that we can make them match, as the declaration
might differ from platform to platform and from platform version to
platform version, so we simply leave the header file out of the check if
we have the function on the platform on which we're checking the API or
ABI.
Change-Id: I8a23e63d9e17e5c1f5a83304dbe14d1e7df22e7e
Reviewed-on: https://code.wireshark.org/review/3115
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/Makefile.am | 11 | ||||
-rw-r--r-- | wsutil/Makefile.common | 10 |
2 files changed, 18 insertions, 3 deletions
diff --git a/wsutil/Makefile.am b/wsutil/Makefile.am index d15d2ae156..c291af6bf1 100644 --- a/wsutil/Makefile.am +++ b/wsutil/Makefile.am @@ -20,6 +20,15 @@ ACLOCAL_AMFLAGS = `../aclocal-flags` +# Optional headers for ABI checking +wsutil_optional_abi_includes = \ + @STRNCASECMP_INCLUDES@ + +# Header files for functions in libwsutil's ABI on this platform. +libwsutil_abi_INCLUDES = \ + $(libwsutil_nonrepl_INCLUDES) \ + $(wsutil_optional_abi_includes) + # Optional objects that I know how to build. These will be # linked into libwsutil if necessary. wsutil_optional_objects = \ @@ -108,7 +117,7 @@ MAINTAINERCLEANFILES = \ dumpabi-libwsutil: all abi-descriptor.xml rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz mkdir abi-check-headers - cp ../config.h ../ws_symbol_export.h *.h abi-check-headers/ + cp ../config.h ../ws_symbol_export.h $(libwsutil_abi_INCLUDES) abi-check-headers/ abi-compliance-checker -l libwsutil -v1 `readlink .libs/libwsutil.so | sed 's/.*\.so\.//'` \ -relpath $(abs_srcdir) -dump-abi abi-descriptor.xml || \ cat logs/libwsutil/[0-9]*/log.txt diff --git a/wsutil/Makefile.common b/wsutil/Makefile.common index 6201a78591..95736cd1f8 100644 --- a/wsutil/Makefile.common +++ b/wsutil/Makefile.common @@ -76,8 +76,9 @@ LIBWSUTIL_SRC = \ unicode-utils.c \ ws_version_info.c -# Header files that are not generated from other files -LIBWSUTIL_INCLUDES = \ +# Header files that don't declare replacement functions for functions +# present in the APIs/ABIs of some, but not all, targets. +libwsutil_nonrepl_INCLUDES = \ adler32.h \ aes.h \ base64.h \ @@ -131,6 +132,11 @@ LIBWSUTIL_INCLUDES = \ ws_mempbrk.h \ ws_version_info.h +# Header files that are not generated from other files +LIBWSUTIL_INCLUDES = \ + $(libwsutil_nonrepl_INCLUDES) \ + strncasecmp.h + # # Editor modelines - http://www.wireshark.org/tools/modelines.html # |