add new builtin “realpath” calling realpath(3) on its argument, skipping
over “--” for compatibility to Debian realpath(1) and possibly busybox’ “sounds handy” replaced@TNF
This commit is contained in:
18
Build.sh
18
Build.sh
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.323 2008/05/17 18:19:11 tg Exp $'
|
||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.324 2008/05/17 18:27:53 tg Exp $'
|
||||
#-
|
||||
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
|
||||
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
|
||||
@@ -1045,6 +1045,22 @@ ac_test mknod '' 'if to use mknod(), makedev() and friends' <<-'EOF'
|
||||
}
|
||||
EOF
|
||||
|
||||
ac_test realpath mksh_full 0 <<-'EOF'
|
||||
#if HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 1024
|
||||
#endif
|
||||
char *res, dst[PATH_MAX];
|
||||
const char src[] = ".";
|
||||
int main(void) {
|
||||
res = realpath(src, dst);
|
||||
return (res == NULL ? 1 : 0);
|
||||
}
|
||||
EOF
|
||||
|
||||
ac_test revoke mksh_full 0 <<-'EOF'
|
||||
#if HAVE_LIBUTIL_H
|
||||
#include <libutil.h>
|
||||
|
Reference in New Issue
Block a user