usr/src/lib/libc/port/gen/env_data.c
author Jon Tibble <meths@btinternet.com>
Thu, 09 Dec 2010 22:32:39 +0100
changeset 13255 4afa820d78b9
parent 6879 150dcecba680
permissions -rw-r--r--
298 SPARC build fails in smt_pause.o 478 Build needs fixing for pkgdepend flag day Reviewed by: [email protected] Reviewed by: [email protected] Reviewed by: [email protected] Approved by: [email protected]
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
     1
/*
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
     2
 * CDDL HEADER START
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
     3
 *
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
     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
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
     7
 *
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
     8
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
     9
 * or http://www.opensolaris.org/os/licensing.
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    10
 * See the License for the specific language governing permissions
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    11
 * and limitations under the License.
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    12
 *
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    13
 * When distributing Covered Code, include this CDDL HEADER in each
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    14
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    15
 * If applicable, add the following below this CDDL HEADER, with the
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    16
 * fields enclosed by brackets "[]" replaced with your own identifying
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    17
 * information: Portions Copyright [yyyy] [name of copyright owner]
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    18
 *
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    19
 * CDDL HEADER END
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    20
 */
6879
150dcecba680 6714179 libc synonym expunging in snv_92 was too aggressive, breaking pfinstall
raf
parents: 0
diff changeset
    21
0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    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
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    24
 * Use is subject to license terms.
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    25
 */
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    26
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    27
/*
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    28
 *	Copyright (c) 1988 AT&T
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    29
 *	All Rights Reserved.
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    30
 */
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    31
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    32
#pragma ident	"%Z%%M%	%I%	%E% SMI"
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    33
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    34
/*
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    35
 * NOTE: The environment symbol pair may also occur in crt1.o.  The definitions
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    36
 * within crt1.o are required for the generation of ABI compliant applications
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    37
 * (see bugid 1181124).  No other symbol definitions should be added to this
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    38
 * file.
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    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
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    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;