Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assume Unix path separators by default #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions nasmlib/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,6 @@
# define catsep '\\'
# define leaveonclean 2 /* Leave \\ at the start alone */
# define curdir "."
#elif defined(unix) || defined(__unix) || defined(__unix__) || \
defined(__UNIX__) || defined(__Unix__) || \
defined(__MACH__) || defined(__BEOS__)
/* Unix and Unix-like operating systems and others using
* the equivalent syntax (slashes as only separators, no concept of volume)
*
* This must come after the __MSDOS__ section, since it seems that at
* least DJGPP defines __unix__ despite not being a Unix environment at all.
*/
# define separators "/"
# define cleandirend "/"
# define catsep '/'
# define leaveonclean 1
# define curdir "."
#elif defined(Macintosh) || defined(macintosh)
/* MacOS classic */
# define separators ":"
Expand All @@ -82,8 +68,14 @@
# define separators ":]"
# define curdir "[]"
#else
/* No idea what to do here, do nothing. Feel free to add new ones. */
# define curdir ""
/* If none of the previous definitions match, assume Unix-like path syntax
* (slashes as only separators, no concept of volume)
*/
# define separators "/"
# define cleandirend "/"
# define catsep '/'
# define leaveonclean 1
# define curdir "."
#endif

/*
Expand Down