now that we found out the root case for the recent QNX problem…
03:11⎜«RT|AO:#!/bin/mksh» YES it WORKS now! … there’s no reason for sys_nerr to not be const, either ☺
This commit is contained in:
parent
595f57ebad
commit
192ea7638b
8
Build.sh
8
Build.sh
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.608 2012/12/28 03:05:17 tg Exp $'
|
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.609 2012/12/28 03:20:34 tg Exp $'
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||||
# 2011, 2012
|
# 2011, 2012
|
||||||
@ -1528,7 +1528,7 @@ else
|
|||||||
#define EXTERN
|
#define EXTERN
|
||||||
#define MKSH_INCLUDES_ONLY
|
#define MKSH_INCLUDES_ONLY
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.608 2012/12/28 03:05:17 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.609 2012/12/28 03:20:34 tg Exp $");
|
||||||
int main(void) { printf("Hello, World!\n"); return (0); }
|
int main(void) { printf("Hello, World!\n"); return (0); }
|
||||||
EOF
|
EOF
|
||||||
case $cm in
|
case $cm in
|
||||||
@ -1566,12 +1566,12 @@ fi
|
|||||||
test x"NetBSD" = x"$TARGET_OS" && $e Ignore the compatibility warning.
|
test x"NetBSD" = x"$TARGET_OS" && $e Ignore the compatibility warning.
|
||||||
|
|
||||||
ac_testn sys_errlist '' "the sys_errlist[] array and sys_nerr" <<-'EOF'
|
ac_testn sys_errlist '' "the sys_errlist[] array and sys_nerr" <<-'EOF'
|
||||||
extern int sys_nerr;
|
extern const int sys_nerr;
|
||||||
extern const char * const sys_errlist[];
|
extern const char * const sys_errlist[];
|
||||||
int main(void) { return (*sys_errlist[sys_nerr - 1]); }
|
int main(void) { return (*sys_errlist[sys_nerr - 1]); }
|
||||||
EOF
|
EOF
|
||||||
ac_testn _sys_errlist '!' sys_errlist 0 "the _sys_errlist[] array and _sys_nerr" <<-'EOF'
|
ac_testn _sys_errlist '!' sys_errlist 0 "the _sys_errlist[] array and _sys_nerr" <<-'EOF'
|
||||||
extern int _sys_nerr;
|
extern const int _sys_nerr;
|
||||||
extern const char * const _sys_errlist[];
|
extern const char * const _sys_errlist[];
|
||||||
int main(void) { return (*_sys_errlist[_sys_nerr - 1]); }
|
int main(void) { return (*_sys_errlist[_sys_nerr - 1]); }
|
||||||
EOF
|
EOF
|
||||||
|
4
shf.c
4
shf.c
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.54 2012/12/28 02:28:39 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.55 2012/12/28 03:20:35 tg Exp $");
|
||||||
|
|
||||||
/* flags to shf_emptybuf() */
|
/* flags to shf_emptybuf() */
|
||||||
#define EB_READSW 0x01 /* about to switch to reading */
|
#define EB_READSW 0x01 /* about to switch to reading */
|
||||||
@ -1090,7 +1090,7 @@ cstrerror(int errnum)
|
|||||||
|
|
||||||
#if HAVE_SYS_ERRLIST
|
#if HAVE_SYS_ERRLIST
|
||||||
#if !HAVE_SYS_ERRLIST_DECL
|
#if !HAVE_SYS_ERRLIST_DECL
|
||||||
extern int sys_nerr;
|
extern const int sys_nerr;
|
||||||
extern const char * const sys_errlist[];
|
extern const char * const sys_errlist[];
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user