Example #1
0
int buffered_file::fileno() const {
  int fd = FMT_POSIX_CALL(fileno FMT_ARGS(file_));
  if (fd == -1)
    FMT_THROW(system_error(errno, "cannot get file descriptor"));
  return fd;
}
Example #2
0
int fmt::BufferedFile::fileno() const {
  int fd = FMT_POSIX_CALL(fileno FMT_ARGS(file_));
  if (fd == -1)
    throw SystemError(errno, "cannot get file descriptor");
  return fd;
}