X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Authenticated: #27081556 X-Provags-ID: V01U2FsdGVkX18EYighvsYEWnu/6gyrNuqKBhBp1W2BpDfQD2gHQj 02C8xGzYzhjprv Message-ID: <50AFFDB9.7060108@gmx.de> Date: Fri, 23 Nov 2012 23:50:33 +0100 From: Juan Manuel Guerrero User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2 MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Difficulties using DJGPP 2.04 together with DOSLFN 0.41 on MSDOS 6.22 References: <509FE38A DOT 9030207 AT gmx DOT de> <1145c3bf-e1ca-40b4-9201-f2c009a06369 AT e25g2000vbm DOT googlegroups DOT com> <9846c8b0-897f-4257-b1f0-e6de3f0f9e80 AT googlegroups DOT com> In-Reply-To: <9846c8b0-897f-4257-b1f0-e6de3f0f9e80@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Reply-To: djgpp AT delorie DOT com Am 23.11.2012 04:25, schrieb RayeR: > I can confirm this behavior on my system: > MS-DOS 6.22, djdev 2.04, gcc 4.7.2, bnu 2.23.1, doslfn 0.41b > the compiled file was crashed after loading doslnf - I can see most binary middle of the file was zero bytes - file was corrupted. > Then I installed updated doslfn 0.41c and problem has gone, the compied exe works fine. > Thx for pointing and fixing this bug. > Only for the record: around September 2011 I pointed out that the libc version build from DJGPP's cvs repository code did not work on MSDOS with some DOSLFN drivers. An inspection of the code showed that for all calls to 0x71XX functions the carry flag was never set before the call was issued. It concerned the following C functions with calls to 0x710D, 0x7160, 0x713B, 0x71A1, 0x7147, 0x713A, 0x71A6, 0x716C, 0x7143, 0x7141, 0x714E, 0x714F, 0x71A8 and 0x71A0: src/libc/dos/io/flushdc.c, src/libcdos/process/dosexec.c, src/libc/posix/sys/stat/fixpath.c, src/libc/posix/dirent/opendir.c, src/libc/posix/unistd/getcwd.c, src/libc/posix/sys/stat/mkdir.c, src/libc/posix/unistd/rmdir.c, src/libc/posix/unistd/chdir.c, src/libc/posix/sys/stat/filelen.c, src/libc/posix/sys/stat/lfilelen.c, src/libc/posix/sys/stat/fstat.c, src/libc/posix/sys/stat/fchmod.c, src/libc/dos/io/_open.c, src/libc/dos/io/_chmod.c, src/libc/dos/io/_creat_n.c, src/libc/dos/io/_creat.c, src/libc/ansi/stdio/remove.c, src/libc/ansi/stdio/findfirs.c, src/libc/ansi/stdio/findnext.c, src/libc/dos/dos/truename.c, src/libc/dos/lfn/lfnshort.c, src/libc/dos/lfn/_use_lfn.c, src/libc/ansi/stdio/_rename.c The bug was fixed by the patch presented and committed at thread: I have checked with all DOSLFN driver versions available at using stock djdev204.zip from /beta directory and a version of libc compiled from code of the DJGPP CVS repository. The table below summarizes the result: doslfn(m).com | md5sum | beta | repo -----------------+----------------------------------+------+------ doslfnjh-0.33 | 84acdb62077edcf9d2f176b36e8b8b57 | OK | OK doslfnm-0.34 | a789c9d75fe09e794577f7cdf931aee7 | OK | OK doslfnm-0.34d | 9287f71e0c466a97be9a34779a5ac00e | KO | OK doslfn-0.40 | 9564bf067e1187f74dd6b3f79f3177e3 | OK | OK doslfn-0.40a | 6ff5150d55b7e83891ed3772021c23ef | OK | OK doslfn-0.40e | 2832bf3e79d31f4ca3c61fcf471f387f | KO | OK doslfn041 | 9d5b5bad0d78e81cae5f4ab9282bec3d | KO | OK doslfn041a | 648ded3978152ee87aec1bc6fca63808 | KO | OK doslfn041b | e69363d404e5d9466f680f7ddd567d50 | KO | OK doslfn041c | 9a3f1b63951737b892d7ed2ca25c5a53 | OK | OK beta : gcc472b, bnu2231b and djdev204 from /beta directory. repo : gcc472b from /beta directory and bnu2231b rebuild using a freshly compiled libc from cvs repository. The linker must be recompiled with the fixed library or broken exe files will be created. For the test program it was not necessary neither to replace gcc.exe nor as.exe. This may be not true for larger programs. Regards, Juan M .Guerrero