File:  [DVB] / dietlibc / libstdio / fdopen.c
Revision 1.6: download - view: text, annotated - select for diffs
Tue Nov 4 18:09:42 2003 UTC (20 years, 7 months ago) by leitner
Branches: MAIN
CVS tags: HEAD
some more _unlocked functions

#include <errno.h>
#include "dietfeatures.h"
#include <sys/types.h>
#include <dietstdio.h>
#include <unistd.h>

FILE *fdopen_unlocked(int filedes, const char *mode) {
  int f=0;	/* O_RDONLY, O_WRONLY or O_RDWR */

  f=__stdio_parse_mode(mode);
  if (filedes<0) { errno=EBADF; return 0; }
  return __stdio_init_file(filedes,0,f);
}

FILE *fdopen(int filedes, const char *mode) __attribute__((weak,alias("fdopen_unlocked")));

LinuxTV legacy CVS <linuxtv.org/cvs>