Back to index

glibc  2.9
Functions
fileno.c File Reference
#include "libioP.h"
#include <stdio.h>

Go to the source code of this file.

Functions

int fileno (_IO_FILE *fp)

Function Documentation

int fileno ( _IO_FILE fp)

Definition at line 32 of file fileno.c.

{
  CHECK_FILE (fp, EOF);

  if (!(fp->_flags & _IO_IS_FILEBUF) || _IO_fileno (fp) < 0)
    {
      __set_errno (EBADF);
      return -1;
    }

  return _IO_fileno (fp);
}

Here is the caller graph for this function: