summaryrefslogtreecommitdiff
path: root/lib/fseeko.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-04-08 13:11:19 +0200
committerBruno Haible <bruno@clisp.org>2008-04-08 13:11:19 +0200
commitb0db05957a20f6506b0de6b499468baf73ae5121 (patch)
tree4af1e8a630f05ad880e6fcbfbc513289d4e071cf /lib/fseeko.c
parent2f1b8f52a0866f8c09fbebad420222702fa20b98 (diff)
downloadgnulib-b0db05957a20f6506b0de6b499468baf73ae5121.tar.gz
Add tentative support for OpenServer.
Diffstat (limited to 'lib/fseeko.c')
-rw-r--r--lib/fseeko.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/fseeko.c b/lib/fseeko.c
index 97dcf6da05..1ed8921ad9 100644
--- a/lib/fseeko.c
+++ b/lib/fseeko.c
@@ -1,5 +1,5 @@
/* An fseeko() function that, together with fflush(), is POSIX compliant.
- 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
@@ -70,7 +70,7 @@ rpl_fseeko (FILE *fp, off_t offset, int whence)
? fp->_bf._size
: 0)
&& fp_ub._base == NULL)
-#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 __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */
# define fp_ ((struct { unsigned char *_ptr; \
unsigned char *_base; \
@@ -82,6 +82,11 @@ rpl_fseeko (FILE *fp, off_t offset, int whence)
if (fp_->_ptr == fp_->_base
&& (fp_->_ptr == NULL || fp_->_cnt == 0))
# else
+# if defined _SCO_DS /* OpenServer */
+# define _base __base
+# define _ptr __ptr
+# define _cnt __cnt
+# endif
if (fp->_ptr == fp->_base
&& (fp->_ptr == NULL || fp->_cnt == 0))
# endif
@@ -112,7 +117,10 @@ rpl_fseeko (FILE *fp, off_t offset, int whence)
fp->_offset = pos;
fp->_flags |= __SOFF;
fp->_flags &= ~__SEOF;
-#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
fp->_flag &= ~_IOEOF;
#endif
return 0;