open or fopen?

Eric Fisher joefoxreal@gmail.com
Thu May 18 08:15:00 GMT 2006


hi,
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?

Thanks



More information about the Gcc-help mailing list