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:
Diffstat (limited to 'winsup/cygwin/environ.h')
-rw-r--r--winsup/cygwin/environ.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/winsup/cygwin/environ.h b/winsup/cygwin/environ.h
index 888b473dd..1a616b214 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.
@@ -9,14 +9,14 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
/* Initialize the environment */
-void environ_init (char **, int);
+void environ_init (char **, int)
+ __attribute__ ((regparm (2)));
/* 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;
@@ -27,14 +27,20 @@ struct win_env
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;}
+ void add_cache (const char *in_posix, const char *in_native = NULL)
+ __attribute__ ((regparm (3)));
+ const char * get_native () const {return native ? native + namelen : NULL;}
+ const char * get_posix () const {return posix ? posix : NULL;}
};
-win_env * __stdcall getwinenv (const char *name, const char *posix = NULL);
+win_env * __stdcall getwinenv (const char *name, const char *posix = NULL)
+ __attribute__ ((regparm (3)));
+char * __stdcall getwinenveq (const char *name, size_t len, int)
+ __attribute__ ((regparm (3)));
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)
+ __attribute__ ((regparm (3)));