I am having a problem where ftell is returning an incorrect value. My code, when run in netbeans on linux reports correctly, but the exact same code, running in netbeans on windows (using mingw) reports incorrectly. the file pointer is to a file opened in BINARY_READ. in my linux netbeans, after running my subroutine, the ftell reports 35. in my windows netbeans, the after calling the same subroutine, the ftell is 3621. I traced through my subroutine and the following statement appears to cause the problem:
if (((header_size = getc (fp)) == EOF) || (header_size == 0))
on my linux netbeans, the ftell(fp) after this statement results in 1. but on my windows netbeans, the ftell(fp) after this statement is 3585.
what could be causing the problem?