summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/exec.cc
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2000-08-02 16:28:18 +0000
committerDJ Delorie <dj@redhat.com>2000-08-02 16:28:18 +0000
commit4c8d72ded51ac22172d4f2d0250ada6b0dd624ff (patch)
tree4573a70b613646456bd4fed93293c6355566c678 /winsup/cygwin/exec.cc
parentad8dea13f05b51769c9bef7e414f654588971c10 (diff)
downloadcygnal-4c8d72ded51ac22172d4f2d0250ada6b0dd624ff.tar.gz
cygnal-4c8d72ded51ac22172d4f2d0250ada6b0dd624ff.tar.bz2
cygnal-4c8d72ded51ac22172d4f2d0250ada6b0dd624ff.zip
* winsup.h: take out protections of environ, errno, allow C use
* *.cc: put winsup.h before other headers (for __INSIDE_CYGWIN__); use cur_environ() instead of just environ * times.cc: remove import protections * glob.c: add winsup.h * localtime.c: ditto * smallprint.c: ditto * Makefile.in: don't __INSIDE_CYGWIN__ as it messes up profiling.
Diffstat (limited to 'winsup/cygwin/exec.cc')
-rw-r--r--winsup/cygwin/exec.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/winsup/cygwin/exec.cc b/winsup/cygwin/exec.cc
index d54937850..ee40d16a9 100644
--- a/winsup/cygwin/exec.cc
+++ b/winsup/cygwin/exec.cc
@@ -8,11 +8,11 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
+#include "winsup.h"
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <process.h>
-#include "winsup.h"
/* This is called _execve and not execve because the real execve is defined
in libc/posix/execve.c. It calls us. */
@@ -44,7 +44,7 @@ execl (const char *path, const char *arg0, ...)
while (argv[i++] != NULL);
va_end (args);
MALLOC_CHECK;
- return _execve (path, (char * const *) argv, environ);
+ return _execve (path, (char * const *) argv, cur_environ ());
}
extern "C"
@@ -52,7 +52,7 @@ int
execv (const char *path, char * const *argv)
{
MALLOC_CHECK;
- return _execve (path, (char * const *) argv, environ);
+ return _execve (path, (char * const *) argv, cur_environ ());
}
/* the same as a standard exec() calls family, but with NT security support */
@@ -85,7 +85,7 @@ sexecl (HANDLE hToken, const char *path, const char *arg0, ...)
va_end (args);
MALLOC_CHECK;
- return sexecve (hToken, path, (char * const *) argv, environ);
+ return sexecve (hToken, path, (char * const *) argv, cur_environ ());
}
extern "C"
@@ -131,7 +131,7 @@ sexeclp (HANDLE hToken, const char *path, const char *arg0, ...)
va_end (args);
MALLOC_CHECK;
- return sexecvpe (hToken, path, (const char * const *) argv, environ);
+ return sexecvpe (hToken, path, (const char * const *) argv, cur_environ ());
}
extern "C"
@@ -163,7 +163,7 @@ int
sexecv (HANDLE hToken, const char *path, const char * const *argv)
{
MALLOC_CHECK;
- return sexecve (hToken, path, argv, environ);
+ return sexecve (hToken, path, argv, cur_environ ());
}
extern "C"
@@ -171,7 +171,7 @@ int
sexecp (HANDLE hToken, const char *path, const char * const *argv)
{
MALLOC_CHECK;
- return sexecvpe (hToken, path, argv, environ);
+ return sexecvpe (hToken, path, argv, cur_environ ());
}
/*