diff options
author | Christopher Faylor <me@cgf.cx> | 2000-07-17 19:18:21 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-07-17 19:18:21 +0000 |
commit | 5bc584ba65db809b22dd2e10eb2cef922ca60d26 (patch) | |
tree | 8248ba57d925f599c0d3fbfb7a7ba6bf8273350a /winsup/cygwin/environ.cc | |
parent | 17811f7bbe8480acfb8b6ef7ad8dcfa5f2819515 (diff) | |
download | cygnal-5bc584ba65db809b22dd2e10eb2cef922ca60d26.tar.gz cygnal-5bc584ba65db809b22dd2e10eb2cef922ca60d26.tar.bz2 cygnal-5bc584ba65db809b22dd2e10eb2cef922ca60d26.zip |
Throughout, eliminate third argument to path_conv and use new PC_* constants
for second argument.
* path.h: Generalize SYMLINK_* constants to PC_*.
(path_conv): Create a new method. Fold third argument into second.
* dll_init.cc (dll_list::alloc): Try harder to find space to allocate dll
struct.
(dll_dllcrt0): Don't check sanity if we've already called dll_crt0.
* path.cc (path_conv::check): Don't check for a null or empty path unless
specifically told with a flag setting.
(check_null_empty_path): New function, adapted from macro.
* syscalls.cc (_rename): Use already-determined file attributes rather than
checking again.
* lib/cygwin/cygwin_attach.dll.c (cygwin_attach_dll): Use a static per_process
structure since this is apparently supposed to be zeroed.
* lib/cygwin_crt0.c (cygwin_crt0): Zero per_process structure sent to older
DLLs.
Diffstat (limited to 'winsup/cygwin/environ.cc')
-rw-r--r-- | winsup/cygwin/environ.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index b53600724..7c236df42 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -259,12 +259,13 @@ setenv (const char *name, const char *value, int rewrite) extern "C" void unsetenv (const char *name) { - register char **P; + register char **e; int offset; while (my_findenv (name, &offset)) /* if set multiple times */ - for (P = &environ[offset];; ++P) - if (!(*P = *(P + 1))) + /* Move up the rest of the array */ + for (e = environ + offset; ; e++) + if (!(*e = *(e + 1))) break; } |