Line endings have always been a cross-platform problem. It was even worse before Macs moved to Unix; before that they used \r as new-line (without \n) so there were three line ending styles. fgets() on Unix wouldn't see the \r as a new line so it would keep reading until your buffer was full.
My ANSI C Hack assembler uses this code to read lines so that it can read both styles of new-lines when running on Windows and Linux (and Macs I assume; I don't have one to test on).
if (fgets(sourceLine, sizeof(sourceLine), inFile)) {
int i = strlen(sourceLine)-1;
while (i >= 0 && (sourceLine[i] == '\n' || sourceLine[i] == '\r'))
sourceLine[i--] = '\0';
...
--Mark