summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/powerpc/bits
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-22 05:27:38 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-22 05:27:38 +0000
commit4afc4d00261ccba61a8fcd2cb0aba246f0029850 (patch)
tree6224250cfadf3ca4431c0d2b09d477bcc6416aba /libc/sysdeps/linux/powerpc/bits
parent64b2dfee9682facaa7222b9960f327eac901fe31 (diff)
sync headers with glibc
Diffstat (limited to 'libc/sysdeps/linux/powerpc/bits')
-rw-r--r--libc/sysdeps/linux/powerpc/bits/fcntl.h15
-rw-r--r--libc/sysdeps/linux/powerpc/bits/mman.h21
-rw-r--r--libc/sysdeps/linux/powerpc/bits/msq.h3
-rw-r--r--libc/sysdeps/linux/powerpc/bits/sem.h9
-rw-r--r--libc/sysdeps/linux/powerpc/bits/shm.h6
-rw-r--r--libc/sysdeps/linux/powerpc/bits/stat.h32
-rw-r--r--libc/sysdeps/linux/powerpc/bits/termios.h87
-rw-r--r--libc/sysdeps/linux/powerpc/bits/wordsize.h32
8 files changed, 121 insertions, 84 deletions
diff --git a/libc/sysdeps/linux/powerpc/bits/fcntl.h b/libc/sysdeps/linux/powerpc/bits/fcntl.h
index 8a709841b..19649c01c 100644
--- a/libc/sysdeps/linux/powerpc/bits/fcntl.h
+++ b/libc/sysdeps/linux/powerpc/bits/fcntl.h
@@ -1,5 +1,6 @@
/* O_*, F_*, FD_* bit values for Linux/PowerPC.
- Copyright (C) 1995,1996,1997,1998,2000,2003 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 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
@@ -45,7 +46,7 @@
# define O_DIRECT 0400000 /* Direct disk access. */
# define O_DIRECTORY 040000 /* Must be a directory. */
# define O_NOFOLLOW 0100000 /* Do not follow links. */
-# define O_STREAMING 04000000 /* streaming access */
+# define O_NOATIME 01000000 /* Do not set atime. */
#endif
#ifdef __USE_LARGEFILE64
@@ -79,7 +80,7 @@
#define F_SETLK64 13 /* Set record locking info (non-blocking). */
#define F_SETLKW64 14 /* Set record locking info (blocking). */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
#endif
@@ -178,3 +179,11 @@ struct flock64
# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+
+__BEGIN_DECLS
+
+/* Provide kernel hint to read ahead. */
+extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
+ __THROW;
+
+__END_DECLS
diff --git a/libc/sysdeps/linux/powerpc/bits/mman.h b/libc/sysdeps/linux/powerpc/bits/mman.h
index f92bc7fc3..580e93886 100644
--- a/libc/sysdeps/linux/powerpc/bits/mman.h
+++ b/libc/sysdeps/linux/powerpc/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/PowerPC version.
- Copyright (C) 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003, 2005, 2006 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
@@ -34,6 +34,10 @@
#define PROT_WRITE 0x2 /* Page can be written. */
#define PROT_EXEC 0x4 /* Page can be executed. */
#define PROT_NONE 0x0 /* Page can not be accessed. */
+#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
+ growsdown vma (mprotect only). */
+#define PROT_GROWSUP 0x02000000 /* Extend change to start of
+ growsup vma (mprotect only). */
/* Sharing types (must choose one and only one of these). */
#define MAP_SHARED 0x001 /* Share changes. */
@@ -52,11 +56,13 @@
/* These are Linux-specific. */
#ifdef __USE_MISC
-# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */
-# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
-# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
-# define MAP_LOCKED 0x0080 /* Lock the mapping. */
-# define MAP_NORESERVE 0x0040 /* Don't check for reservations. */
+# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
+# define MAP_DENYWRITE 0x00800 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
+# define MAP_LOCKED 0x00080 /* Lock the mapping. */
+# define MAP_NORESERVE 0x00040 /* Don't check for reservations. */
+# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
+# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
#endif
/* Flags to `msync'. */
@@ -83,6 +89,9 @@
# 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_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
#endif
/* The POSIX people had to invent similar names for the same things. */
diff --git a/libc/sysdeps/linux/powerpc/bits/msq.h b/libc/sysdeps/linux/powerpc/bits/msq.h
index 45173a4cb..f19884437 100644
--- a/libc/sysdeps/linux/powerpc/bits/msq.h
+++ b/libc/sysdeps/linux/powerpc/bits/msq.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2002 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
@@ -21,7 +21,6 @@
#endif
#include <bits/types.h>
-#include <bits/wordsize.h>
/* Define options for message queue functions. */
#define MSG_NOERROR 010000 /* no error if message is too big */
diff --git a/libc/sysdeps/linux/powerpc/bits/sem.h b/libc/sysdeps/linux/powerpc/bits/sem.h
index 6a615f154..1c648cd19 100644
--- a/libc/sysdeps/linux/powerpc/bits/sem.h
+++ b/libc/sysdeps/linux/powerpc/bits/sem.h
@@ -22,7 +22,6 @@
#endif
#include <sys/types.h>
-#include <bits/wordsize.h>
/* Flags for `semop'. */
#define SEM_UNDO 0x1000 /* undo the operation on exit */
@@ -31,8 +30,8 @@
#define GETPID 11 /* get sempid */
#define GETVAL 12 /* get semval */
#define GETALL 13 /* get all semval's */
-#define GETNCNT 14 /* get semncnt */
-#define GETZCNT 15 /* get semzcnt */
+#define GETNCNT 14 /* get semncnt */
+#define GETZCNT 15 /* get semzcnt */
#define SETVAL 16 /* set semval */
#define SETALL 17 /* set all semval's */
@@ -44,11 +43,11 @@ struct semid_ds
#if __WORDSIZE == 32
unsigned int __unused1;
#endif
- __time_t sem_otime; /* last semop() time */
+ __time_t sem_otime; /* last semop() time */
#if __WORDSIZE == 32
unsigned int __unused2;
#endif
- __time_t sem_ctime; /* last time changed by semctl() */
+ __time_t sem_ctime; /* last time changed by semctl() */
unsigned long int sem_nsems; /* number of semaphores in set */
unsigned long __unused3;
unsigned long __unused4;
diff --git a/libc/sysdeps/linux/powerpc/bits/shm.h b/libc/sysdeps/linux/powerpc/bits/shm.h
index 6477df634..62560c0ca 100644
--- a/libc/sysdeps/linux/powerpc/bits/shm.h
+++ b/libc/sysdeps/linux/powerpc/bits/shm.h
@@ -22,7 +22,6 @@
#endif
#include <bits/types.h>
-#include <bits/wordsize.h>
/* Permission flag for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
@@ -81,9 +80,10 @@ struct shmid_ds
# define SHM_INFO 14
/* shm_mode upper byte flags */
-# define SHM_DEST 01000 /* segment will be destroyed on last detach */
-# define SHM_LOCKED 02000 /* segment will not be swapped */
+# define SHM_DEST 01000 /* segment will be destroyed on last detach */
+# define SHM_LOCKED 02000 /* segment will not be swapped */
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
+# define SHM_NORESERVE 010000 /* don't check for reservations */
struct shminfo
{
diff --git a/libc/sysdeps/linux/powerpc/bits/stat.h b/libc/sysdeps/linux/powerpc/bits/stat.h
index c85695e51..af71f275e 100644
--- a/libc/sysdeps/linux/powerpc/bits/stat.h
+++ b/libc/sysdeps/linux/powerpc/bits/stat.h
@@ -27,11 +27,11 @@
#define _STAT_VER_LINUX_OLD 1
#define _STAT_VER_KERNEL 1
#define _STAT_VER_SVR4 2
+#define _STAT_VER_LINUX 3
#if __WORDSIZE == 32
-# define _STAT_VER_LINUX 3
-# define _STAT_VER _STAT_VER_LINUX /* The one defined below. */
+# define _STAT_VER _STAT_VER_LINUX
#else
-# define _STAT_VER _STAT_VER_KERNEL /* The one defined below. */
+# define _STAT_VER _STAT_VER_KERNEL
#endif
/* Versions of the `xmknod' interface. */
@@ -70,11 +70,11 @@ struct stat
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
# endif
__time_t st_atime; /* Time of last access. */
- unsigned long int __unused1; /* Reserved for atime.nanoseconds. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
- unsigned long int __unused2; /* Reserved for mtime.nanoseconds. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
- unsigned long int __unused3; /* Reserved for ctime.nanoseconds. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
unsigned long int __unused4;
unsigned long int __unused5;
};
@@ -95,11 +95,11 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
__time_t st_atime; /* Time of last access. */
- unsigned long int __unused1; /* Reserved for atime.nanoseconds. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
- unsigned long int __unused2; /* Reserved for mtime.nanoseconds. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
- unsigned long int __unused3; /* Reserved for ctime.nanoseconds. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
unsigned long int __unused4;
unsigned long int __unused5;
};
@@ -134,11 +134,11 @@ struct stat
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
# endif
__time_t st_atime; /* Time of last access. */
- unsigned long int __unused1; /* Reserved for atime.nanoseconds. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
- unsigned long int __unused2; /* Reserved for mtime.nanoseconds. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
- unsigned long int __unused3; /* Reserved for ctime.nanoseconds. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
unsigned long int __unused4;
unsigned long int __unused5;
unsigned long int __unused6;
@@ -159,11 +159,11 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
__time_t st_atime; /* Time of last access. */
- unsigned long int __unused1; /* Reserved for atime.nanoseconds. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
- unsigned long int __unused2; /* Reserved for mtime.nanoseconds. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
- unsigned long int __unused3; /* Reserved for ctime.nanoseconds. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
unsigned long int __unused4;
unsigned long int __unused5;
unsigned long int __unused6;
@@ -175,6 +175,8 @@ struct stat64
/* Tell code we have these members. */
#define _STATBUF_ST_BLKSIZE
#define _STATBUF_ST_RDEV
+/* Nanosecond resolution time values are supported. */
+#define _STATBUF_ST_NSEC
/* Encoding of the file mode. */
diff --git a/libc/sysdeps/linux/powerpc/bits/termios.h b/libc/sysdeps/linux/powerpc/bits/termios.h
index f7b89ae59..7aac02dc5 100644
--- a/libc/sysdeps/linux/powerpc/bits/termios.h
+++ b/libc/sysdeps/linux/powerpc/bits/termios.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1999,2001,2003,2004,2005 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
@@ -40,6 +40,8 @@ struct termios {
cc_t c_cc[NCCS]; /* control characters */
speed_t c_ispeed; /* input speed */
speed_t c_ospeed; /* output speed */
+#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
+#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
};
/* c_cc characters */
@@ -77,6 +79,7 @@ struct termios {
#define IXANY 0004000
#define IUCLC 0010000
#define IMAXBEL 0020000
+#define IUTF8 0040000
/* c_oflag bits */
#define OPOST 0000001
@@ -89,34 +92,41 @@ struct termios {
#define OFILL 00000100
#define OFDEL 00000200
-#define NLDLY 00001400
-#define NL0 00000000
-#define NL1 00000400
-#define NL2 00001000
-#define NL3 00001400
-#define TABDLY 00006000
-#define TAB0 00000000
-#define TAB1 00002000
-#define TAB2 00004000
-#define TAB3 00006000
-#define CRDLY 00030000
-#define CR0 00000000
-#define CR1 00010000
-#define CR2 00020000
-#define CR3 00030000
-#define FFDLY 00040000
-#define FF0 00000000
-#define FF1 00040000
-#define BSDLY 00100000
-#define BS0 00000000
-#define BS1 00100000
+#if defined __USE_MISC || defined __USE_XOPEN
+# define NLDLY 00001400
+# define NL0 00000000
+# define NL1 00000400
+# define NL2 00001000
+# define NL3 00001400
+# define TABDLY 00006000
+# define TAB0 00000000
+# define TAB1 00002000
+# define TAB2 00004000
+# define TAB3 00006000
+# define CRDLY 00030000
+# define CR0 00000000
+# define CR1 00010000
+# define CR2 00020000
+# define CR3 00030000
+# define FFDLY 00040000
+# define FF0 00000000
+# define FF1 00040000
+# define BSDLY 00100000
+# define BS0 00000000
+# define BS1 00100000
+#endif
#define VTDLY 00200000
#define VT0 00000000
#define VT1 00200000
-#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
+
+#ifdef __USE_MISC
+# define XTABS 00006000
+#endif
/* c_cflag bit meaning */
-#define CBAUD 0000377
+#ifdef __USE_MISC
+# define CBAUD 0000377
+#endif
#define B0 0000000 /* hang up */
#define B50 0000001
#define B75 0000002
@@ -133,9 +143,11 @@ struct termios {
#define B9600 0000015
#define B19200 0000016
#define B38400 0000017
-#define EXTA B19200
-#define EXTB B38400
-#define CBAUDEX 0000020
+#ifdef __USE_MISC
+# define EXTA B19200
+# define EXTB B38400
+# define CBAUDEX 0000020
+#endif
#define B57600 00020
#define B115200 00021
#define B230400 00022
@@ -166,23 +178,30 @@ struct termios {
#define HUPCL 00040000
#define CLOCAL 00100000
-#define CRTSCTS 020000000000 /* flow control */
+#ifdef __USE_MISC
+# define CMSPAR 010000000000 /* mark or space (stick) parity */
+# define CRTSCTS 020000000000 /* flow control */
+#endif
/* c_lflag bits */
#define ISIG 0x00000080
#define ICANON 0x00000100
-#define XCASE 0x00004000
+#if defined __USE_MISC || defined __USE_XOPEN
+# define XCASE 0x00004000
+#endif
#define ECHO 0x00000008
#define ECHOE 0x00000002
#define ECHOK 0x00000004
#define ECHONL 0x00000010
#define NOFLSH 0x80000000
#define TOSTOP 0x00400000
-#define ECHOCTL 0x00000040
-#define ECHOPRT 0x00000020
-#define ECHOKE 0x00000001
-#define FLUSHO 0x00800000
-#define PENDIN 0x20000000
+#ifdef __USE_MISC
+# define ECHOCTL 0x00000040
+# define ECHOPRT 0x00000020
+# define ECHOKE 0x00000001
+# define FLUSHO 0x00800000
+# define PENDIN 0x20000000
+#endif
#define IEXTEN 0x00000400
/* Values for the ACTION argument to `tcflow'. */
diff --git a/libc/sysdeps/linux/powerpc/bits/wordsize.h b/libc/sysdeps/linux/powerpc/bits/wordsize.h
index ba643b60a..cf934234f 100644
--- a/libc/sysdeps/linux/powerpc/bits/wordsize.h
+++ b/libc/sysdeps/linux/powerpc/bits/wordsize.h
@@ -1,19 +1,19 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
+/* Determine the wordsize from the preprocessor defines. */
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
+#if defined __powerpc64__
+# define __WORDSIZE 64
+# define __WORDSIZE_COMPAT32 1
+#else
+# define __WORDSIZE 32
+#endif
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#define __WORDSIZE 32
+/* Signal the glibc ABI didn't used to have a `long double'.
+ The changes all the `long double' function variants to be redirects
+ to the double functions. */
+# define __LONG_DOUBLE_MATH_OPTIONAL 1
+# ifndef __LONG_DOUBLE_128__
+# define __NO_LONG_DOUBLE_MATH 1
+# endif
+#endif