diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-09-01 16:11:32 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-09-01 16:11:32 -0700 |
commit | 9a6a6502413e657277e74ac1d0842ddca34cab50 (patch) | |
tree | 09d3a2d474389be1d655f92a19263b713dd8677e /netdissect-stdinc.h | |
parent | 50c1904960bec90e234100a7c1b081d771c48e9b (diff) | |
download | tcpdump-9a6a6502413e657277e74ac1d0842ddca34cab50.tar.gz |
Don't use <ctype.h> macros.
Some of them are locale-dependent, and all of them run the risk of
failing if you hand them a char with the 8th bit set.
Move our replacements to a new netdissect-ctype.h file, and, for the
ones that check for particular character types, add _ASCII to the name,
to indicate that only ASCII characters pass the check. Do the same for
the ones that map between cases, to indicate that they only map ASCII
letters.
For isspace(), explicitly check for the characters we care about, to
make it clearer what we're doing.
Diffstat (limited to 'netdissect-stdinc.h')
-rw-r--r-- | netdissect-stdinc.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/netdissect-stdinc.h b/netdissect-stdinc.h index 567fb8ef..2c16be39 100644 --- a/netdissect-stdinc.h +++ b/netdissect-stdinc.h @@ -124,7 +124,6 @@ #include <stdio.h> #include <winsock2.h> #include <ws2tcpip.h> -#include <ctype.h> #include <time.h> #include <io.h> #include <fcntl.h> @@ -222,7 +221,6 @@ typedef char* caddr_t; * Includes and definitions for various flavors of UN*X. */ -#include <ctype.h> #include <unistd.h> #include <netdb.h> #include <sys/param.h> |