remove dead code and ifdefs, speed up configuring
This commit is contained in:
15
Build.sh
15
Build.sh
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.316 2008/05/04 00:55:18 tg Exp $'
|
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.317 2008/05/04 01:51:28 tg Exp $'
|
||||||
#-
|
#-
|
||||||
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
|
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
|
||||||
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
|
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
|
||||||
@ -823,16 +823,6 @@ ac_testn mksh_full '' "if a full-featured mksh is requested" <<-'EOF'
|
|||||||
#endif
|
#endif
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
ac_testn mksh_defutf8 '' "if to assume UTF-8 is enabled" <<-'EOF'
|
|
||||||
#ifdef MKSH_ASSUME_UTF8
|
|
||||||
/* force a success: we assume UTF-8 by default */
|
|
||||||
int main(void) { return (0); }
|
|
||||||
#else
|
|
||||||
/* force a failure: use setlocale() and nl_langinfo(CODESET) */
|
|
||||||
int main(void) { return (thiswillneverbedefinedIhope()); }
|
|
||||||
#endif
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if test 0 = $HAVE_MKSH_FULL; then
|
if test 0 = $HAVE_MKSH_FULL; then
|
||||||
if test $ct = xlc; then
|
if test $ct = xlc; then
|
||||||
ac_flags 1 fnoinline -qnoinline
|
ac_flags 1 fnoinline -qnoinline
|
||||||
@ -842,7 +832,6 @@ if test 0 = $HAVE_MKSH_FULL; then
|
|||||||
|
|
||||||
: ${HAVE_MKNOD=0} ${HAVE_SETLOCALE_CTYPE=0}
|
: ${HAVE_MKNOD=0} ${HAVE_SETLOCALE_CTYPE=0}
|
||||||
check_categories=$check_categories,smksh
|
check_categories=$check_categories,smksh
|
||||||
test 0 = $HAVE_MKSH_DEFUTF8 || check_categories=$check_categories,dutf
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -1026,7 +1015,7 @@ ac_test mkstemp <<-'EOF'
|
|||||||
int main(void) { char tmpl[] = "X"; return (mkstemp(tmpl)); }
|
int main(void) { char tmpl[] = "X"; return (mkstemp(tmpl)); }
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
ac_test setlocale_ctype '!' mksh_defutf8 0 'setlocale(LC_CTYPE, "")' <<-'EOF'
|
ac_test setlocale_ctype '' 'setlocale(LC_CTYPE, "")' <<-'EOF'
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
int main(void) { return ((ptrdiff_t)(void *)setlocale(LC_CTYPE, "")); }
|
int main(void) { return ((ptrdiff_t)(void *)setlocale(LC_CTYPE, "")); }
|
||||||
|
4
Makefile
4
Makefile
@ -1,4 +1,4 @@
|
|||||||
# $MirOS: src/bin/mksh/Makefile,v 1.57 2008/04/20 02:15:12 tg Exp $
|
# $MirOS: src/bin/mksh/Makefile,v 1.58 2008/05/04 01:51:29 tg Exp $
|
||||||
#-
|
#-
|
||||||
# use CPPFLAGS=-DDEBUG __CRAZY=Yes to check for certain more stuff
|
# use CPPFLAGS=-DDEBUG __CRAZY=Yes to check for certain more stuff
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ CPPFLAGS+= -DMKSH_ASSUME_UTF8 \
|
|||||||
-DHAVE_RLIM_T=1 -DHAVE_SIG_T=1 -DHAVE_SYS_SIGNAME=1 \
|
-DHAVE_RLIM_T=1 -DHAVE_SIG_T=1 -DHAVE_SYS_SIGNAME=1 \
|
||||||
-DHAVE_SYS_SIGLIST=1 -DHAVE_STRSIGNAL=0 -DHAVE_ARC4RANDOM=1 \
|
-DHAVE_SYS_SIGLIST=1 -DHAVE_STRSIGNAL=0 -DHAVE_ARC4RANDOM=1 \
|
||||||
-DHAVE_ARC4RANDOM_PUSHB=1 -DHAVE_MKSTEMP=1 \
|
-DHAVE_ARC4RANDOM_PUSHB=1 -DHAVE_MKSTEMP=1 \
|
||||||
-DHAVE_SETLOCALE_CTYPE=0 -DHAVE_LANGINFO_CODESET=0 \
|
-DHAVE_SETLOCALE_CTYPE=1 -DHAVE_LANGINFO_CODESET=1 \
|
||||||
-DHAVE_MKNOD=1 -DHAVE_REVOKE=1 -DHAVE_SETMODE=1 \
|
-DHAVE_MKNOD=1 -DHAVE_REVOKE=1 -DHAVE_SETMODE=1 \
|
||||||
-DHAVE_SETRESUGID=1 -DHAVE_SETGROUPS=1 -DHAVE_STRCASESTR=1 \
|
-DHAVE_SETRESUGID=1 -DHAVE_SETGROUPS=1 -DHAVE_STRCASESTR=1 \
|
||||||
-DHAVE_STRLCPY=1 -DHAVE_ARC4RANDOM_DECL=1 \
|
-DHAVE_STRLCPY=1 -DHAVE_ARC4RANDOM_DECL=1 \
|
||||||
|
4
check.t
4
check.t
@ -1,4 +1,4 @@
|
|||||||
# $MirOS: src/bin/mksh/check.t,v 1.191 2008/05/04 01:39:12 tg Exp $
|
# $MirOS: src/bin/mksh/check.t,v 1.192 2008/05/04 01:51:29 tg Exp $
|
||||||
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
|
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
|
||||||
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
|
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
|
||||||
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
|
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
|
||||||
@ -7,7 +7,7 @@
|
|||||||
# http://www.research.att.com/~gsf/public/ifs.sh
|
# http://www.research.att.com/~gsf/public/ifs.sh
|
||||||
|
|
||||||
expected-stdout:
|
expected-stdout:
|
||||||
@(#)MIRBSD KSH R33 2008/05/02
|
@(#)MIRBSD KSH R33 2008/05/04
|
||||||
description:
|
description:
|
||||||
Check version of shell.
|
Check version of shell.
|
||||||
category: pdksh
|
category: pdksh
|
||||||
|
4
lex.c
4
lex.c
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.58 2008/04/19 22:15:03 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.59 2008/05/04 01:51:30 tg Exp $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* states while lexing word
|
* states while lexing word
|
||||||
@ -1134,9 +1134,7 @@ getsc__(void)
|
|||||||
(((const unsigned char *)(s->str))[0] == 0xBB) &&
|
(((const unsigned char *)(s->str))[0] == 0xBB) &&
|
||||||
(((const unsigned char *)(s->str))[1] == 0xBF)) {
|
(((const unsigned char *)(s->str))[1] == 0xBF)) {
|
||||||
s->str += 2;
|
s->str += 2;
|
||||||
#if !defined(MKSH_ASSUME_UTF8) || !defined(MKSH_SMALL)
|
|
||||||
Flag(FUTFHACK) = 1;
|
Flag(FUTFHACK) = 1;
|
||||||
#endif
|
|
||||||
goto getsc_again;
|
goto getsc_again;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
7
mksh.1
7
mksh.1
@ -1,4 +1,4 @@
|
|||||||
.\" $MirOS: src/bin/mksh/mksh.1,v 1.123 2008/04/20 21:30:29 tg Exp $
|
.\" $MirOS: src/bin/mksh/mksh.1,v 1.124 2008/05/04 01:51:30 tg Exp $
|
||||||
.\" $OpenBSD: ksh.1,v 1.121 2008/03/21 12:51:19 millert Exp $
|
.\" $OpenBSD: ksh.1,v 1.121 2008/03/21 12:51:19 millert Exp $
|
||||||
.\"-
|
.\"-
|
||||||
.\" Try to make GNU groff and AT&T nroff more compatible
|
.\" Try to make GNU groff and AT&T nroff more compatible
|
||||||
@ -30,7 +30,7 @@
|
|||||||
.el .xD \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
|
.el .xD \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
|
||||||
..
|
..
|
||||||
.\"-
|
.\"-
|
||||||
.Dd $Mdocdate: April 20 2008 $
|
.Dd $Mdocdate: May 4 2008 $
|
||||||
.Dt MKSH 1
|
.Dt MKSH 1
|
||||||
.Os MirBSD
|
.Os MirBSD
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -3416,7 +3416,8 @@ if
|
|||||||
is used).
|
is used).
|
||||||
.It Fl U \*(Ba Ic utf8\-hack
|
.It Fl U \*(Ba Ic utf8\-hack
|
||||||
Enable UTF-8 support in the
|
Enable UTF-8 support in the
|
||||||
.Sx Emacs editing mode .
|
.Sx Emacs editing mode
|
||||||
|
and internal string handling functions.
|
||||||
This is enabled automatically for interactive shells if your system supports
|
This is enabled automatically for interactive shells if your system supports
|
||||||
.Fn setlocale LC_CTYPE \&""
|
.Fn setlocale LC_CTYPE \&""
|
||||||
and optionally
|
and optionally
|
||||||
|
4
sh.h
4
sh.h
@ -96,9 +96,9 @@
|
|||||||
#define __SCCSID(x) __IDSTRING(sccsid,x)
|
#define __SCCSID(x) __IDSTRING(sccsid,x)
|
||||||
|
|
||||||
#ifdef EXTERN
|
#ifdef EXTERN
|
||||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.213 2008/05/02 18:55:36 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.214 2008/05/04 01:51:31 tg Exp $");
|
||||||
#endif
|
#endif
|
||||||
#define MKSH_VERSION "R33 2008/05/02"
|
#define MKSH_VERSION "R33 2008/05/04"
|
||||||
|
|
||||||
#ifndef MKSH_INCLUDES_ONLY
|
#ifndef MKSH_INCLUDES_ONLY
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user