Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config.mak.dev: specify C99 for IBM xlc
In 5f46385 (config.mak.dev: specify -std=gnu99 for gcc/clang, 2021-12-08) GCC and Clang were made to use the C99 standard when compiling, let's do the same for IBM's XLC. Its default is a looser mode that "accepts implementation-specific language extensions"[1]. The entire codebase compiles with this, except the code being altered here in wildmatch.c. Since we've permanently forked that upstream code (the upstream is GPLv3) let's just drop the "typedef" and use "unsigned char" directly. This resolves the following warnings on IBM xlc 13.01: "wildmatch.c", line 15.23: 1506-334 (S) Identifier uchar has already been defined on line 560 of "/usr/include/sys/types.h". "wildmatch.c", line 60.38: 1506-281 (S) Prefix and postfix increment and decrement operators cannot be applied to "illegal type*". "wildmatch.c", line 60.46: 1506-281 (S) Prefix and postfix increment and decrement operators cannot be applied to "illegal type*". "wildmatch.c", line 73.35: 1506-281 (S) Prefix and postfix increment and decrement operators cannot be applied to "illegal type*". "wildmatch.c", line 85.32: 1506-281 (S) Prefix and postfix increment and decrement operators cannot be applied to "illegal type*". "wildmatch.c", line 86.57: 1506-068 (S) Operation between types "illegal type*" and "int" is not allowed. "wildmatch.c", line 87.43: 1506-281 (S) Prefix and postfix increment and decrement operators cannot be applied to "illegal type*". "wildmatch.c", line 91.50: 1506-068 (E) Operation between types "illegal type*" and "illegal type*" is not allowed. "wildmatch.c", line 93.39: 1506-019 (S) Expecting an array or a pointer to object type. "wildmatch.c", line 93.55: 1506-019 (S) Expecting an array or a pointer to object type. "wildmatch.c", line 103.45: 1506-019 (S) Expecting an array or a pointer to object type. "wildmatch.c", line 104.54: 1506-068 (S) Operation between types "illegal type*" and "int" is not allowed. "wildmatch.c", line 154.49: 1506-281 (S) Prefix and postfix increment and decrement operators cannot be applied to "illegal type*". "wildmatch.c", line 164.43: 1506-281 (S) Prefix and postfix increment and decrement operators cannot be applied to "illegal type*". "wildmatch.c", line 168.35: 1506-281 (S) Prefix and postfix increment and decrement operators cannot be applied to "illegal type*". "wildmatch.c", line 177.43: 1506-281 (S) Prefix and postfix increment and decrement operators cannot be applied to "illegal type*". "wildmatch.c", line 185.51: 1506-281 (S) Prefix and postfix increment and decrement operators cannot be applied to "illegal type*". "wildmatch.c", line 190.70: 1506-019 (S) Expecting an array or a pointer to object type. "wildmatch.c", line 190.78: 1506-019 (S) Expecting an array or a pointer to object type. "wildmatch.c", line 191.51: 1506-281 (S) Prefix and postfix increment and decrement operators cannot be applied to "illegal type*". "wildmatch.c", line 193.59: 1506-281 (S) Prefix and postfix increment and decrement operators cannot be applied to "illegal type*". "wildmatch.c", line 205.59: 1506-019 (S) Expecting an array or a pointer to object type. "wildmatch.c", line 208.52: 1506-068 (S) Operation between types "illegal type*" and "int" is not allowed. "wildmatch.c", line 208.86: 1506-281 (S) Prefix and postfix increment and decrement operators cannot be applied to "illegal type*". "wildmatch.c", line 211.47: 1506-068 (S) Operation between types "illegal type*" and "illegal type*" is not allowed. "wildmatch.c", line 212.54: 1506-019 (S) Expecting an array or a pointer to object type. "wildmatch.c", line 214.55: 1506-068 (S) Operation between types "illegal type*" and "int" is not allowed. "wildmatch.c", line 263.61: 1506-281 (S) Prefix and postfix increment and decrement operators cannot be applied to "illegal type*". Makefile:2609: recipe for target 'wildmatch.o' failed 1. https://www.ibm.com/docs/sv/xl-c-and-cpp-aix/13.1.2?topic=descriptions-qlanglvl Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Loading branch information