[fpc-devel]1.1 branch: FixFileName and FixFilePath callings causes problems

Pavel V. Ozerski pavel at insect.mail.iephb.ru
Tue Sep 18 11:49:24 CEST 2001


Hello,
Today's compiler built from source (zip file 18.09.01) cannot find own exe path (and therefore .cfg file) correctly. Cause:
at initialization of globals unit the proceure get_exepath is called. This procedure tries to fix dir separators
in paramstr(0) and in found path to executable (using FixFileName and FixFilePath functions). These functions
try to use source_info.dirsep but source_info structure is not initialized at this stage because initsystems procedure
(unit systems) will be called only later! At result separators became #0.

A small related question:
What is the mean to try to fix paramstr(0) here? Its value contains dir separators got from OS, therefore they will be always correct!

sincerely, Pavel





More information about the fpc-devel mailing list