OSDN Git Service

* dcrt0.cc (wow64_respawn): New static variable.
[pf3gnuchains/pf3gnuchains4x.git] / winsup / cygwin / environ.h
1 /* environ.h: Declarations for environ manipulation
2
3    Copyright 2000, 2001, 2002, 2003, 2005, 2006, 2008 Red Hat, Inc.
4
5 This file is part of Cygwin.
6
7 This software is a copyrighted work licensed under the terms of the
8 Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
9 details. */
10
11 /* Initialize the environment */
12 void environ_init (char **, int)
13   __attribute__ ((regparm (2)));
14
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".  */
19 struct win_env
20   {
21     const char *name;
22     size_t namelen;
23     char *posix;
24     char *native;
25     ssize_t (*toposix) (const void *, void *, size_t);
26     ssize_t (*towin32) (const void *, void *, size_t);
27     bool immediate;
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;}
34     ~win_env ();
35   };
36
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)));
41
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)));
48
49 #define ENV_CVT -1