author | Jon Tibble <meths@btinternet.com> |
Thu, 09 Dec 2010 22:32:39 +0100 | |
changeset 13255 | 4afa820d78b9 |
parent 6879 | 150dcecba680 |
permissions | -rw-r--r-- |
0 | 1 |
/* |
2 |
* CDDL HEADER START |
|
3 |
* |
|
4 |
* The contents of this file are subject to the terms of the |
|
6879
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
5 |
* Common Development and Distribution License (the "License"). |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
6 |
* You may not use this file except in compliance with the License. |
0 | 7 |
* |
8 |
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 |
* or http://www.opensolaris.org/os/licensing. |
|
10 |
* See the License for the specific language governing permissions |
|
11 |
* and limitations under the License. |
|
12 |
* |
|
13 |
* When distributing Covered Code, include this CDDL HEADER in each |
|
14 |
* file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 |
* If applicable, add the following below this CDDL HEADER, with the |
|
16 |
* fields enclosed by brackets "[]" replaced with your own identifying |
|
17 |
* information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 |
* |
|
19 |
* CDDL HEADER END |
|
20 |
*/ |
|
6879
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
21 |
|
0 | 22 |
/* |
6879
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
23 |
* Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
0 | 24 |
* Use is subject to license terms. |
25 |
*/ |
|
26 |
||
27 |
/* |
|
28 |
* Copyright (c) 1988 AT&T |
|
29 |
* All Rights Reserved. |
|
30 |
*/ |
|
31 |
||
32 |
#pragma ident "%Z%%M% %I% %E% SMI" |
|
33 |
||
34 |
/* |
|
35 |
* NOTE: The environment symbol pair may also occur in crt1.o. The definitions |
|
36 |
* within crt1.o are required for the generation of ABI compliant applications |
|
37 |
* (see bugid 1181124). No other symbol definitions should be added to this |
|
38 |
* file. |
|
39 |
*/ |
|
6879
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
40 |
|
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
41 |
/* |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
42 |
* The original SVR3 ABI states: |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
43 |
* |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
44 |
* Application Constraints |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
45 |
* As described above, libsys provides symbols for applications. In a few cases, |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
46 |
* however, an application is obliged to provide symbols for the library. |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
47 |
* |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
48 |
* extern char **environ; |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
49 |
* Normally, this symbol is synonymous with environ, as |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
50 |
* exec(BA_OS) describes. This isn't always true, though, because |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
51 |
* ANSI C does not define environ. Thus, an ANSI C-conforming |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
52 |
* application can define its own environ symbol, unrelated to the pro- |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
53 |
* cess environment. If the application defines environ and intends it |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
54 |
* to have the System V Interface Definition, Third Edition semantics, it |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
55 |
* must also define _environ so that the two symbols refer to the same |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
56 |
* data object. |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
57 |
* |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
58 |
* The ABI description implies that the process environment should use |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
59 |
* _environ and that nothing in libc should make reference to the unadorned |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
60 |
* "environ" symbol. This way, an application can define and use a symbol |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
61 |
* named "environ" for its own purposes without affecting the actual |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
62 |
* process environment. |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
63 |
*/ |
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
64 |
|
0 | 65 |
#pragma weak environ = _environ |
6879
150dcecba680
6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents:
0
diff
changeset
|
66 |
const char **_environ = 0; |