couple of minor/cosmetic fixes from RT’s compile farm:
• promote SCO OpenServer and UnixWare to !oswarn • omit trying -O2/-O on OpenServer 5 and USL C • cast mksh_ari_t to int, mksh_uari_t to unsigned int for printf • skip ulimit-1 on syllable (which is still too broken) • write ((mksh_ari_t)-2147483648) ipv UB ((mksh_ari_t)1 << 31) and add a comment that that is actually meant • rewrite functions returning !void ending in NOTREACHED so they’ve got a jump target returning an error at the end, to aid older compilers and just to be safe • cast struct stat.st_size to off_t or size_t explicitly when needed • shorten struct env by two bytes and an alignment, at least also, optimise control flow and fix more paren matching cases
This commit is contained in:
12
sh.h
12
sh.h
@@ -152,9 +152,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef EXTERN
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.537 2012/03/28 23:09:24 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.538 2012/03/29 19:23:01 tg Exp $");
|
||||
#endif
|
||||
#define MKSH_VERSION "R40 2012/03/27"
|
||||
#define MKSH_VERSION "R40 2012/03/29"
|
||||
|
||||
/* arithmetic types: C implementation */
|
||||
#if !HAVE_CAN_INTTYPES
|
||||
@@ -590,8 +590,8 @@ extern struct env {
|
||||
short *savefd; /* original redirected fds */
|
||||
struct temp *temps; /* temp files */
|
||||
sigjmp_buf jbuf; /* long jump back to env creator */
|
||||
short type; /* environment type - see below */
|
||||
short flags; /* EF_* */
|
||||
uint8_t type; /* environment type - see below */
|
||||
uint8_t flags; /* EF_* */
|
||||
} *e;
|
||||
|
||||
/* struct env.type values */
|
||||
@@ -610,8 +610,8 @@ extern struct env {
|
||||
#define EF_FAKE_SIGDIE BIT(2) /* hack to get info from unwind to quitenv */
|
||||
|
||||
/* Do breaks/continues stop at env type e? */
|
||||
#define STOP_BRKCONT(t) ((t) == E_NONE || (t) == E_PARSE \
|
||||
|| (t) == E_FUNC || (t) == E_INCL)
|
||||
#define STOP_BRKCONT(t) ((t) == E_NONE || (t) == E_PARSE || \
|
||||
(t) == E_FUNC || (t) == E_INCL)
|
||||
/* Do returns stop at env type e? */
|
||||
#define STOP_RETURN(t) ((t) == E_FUNC || (t) == E_INCL)
|
||||
|
||||
|
Reference in New Issue
Block a user