Re: [cfarm-users] AIX portability

2022-09-21 Thread Kaz Kylheku via cfarm-users
On 2022-09-21 02:49, Jonathan Wakely wrote: > Well this is just user error. Unless I'm mistaken, _XOPEN_SOURCE=500 > selects a standard that doesn't even define struct in6_addr. That is almost certainly correct; but the issue reproduces with 700, which I tried first. Then I found the smallest val

Re: [cfarm-users] AIX portability

2022-09-21 Thread Kaz Kylheku via cfarm-users
On 2022-09-21 01:32, Bruno Haible wrote: > Kaz Kylheku wrote: >> gcc -E - -D_XOPEN_SOURCE=500 > > Defining _XOPEN_SOURCE — or worse, _POSIX_SOURCE — on arbitrary platforms > is a recipe for producing compilation errors. > > On HP-UX/hppa, -D_XOPEN_SOURCE=500 is useful. > On HP-UX/ia64, -D_XOPEN_S

Re: [cfarm-users] AIX portability

2022-09-21 Thread Jonathan Wakely via cfarm-users
On Wed, 21 Sept 2022 at 04:19, Kaz Kylheku via cfarm-users wrote: > > On 2022-09-20 14:29, Bruno Haible wrote: > > This is on gcc119.fsffrance.org (AIX 7.2). About which AIX and GCC versions > > were you complaining? > > I neglected to mention: there are two areas in the header file > which defin

Re: [cfarm-users] AIX portability

2022-09-21 Thread Bruno Haible via cfarm-users
Kaz Kylheku wrote: > gcc -E - -D_XOPEN_SOURCE=500 Defining _XOPEN_SOURCE — or worse, _POSIX_SOURCE — on arbitrary platforms is a recipe for producing compilation errors. On HP-UX/hppa, -D_XOPEN_SOURCE=500 is useful. On HP-UX/ia64, -D_XOPEN_SOURCE=600 is useful, but only in combination with -D_HPU

Re: [cfarm-users] AIX portability

2022-09-20 Thread Kaz Kylheku via cfarm-users
On 2022-09-20 14:29, Bruno Haible wrote: > This is on gcc119.fsffrance.org (AIX 7.2). About which AIX and GCC versions > were you complaining? I neglected to mention: there are two areas in the header file which define that same structure, with different member names and different definitions of

Re: [cfarm-users] AIX portability

2022-09-20 Thread Bruno Haible via cfarm-users
Kaz Kylheku wrote: > Simple code like this doesn't compile: > > #include > > // ... > > void foo(struct in6_addr *addr) > { > return bar(addr->s6_addr, 16); > } After fixing the gcc warning "‘return’ with a value, in function returning void", this code compiles perfectly fine, bo