changeset 8703:0f394f9a6ffe

Port to Solaris/SPARC64.
author Bruno Haible <bruno@clisp.org>
date Mon, 23 Apr 2007 08:01:35 +0000
parents 880113a4765f
children cd62ee26b120
files ChangeLog lib/fbufmode.c
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-04-23  Bruno Haible  <bruno@clisp.org>
+
+	* lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
+
 2007-04-23  Bruno Haible  <bruno@clisp.org>
 
 	* lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
--- a/lib/fbufmode.c
+++ b/lib/fbufmode.c
@@ -55,9 +55,13 @@
   if (fp->_flag & _IOLBF)
     return _IOLBF;
 # endif
+# if defined __sun && defined __sparc && defined _LP64 /* Solaris/SPARC 64-bit */
+  return ((unsigned int *) fp) [9] & (_IONBF | _IOFBF);
+# else
   if (fp->_flag & _IONBF)
     return _IONBF;
   return _IOFBF;
+# endif
 #else
  #error "Please port gnulib fbufmode.c to your platform! Look at the setvbuf implementation."
 #endif