Re: [PATCH] Darwin, libgfortran : Do not use environ directly from the library.

2020-11-21 Thread Iain Sandoe
Hi Thomas, Thomas Koenig via Fortran wrote: tested on a number of Darwin platforms old and new, and on x86_64/powerpc64-linux, OK for master? … and backports to open branches? One question... +# ifdef __APPLE__ +# include +# define environ (*_NSGetEnviron ()) Is it guaranteed that

Re: [PATCH] Darwin, libgfortran : Do not use environ directly from the library.

2020-11-21 Thread Thomas Koenig via Gcc-patches
Hi Iain, tested on a number of Darwin platforms old and new, and on x86_64/powerpc64-linux, OK for master? … and backports to open branches? One question... +# ifdef __APPLE__ +#  include +#  define environ (*_NSGetEnviron ()) Is it guaranteed that crt_externs.h is present if __APPLE__

[PATCH] Darwin, libgfortran : Do not use environ directly from the library.

2020-11-20 Thread Iain Sandoe
Hi, not sure if this is covered directly by my Darwin maintainer’s hat so … - On macOS / Darwin, the environ variable can be used directly in the code of an executable, but cannot be used in the code of a shared library (i.e. libgfortran.dylib)** In such cases, the function _NSGetEnviron