Prepend /@unixroot to rooted paths on OS/2

$UNIXROOT is a root directory of FHS on OS/2. /@unixroot is replaced by
$UNIXROOT at runtime.
This commit is contained in:
KO Myung-Hun
2015-05-09 15:45:08 +09:00
parent 0fbbbed49c
commit 89324074c4
4 changed files with 9 additions and 5 deletions

4
sh.h
View File

@@ -303,6 +303,7 @@ struct rusage {
#endif
#ifdef __OS2__
#define UNIXROOT "/@unixroot"
#define PATH_SEP ';'
#define PATH_SEP_STR ";"
#define IS_DIR_SEP(c) ({ \
@@ -328,6 +329,7 @@ struct rusage {
(ksh_isalphx(_p_[0]) && _p_[1] == ':')); \
})
#else
#define UNIXROOT ""
#define PATH_SEP ':'
#define PATH_SEP_STR ":"
#define IS_DIR_SEP(c) ((c) == '/')
@@ -1083,7 +1085,7 @@ EXTERN mksh_ari_t x_lins E_INIT(24); /* tty lines */
#if defined(ANDROID)
#define MKSH_DEFAULT_PROFILEDIR "/system/etc"
#else
#define MKSH_DEFAULT_PROFILEDIR "/etc"
#define MKSH_DEFAULT_PROFILEDIR UNIXROOT "/etc"
#endif
#endif