summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-11-10 12:37:32 +0100
committerBruno Haible <bruno@clisp.org>2008-11-10 12:37:32 +0100
commita2c5f8d99ec52594aae96afeb29e0aeb7a841872 (patch)
tree73e72cea84741a0ac9ddad4bcb38c13360e04445 /lib
parent729edda20b3bc6862f41a34ae0ff17e7db449333 (diff)
downloadgnulib-a2c5f8d99ec52594aae96afeb29e0aeb7a841872.tar.gz
Add support for Haiku.
Diffstat (limited to 'lib')
-rw-r--r--lib/fbufmode.c2
-rw-r--r--lib/fpurge.c2
-rw-r--r--lib/freadable.c2
-rw-r--r--lib/freadahead.c2
-rw-r--r--lib/freading.c2
-rw-r--r--lib/freadptr.c2
-rw-r--r--lib/freadseek.c2
-rw-r--r--lib/fseeko.c2
-rw-r--r--lib/fseterr.c2
-rw-r--r--lib/fwritable.c2
-rw-r--r--lib/fwriting.c2
11 files changed, 11 insertions, 11 deletions
diff --git a/lib/fbufmode.c b/lib/fbufmode.c
index 961ae2adb2..d5b456ff0a 100644
--- a/lib/fbufmode.c
+++ b/lib/fbufmode.c
@@ -31,7 +31,7 @@ fbufmode (FILE *fp)
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
# if HAVE___FLBF /* glibc >= 2.2 */
if (__flbf (fp))
return _IOLBF;
diff --git a/lib/fpurge.c b/lib/fpurge.c
index c82d8012e7..eccfa0ea1f 100644
--- a/lib/fpurge.c
+++ b/lib/fpurge.c
@@ -61,7 +61,7 @@ fpurge (FILE *fp)
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-# if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
+# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_IO_read_end = fp->_IO_read_ptr;
fp->_IO_write_ptr = fp->_IO_write_base;
/* Avoid memory leak when there is an active ungetc buffer. */
diff --git a/lib/freadable.c b/lib/freadable.c
index 54703da407..b50140433a 100644
--- a/lib/freadable.c
+++ b/lib/freadable.c
@@ -27,7 +27,7 @@ freadable (FILE *fp)
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
return (fp->_flags & _IO_NO_READS) == 0;
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
return (fp_->_flags & (__SRW | __SRD)) != 0;
diff --git a/lib/freadahead.c b/lib/freadahead.c
index 2dcf81c305..25bfc1ee81 100644
--- a/lib/freadahead.c
+++ b/lib/freadahead.c
@@ -25,7 +25,7 @@
size_t
freadahead (FILE *fp)
{
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
if (fp->_IO_write_ptr > fp->_IO_write_base)
return 0;
return (fp->_IO_read_end - fp->_IO_read_ptr)
diff --git a/lib/freading.c b/lib/freading.c
index e201b89752..b08fbeaf3c 100644
--- a/lib/freading.c
+++ b/lib/freading.c
@@ -31,7 +31,7 @@ freading (FILE *fp)
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
return ((fp->_flags & _IO_NO_WRITES) != 0
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
&& fp->_IO_read_base != NULL));
diff --git a/lib/freadptr.c b/lib/freadptr.c
index b47e09ffc3..f78ec1abec 100644
--- a/lib/freadptr.c
+++ b/lib/freadptr.c
@@ -29,7 +29,7 @@ freadptr (FILE *fp, size_t *sizep)
size_t size;
/* Keep this code in sync with freadahead! */
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
if (fp->_IO_write_ptr > fp->_IO_write_base)
return NULL;
size = fp->_IO_read_end - fp->_IO_read_ptr;
diff --git a/lib/freadseek.c b/lib/freadseek.c
index 4299e82fea..311c6990c9 100644
--- a/lib/freadseek.c
+++ b/lib/freadseek.c
@@ -34,7 +34,7 @@ static inline void
freadptrinc (FILE *fp, size_t increment)
{
/* Keep this code in sync with freadptr! */
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_IO_read_ptr += increment;
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
fp_->_p += increment;
diff --git a/lib/fseeko.c b/lib/fseeko.c
index 536dfaf680..ac0af5785e 100644
--- a/lib/fseeko.c
+++ b/lib/fseeko.c
@@ -41,7 +41,7 @@ rpl_fseeko (FILE *fp, off_t offset, int whence)
#endif
/* These tests are based on fpurge.c. */
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
if (fp->_IO_read_end == fp->_IO_read_ptr
&& fp->_IO_write_ptr == fp->_IO_write_base
&& fp->_IO_save_base == NULL)
diff --git a/lib/fseterr.c b/lib/fseterr.c
index 69fcd32f1e..ebe3580802 100644
--- a/lib/fseterr.c
+++ b/lib/fseterr.c
@@ -29,7 +29,7 @@ fseterr (FILE *fp)
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_flags |= _IO_ERR_SEEN;
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
fp_->_flags |= __SERR;
diff --git a/lib/fwritable.c b/lib/fwritable.c
index 691ddc573b..ed7be9d9b0 100644
--- a/lib/fwritable.c
+++ b/lib/fwritable.c
@@ -27,7 +27,7 @@ fwritable (FILE *fp)
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
return (fp->_flags & _IO_NO_WRITES) == 0;
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
return (fp_->_flags & (__SRW | __SWR)) != 0;
diff --git a/lib/fwriting.c b/lib/fwriting.c
index 7ce0925976..4ecf4b0a09 100644
--- a/lib/fwriting.c
+++ b/lib/fwriting.c
@@ -27,7 +27,7 @@ fwriting (FILE *fp)
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
return (fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) != 0;
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
return (fp_->_flags & __SWR) != 0;