add size optimisation hacks by me from Android except ifdef’d
(note, I’d prefer everyone to keep IDSTRINGs around though)
This commit is contained in:
parent
dcbfc48855
commit
08862021ee
3
Build.sh
3
Build.sh
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.459 2010/08/24 15:46:06 tg Exp $'
|
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.460 2010/09/14 21:15:09 tg Exp $'
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||||
# Thorsten Glaser <tg@mirbsd.org>
|
# Thorsten Glaser <tg@mirbsd.org>
|
||||||
@ -30,6 +30,7 @@ srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.459 2010/08/24 15:46:06 tg Exp $'
|
|||||||
# MKSH_NOPWNAM MKSH_NO_LIMITS MKSH_SMALL MKSH_S_NOVI
|
# MKSH_NOPWNAM MKSH_NO_LIMITS MKSH_SMALL MKSH_S_NOVI
|
||||||
# MKSH_UNEMPLOYED MKSH_DEFAULT_EXECSHELL MKSHRC_PATH
|
# MKSH_UNEMPLOYED MKSH_DEFAULT_EXECSHELL MKSHRC_PATH
|
||||||
# MKSH_DEFAULT_TMPDIR MKSH_CLRTOEOL_STRING MKSH_A4PB
|
# MKSH_DEFAULT_TMPDIR MKSH_CLRTOEOL_STRING MKSH_A4PB
|
||||||
|
# MKSH_NO_DEPRECATED_WARNING MKSH_DONT_EMIT_IDSTRING
|
||||||
|
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
4
misc.c
4
misc.c
@ -29,7 +29,7 @@
|
|||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.145 2010/08/28 20:22:21 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.146 2010/09/14 21:15:10 tg Exp $");
|
||||||
|
|
||||||
unsigned char chtypes[UCHAR_MAX + 1]; /* type bits for unsigned char */
|
unsigned char chtypes[UCHAR_MAX + 1]; /* type bits for unsigned char */
|
||||||
|
|
||||||
@ -330,12 +330,14 @@ parse_args(const char **argv,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
i = option(go.optarg);
|
i = option(go.optarg);
|
||||||
|
#ifndef MKSH_NO_DEPRECATED_WARNING
|
||||||
if ((enum sh_flag)i == FARC4RANDOM) {
|
if ((enum sh_flag)i == FARC4RANDOM) {
|
||||||
warningf(true, "Do not use set ±o arc4random,"
|
warningf(true, "Do not use set ±o arc4random,"
|
||||||
" it will be removed in the next version"
|
" it will be removed in the next version"
|
||||||
" of mksh!");
|
" of mksh!");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if ((i != (size_t)-1) && set == Flag(i))
|
if ((i != (size_t)-1) && set == Flag(i))
|
||||||
/* Don't check the context if the flag
|
/* Don't check the context if the flag
|
||||||
* isn't changing - makes "set -o interactive"
|
* isn't changing - makes "set -o interactive"
|
||||||
|
6
sh.h
6
sh.h
@ -141,16 +141,20 @@
|
|||||||
#undef __SCCSID
|
#undef __SCCSID
|
||||||
#define __IDSTRING_CONCAT(l,p) __LINTED__ ## l ## _ ## p
|
#define __IDSTRING_CONCAT(l,p) __LINTED__ ## l ## _ ## p
|
||||||
#define __IDSTRING_EXPAND(l,p) __IDSTRING_CONCAT(l,p)
|
#define __IDSTRING_EXPAND(l,p) __IDSTRING_CONCAT(l,p)
|
||||||
|
#ifdef MKSH_DONT_EMIT_IDSTRING
|
||||||
|
#define __IDSTRING(prefix, string) /* nothing */
|
||||||
|
#else
|
||||||
#define __IDSTRING(prefix, string) \
|
#define __IDSTRING(prefix, string) \
|
||||||
static const char __IDSTRING_EXPAND(__LINE__,prefix) [] \
|
static const char __IDSTRING_EXPAND(__LINE__,prefix) [] \
|
||||||
MKSH_A_USED = "@(""#)" #prefix ": " string
|
MKSH_A_USED = "@(""#)" #prefix ": " string
|
||||||
|
#endif
|
||||||
#define __COPYRIGHT(x) __IDSTRING(copyright,x)
|
#define __COPYRIGHT(x) __IDSTRING(copyright,x)
|
||||||
#define __RCSID(x) __IDSTRING(rcsid,x)
|
#define __RCSID(x) __IDSTRING(rcsid,x)
|
||||||
#define __SCCSID(x) __IDSTRING(sccsid,x)
|
#define __SCCSID(x) __IDSTRING(sccsid,x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXTERN
|
#ifdef EXTERN
|
||||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.412 2010/09/05 19:51:35 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.413 2010/09/14 21:15:11 tg Exp $");
|
||||||
#endif
|
#endif
|
||||||
#define MKSH_VERSION "R39 2010/09/05"
|
#define MKSH_VERSION "R39 2010/09/05"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user