1/*- 2 * See the file LICENSE for redistribution information. 3 * 4 * Copyright (c) 2006-2009 Oracle. All rights reserved. 5 * 6 * $Id$ 7 */ 8 9#include "db_config.h" 10 11#include "db_int.h" 12 13/* 14 * fgetc -- 15 * 16 * PUBLIC: #ifndef HAVE_FGETC 17 * PUBLIC: int fgetc __P((FILE *)); 18 * PUBLIC: #endif 19 */ 20int 21fgetc(fp) 22 FILE *fp; 23{ 24 char b[1]; 25 26 if (IFILE_Read(fp, b, 1)) 27 return ((int)b[0]); 28 29 __os_set_errno(EIO); 30 return (EOF); 31} 32