Hi Bruno, On 4/19/24 3:12 PM, Bruno Haible wrote: > The reason is that on this system, the function 'memset_s' exists in libc, > but is only declared (in /usr/include/iso/string_iso.h) if __EXT1_VISIBLE > is set. __EXT1_VISIBLE is defined by <sys/feature_tests.h> if > __STDC_WANT_LIB_EXT1__ is defined to non-zero at that point. > gnulib's lib/memset_explicit.c defines __STDC_WANT_LIB_EXT1__, but it comes > too late, because <config.h> has already included <stdalign.h>, <stddef.h>, > <stdbool.h>, or <assert.h>. <stdbool.h> and <assert.h> include > <sys/feature_tests.h>.
In GNU inetutils I see the following warnings in multiple places: In file included from telnetd.h:19, from pty.c:21: ../config.h:2783:9: warning: "__STDC_WANT_LIB_EXT1__" redefined 2783 | #define __STDC_WANT_LIB_EXT1__ 1 | ^~~~~~~~~~~~~~~~~~~~~~ In file included from ./telnetd.h:19, from term.c:21: ../config.h:2783:9: warning: "__STDC_WANT_LIB_EXT1__" redefined 2783 | #define __STDC_WANT_LIB_EXT1__ 1 | ^~~~~~~~~~~~~~~~~~~~~~ In pty.c we have: #include <config.h> #include "telnetd.h" in telnetd.h: #include <config.h> #include <sys/types.h> /* Many more system headers (or gnulib versions). */ I'm a bit confused as to why I only see warnings for this macro from gcc. Should this be wrapped in an #ifndef like the ones in AC_USE_SYSTEM_EXTENSIONS? Collin