1 /* environ.h: Declarations for environ manipulation
3 Copyright 2000, 2001, 2002, 2003, 2005, 2006, 2008 Red Hat, Inc.
5 This file is part of Cygwin.
7 This software is a copyrighted work licensed under the terms of the
8 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
11 /* Initialize the environment */
12 void environ_init (char **, int)
13 __attribute__ ((regparm (2)));
15 /* The structure below is used to control conversion to/from posix-style
16 file specs. Currently, only PATH and HOME are converted, but PATH
17 needs to use a "convert path list" function while HOME needs a simple
18 "convert to posix/win32". */
25 ssize_t (*toposix) (const void *, void *, size_t);
26 ssize_t (*towin32) (const void *, void *, size_t);
28 void add_cache (const char *in_posix, const char *in_native = NULL)
29 __attribute__ ((regparm (3)));
30 const char * get_native () const {return native ? native + namelen : NULL;}
31 const char * get_posix () const {return posix ? posix : NULL;}
32 struct win_env& operator = (struct win_env& x);
33 void reset () {native = posix = NULL;}
37 win_env * __stdcall getwinenv (const char *name, const char *posix = NULL, win_env * = NULL)
38 __attribute__ ((regparm (3)));
39 char * __stdcall getwinenveq (const char *name, size_t len, int)
40 __attribute__ ((regparm (3)));
42 void __stdcall update_envptrs ();
43 extern "C" char **__cygwin_environ, ***main_environ;
44 extern "C" char __stdcall **cur_environ ();
45 char ** __stdcall build_env (const char * const *envp, PWCHAR &envblock,
46 int &envc, bool need_envblock)
47 __attribute__ ((regparm (3)));