Browse Source

fl_wrapper: use the standard `environ` instead of ` __environ`

master
Alejandro Mery 10 years ago
parent
commit
6817fbaa0b
1 changed files with 20 additions and 6 deletions
  1. +20
    -6
      src/tools-source/fl_wrapper/fl_wrapper_execl.c

+ 20
- 6
src/tools-source/fl_wrapper/fl_wrapper_execl.c

@ -1,9 +1,23 @@
/*
* --- SDE-COPYRIGHT-NOTE-BEGIN ---
* This copyright note is auto-generated by ./scripts/Create-CopyPatch.
*
* Filename: src/tools-source/fl_wrapper/fl_wrapper_execl.c
* Copyright (C) 2014 The OpenSDE Project
*
* More information can be found in the files COPYING and README.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License. A copy of the
* GNU General Public License can be found in the file COPYING.
* --- SDE-COPYRIGHT-NOTE-END ---
*/
/*
* Copyright (C) 1991, 92, 94, 97, 98, 99 Free Software Foundation, Inc.
* This file is part of the GNU C Library.
*
* --- NO-ROCK-COPYRIGHT-NOTE ---
*
* glibc-2.2.5/posix/execl.c
*/
@ -52,7 +66,7 @@ execl (const char *path, const char *arg, ...)
}
va_end (args);
return execve (path, (char *const *) argv, __environ);
return execve (path, (char *const *) argv, environ);
}
/*
@ -197,7 +211,7 @@ script_execute (const char *file, char *const argv[])
}
/* Execute the shell. */
execve (new_argv[0], new_argv, __environ);
execve (new_argv[0], new_argv, environ);
}
}
@ -219,7 +233,7 @@ execvp (file, argv)
if (strchr (file, '/') != NULL)
{
/* Don't search when it contains a slash. */
execve (file, argv, __environ);
execve (file, argv, environ);
if (errno == ENOEXEC)
script_execute (file, argv);
@ -272,7 +286,7 @@ execvp (file, argv)
startp = (char *) memcpy (name - (p - path), path, p - path);
/* Try to execute this name. If it works, execv will not return. */
execve (startp, argv, __environ);
execve (startp, argv, environ);
if (errno == ENOEXEC)
script_execute (startp, argv);

Loading…
Cancel
Save