Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-06-12 09:13:54 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-12 09:13:54 +0400
commitda086d020cc3fd5c0a374ca753dfb0bc62a3cda0 (patch)
tree66bfacfed261a4c61efbf482a93606fac66b96f2 /winsup/cygwin/environ.h
parent09c95bb14fd314b0529e1183c26d72dba386832a (diff)
* cygheap.cc (cygheap_user::set_name): Set homedrive and homepath to NULL on
user name change. (cygheap_user::set_logsrv): Allocate enough space for leading \\ so that we can put this in the environment, if needed. * cygheap.h (homebodies): New enum. (cygheap_user::homedrive): New field. (cygheap_user::homepath): Ditto. (cygheap_user::env_logsrv): New method. (cygheap_user::env_homepath): New method. (cygheap_user::env_homedrive): New method. (cygheap_user::env_userprofile): New method. (cygheap_user::ontherange): New method. * environ.cc (envsize): Eliminate debugging argument. (environ_init): Assume that envc counts number of elments not total size. (spenv): New class. (spenvs): New array, renamed from forced_winenv_vars, using spenv. (spenv::retrieve): New method. (build_env): Rename from 'winenv' -- one stop shopping for building new environment blocks for both windows and "unix". * environ.h (build_env: Declare. (winenv): Delete declaration. (envsize): Ditto. * spawn.cc (spawn_guts): Use build_env to build windows and cygwin environment blocks. * uinfo.cc (internal_getlogin): Eliminate environment manipulation. Default to info from GetUserName if it exists. Move HOMEPATH and HOMEDRIVE stuff elsewhere. Move HOME setting elsewhere. Only set HOME environment variable in processes that are not parented by a cygwin process. (cygheap_user::ontherange): Define new method. (cygheap_user::env_logsrv): Ditto. (cygheap_user::env_homepath): Ditto. (cygheap_user::env_homedrive): Ditto. (cygheap_user::env_userprofile): Ditto.
Diffstat (limited to 'winsup/cygwin/environ.h')
-rw-r--r--winsup/cygwin/environ.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/winsup/cygwin/environ.h b/winsup/cygwin/environ.h
index 86f70f675..3f372b17c 100644
--- a/winsup/cygwin/environ.h
+++ b/winsup/cygwin/environ.h
@@ -1,6 +1,6 @@
/* environ.h: Declarations for environ manipulation
- Copyright 2000 Red Hat, Inc.
+ Copyright 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin.
@@ -12,11 +12,10 @@ details. */
void environ_init (char **, int);
/* The structure below is used to control conversion to/from posix-style
- * file specs. Currently, only PATH and HOME are converted, but PATH
- * needs to use a "convert path list" function while HOME needs a simple
- * "convert to posix/win32". For the simple case, where a calculated length
- * is required, just return MAX_PATH. *FIXME*
- */
+ file specs. Currently, only PATH and HOME are converted, but PATH
+ needs to use a "convert path list" function while HOME needs a simple
+ "convert to posix/win32". For the simple case, where a calculated length
+ is required, just return MAX_PATH. *FIXME* */
struct win_env
{
const char *name;
@@ -35,7 +34,7 @@ struct win_env
win_env * __stdcall getwinenv (const char *name, const char *posix = NULL);
void __stdcall update_envptrs ();
-char * __stdcall winenv (const char * const *, int);
extern char **__cygwin_environ, ***main_environ;
extern "C" char __stdcall **cur_environ ();
-int __stdcall envsize (const char * const *, int debug_print = 0);
+char ** __stdcall build_env (const char * const *envp, char *&envblock,
+ int &envc, bool need_envblock);