#include "libioP.h"
#include "stdio.h"

#undef getc

int
getc(stream)
  FILE *stream;
{
#ifdef _LIBPTHREAD
  int ret;
  flockfile (stream);
  ret = _IO_getc(stream);
  funlockfile (stream);
  return ret;
#else
  return _IO_getc (stream);
#endif
}

#ifndef _LIBPTHREAD
#ifdef __ELF__
#pragma weak getc
#endif
#endif
