mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
parent
a897ef0025
commit
58d7c4b388
4 changed files with 1 additions and 36 deletions
24
configure.ac
24
configure.ac
|
@ -675,30 +675,6 @@ else
|
|||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
# Check for __environ symbol
|
||||
AC_MSG_CHECKING([for __environ symbol])
|
||||
AC_TRY_LINK(
|
||||
[
|
||||
#include <unistd.h>
|
||||
],
|
||||
[
|
||||
extern char **__environ;
|
||||
char **tmp = __environ;
|
||||
exit(tmp!=0);
|
||||
],
|
||||
have___environ=yes,
|
||||
have___environ=no
|
||||
)
|
||||
if test "$have___environ" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(
|
||||
[HAVE___ENVIRON],
|
||||
[1],
|
||||
[Define to 1 if the __environ symbol is exported.]
|
||||
)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
# Check for sys_errlist
|
||||
AC_MSG_CHECKING([for sys_errlist array])
|
||||
|
|
|
@ -206,9 +206,6 @@
|
|||
/* Define to 1 if the _sys_errs array is available. */
|
||||
/* #undef HAVE__SYS__ERRS */
|
||||
|
||||
/* Define to 1 if the __environ symbol is exported. */
|
||||
/* #undef HAVE___ENVIRON */
|
||||
|
||||
/* Define to 1 to disable ncurses macros that conflict with the STL */
|
||||
#define NCURSES_NOMACROS 1
|
||||
|
||||
|
|
|
@ -45,8 +45,6 @@
|
|||
|
||||
/// At init, we read all the environment variables from this array.
|
||||
extern char **environ;
|
||||
/// This should be the same thing as \c environ, but it is possible only one of the two work...
|
||||
extern char **__environ;
|
||||
|
||||
bool g_log_forks = false;
|
||||
bool g_use_posix_spawn = false; // will usually be set to true
|
||||
|
@ -311,7 +309,7 @@ void env_init(const struct config_paths_t *paths /* or NULL */) {
|
|||
// Import environment variables. Walk backwards so that the first one out of any duplicates wins
|
||||
// (#2784).
|
||||
wcstring key, val;
|
||||
const char *const *envp = (environ ? environ : __environ);
|
||||
const char *const *envp = environ;
|
||||
size_t i = 0;
|
||||
while (envp && envp[i]) {
|
||||
i++;
|
||||
|
|
|
@ -46,12 +46,6 @@
|
|||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "util.h" // IWYU pragma: keep
|
||||
|
||||
#ifndef HAVE___ENVIRON
|
||||
|
||||
char **__environ = 0;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef TPUTS_KLUDGE
|
||||
|
||||
int tputs(const char *str, int affcnt, int (*fish_putc)(tputs_arg_t))
|
||||
|
|
Loading…
Reference in a new issue