Maurice Lombardi wrote:
Prof A Olowofoyeku (The African Chief) a écrit:
- gcc-3.3.5 backend - several failures - see attached log
Very similar for DJGPP. Seems to be related to Windows/DOS target peculiarities
Only one failure with gcc-3.2.3 fjf1044s.pas with same error mesage as above
Many failures with gcc-3.3.5 most of them with the same message:
FAIL: adam3i.pas c:/djgpp/b/gnu/build.gcc/gcc/p/test/a.out: error when trying to erase internal file `f' (Permission denied (EACCES)) (error #474 at 18f5)
see attached log
It seems that the message comes from RTS procedure Unlink (in files.pas 758) The culprit may be OSDosFlag (if it is false). In turn OSDosFlag depends on __OS_DOS__ beeing defined. __OS_DOS__ was defined in gpcpp by a special hack, which got broken by integrated preprocessor. The following should fix the problem (note that you need to rebuild the RTS for the change to be effective):
diff -up gpc-20051116/p/gpcpp.c gpc/p/gpcpp.c --- gpc-20051116/p/gpcpp.c 2005-11-13 16:23:34.000000000 +0100 +++ gpc/p/gpcpp.c 2005-11-17 22:23:21.121088472 +0100 @@ -1257,11 +1257,13 @@ gpcpp_process_options (int argc, char ** int c; char *p = pend_defs[i]; make_definition (p, pend_defs_case_sensitive[i]); +#ifndef GCC_3_3 if ((!strncmp (p, "MSDOS", c = 5) || !strncmp (p, "_WIN32", c = 6) || !strncmp (p, "__EMX__", c = 7)) && (p[c] == 0 || p[c] == '=')) make_definition ("__OS_DOS__=1", 1); +#endif } }
diff -up gpc-20051116/p/lang.c gpc/p/lang.c --- gpc-20051116/p/lang.c 2005-11-16 05:48:36.000000000 +0100 +++ gpc/p/lang.c 2005-11-17 22:23:53.523162608 +0100 @@ -447,7 +447,15 @@ static void builtin_define_std (const ch static void do_def (const char *s) { + int c; make_definition (s, 1); +#ifdef GCC_3_3 + if ((!strncmp (s, "MSDOS", c = 5) || + !strncmp (s, "_WIN32", c = 6) || + !strncmp (s, "__EMX__", c = 7)) + && (s[c] == 0 || s[c] == '=')) + make_definition ("__OS_DOS__=1", 1); +#endif #if 0 if (co->print_needed_options) fprintf (stderr, "-D%s ", s);