aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/environ.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-06-28 02:19:57 +0000
committerChristopher Faylor <me@cgf.cx>2001-06-28 02:19:57 +0000
commit7a4078ee340b7f15c839257d6fa895d92abe0224 (patch)
treec12bcf5b7e6d1cfcf06276b8055aadc5d779ddd7 /winsup/cygwin/environ.cc
parentc135faa8b30fd29a8b8e20cda6b07a882a042cbe (diff)
downloadnewlib-7a4078ee340b7f15c839257d6fa895d92abe0224.zip
newlib-7a4078ee340b7f15c839257d6fa895d92abe0224.tar.gz
newlib-7a4078ee340b7f15c839257d6fa895d92abe0224.tar.bz2
Change check_null_empty_path* to check_null_empty_str* throughout.
* path.cc (path_conv::check): Add signal protection here since retrieving info about remote shares can take some time. * path.h (check_null_empty_str_errno): Convert to a function prototype. * path.cc (check_null_empty_str): Move to miscfuncs.cc. * miscfuncs.cc (check_null_empty_str_errno): New function. (__check_null_invalid_struct): Ditto. (__check_null_invalid_struct_errno): Ditto. (check_null_empty_str): Change from VirtualQuery to IsBadWritePtr. * thread.cc (check_valid_pointer): Ditto. * resource.cc (getrlimit): Use check_null_invalid_struct macro for checking validity of pointer. (setrlimit): Ditto.
Diffstat (limited to 'winsup/cygwin/environ.cc')
-rw-r--r--winsup/cygwin/environ.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 47de60a..1135bfb 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -290,7 +290,7 @@ extern "C" int
putenv (const char *str)
{
int res;
- if ((res = check_null_empty_path (str)))
+ if ((res = check_null_empty_str (str)))
{
if (res == ENOENT)
return 0;
@@ -312,12 +312,12 @@ extern "C" int
setenv (const char *name, const char *value, int overwrite)
{
int res;
- if ((res = check_null_empty_path (value)) == EFAULT)
+ if ((res = check_null_empty_str (value)) == EFAULT)
{
set_errno (res);
return -1;
}
- if ((res = check_null_empty_path (name)))
+ if ((res = check_null_empty_str (name)))
{
if (res == ENOENT)
return 0;