haproxy/include/common
Willy Tarreau 908071171b BUILD: general: always pass unsigned chars to is* functions
The isalnum(), isalpha(), isdigit() etc functions from ctype.h are
supposed to take an int in argument which must either reflect an
unsigned char or EOF. In practice on some platforms they're implemented
as macros referencing an array, and when passed a char, they either cause
a warning "array subscript has type 'char'" when lucky, or cause random
segfaults when unlucky. It's quite unconvenient by the way since none of
them may return true for negative values. The recent introduction of
cygwin to the list of regularly tested build platforms revealed a lot
of breakage there due to the same issues again.

So this patch addresses the problem all over the code at once. It adds
unsigned char casts to every valid use case, and also drops the unneeded
double cast to int that was sometimes added on top of it.

It may be backported by dropping irrelevant changes if that helps better
support uncommon platforms. It's unlikely to fix bugs on platforms which
would already not emit any warning though.
2020-02-25 08:16:33 +01:00
..
accept4.h CLEANUP: build: rename some build macros to use the USE_* ones 2019-05-22 19:47:57 +02:00
base64.h [MINOR] add encode/decode function for 30-bit integers from/to base64 2010-10-30 19:04:33 +02:00
buf.h MINOR: buffer: add functions to read/write varints from/to buffers 2019-08-27 17:14:19 +02:00
buffer.h CLEANUP: buffer: replace b_drop() with b_free() 2019-08-08 08:07:45 +02:00
cfgparse.h MINOR: cfgparse: make the process/thread parser support a maximum value 2019-01-26 13:25:14 +01:00
chunk.h MINOR: chunk: implement chunk_strncpy() to copy partial strings 2020-02-14 19:02:06 +01:00
compat.h BUILD: signals: FreeBSD has SI_LWP instead of SI_TKILL 2019-05-23 08:40:50 +02:00
compiler.h BUILD: remove obsolete support for -mregparm / USE_REGPARM 2020-02-25 07:41:47 +01:00
config.h MINOR: compiler: move CPU capabilities definition from config.h and complete them 2020-02-21 16:32:57 +01:00
debug.h MINOR: stats/debug: maintain a counter of debug commands issued 2019-10-24 18:38:00 +02:00
defaults.h MEDIUM: cli: Allow multiple filter entries for "show table" 2020-01-22 14:33:17 +01:00
epoll.h CLEANUP: build: rename some build macros to use the USE_* ones 2019-05-22 19:47:57 +02:00
errors.h [MINOR] errors: provide new status codes for config parsing functions 2010-08-10 14:01:15 +02:00
fcgi.h MINOR: fcgi: Add function to get the string representation of a record type 2019-10-04 16:12:02 +02:00
h1.h MEDIUM: mux-h1/h1-htx: move HTX convertion of H1 messages in dedicated file 2019-09-17 10:18:54 +02:00
h2.h MINOR: h2: add a function to report H2 error codes as strings 2019-11-25 11:34:26 +01:00
hash.h BUG/MAJOR: hashes: fix the signedness of the hash inputs 2020-01-16 08:23:42 +01:00
hathreads.h BUG/MEDIUM: pattern: make the pattern LRU cache thread-local and lockless 2019-10-23 07:27:25 +02:00
hpack-dec.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
hpack-enc.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
hpack-huff.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
hpack-tbl.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
http-hdr.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
http.h MINOR: http: Add 404 to http-request deny 2020-01-08 16:15:23 +01:00
htx.h MINOR: htx: Add a function to append an HTX message to another one 2020-02-06 14:54:47 +01:00
initcall.h MINOR: initcall: Don't forget to define the __start/stop_init_##stg symbols. 2019-04-10 16:33:25 +02:00
ist.h MINOR: ist: add an iststop() function 2020-02-21 11:47:25 +01:00
istbuf.h Revert "MINOR: istbuf: add b_fromist() to make a buffer from an ist" 2019-10-29 13:09:14 +01:00
memory.h BUG/MAJOR: memory: Don't forget to unlock the rwlock if the pool is empty. 2020-02-03 13:05:31 +01:00
mini-clist.h CLEANUP: mini-clist: simplify nested do { while(1) {} } while (0) 2020-02-11 10:27:04 +01:00
namespace.h CLEANUP: build: rename some build macros to use the USE_* ones 2019-05-22 19:47:57 +02:00
net_helper.h CLEANUP: net_helper: Do not negate the result of unlikely 2020-02-25 07:30:49 +01:00
openssl-compat.h CLEANUP: ssl: remove unused functions in openssl-compat.h 2020-02-14 16:15:00 +01:00
regex.h MEDIUM: regex: modify regex_comp() to atomically allocate/free the my_regex struct 2019-05-07 06:58:15 +02:00
splice.h CLEANUP: build: rename some build macros to use the USE_* ones 2019-05-22 19:47:57 +02:00
standard.h BUILD: general: always pass unsigned chars to is* functions 2020-02-25 08:16:33 +01:00
syscall.h BUILD: enable build on Linux/s390x 2015-10-12 20:58:51 +02:00
template.h [CLEANUP] included common/version.h everywhere 2006-06-29 18:54:54 +02:00
ticks.h [MEDIUM] scheduler: get rid of the 4 trees thanks and use ebtree v4.1 2009-03-21 10:25:14 +01:00
time.h BUILD: remove obsolete support for -mregparm / USE_REGPARM 2020-02-25 07:41:47 +01:00
tools.h BUG/MINOR: ssl: ssl_sock_load_pem_into_ckch is not consistent 2020-01-22 15:55:55 +01:00
uri_auth.h MINOR: stats: replace the ST_* uri_auth flags with STAT_* 2019-10-10 11:30:07 +02:00
version.h MINOR: version: this is development again, update the status 2019-11-25 20:38:32 +01:00
xref.h MEDIUM: xref: Use the new _HA_ATOMIC_* macros. 2019-03-11 17:02:37 +01:00