Mail Archives: djgpp/2011/11/28/17:45:41
On Nov 12, 6:08 am, Rugxulo <rugx DOT DOT DOT AT gmail DOT com> wrote:
> Hi,
>
> On Nov 11, 4:20 pm, tm <thomas DOT mer DOT DOT DOT AT gmx DOT at> wrote:
>
> > I have released a new version of Seed7: seed7_05_20111111.tgz
>
> Remember me? :-) Yeah, about a year ago I hacked Seed7 to (barely)
> work with DJGPP, at least the interpreter.
I can remember your work. Thanks again.
BTW: Sorry for my delayed answer, I was off-net.
> ... I still browsed here (comp.lang.misc) occasionally and usually
> downloaded the latest Seed7 sources but never did anything (though I
> did notice you added a DJGPP makefile a few months back).
> ... Basically my XP machine is half-dead, so I can't use that (though I
> could use aunts' one night if really needed). I ended up running under
> native FreeDOS w/ DOSLFN loaded. Not ideal as some things don't work
> as well, if at all, but here it basically worked (surprisingly) ...
> after a few minor tweaks. Yeah, I really should've tried this earlier,
> but you never asked / nagged / emailed, so I didn't.
>
> It mostly (but not fully) seems to work. I can't remember why DJGPP
> will sometimes say "No swap space!" That's kinda weird, normally it's
> obvious, but here it wasn't. (Yeah, I know, strerror() is the likely
> culprit, but I didn't look any closer than that.)
>
> Anyways, I hope this isn't too too long a reply, but here's the diff
> for the Makefile (mandatory!) and (partially successful) output of "/
> prg/hi chk_all":
I installed DJGPP under Windows XP, to test it.
I use the original make.exe from DJGPP/bin to execute mk_djgpp.mak
(with C:\DJGPP\bin\make -f mk_djgpp.mak). When I use your patch I
get error messages. The replacement of " with \" does not work with
my DJGPP. Maybe this is because XP uses cmd.exe to execute makefile
commands. AFAIK DOS uses command.com for this purpose. When I do:
echo #asdf "jkl"
in a command window (under XP) it writes:
#asdf "jkl"
Likewise the command:
echo #asdf "jkl" > version.h
in a command window writes:
#asdf "jkl"
to the file "version.h".
Maybe there is an alternate way to write ' and " with echo under
DOS. Preferably this way works under DOS and Windows.
About your other changes to "mk_djgpp.mak":
- Is the option -g not supported by your DJGPP gcc?
My DJGPP gcc supports it.
- Why do you use the option -s (Remove all symbol table and
relocation information from the executable)?
- Does the comment /* backslash (ASCII) */ make problems?
I added this comment to show the meaning of the value 92.
- As I already mentioned \' and \" do cause problems under XP.
GET_CC_VERSION_INFO can be used to determine the version of the
actual C compiler. This is done the following way:
A file name should be concatenated to GET_CC_VERSION_INFO and the
whole string should be executed by the shell. E.g.:
cmd_sh(GET_CC_VERSION_INFO & "a_file");
This shell command should write a line with the version info of the
C compiler to the given file. This version information can be read
from the file afterwards. It is important that the actual C compiler
is used to write the version information. This way a program can
determime the version of the actual C compiler (Instead of the C
compiler used to compile Seed7). The version of the C compiler,
which compiled Seed7, is defined with the preprocessor macro
C_COMPILER_VERSION. So a program can recognice that the C compiler
changed after Seed7 was compiled. Currently this mechanism is not
used, but it will probably be used in the near future.
> HI INTERPRETER Version 4.5.8856 Copyright (c) 1990-2011 Thomas Mertes
> compiling the compiler - okay
> chkint - okay
> chkflt
> *** The interpreted chkflt does not work okay:
>
> Comparison of float values works correct.
> Compare of float values works correct.
> Decimal conversion of float works correct.
> Conversion from integer to float works correct.
> Truncation of float works correct.
> Addition works correct for selected values.
> A ** B works correct for selected values.
> A ** B with integer B works correct for selected values.
> Infinity works correct for selected values.
> ***** NaN is not returned as error value for math functions
Some floating point functions should (according to IEEE 754), return
NaN. Seed7 relies on the features of the C library. This error shows
up, when the C floating point library does not work according to
IEEE 754 rules.
> ***** NaN does not work correct
> Negative zero does work correct.
> chkstr - okay
> chkprc - okay
> chkbig
> *** The interpreted compiler was not able to compile chkbig
>
> *** The compiled compiler was not able to compile chkbig
Probably this was caused by the "No swap space!" error you
mentioned. To prove this you can call
hi comp chkbig
manually. The file tmp_chkbig.cerrs or tmp_chkbig.lerrs may
contain helpful information. Please tell me, when the Seed7
compiler (comp.sd7) itself crashes.
> chkbool - okay
> chkset
> *** The interpreted compiler was not able to compile chkset
>
> *** The compiled compiler was not able to compile chkset
See my comment regarding compilation of chkbig above.
> chkexc
> *** The interpreted chkexc does not work okay:
>
> Integer exceptions work correct.
> BigInteger exceptions work correct.
> Floating point exceptions work correct.
> String exceptions work correct.
> Array exceptions work correct.
> ***** gets from write only file succeeded
> ***** gets from write only file succeeded
> ***** getln from write only file succeeded
> ***** getwd from write only file succeeded
> ***** gets from UTF-8 write only file succeeded
> ***** gets from UTF-8 write only file succeeded
> ***** getln from UTF-8 write only file succeeded
> ***** getwd from UTF-8 write only file succeeded
> ***** length for pipe succeeded
> ***** bigLength for pipe succeeded
> ***** seek for pipe succeeded
> ***** seek for pipe succeeded
> ***** tell for pipe succeeded
> ***** bigTell for pipe succeeded
> ***** length for pipe succeeded
> ***** bigLength for pipe succeeded
> ***** seek for pipe succeeded
> ***** seek for pipe succeeded
> ***** tell for pipe succeeded
> ***** bigTell for pipe succeeded
This errors are caused by weaknesses in the underlying C library,
respectively in DOS.
> ***** File exceptions do not work correct
I have to investigate this message.
> EDIT: I think?? "hi.exe" (interpreter) was successful with running
> chkbig, chkset (but fails for the compiler??).
Yes, see my comment regarding chkbig above.
I really want to improve "mk_djgpp.mak", such that it works for you.
But I think it should also work for DJGPP under Windows (that way I
can test it also). Please help me, to reach that goal.
Greetings Thomas Mertes
--
Seed7 Homepage: http://seed7.sourceforge.net
Seed7 - The extensible programming language: User defined statements
and operators, abstract data types, templates without special
syntax, OO with interfaces and multiple dispatch, statically typed,
interpreted or compiled, portable, runs under linux/unix/windows.
- Raw text -