annotate include/environ.h @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Declare the environ system variable.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 Copyright (C) 2015-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This file is part of the libiberty library.
kono
parents:
diff changeset
5 Libiberty is free software; you can redistribute it and/or
kono
parents:
diff changeset
6 modify it under the terms of the GNU Library General Public
kono
parents:
diff changeset
7 License as published by the Free Software Foundation; either
kono
parents:
diff changeset
8 version 2 of the License, or (at your option) any later version.
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 Libiberty is distributed in the hope that it will be useful,
kono
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
kono
parents:
diff changeset
13 Library General Public License for more details.
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 You should have received a copy of the GNU Library General Public
kono
parents:
diff changeset
16 License along with libiberty; see the file COPYING.LIB. If not,
kono
parents:
diff changeset
17 write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
kono
parents:
diff changeset
18 Boston, MA 02110-1301, USA. */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 /* On OSX, the environ variable can be used directly in the code of an
kono
parents:
diff changeset
21 executable, but cannot be used in the code of a shared library (such as
kono
parents:
diff changeset
22 GCC's liblto_plugin, which links in libiberty code). Instead, the
kono
parents:
diff changeset
23 function _NSGetEnviron can be called to get the address of environ. */
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 #ifndef HAVE_ENVIRON_DECL
kono
parents:
diff changeset
26 # ifdef __APPLE__
kono
parents:
diff changeset
27 # include <crt_externs.h>
kono
parents:
diff changeset
28 # define environ (*_NSGetEnviron ())
kono
parents:
diff changeset
29 # else
kono
parents:
diff changeset
30 # ifndef environ
kono
parents:
diff changeset
31 extern char **environ;
kono
parents:
diff changeset
32 # endif
kono
parents:
diff changeset
33 # endif
kono
parents:
diff changeset
34 # define HAVE_ENVIRON_DECL
kono
parents:
diff changeset
35 #endif