On Thu, 25 Jan 2024 15:11:12 +
Jon Turney wrote:
> On 24/01/2024 15:22, Takashi Yano via Cygwin-apps wrote:
> > +#ifdef __CYGWIN__
> > +#define _GNU_SOURCE 1
> > +#endif
> > +
>
> I'd suggest adding -D_GNU_SOURCE=1 to CPPFLAGS, rather than patching
> this in everywhere it's needed.
>
> (Setting this unconditionally could be added to the build system
> somewhere, which is theoretically upstreamable, since it's only not
> needed on linux for :reasons:)
Sounds good! Thanks.
I'll add it to CMakeLists.txt and Makfile for CYGWIN for the time being.
> > +#ifdef __CYGWIN__
> > +typedef uint32_t DWORD
>
> Is it not possible to just #include here? If not, perhaps a
> comment why the definitions are copied would nice.
When I included here, many conflicts occured between
posix headers and w32api headers.
However, now I have found that including w32api headers after all
the posix headers and typedef IN6_ADDR like:
#ifdef __CYGWIN__
#include
#include
#include
typedef struct {
union {
u_char Byte[16];
u_short Word[8];
} u;
} IN6_ADDR;
#include
#endif
solves the conflicts. Thanks!
--
Takashi Yano