open or fopen?

Eric Fisher
Thu May 18 08:15:00 GMT 2006

There is a question about file operation functions used in gcc source
code. I can't figure out why sometimes we use open function such as
load_specs in gcc.c,
static char *
load_specs (const char *filename)
  int desc;
  /* Open and stat the file.  */
  desc = open (filename, O_RDONLY, 0);
why not fopen?


More information about the Gcc-help mailing list