| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
If we ever run the tests on Windows NT, they might get back a UTF-16
string, which they won't handle correctly.
On UN*X, it's just a simple wrapper around pcap_findalldevs(), so it's
not worth testing.
On MS-DOS, it basically duplicates what pcap_findalldevs() does.
|
|
|
|
| |
That lets us use any of them in public declarations, if we ever need to.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Take the set of tests in the test programs that check compiler and
version to decide how to mark functions as printflike or as not
returning, and put them into a header. Use that throughout the libpcap
code, rather than doing configuration-time tests that have to be
replicated in the autoconf script and CMake files.
That obviates the need to put those tests into CMakeLists.txt and means
that, if we ever make functions with those attributes available by code
outside libpcap (for example, if we ever introduce a plugin mechanism
for libpcap, to allow third-party pcap modules to be maintained
separately from libpcap), we can use those declarations (making a public
header file dependent on the results of a configure script usually
doesn't work well, for a variety of reasons).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a bunch of compiler checks to define various macros for attributes
to be assigned to functions and variables.
The Single UNIX Specification says inet_addr() returns (in_addr_t)(-1)
on an error; check for that, as INADDR_NONE isn't defined on all UN*Xes.
(Microsoft's documentation says inet_addr() returns INADDR_NONE, but
that's probably just -1 or 0xffffffff.)
Check whether we have sys/select.h and, if we don't, include sys/time.h
instead; some older UN*Xes don't have sys/select.h.
Get rid of some unused #defines in Win32/Include/Gnuc.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We include <unistd.h> for getopt(), but, on Windows, we supply our own
getopt() (as it's a UN*X API), so supply our own header and include that
instead.
While we're at it, mark the copyright strings as unused (to squelch
compiler warnings), and don't include the headers for select() or poll()
in capturetest.c, as we don't use those APIs there (that's what
selpolltest(), which is UN*X-only, is for). <unistd.h> or "getopt.h"
should declare the getopt() external variables, so don't declare them
ourselves.
|
| |
|
|
|