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:
tg 2012-12-28 03:20:35 +00:00
parent 595f57ebad
commit 192ea7638b
2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
#!/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,
# 2011, 2012
@ -1528,7 +1528,7 @@ else
#define EXTERN
#define MKSH_INCLUDES_ONLY
#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); }
EOF
case $cm in
@ -1566,12 +1566,12 @@ fi
test x"NetBSD" = x"$TARGET_OS" && $e Ignore the compatibility warning.
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[];
int main(void) { return (*sys_errlist[sys_nerr - 1]); }
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[];
int main(void) { return (*_sys_errlist[_sys_nerr - 1]); }
EOF

4
shf.c
View File

@ -24,7 +24,7 @@
#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() */
#define EB_READSW 0x01 /* about to switch to reading */
@ -1090,7 +1090,7 @@ cstrerror(int errnum)
#if HAVE_SYS_ERRLIST
#if !HAVE_SYS_ERRLIST_DECL
extern int sys_nerr;
extern const int sys_nerr;
extern const char * const sys_errlist[];
#endif
#endif