On 2013-06-18 22:54, Thorsten Glaser wrote:
Jens Staal dixit:
./a.out
24
Good guess!
no idea if that is what we want...
The code checks for == 22.
I suppose I must change that into an offsetof checkb> should be safe, as
offsetof is already used in the code.
For now, make the b
OK cool
added that to the patch.
compiler(s)). The thing is, I have no idea who/how to fix the kernel/ape bug
responsible or who to get in touch with for that.
Me neitherb> working for Google on their b> now. The 9front people are out of
question, and othersb> no idea b> this mailing list b:) could enlighten us.
I find it awesome with such a rapid feedback!
If my rate of feedback is b> on a slow streakb> pressurise myself just that
much. Thanks! b:
bye,
//mirabilos
Attached is a unified patch (ape diff -u) that builds using APE "cc" on
Plan9. If anyone is interesting, also a binary+source (compiled with
-DMKSH_NOPROSPECTOFWORK) archive can be downloaded at
http://plan9.bell-labs.com/sources/contrib/staal1978/pkg/mksh-R46.tbz
(warning, meant to be extracted directly at / ,so no directory first)
For my initial test of the NOPROSPECT... build is that it seems to work
fine as a shell :)
--- Build.sh.orig Mon Jun 17 07:48:23 2013
+++ Build.sh Wed Jun 19 02:02:08 2013
@@ -688,6 +688,9 @@
add_cppflags -DMKSH_NO_CMDLINE_EDITING
oswarn=' and will currently not work'
add_cppflags -DMKSH_UNEMPLOYED
+ add_cppflags -DMKSH__NO_SETEUGID
+ #OK this one is only added to pick up plan9 in c-coded tests...
+ add_cppflags -DPLAN9
;;
PW32*)
HAVE_SIG_T=0 # incompatible
@@ -876,6 +879,8 @@
ct="uslc"
#elif defined(__LCC__)
ct="lcc"
+#elif defined(PLAN9) /* put last to give alternative compilers on Plan9 a chance */
+ct="plan9"
#else
ct="unknown"
#endif
@@ -994,6 +999,9 @@
been tested for compatibility with mksh. Continue at your
own risk, please report success/failure to the developers.'
;;
+plan9)
+ vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN -v conftest.c $LIBS"
+ ;;
sdcc)
echo >&2 'Warning: sdcc (http://sdcc.sourceforge.net), the small devices
C compiler for embedded systems detected. This has not yet
@@ -1133,6 +1141,9 @@
elif test $ct = watcom; then
save_NOWARN=
DOWARN=-Wc,-we
+elif test $ct = plan9; then
+ save_NOWARN=
+ DOWARN=
else
test x"$save_NOWARN" = x"" && save_NOWARN=-Wno-error
ac_flags 0 wnoerror "$save_NOWARN"
@@ -1166,7 +1177,7 @@
elif test $ct = xlc; then
ac_flags 1 othree "-O3 -qstrict"
test 1 = $HAVE_CAN_OTHREE || ac_flags 1 otwo -O2
-elif test $ct = tcc || test $ct = tendra; then
+elif test $ct = tcc || test $ct = tendra || test $ct = plan9; then
: no special optimisation
else
ac_flags 1 otwo -O2
@@ -1902,8 +1913,8 @@
#else
#define NUM 16
#endif
-char ctasserts_dblcheck[sizeof(struct ctasserts) == NUM ? 1 : -1];
- int main(void) { return (sizeof(ctasserts_dblcheck)); }
+char ctasserts_dblcheck[sizeof(struct ctasserts) >= NUM ? 1 : -1];
+ int main(void) { return (sizeof(ctasserts_dblcheck)); }
EOF
CFLAGS=$save_CFLAGS
eval test 1 = \$HAVE_COMPILE_TIME_ASSERTS_$$ || exit 1