summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/x86_64/bits
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-08-23 19:27:42 +0000
committerMike Frysinger <vapier@gentoo.org>2006-08-23 19:27:42 +0000
commit0814bdad52c764ec4f3c010e78d7cdb6418e64e0 (patch)
tree3c706ff1cb2cce2cbc9eb500095745b974e3e4b9 /libc/sysdeps/linux/x86_64/bits
parente47414d975e0ba1fe3a5f329756a20daaf31fefa (diff)
sync with upstream via psm
Diffstat (limited to 'libc/sysdeps/linux/x86_64/bits')
-rw-r--r--libc/sysdeps/linux/x86_64/bits/fcntl.h40
-rw-r--r--libc/sysdeps/linux/x86_64/bits/mathdef.h18
-rw-r--r--libc/sysdeps/linux/x86_64/bits/mman.h2
-rw-r--r--libc/sysdeps/linux/x86_64/bits/stat.h30
4 files changed, 84 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/x86_64/bits/fcntl.h b/libc/sysdeps/linux/x86_64/bits/fcntl.h
index 712007c36..f69bcf60e 100644
--- a/libc/sysdeps/linux/x86_64/bits/fcntl.h
+++ b/libc/sysdeps/linux/x86_64/bits/fcntl.h
@@ -21,9 +21,12 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-
#include <sys/types.h>
#include <bits/wordsize.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 */
@@ -194,16 +197,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/x86_64/bits/mathdef.h b/libc/sysdeps/linux/x86_64/bits/mathdef.h
index 37665c209..b0567e4d4 100644
--- a/libc/sysdeps/linux/x86_64/bits/mathdef.h
+++ b/libc/sysdeps/linux/x86_64/bits/mathdef.h
@@ -23,14 +23,30 @@
#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
# define _MATH_H_MATHDEF 1
+# include <bits/wordsize.h>
+
+# if __WORDSIZE == 64 || (defined __FLT_EVAL_METHOD__ && __FLT_EVAL_METHOD__ == 0)
/* The x86-64 architecture computes values with the precission of the
- used type. */
+ used type. Similarly for -m32 -mfpmath=sse. */
typedef float float_t; /* `float' expressions are evaluated as `float'. */
typedef double double_t; /* `double' expressions are evaluated
as `double'. */
+# else
+/* The ix87 FPUs evaluate all values in the 80 bit floating-point format
+ which is also available for the user as `long double'. Therefore we
+ define: */
+typedef long double float_t; /* `float' expressions are evaluated as
+ `long double'. */
+typedef long double double_t; /* `double' expressions are evaluated as
+ `long double'. */
+# endif
/* The values returned by `ilogb' for 0 and NaN respectively. */
# define FP_ILOGB0 (-2147483647 - 1)
# define FP_ILOGBNAN (-2147483647 - 1)
#endif /* ISO C99 */
+
+#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
diff --git a/libc/sysdeps/linux/x86_64/bits/mman.h b/libc/sysdeps/linux/x86_64/bits/mman.h
index 880390055..535c9edcf 100644
--- a/libc/sysdeps/linux/x86_64/bits/mman.h
+++ b/libc/sysdeps/linux/x86_64/bits/mman.h
@@ -89,7 +89,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
diff --git a/libc/sysdeps/linux/x86_64/bits/stat.h b/libc/sysdeps/linux/x86_64/bits/stat.h
index ddc292a34..3a9c7740a 100644
--- a/libc/sysdeps/linux/x86_64/bits/stat.h
+++ b/libc/sysdeps/linux/x86_64/bits/stat.h
@@ -78,12 +78,27 @@ struct stat
#else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
#endif
+#if 0 /*def __USE_MISC*/
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+#else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
+#endif
#if __WORDSIZE == 64
long int __unused[3];
#else
@@ -124,12 +139,27 @@ struct stat64
#endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
+#if 0 /*def __USE_MISC*/
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+#else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
+#endif
#if __WORDSIZE == 64
long int __unused[3];
#else