Message-Id: <3.0.1.16.19970612222210.50efed78@hal.nt.tuwien.ac.at> Date: Thu, 12 Jun 1997 22:22:10 To: Eli Zaretskii From: Anton Helm Subject: Re: Strange behavior of GNU-make (WinNT 4.0) Cc: djgpp AT delorie DOT com In-Reply-To: References: <3 DOT 0 DOT 1 DOT 16 DOT 19970604172045 DOT 2a97752c AT hal DOT nt DOT tuwien DOT ac DOT at> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Precedence: bulk At 11:13 1997-06-05 +0300, you wrote: > >On Wed, 4 Jun 1997, Anton Helm wrote: > >> I have been using these makefiles for more than a year with several >> versions of GNU-make on various UNIX platforms and MS-DOS without >> problems. >> >> What's happening in WinNT 4.0 ? > >Are you saying that these same Makefiles worked with that same >Make 3.75 on MS-DOS, but fail as you describe on NT? Yes. >If so, please >run Make on both platforms with -d and -p switches, redirect the >output to a file and examine the log for the differences. This should >unlock the problem. Hmmm. As I stated before it acts like there would be a file named 'all' which is up to date. Meanwhile I have also detected some strange behavior of gunzip (tells me that the output file already exists...) which gave me a hint where to search for a bug, and....... BINGO ! From the gzip sources I got that piece of source code that is testing files and created a little test program (available upon request). !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! I found out that when running WinNT4.0 the stat() function is returning 0 !! !! for non-existing files (no matter if file system is FAT or NTFS). !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Here is a dump of the returned stat structure for a non-existing file: st_dev = 3 st_ino = 0 st_dmode = 0 st_uid = 42 st_gid = 42 st_rdev = 0 st_size = 0 st_atime = 312768000 Due to the functionality of a make utility I strongly suspect that it is using stat() or one of the related functions for checking files. This would explain the misbehavior of make. As I have neither knowledge of how the stat() function is implemented nor detailed knowledge of WinNT, I would like to ask if someone out there could have a look at the libc source to fix this. Maybe the other related functions are buggy too. Tony ************************************************************************* Dipl.-Ing. Anton HELM * mailto:tony AT nt DOT tuwien DOT ac DOT at Institut fuer Nachrichtentechnik * http://dictator.nt.tuwien.ac.at/~tony/ und Hochfrequenztechnik * http://www.tuwien.ac.at/nthft/ Guszhausstr. 25/389 * phoneto:+43-1-58801-3520 A-1040 Wien, AUSTRIA * faxto:+43-1-5870583 *************************************************************************