Cygwin: (mostly) drop NT4 and Samba < 3.0 support
[newlib-cygwin.git] / winsup / cygwin / local_includes / environ.h
blob86e64a72f9b10f969bf9b191040dbb6dd636861a
1 /* environ.h: Declarations for environ manipulation
3 This file is part of Cygwin.
5 This software is a copyrighted work licensed under the terms of the
6 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
7 details. */
9 /* Initialize the environment */
10 void environ_init (char **, int);
12 /* The structure below is used to control conversion to/from posix-style
13 file specs. Currently, only PATH and HOME are converted, but PATH
14 needs to use a "convert path list" function while HOME needs a simple
15 "convert to posix/win32". */
16 struct win_env
18 const char *name;
19 size_t namelen;
20 char *posix;
21 char *native;
22 ssize_t (*toposix) (const void *, void *, size_t);
23 ssize_t (*towin32) (const void *, void *, size_t);
24 bool immediate;
25 void add_cache (const char *in_posix, const char *in_native = NULL);
26 const char * get_native () const {return native ? native + namelen : NULL;}
27 const char * get_posix () const {return posix ? posix : NULL;}
28 struct win_env& operator = (struct win_env& x);
29 void reset () {native = posix = NULL;}
30 ~win_env ();
33 win_env *getwinenv (const char *name, const char *posix = NULL, win_env * = NULL);
34 char *getwinenveq (const char *name, size_t len, int);
36 char **build_env (const char * const *envp, PWCHAR &envblock,
37 int &envc, bool need_envblock, HANDLE new_token);
39 char **win32env_to_cygenv (PWCHAR rawenv, bool posify);
41 #define ENV_CVT -1