diff options
author | Christopher Faylor <me@cgf.cx> | 2002-06-26 19:39:05 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-06-26 19:39:05 +0000 |
commit | c99902b9b09c43722eeccac40175f9e69d9e59c4 (patch) | |
tree | f54598c586a7cba3597891fae24dc6a3769f3059 /winsup | |
parent | be5007aa5299be3acfe2ac63236fce319bb96bb1 (diff) | |
download | newlib-c99902b9b09c43722eeccac40175f9e69d9e59c4.zip newlib-c99902b9b09c43722eeccac40175f9e69d9e59c4.tar.gz newlib-c99902b9b09c43722eeccac40175f9e69d9e59c4.tar.bz2 |
* cygheap.cc (cygheap_user::set_name): Avoid clearing things when just setting
name to itself or during first time initialization.
* environ.cc (check_case_init): Make case insensitive.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/cygheap.cc | 10 | ||||
-rw-r--r-- | winsup/cygwin/environ.cc | 4 |
3 files changed, 18 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 47ddb26..1af4606 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2002-06-26 Christopher Faylor <cgf@redhat.com> + + * cygheap.cc (cygheap_user::set_name): Avoid clearing things when just + setting name to itself or during first time initialization. + + * environ.cc (check_case_init): Make case insensitive. + 2002-06-26 Corinna Vinschen <corinna@vinschen.de> * fhandler.h (fhandler_socket::bind): Add method definition. diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 0522255..ded9c25 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -440,9 +440,17 @@ cygheap_user::~cygheap_user () void cygheap_user::set_name (const char *new_name) { - if (pname) + if (strcasematch (new_name, pname)) + return; /* nothing changed */ + + bool allocated = !!pname; + if (allocated) cfree (pname); + pname = cstrdup (new_name ? new_name : ""); + if (!allocated) + return; /* Initializing. Don't bother with other stuff. */ + homedrive = NULL; homepath = NULL; if (plogsrv) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index ab28026..114fce7 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -411,12 +411,12 @@ check_case_init (const char *buf) pcheck_case = PCHECK_RELAXED; debug_printf ("File case checking set to RELAXED"); } - else if (strcmp (buf, "adjust")== 0) + else if (strcasematch (buf, "adjust")) { pcheck_case = PCHECK_ADJUST; debug_printf ("File case checking set to ADJUST"); } - else if (strcmp (buf, "strict")== 0) + else if (strcasematch (buf, "strict")) { pcheck_case = PCHECK_STRICT; debug_printf ("File case checking set to STRICT"); |