diff options
author | H. Peter Anvin <hpa@zytor.com> | 2017-04-23 23:11:12 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2017-04-23 23:11:12 -0700 |
commit | d00d8c6ac396a84e85900cff7058f88180bf68fa (patch) | |
tree | b2b84766f3fcaf6549e46a8e0313d49d3bed316a | |
parent | 11a07a7319676b55b9668fdfbf159580388d0318 (diff) | |
download | nasm-d00d8c6ac396a84e85900cff7058f88180bf68fa.tar.gz |
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 <hpa@zytor.com>
-rw-r--r-- | nasmlib/path.c | 8 |
1 files 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 |