/* Retrieve information about a FILE stream.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return (fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) != 0;
#elif defined __sferror /* FreeBSD, NetBSD, OpenBSD, MacOS X, Cygwin */
return (fp->_flags & __SWR) != 0;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, mingw */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
+# if defined _SCO_DS /* OpenServer */
+# define _flag __flag
+# endif
return (fp->_flag & _IOWRT) != 0;
#elif defined __UCLIBC__ /* uClibc */
return (fp->__modeflags & __FLAG_WRITING) != 0;