--- getc_putc.cpp.old 2004-09-15 02:37:21.500489552 +0200 +++ getc_putc.cpp 2004-09-15 02:40:58.623481840 +0200 @@ -165,7 +165,11 @@ int size = 0, wrote; while(size < file_size) { - wrote = write(FILE_FD, buf, min(sizeof(buf), (unsigned int)file_size - size)); + //wrote = write(FILE_FD, buf, min(sizeof(buf), (unsigned int)file_size - size)); + /* + * gcc doesn't like above line. ? : should do the job as good as min()... + */ + wrote = write(FILE_FD, buf, (sizeof(buf) < (file_size - size) ? (sizeof(buf)):(file_size - size))); if(wrote < 0) { fprintf(stderr, "Can't extend file - disk full?\n");