BUILD: ist: turn the lower/upper case tables to literal on obsolete linkers
authorWilly Tarreau <w@1wt.eu>
Wed, 15 May 2019 14:07:36 +0000 (16:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 15 May 2019 14:14:04 +0000 (16:14 +0200)
commit0f35c593f64c4499e7f5153b9dfc9b33587e7de4
treeef7fdb45a35a0e9be5a31708ee2cadd29f8bbbc6
parent35d116885d590a845b227e8ab808aa5fdf5890c1
BUILD: ist: turn the lower/upper case tables to literal on obsolete linkers

Gil Bahat reported build issues on Cygwin starting with 1.9 due to a
difference in the way the linker handles the weak symbols there,
causing multiple declarations of ist_lc[] and ist_uc[]. It's likely
that this issue could also happen on any older or non-ELF linker.

This patch addresses this by using literals instead on such platforms,
leaving it to the compiler to merge the constants when it can. On other
platforms the resulting executable is slightly larger due to strings
that could not be merged but this is a minor detail compared to not
being able to build at all.

If this change alone is confirmed to fix these issues, it's safe to
backport to 1.9.
include/common/ist.h