1 #include "stdio_impl.h" 2 #ifndef __LITEOS__ 3 #include "param_check.h" 4 #endif 5 6 #undef ferror 7 ferror(FILE * f)8int ferror(FILE *f) 9 { 10 #ifndef __LITEOS__ 11 PARAM_CHECK(f); 12 #endif 13 FLOCK(f); 14 int ret = !!(f->flags & F_ERR); 15 FUNLOCK(f); 16 return ret; 17 } 18 19 weak_alias(ferror, ferror_unlocked); 20 weak_alias(ferror, _IO_ferror_unlocked); 21