summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sh/bits
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/sh/bits')
-rw-r--r--libc/sysdeps/linux/sh/bits/fcntl.h40
-rw-r--r--libc/sysdeps/linux/sh/bits/huge_val.h62
-rw-r--r--libc/sysdeps/linux/sh/bits/mman.h2
3 files changed, 44 insertions, 60 deletions
diff --git a/libc/sysdeps/linux/sh/bits/fcntl.h b/libc/sysdeps/linux/sh/bits/fcntl.h
index 8c9159f0f..30fcc8367 100644
--- a/libc/sysdeps/linux/sh/bits/fcntl.h
+++ b/libc/sysdeps/linux/sh/bits/fcntl.h
@@ -22,8 +22,11 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-
#include <sys/types.h>
+#ifdef __USE_GNU
+# include <bits/uio.h>
+#endif
+
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
@@ -180,16 +183,45 @@ struct flock64
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
-/* Linux-specific operations for posix_fadvise. */
+
#ifdef __USE_GNU
-# define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range. */
-# define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range. */
+# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
+ in the range before performing the
+ write. */
+# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
+ dirty pages in the range which are
+ not presently under writeback. */
+# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
+ the range after performing the
+ write. */
#endif
__BEGIN_DECLS
+#if 0 /*def __USE_GNU*/
+
/* Provide kernel hint to read ahead. */
extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
__THROW;
+
+/* Selective file content synch'ing. */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+ unsigned int __flags);
+
+
+/* Splice address range into a pipe. */
+extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
+ unsigned int __flags);
+
+/* Splice two files together. */
+extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+ __THROW;
+
+/* In-kernel implementation of tee for pipe buffers. */
+extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+ __THROW;
+
+#endif
+
__END_DECLS
diff --git a/libc/sysdeps/linux/sh/bits/huge_val.h b/libc/sysdeps/linux/sh/bits/huge_val.h
index e476d796b..732b06503 100644
--- a/libc/sysdeps/linux/sh/bits/huge_val.h
+++ b/libc/sysdeps/linux/sh/bits/huge_val.h
@@ -1,7 +1,8 @@
/* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity).
Used by <stdlib.h> and <math.h> functions for overflow.
SH version.
- Copyright (C) 1992, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1992, 95, 96, 97, 98, 99, 2000, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,25 +24,19 @@
# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
#endif
-#include <features.h>
-
/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
-#ifdef __GNUC__
-
-# if __GNUC_PREREQ(2,96)
-
-# define HUGE_VAL (__extension__ 0x1.0p2047)
-
-# else
+#if __GNUC_PREREQ(3,3)
+# define HUGE_VAL (__builtin_huge_val())
+#elif __GNUC_PREREQ(2,96)
+# define HUGE_VAL (__extension__ 0x1.0p2047)
+#elif defined __GNUC__
# define HUGE_VAL \
(__extension__ \
((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
{ __l: 0x000000007ff00000ULL }).__d)
-# endif
-
#else /* not GCC */
# include <endian.h>
@@ -59,46 +54,3 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
# define HUGE_VAL (__huge_val.__d)
#endif /* GCC. */
-
-
-/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
-
-#ifdef __USE_ISOC99
-
-# ifdef __GNUC__
-
-# if __GNUC_PREREQ(2,96)
-
-# define HUGE_VALF (__extension__ 0x1.0p255f)
-
-# else
-
-# define HUGE_VALF \
- (__extension__ \
- ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \
- { __l: 0x7f800000UL }).__d)
-
-# endif
-
-# else /* not GCC */
-
-typedef union { unsigned char __c[4]; float __f; } __huge_valf_t;
-
-# if __BYTE_ORDER == __BIG_ENDIAN
-# define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 }
-# endif
-# if __BYTE_ORDER == __LITTLE_ENDIAN
-# define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f }
-# endif
-
-static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
-# define HUGE_VALF (__huge_valf.__f)
-
-# endif /* GCC. */
-
-
-/* Generally there is no separate `long double' format and it is the
- same as `double'. */
-# define HUGE_VALL HUGE_VAL
-
-#endif /* __USE_ISOC99. */
diff --git a/libc/sysdeps/linux/sh/bits/mman.h b/libc/sysdeps/linux/sh/bits/mman.h
index 3c10334a4..7a6b572a4 100644
--- a/libc/sysdeps/linux/sh/bits/mman.h
+++ b/libc/sysdeps/linux/sh/bits/mman.h
@@ -88,7 +88,7 @@
# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
# define MADV_WILLNEED 3 /* Will need these pages. */
# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_REMOVE 5 /* Remove these pages and resources. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
# define MADV_DONTFORK 10 /* Do not inherit across fork. */
# define MADV_DOFORK 11 /* Do inherit across fork. */
#endif