Prof Abimbola Olowofoyeku wrote:
Correct. The problem is with front slashes (or so it seems).
This is precisely the problem. Whatever you pass to gpc, the gpc driver internally changes back slashes to front slashes when it wants to spawn its subprocesses (in the first instance, gpcpp). This is then treated as an invalid command by command.com, and the gpc driver dies with a complaint that it cannot find gpcpp (actually, it just cannot execute it). This problem only exists under Win9x.
So the solution seems to be not to change the back slashes to front slashes when running under Mingw - which is unfortunate, because Win NT/2000/XP do not mind the front slashes.
The attached diff seems to solve the problem. I can release a patched version of gpc.exe if it is deemed that the patch is appropriate for inclusion in GPC (I hope also that the C code is correct!).
The code looks correct (though a C wizard would do it differently ;-). However, I'm not sure if converting forth and back it so good.
Did you find the place where it changes back slashes to front slashes? I suppose it's the places where something is set to DIR_SEPARATOR in gpc.c. However, config/i386/xm-mingw32.h says:
#define DIR_SEPARATOR '\' #define DIR_SEPARATOR_2 '/'
So I still don't understand it. DIR_SEPARATOR should be correct (unlike DIR_SEPARATOR_2), while Cygwin has them vice versa (which should also be good).
Anyway, you might want to try changing the assignments (search for ` = DIR_SEPARATOR', and also the declaration of dir_separator_str) to DIR_SEPARATOR_2, without applying your patch.
I don't really see why this should work, but if it does, at least I know what we're at ...
Frank