"Dr A Olowofoyeku" wrote:
Actually, that's good news. ;-) The GPC sources contain a workaround for a mingw problem. Apparently, the mingw problem has been solved now, so the workaround doesn't work anymore. But if you remove the workaround, i.e. the following lines in rts/file.c, it should work:
#if defined (_WIN32) && !defined (CYGWIN32) #define mkdir(path,mode) mkdir(path) #endif
Removing those 3 lines did it.
Fine. I'll remove them from the official sources as well.
The process then chokes on compiling 'files.pas', with these errors; line 257: function 'Sleepmicroseconds' argument does not match conformant array formal parameter invalid use of void expression argument does not match conformant array formal parameter too few arguments to function 'Ioselect'
Strange, this was a bug, but it has been fixed. A possible reason why it still occurs is that there is an older GPC version installed which is used to compile the RTS. This does not work.
Can you make sure by looking at the make output whether this is the case. Normally, the GPC just created (called `xgpc') should be used.
If it isn't used, you can try giving the parameter `GPC_FOR_TARGET=<file name with full path of xgpc>' to make, but then we should try to find out why that's necessary.
You're using the gpc-19990813 sources, aren't you?
line 310: function 'Stringtfdd_rewrite' assignment from incompatible pointer type
I have looked at 'files.pas', and it is not obvious why there should be a problem with those lines. However, I will continue to work on it. In the meantime, I am open to suggestions ;)
There's indeed a bug here. Here's the fix:
--- p/rts/files.pas.orig Mon Sep 13 04:21:57 1999 +++ p/rts/files.pas Mon Sep 13 04:22:02 1999 @@ -307,7 +307,7 @@ Buf.Chars := GPC_PChars (@s[1]); Buf.Truncate := True; (**) Buf.StringType := AnyStringLong; - Buf.PLongLength := @GPC_PString (@s)^.Length; + Buf.PLongLength := @Cardinal (GPC_PString (@s)^.Length); AnyStringTFDD_Rewrite (f, Buf) end;
My mistake. It was 2 parameters, but I got confused by all the stars and commas, etc.
I can imagine that well... :-)
Frank