#782: src/pmc/env.t confuses compiler specific and platform specific macros
--------------------+-------------------------------------------------------
Reporter: moritz | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: core | Version: 1.3.0
Severity: medium | Keywords: build, macos, clang
Lang: | Patch:
Platform: linux |
--------------------+-------------------------------------------------------
From src/pmc/env.pmc (lines 23 and onwards)
{{{
/* array of environment variables,
speced in POSIX.1, but not in ISO-C
MS C compilers know about environ, as it is declared in stdlib.h.
OS X doesn't allow access to "environ" from within shared libraries.
*/
#ifndef WIN32
# ifdef __APPLE_CC__
# include <crt_externs.h>
# define environ (*_NSGetEnviron())
# else /* !__APPLE_CC__ */
extern char **environ;
# endif /* __APPLE_CC__ */
#endif /* !WIN32 */
}}}
This causes build failures on linux with clang (a llvm frontend) which
sets the __APPLE_CC__ macro, but doesn't provide crt_externs.h
It seems that it would be more appropriate to check for being on MacOS
than checking a vendor specific macro.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/782>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets