On Fri, 20 Aug 2021 at 14:09, Jonathan Wakely wrote: > > On Fri, 20 Aug 2021 at 13:59, Arjen Markus wrote: > > > > Going the WSL2 route (I am not all that familiar with WSL) or a Linux > > emulation may be the way to go, indeed, but your remark triggered me to do > > a bit of searching: there is some discussion about the secure_getenv() > > function wrt Cygwin but there actually is a prototype for it in Cygwin's > > stdlib.h. It is protected by a symbol __GNU_VISIBLE. I will try to define > > that and see what happens. > > Don't do that. Define _GNU_SOURCE to tell Cygwin you want the GNU > extensions like secure_getenv, and then <sys/features.h> will define > __GNU_VISIBLE.
As it says in <sys/features.h> ... * The following private macros are used throughout the headers to control * which symbols should be exposed. They are for internal use only, as * indicated by the leading double underscore, and must never be used outside * of these headers. ... * __GNU_VISIBLE * GNU extensions; enabled with _GNU_SOURCE. > > I am curious why _GNU_SOURCE would be defined during configure but not > when compiling.