Maurice Lombardi wrote:
It needs only very minor changes to the sources to work. They are contained in the two attached diffs to apply to gpc-20000707 and gcc-2952 source directories. - the gpc-20000707.diff corrects for an already reported problem with djgpp where pwd under command.com respond c:\djgpp\ garbling ADD_RTS_PARENT_DIR in make-lang.in
! ADD_RTS_PARENT_DIR = sed -e 's,-B\([^/]\),-B../../\1,g;s,^\([^/][^ ]*\),../../\1,'` ! ADD_RTS_PARENT_DIR = sed -e 's,-B\([^/][^:]\),-B../../\1,g;s,^\([^/][^:][^ ]*\),../../\1,'`
I think this should be: ADD_RTS_PARENT_DIR = sed -e 's,-B\([^/][^:]\),-B../../\1,g;s,^\([^/][^ :]*\),../../\1,' But I'm wondering what the space is about, anyway (can the name of the compiler ever be a single character?), so I think the following is also ok: ADD_RTS_PARENT_DIR = sed -e 's,-B\([^/][^:]\),-B../../\1,g;s,^\([^/][^:]*\),../../\1,' Another problem is that your change would miss, e.g., `-B.' if it's at the end of the string. I think the easiest way to fix it is where ADD_RTS_PARENT_DIR is used: # The ' ' is there so, e.g., `-B.' will be replaced by ADD_RTS_PARENT_DIR RTS_COMPILERS = CC="`echo $(GCC_FOR_TARGET)' ' | $(ADD_RTS_PARENT_DIR)`" \ PC="`echo $(GPC_FOR_TARGET)' ' | $(ADD_RTS_PARENT_DIR)`" I'm changing this in the official sources now. The gcc patch is Peter's area. However, I'm skeptical about the manifest files since they would have to be updated often. I've written a script mkdjgppgpczip which automatically creates manifest etc. It's included in the script directory. It works for cross-building from Linux, might need adjustments for native DJGPP building (never tried that).
When running the demos I have found
- gpc-in-c.h in the unit directory is not in a standard search directory for C header files, I moved it manually (in the zip) into the %DJGPP%\lib\gcc-lib\djgpp\2.952\include
Peter, can we just install it there by default, or do we need permission from the GCC developers?
- intfiledemo.pas does not work. Cannot rewrite a non assigned file under djgpp
This should work (works for me in DosEmu). Does GetTempFileName return a valid name? program Foo; uses GPC; begin Writeln (GetTempFileName); Writeln (GetTempDirectory); CheckInOutRes end. Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/ GPC To-Do list, latest features, fixed bugs: http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html