diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-04-15 14:00:45 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-04-15 14:00:45 +0000 |
commit | 1ff87985a175ff56e9e813b2dbdfa856dec5ca35 (patch) | |
tree | dbd885599664dc3105ce4af9ca20408269996bbb | |
parent | 34bbe838e6a03f2eaaa0565b8e88926878097a28 (diff) | |
download | newlib-1ff87985a175ff56e9e813b2dbdfa856dec5ca35.zip newlib-1ff87985a175ff56e9e813b2dbdfa856dec5ca35.tar.gz newlib-1ff87985a175ff56e9e813b2dbdfa856dec5ca35.tar.bz2 |
* path.cc (add_ext_from_sym): Redefine to call `add_ext_from_sym_'.
(add_ext_from_sym_): New inline function.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 17 |
2 files changed, 18 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 2e88d0f..5d448cb 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Sun Apr 15 15:56:00 2001 Corinna Vinschen <corinna@vinschen.de> + + * path.cc (add_ext_from_sym): Redefine to call `add_ext_from_sym_'. + (add_ext_from_sym_): New inline function. + Sat Apr 14 19:23:52 2001 Christopher Faylor <cgf@cygnus.com> * config.h.in: Turn on VFORK by default. diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index be165a0..1bf126f 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -179,10 +179,19 @@ pathmatch (const char *path1, const char *path2) : strcasematch (path1, path2); } -#define add_ext_from_sym(sym) \ - (void)(sym.ext_here && *sym.ext_here && \ - ( known_suffix = this->path + sym.extn, \ - (sym.ext_tacked_on && strcpy (known_suffix, sym.ext_here)))) +#define add_ext_from_sym(s) \ + (add_ext_from_sym_ (this->path, this->known_suffix, s)) + +inline void +add_ext_from_sym_ (char *path, char *known_suffix, symlink_info &sym) +{ + if (sym.ext_here && *sym.ext_here) + { + known_suffix = path + sym.extn; + if (sym.ext_tacked_on) + strcpy (known_suffix, sym.ext_here); + } +} /* Convert an arbitrary path SRC to a pure Win32 path, suitable for passing to Win32 API routines. |