delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/05/10/03:57:45

Date: Mon, 10 May 1993 00:24:33 -0700
From: Timothy Wilson <wilsont AT rahul DOT net>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: GNU C user needs help with djgpp.

Hello!
After using various GNU C implementations on other platforms, and needing
to write some msdos software, I picked up the binaries (1.09) from an FTP
site. 

However, I'm having *lots* of problems, I hope someone can help.

1. fprintf, fputc do not work properly.  forexample
dfile=fopen("test","rb+");
fseek(dfile, 30, 0);
fprintf(dfile,"won't work");
fclose(dfile);

This code will leave the file 'test' exactly the way it was!

I noticed that write() worked, in the above case, but that it didn't work 
in other parts of my program.

The program I am working on runs *perfectly* on a Sun and my Atari ST. 
(with their respective GCC compilers of course)

2. Lots of Memory segmentation errors. 
My 4 Meg ST has no problems what so ever running my code. I copy the 
source directly over to my clone (386SX-16, 4 Megs) and it craps out when i
access certain parts of my program. 
(and no, its not hardware specific code, its all standard C)

What gives? Am i wrong in the assumption that djgpp has a truly flat memory
model? (ie, whats the catch). 

Please help me conquer this wretched clone. 

Thank you!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019