For a namespace clean function, implement
_close
, otherwise implement
close
. The detailed implementation will
depend on the file handling functionality available.
In the minimal implementation, this function always fails, since there is only standard output, which is not a valid file to close. This implementation is sufficient for the OpenRISC 1000 .
#include <errno.h> #undef errno extern int errno; int _close (int file) { errno = EBADF; return -1; /* Always fails */ } /* _close () */