Open komh opened 1 month ago
iconv()
LIBCn declares like: https://github.com/bitwiseworks/libc/blob/7a15da98a2c81aeb6341859bf5409586eea19241/src/emx/include/iconv.h#L37
POSIX requires:
size_t iconv(iconv_t cd, char **restrict inbuf, size_t *restrict inbytesleft, char **restrict outbuf, size_t *restrict outbytesleft);
See https://pubs.opengroup.org/onlinepubs/9699919799.2013edition/functions/iconv.html.
The following is errors from MPlayer:
gcc -MMD -MP -Wundef -W -Wall -Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Werror=format-security -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=c11 -Werror-implicit-function-declaration -D_ISOC99_SOURCE -I. -Iffmpeg -O2 -march=i586 -mtune=i586 -pipe -g -fno-tree-vectorize -fno-asynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_EMX_SOURCE -I/usr/local/include -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include/libpng16 -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include/libpng16 -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include/libpng16 -DZLIB_CONST -I/usr/local/include/libxml2 -I/usr/local/include -c -o mp_msg.o mp_msg.c
mp_msg.c: In function 'mp_msg_va':
mp_msg.c:236:30: error: passing argument 2 of 'iconv' from incompatible pointer type [-Wincompatible-pointer-types]
236 | while (iconv(msgiconv, &in, &inlen, &out, &outlen) == -1) {
| ^~~
| |
| char **
In file included from mp_msg.c:29:
g:/usr/include/iconv.h:37:31: note: expected 'const char **' but argument is of type 'char **'
37 | extern size_t iconv (iconv_t, const char **, size_t *, char **, size_t *);
| ^~~~~~~~~~~~~
mp_msg.c:236:58: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'unsigned int'} and 'int' [-Wsign-compare]
236 | while (iconv(msgiconv, &in, &inlen, &out, &outlen) == -1) {
| ^~
In addition, all the many feature tests of iconv() of configure fail due to this when using GCC14.
Hi/2.
Some functions are declared differently POSIX. And some codes such as GNULIB test-suites require exact function declarations. Worse is that GCC14 now treats this as errors. So these should be solved.
1.
putenv()
and_putenv()
LIBCn declares like: https://github.com/bitwiseworks/libc/blob/7a15da98a2c81aeb6341859bf5409586eea19241/src/emx/include/stdlib.h#L207
POSIX requires:
See https://pubs.opengroup.org/onlinepubs/9799919799/functions/putenv.html.
_putenv()
should be considered, too.The following is errors from GNULIB test-suites:
initstate()
andsrandom()
LIBCn declares like: https://github.com/bitwiseworks/libc/blob/7a15da98a2c81aeb6341859bf5409586eea19241/src/emx/include/stdlib.h#L190 https://github.com/bitwiseworks/libc/blob/7a15da98a2c81aeb6341859bf5409586eea19241/src/emx/include/stdlib.h#L218
POSIX requires:
The following is errors from GNULIB test-suites: