diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 18bcfa3af..e0749fb7c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2005-05-27 Christopher Faylor + + * cygheap.h: Reference _cygheap_start via .cygheap section. + + * environ.cc: Fix force_into_environment typo throughout. + (spenvs): Export CYGWIN_DEBUG if DEBUGGING. + 2005-05-26 Christopher Faylor * include/cygwin/version.h: Bump DLL minor number to 18. diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h index d2be12047..4575572ba 100644 --- a/winsup/cygwin/cygheap.h +++ b/winsup/cygwin/cygheap.h @@ -428,5 +428,5 @@ char *__stdcall cstrdup (const char *) __attribute__ ((regparm(1))); char *__stdcall cstrdup1 (const char *) __attribute__ ((regparm(1))); void __stdcall cfree_and_set (char *&, char * = NULL) __attribute__ ((regparm(2))); void __stdcall cygheap_init (); -extern DWORD _cygheap_start; +extern DWORD _cygheap_start __attribute__((section(".cygheap"))); } diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index a280f52c7..5af62d628 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -856,7 +856,7 @@ struct spenv { const char *name; size_t namelen; - bool force_into_environmentironment; /* If true, always add to env if missing */ + bool force_into_environment; /* If true, always add to env if missing */ bool add_if_exists; /* if true, retrieve value from cache */ const char * (cygheap_user::*from_cygheap) (const char *, size_t); @@ -869,6 +869,9 @@ struct spenv /* Keep this list in upper case and sorted */ static NO_COPY spenv spenvs[] = { +#ifdef DEBUGGING + {NL ("CYGWIN_DEBUG="), false, true, &cygheap_user::env_homedrive}, +#endif {NL ("HOMEDRIVE="), false, false, &cygheap_user::env_homedrive}, {NL ("HOMEPATH="), false, false, &cygheap_user::env_homepath}, {NL ("LOGONSERVER="), false, false, &cygheap_user::env_logsrv}, @@ -977,7 +980,7 @@ build_env (const char * const *envp, char *&envblock, int &envc, assert ((srcp - envp) == n); /* Fill in any required-but-missing environment variables. */ for (unsigned i = 0; i < SPENVS_SIZE; i++) - if (!saw_spenv[i] && (spenvs[i].force_into_environmentironment || cygheap->user.issetuid ())) + if (!saw_spenv[i] && (spenvs[i].force_into_environment || cygheap->user.issetuid ())) { *dstp = spenvs[i].retrieve (false); if (*dstp && *dstp != env_dontadd)