From 1ff87985a175ff56e9e813b2dbdfa856dec5ca35 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sun, 15 Apr 2001 14:00:45 +0000 Subject: * path.cc (add_ext_from_sym): Redefine to call `add_ext_from_sym_'. (add_ext_from_sym_): New inline function. --- winsup/cygwin/ChangeLog | 5 +++++ 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 + + * 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 * 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. -- cgit v1.1