diff options
author | Christopher Faylor <me@cgf.cx> | 2000-09-08 02:56:55 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-09-08 02:56:55 +0000 |
commit | f0338f545d769143f542338b4d61f771b5a87f93 (patch) | |
tree | b9d5b53c28100c35e10c0232c0e54ce474d6cc7c /winsup/cygwin/environ.h | |
parent | 42b6d9648fdd3f78806ac0556338f8fb13707821 (diff) | |
download | newlib-f0338f545d769143f542338b4d61f771b5a87f93.zip newlib-f0338f545d769143f542338b4d61f771b5a87f93.tar.gz newlib-f0338f545d769143f542338b4d61f771b5a87f93.tar.bz2 |
Break out more header info into separate files. Use appropriate header files
throughout.
* shared.h: Remove.
* cygwin_version.h: New file.
* delqueue.h: New file.
* environ.h: New file.
* host_dependent.h: New file.
* perprocess.h: New file.
* registry.h: New file.
* security.h: New file.
Diffstat (limited to 'winsup/cygwin/environ.h')
-rw-r--r-- | winsup/cygwin/environ.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/winsup/cygwin/environ.h b/winsup/cygwin/environ.h new file mode 100644 index 0000000..e5967eb --- /dev/null +++ b/winsup/cygwin/environ.h @@ -0,0 +1,40 @@ +/* environ.h: Declarations for environ manipulation + + Copyright 2000 Red Hat, Inc. + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. */ + +/* Initialize the environment */ +void environ_init (char **); + +/* 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* + */ +struct win_env + { + const char *name; + size_t namelen; + char *posix; + char *native; + int (*toposix) (const char *, char *); + int (*towin32) (const char *, char *); + int (*posix_len) (const char *); + int (*win32_len) (const char *); + void add_cache (const char *in_posix, const char *in_native = NULL); + const char * get_native () {return native ? native + namelen : NULL;} + }; + +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); |