Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2001-04-15 18:00:45 +0400
committerCorinna Vinschen <corinna@vinschen.de>2001-04-15 18:00:45 +0400
commit1ff87985a175ff56e9e813b2dbdfa856dec5ca35 (patch)
treedbd885599664dc3105ce4af9ca20408269996bbb /winsup/cygwin/path.cc
parent34bbe838e6a03f2eaaa0565b8e88926878097a28 (diff)
* path.cc (add_ext_from_sym): Redefine to call `add_ext_from_sym_'.
(add_ext_from_sym_): New inline function.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc17
1 files changed, 13 insertions, 4 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index be165a046..1bf126fe6 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.