David Edelsohn wrote: > When I try to configure gettext-0.22.3, I receive the following error: > > checking for socklen_t equivalent... configure: error: Cannot find a type > to use in place of socklen_t > > configure: error: > /nasfarm/edelsohn/src/gettext-0.22.3/libtextstyle/configure failed for > libtextstyle > > > configure:43943: /nasfarm/edelsohn/install/GCC12/bin/gcc -c -g -O2 > -D_THREAD_SAFE > conftest.c >&5 > > conftest.c:112:18: error: two or more data types in declaration specifiers > > 112 | #define intmax_t long long > > | ^~~~ > > conftest.c:112:23: error: two or more data types in declaration specifiers > > 112 | #define intmax_t long long > > | ^~~~ > > In file included from conftest.c:212: > > conftest.c:214:24: error: conflicting types for 'ngetpeername'; have > 'int(int, void *, long unsigned int *)' > > 214 | int getpeername (int, void *, unsigned long int > *); > > | ^~~~~~~~~~~ > > /nasfarm/edelsohn/install/GCC12/lib/gcc/powerpc-ibm-aix7.2.5.0/12.1.1/include-fixed/sys/socket.h:647:9: > note: previous declaration of 'ngetpeername' with type 'int(int, struct > sockaddr * restrict, socklen_t * restrict)' {aka 'int(int, struct > sockaddr * restrict, long unsigned int * restrict)'} > > 647 | int getpeername(int, struct sockaddr *__restrict__, socklen_t > *__restrict__); > > | ^~~~~~~~~~~ > > > configure and config.h seems to get itself confused about types.
There seem to be two problems, both related to the include files of your compiler: - The configure test "checking for intmax_t..." must have found the answer "no". But on a modern system, <stdint.h> should be defining intmax_t already. - This configure test that tries to find the getpeername declaration, but cannot find it (maybe because of the first problem?): ================================================================================ for arg2 in "struct sockaddr" void; do for t in int size_t "unsigned int" "long int" "unsigned long int"; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> #include <sys/socket.h> int getpeername (int, $arg2 *, $t *); int main (void) { $t len; getpeername (0, 0, &len); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_socklen_t_equiv="$t" fi ================================================================================ I would concentrate on the first problem. If you don't get it fixed, then I'd suggest to try 'gcc' from the AIX Toolbox [1] or 'xlc' (as an IBM product) instead of 'gcc' (that looks like you built it yourself). Bruno [1] https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/SPECS/gcc12-12.3.0-1.spec