xref: /minix3/minix/lib/libc/sys/environ.c (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1*433d6423SLionel Sambuc /*
2*433d6423SLionel Sambuc  * environ.c - define the variable environ
3*433d6423SLionel Sambuc  */
4*433d6423SLionel Sambuc /* $Header$ */
5*433d6423SLionel Sambuc /*
6*433d6423SLionel Sambuc  * This file defines the variable environ and initializes it with a magic
7*433d6423SLionel Sambuc  * value.  The C run-time start-off routine tests whether the variable
8*433d6423SLionel Sambuc  * environ is initialized with this value.  If it is not, it is assumed
9*433d6423SLionel Sambuc  * that it is defined by the user.  Only two bytes are tested, since we
10*433d6423SLionel Sambuc  * don't know the endian-ness and alignment restrictions of the machine.
11*433d6423SLionel Sambuc  * This means that the low-order two-bytes should be equal to the
12*433d6423SLionel Sambuc  * high-order two-bytes on machines with four-byte pointers.  In fact, all
13*433d6423SLionel Sambuc  * the bytes in the pointer are the same, just in case.
14*433d6423SLionel Sambuc  */
15*433d6423SLionel Sambuc 
16*433d6423SLionel Sambuc char **environ = (char **) 0x53535353;
17