]> The Tcpdump Group git mirrors - libpcap/commit
Add a routine to format error messages with an errno-based message at the end.
authorGuy Harris <[email protected]>
Wed, 15 Nov 2017 18:47:24 +0000 (10:47 -0800)
committerGuy Harris <[email protected]>
Wed, 15 Nov 2017 18:47:24 +0000 (10:47 -0800)
commit7d787482040aa327ef2345eca2e9f980ce76cc28
treea4756446c343f763ab12c0c55b78801d3c28a3f4
parent3299e855cb1cf7b6426d70e52cc51a022b9d9141
Add a routine to format error messages with an errno-based message at the end.

That routine will use strerror_s() or strerror_r() if available, in a
fashion that's thread-safe.  Otherwise, it falls back on
pcap_strerror().

Use it in both libpcap and rpcapd.

Given that we check for errors in strerror_r(), hopefully this will
squelch warnings with newer version of GCC and GNU libc; whilst the
macOS (and other BSD-flavored?) strerror_r() always fills in a message,
that's not required by the Single UNIX Specification, as far as I can
tell, so we apparently really *do* need to check for errors.
41 files changed:
CMakeLists.txt
Makefile.in
config.h.in
configure
configure.ac
dlpisubs.c
fad-getad.c
fad-gifc.c
fad-glifc.c
fmtutils.c [new file with mode: 0644]
fmtutils.h [new file with mode: 0644]
gencode.c
optimize.c
pcap-bpf.c
pcap-bt-linux.c
pcap-bt-monitor-linux.c
pcap-dag.c
pcap-dlpi.c
pcap-int.h
pcap-libdlpi.c
pcap-linux.c
pcap-netfilter-linux.c
pcap-netmap.c
pcap-new.c
pcap-nit.c
pcap-npf.c
pcap-pf.c
pcap-rpcap.c
pcap-septel.c
pcap-sita.c
pcap-snf.c
pcap-snit.c
pcap-snoop.c
pcap-tc.c
pcap-usb-linux.c
pcap.c
rpcapd/daemon.c
rpcapd/rpcapd.c
savefile.c
sf-pcap-ng.c
sf-pcap.c