|
From: Oscar F. <of...@wa...> - 2003-06-19 15:29:51
|
ml...@mu... writes: > when fseek is called, for example, like this: > > file_pointer=fopen(filename,"ab"); > fseek(file_pointer,4,SEEK_SET); > > it actually seeks to the end of the file instead of the 4th byte. > Is this a known problem under Windows ? I guess the problem is this: the 'a' mode value is for *appending* data. The C RTL just *keeps* the file pointer at the end. Have you checked the fseek return value? > Because compiled with DJGPP it works as expected. Please correct me if I'm wrong, but DJGPP is the one that seems wrong here. A look at the C standard should clarify things, but it's too late here. > I'm using MinGW 2.0.0.3, Runtime 3.0 and GCC 3.2.3-20030504-1 -- Oscar |