getting "implicit declaration of function 'fcloseall' is invalid in C99" when compiling to gnu99

Posted by Emanuel Ey on Stack Overflow See other posts from Stack Overflow or by Emanuel Ey
Published on 2011-01-13T12:50:05Z Indexed on 2011/01/13 12:53 UTC
Read the original article Hit count: 519

Filed under:
|
|

Consider the following C code:

#include <stdio.h>
#include <stdlib.h>

void fatal(const char* message){
 /*
  Prints a message and terminates the program.
  Closes all open i/o streams before exiting.
 */
 printf("%s\n", message);
 fcloseall();
 exit(EXIT_FAILURE);
}

I'm using clang 2.8 to compile: clang -Wall -std=gnu99 -o <executable> <source.c>

And get: implicit declaration of function 'fcloseall' is invalid in C99

Which is true, but i'm explicitly compiling to gnu99 [which should support fcloseall()], and not to c99. Although the code runs, I don like the have unresolved warnings when compiling. How can i solve this?

© Stack Overflow or respective owner

Related posts about c

    Related posts about c99