/* ferror( FILE * )12This file is part of the Public Domain C Library (PDCLib).3Permission is granted to use, modify, and / or redistribute at will.4*/56#include <stdio.h>78#ifndef REGTEST9#include "_PDCLIB_io.h"1011int _PDCLIB_ferror_unlocked( FILE * stream )12{13return stream->status & _PDCLIB_ERRORFLAG;14}1516int ferror( FILE * stream )17{18_PDCLIB_flockfile( stream );19int error = _PDCLIB_ferror_unlocked( stream );20_PDCLIB_funlockfile( stream );21return error;22}2324#endif2526#ifdef TEST27#include "_PDCLIB_test.h"2829int main( void )30{31/* Testing covered by clearerr(). */32return TEST_RESULTS;33}3435#endif36373839