This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: EXE has file junk in it


Sergey Okhapkin wrote:
> Michael Hirmke wrote:
> > > If I am right, you linked under windows 95. Please confirm this. I would like
> > > to know if this theory is correct.
> > 
> > Same with Windows NT, at least with NT 4.0 !
> > 
> 
> How come??? Yeah... I have an idea! Are you using WS or Server? Server makes zero-filling! I don't know what behavior WS has.


I just tried my seek test on NTWS 4.0 - resulting file is zero-filled...

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>

main()
{
	int fd;
	int i=0;

	fd = open("seek.tst", O_CREAT| O_WRONLY|O_BINARY, 0666);
	write(fd, &i, 1);
	i++;
	lseek(fd, 4096, SEEK_SET);
	write(fd, &i, 1);
	i++;
	lseek(fd, 8192, SEEK_SET);
	write(fd, &i, 1);
	i++;
	lseek(fd, 16384, SEEK_SET);
	write(fd, &i, 1);
}


-- 
Sergey Okhapkin
Moscow, Russia
Looking for a job.


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]