From d00d8c6ac396a84e85900cff7058f88180bf68fa Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sun, 23 Apr 2017 23:11:12 -0700 Subject: [PATCH] nasmlib: fix MacOS classic catsep definition Correct the definition for MacOS classic "catsep" in nasm_catfile(). Also put in a stern comment that this function doesn't handle filenames with path components. Signed-off-by: H. Peter Anvin --- nasmlib/path.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nasmlib/path.c b/nasmlib/path.c index 72136546..fd7ea132 100644 --- a/nasmlib/path.c +++ b/nasmlib/path.c @@ -55,7 +55,7 @@ #elif defined(Macintosh) /* MacOS classic? */ # define separators ":" # define curdir ":" -# define catsep ":" +# define catsep ':' # define cleandirend ":" # define leaveonclean 0 # define leave_leading 1 @@ -137,7 +137,11 @@ char *nasm_dirname(const char *path) return nasm_strndup(path, p-path); } -/* Concatenate a directory path and a filename */ +/* + * Concatenate a directory path and a filename. Note that this function + * currently does NOT handle the case where file itself contains + * directory components (except on Unix platforms, because it is trivial.) + */ char *nasm_catfile(const char *dir, const char *file) { #ifndef catsep -- 2.11.4.GIT