From 7a4078ee340b7f15c839257d6fa895d92abe0224 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 28 Jun 2001 02:19:57 +0000 Subject: 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. --- winsup/cygwin/path.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'winsup/cygwin/path.h') diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index b72a20c14..a3e94c18f 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -150,21 +150,11 @@ class path_conv int __stdcall get_device_number (const char *name, int &unit, BOOL from_conv = FALSE) __attribute__ ((regparm(3))); int __stdcall slash_unc_prefix_p (const char *path) __attribute__ ((regparm(1))); -int __stdcall check_null_empty_path (const char *name) __attribute__ ((regparm(1))); const char * __stdcall find_exec (const char *name, path_conv& buf, const char *winenv = "PATH=", int null_if_notfound = 0, const char **known_suffix = NULL) __attribute__ ((regparm(3))); /* Common macros for checking for invalid path names */ - -#define check_null_empty_path_errno(src) \ -({ \ - int __err; \ - if ((__err = check_null_empty_path(src))) \ - set_errno (__err); \ - __err; \ -}) - #define isdrive(s) (isalpha (*(s)) && (s)[1] == ':') static inline bool -- cgit v1.2.3