From 39534e9e57a3c64f8fdadd0081a4992f0d52e4ab Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 1 Dec 2005 07:58:06 +0000 Subject: sync with glibc --- libc/sysdeps/linux/sparc/bits/fcntl.h | 16 ++++-- libc/sysdeps/linux/sparc/bits/mman.h | 10 +++- libc/sysdeps/linux/sparc/bits/resource.h | 57 +++++++++++++------- libc/sysdeps/linux/sparc/bits/setjmp.h | 6 +-- libc/sysdeps/linux/sparc/bits/shm.h | 1 + libc/sysdeps/linux/sparc/bits/siginfo.h | 27 +++++----- libc/sysdeps/linux/sparc/bits/signum.h | 4 +- libc/sysdeps/linux/sparc/bits/stat.h | 16 +++--- libc/sysdeps/linux/sparc/bits/termios.h | 89 +++++++++++++++++++------------- 9 files changed, 142 insertions(+), 84 deletions(-) (limited to 'libc/sysdeps/linux/sparc/bits') diff --git a/libc/sysdeps/linux/sparc/bits/fcntl.h b/libc/sysdeps/linux/sparc/bits/fcntl.h index 12e9cffd2..5dc8bf32f 100644 --- a/libc/sysdeps/linux/sparc/bits/fcntl.h +++ b/libc/sysdeps/linux/sparc/bits/fcntl.h @@ -1,5 +1,6 @@ /* O_*, F_*, FD_* bit values for Linux/SPARC. - Copyright (C) 1995, 1996, 1997, 1998, 2000 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 @@ -43,7 +44,8 @@ #ifdef __USE_GNU # define O_DIRECTORY 0x10000 /* must be a directory */ # define O_NOFOLLOW 0x20000 /* don't follow links */ -# define O_STREAMING 0x4000000/* streaming access */ +# define O_DIRECT 0x100000 /* direct disk access hint */ +# define O_NOATIME 0x200000 /* Do not set atime. */ #endif #ifdef __USE_LARGEFILE64 @@ -76,7 +78,7 @@ #define F_SETFD 2 /* Set file descriptor flags. */ #define F_GETFL 3 /* Get file status flags. */ #define F_SETFL 4 /* Set file status flags. */ -#if defined __USE_BSD || defined __USE_XOPEN2K +#if defined __USE_BSD || defined __USE_UNIX98 # define F_GETOWN 5 /* Get owner of socket (receiver of SIGIO). */ # define F_SETOWN 6 /* Set owner of socket (receiver of SIGIO). */ #endif @@ -196,3 +198,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/sparc/bits/mman.h b/libc/sysdeps/linux/sparc/bits/mman.h index c3988b441..26425876f 100644 --- a/libc/sysdeps/linux/sparc/bits/mman.h +++ b/libc/sysdeps/linux/sparc/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/SPARC version. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000, 2003, 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 @@ -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 0x01 /* Share changes. */ @@ -53,12 +57,14 @@ /* These are Linux-specific. */ #ifdef __USE_MISC -# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ +# define MAP_GROWSDOWN 0x0200 /* Stack-like segment. */ # define MAP_DENYWRITE 0x0800 /* ETXTBSY */ # define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ # define MAP_LOCKED 0x0100 /* Lock the mapping. */ # define MAP_NORESERVE 0x0040 /* Don't check for reservations. */ # define _MAP_NEW 0x80000000 /* Binary compatibility with SunOS. */ +# define MAP_POPULATE 0x8000 /* Populate (prefault) pagetables. */ +# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ #endif /* Flags to `msync'. */ diff --git a/libc/sysdeps/linux/sparc/bits/resource.h b/libc/sysdeps/linux/sparc/bits/resource.h index 40c30d01d..3f2c60014 100644 --- a/libc/sysdeps/linux/sparc/bits/resource.h +++ b/libc/sysdeps/linux/sparc/bits/resource.h @@ -1,5 +1,6 @@ /* Bit values & structures for resource limits. Linux/SPARC version. - Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc. + Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 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 @@ -55,34 +56,54 @@ enum __rlimit_resource This affects swapping; processes that are exceeding their resident set size will be more likely to have physical memory taken from them. */ - RLIMIT_RSS = 5, -#define RLIMIT_RSS RLIMIT_RSS + __RLIMIT_RSS = 5, +#define RLIMIT_RSS __RLIMIT_RSS /* Number of open files. */ RLIMIT_NOFILE = 6, - RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ + __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ #define RLIMIT_NOFILE RLIMIT_NOFILE -#define RLIMIT_OFILE RLIMIT_OFILE +#define RLIMIT_OFILE __RLIMIT_OFILE /* Address space limit (?) */ RLIMIT_AS = 9, #define RLIMIT_AS RLIMIT_AS /* Number of processes. */ - RLIMIT_NPROC = 7, -#define RLIMIT_NPROC RLIMIT_NPROC + __RLIMIT_NPROC = 7, +#define RLIMIT_NPROC __RLIMIT_NPROC /* Locked-in-memory address space. */ - RLIMIT_MEMLOCK = 8, -#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + __RLIMIT_MEMLOCK = 8, +#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK /* Maximum number of file locks. */ - RLIMIT_LOCKS = 10, -#define RLIMIT_LOCKS RLIMIT_LOCKS - - RLIM_NLIMITS = 11 -#define RLIMIT_NLIMITS RLIMIT_NLIMITS -#define RLIM_NLIMITS RLIM_NLIMITS + __RLIMIT_LOCKS = 10, +#define RLIMIT_LOCKS __RLIMIT_LOCKS + + /* Maximum number of pending signals. */ + __RLIMIT_SIGPENDING = 11, +#define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING + + /* Maximum bytes in POSIX message queues. */ + __RLIMIT_MSGQUEUE = 12, +#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE + + /* Maximum nice priority allowed to raise to. + Nice levels 19 .. -20 correspond to 0 .. 39 + values of this resource limit. */ + __RLIMIT_NICE = 13, +#define RLIMIT_NICE __RLIMIT_NICE + + /* Maximum realtime priority allowed for non-priviledged + processes. */ + __RLIMIT_RTPRIO = 14, +#define RLIMIT_RTPRIO __RLIMIT_RTPRIO + + __RLIMIT_NLIMITS = 15, + __RLIM_NLIMITS = __RLIMIT_NLIMITS +#define RLIMIT_NLIMITS __RLIMIT_NLIMITS +#define RLIM_NLIMITS __RLIM_NLIMITS }; /* Value to indicate that there is no limit. */ @@ -153,12 +174,8 @@ enum __rusage_who #define RUSAGE_SELF RUSAGE_SELF /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1, + RUSAGE_CHILDREN = -1 #define RUSAGE_CHILDREN RUSAGE_CHILDREN - - /* Both. */ - RUSAGE_BOTH = -2 -#define RUSAGE_BOTH RUSAGE_BOTH }; #define __need_timeval diff --git a/libc/sysdeps/linux/sparc/bits/setjmp.h b/libc/sysdeps/linux/sparc/bits/setjmp.h index 574085664..dac9ac5cb 100644 --- a/libc/sysdeps/linux/sparc/bits/setjmp.h +++ b/libc/sysdeps/linux/sparc/bits/setjmp.h @@ -17,7 +17,7 @@ 02111-1307 USA. */ #ifndef _BITS_SETJMP_H -#define _BITS_SETJMP_H 1 +#define _BITS_SETJMP_H 1 #if !defined _SETJMP_H && !defined _PTHREAD_H # error "Never include directly; use instead." @@ -77,8 +77,8 @@ typedef int __jmp_buf[3]; /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (void *) (jmpbuf)[JB_SP]) + ((int) (address) < (jmpbuf)[JB_SP]) #endif -#endif /* bits/setjmp.h */ +#endif /* bits/setjmp.h */ diff --git a/libc/sysdeps/linux/sparc/bits/shm.h b/libc/sysdeps/linux/sparc/bits/shm.h index f075be8d8..03decb110 100644 --- a/libc/sysdeps/linux/sparc/bits/shm.h +++ b/libc/sysdeps/linux/sparc/bits/shm.h @@ -81,6 +81,7 @@ struct shmid_ds # 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/sparc/bits/siginfo.h b/libc/sysdeps/linux/sparc/bits/siginfo.h index da2aed678..7ff1971c2 100644 --- a/libc/sysdeps/linux/sparc/bits/siginfo.h +++ b/libc/sysdeps/linux/sparc/bits/siginfo.h @@ -1,5 +1,5 @@ /* siginfo_t, sigevent and constants. Linux/SPARC version. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997-2002, 2003 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 @@ -69,8 +69,9 @@ typedef struct siginfo /* POSIX.1b timers. */ struct { - unsigned int _timer1; - unsigned int _timer2; + int si_tid; /* Timer ID. */ + int si_overrun; /* Overrun count. */ + sigval_t si_sigval; /* Signal value. */ } _timer; /* POSIX.1b signals. */ @@ -111,8 +112,8 @@ typedef struct siginfo /* X/Open requires some more fields with fixed names. */ # define si_pid _sifields._kill.si_pid # define si_uid _sifields._kill.si_uid -# define si_timer1 _sifields._timer._timer1 -# define si_timer2 _sifields._timer._timer2 +# define si_timerid _sifields._timer.si_tid +# define si_overrun _sifields._timer.si_overrun # define si_status _sifields._sigchld.si_status # define si_utime _sifields._sigchld.si_utime # define si_stime _sifields._sigchld.si_stime @@ -129,8 +130,10 @@ typedef struct siginfo signals. */ enum { - SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */ + SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */ # define SI_ASYNCNL SI_ASYNCNL + SI_TKILL = -6, /* Sent by tkill. */ +# define SI_TKILL SI_TKILL SI_SIGIO, /* Sent by queued SIGIO. */ # define SI_SIGIO SI_SIGIO SI_ASYNCIO, /* Sent by AIO completion. */ @@ -276,9 +279,6 @@ enum # define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) # endif -/* Forward declaration of the `pthread_attr_t' type. */ -struct __pthread_attr_s; - typedef struct sigevent { sigval_t sigev_value; @@ -291,8 +291,8 @@ typedef struct sigevent struct { - void (*_function) (sigval_t); /* Function to start. */ - struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */ + void (*_function) (sigval_t); /* Function to start. */ + void *_attribute; /* Really pthread_attr_t. */ } _sigev_thread; } _sigev_un; } sigevent_t; @@ -308,8 +308,11 @@ enum # define SIGEV_SIGNAL SIGEV_SIGNAL SIGEV_NONE, /* Other notification: meaningless. */ # define SIGEV_NONE SIGEV_NONE - SIGEV_THREAD /* Deliver via thread creation. */ + SIGEV_THREAD, /* Deliver via thread creation. */ # define SIGEV_THREAD SIGEV_THREAD + + SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */ +#define SIGEV_THREAD_ID SIGEV_THREAD_ID }; #endif /* have _SIGNAL_H. */ diff --git a/libc/sysdeps/linux/sparc/bits/signum.h b/libc/sysdeps/linux/sparc/bits/signum.h index 48d39402d..6b58ec29d 100644 --- a/libc/sysdeps/linux/sparc/bits/signum.h +++ b/libc/sysdeps/linux/sparc/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux/SPARC version. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 2003 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 @@ -70,7 +70,7 @@ #define SIGUSR1 30 #define SIGUSR2 31 -#define _NSIG 64 /* Biggest signal number + 1 +#define _NSIG 65 /* Biggest signal number + 1 (including real-time signals). */ #define SIGRTMIN (__libc_current_sigrtmin ()) diff --git a/libc/sysdeps/linux/sparc/bits/stat.h b/libc/sysdeps/linux/sparc/bits/stat.h index aefcf9ee1..cc454117b 100644 --- a/libc/sysdeps/linux/sparc/bits/stat.h +++ b/libc/sysdeps/linux/sparc/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,95,96,97,98,99,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1992,95,96,97,98,99,2000,2001,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 @@ -61,11 +61,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; + unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; + unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; + unsigned long int st_ctimensec; /* Nsecs of last status change. */ unsigned long int __unused4; unsigned long int __unused5; }; @@ -89,11 +89,11 @@ struct stat64 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; + unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; + unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; + unsigned long int st_ctimensec; /* Nsecs of last status change. */ unsigned long int __unused4; unsigned long int __unused5; }; @@ -102,6 +102,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/sparc/bits/termios.h b/libc/sysdeps/linux/sparc/bits/termios.h index 409ed233d..cea13227f 100644 --- a/libc/sysdeps/linux/sparc/bits/termios.h +++ b/libc/sysdeps/linux/sparc/bits/termios.h @@ -1,5 +1,6 @@ /* termios type and macro definitions. Linux/SPARC version. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000, 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 @@ -73,6 +74,7 @@ struct termios #define IXANY 0x00000800 #define IXOFF 0x00001000 #define IMAXBEL 0x00002000 +#define IUTF8 0x00004000 /* c_oflag bits */ #define OPOST 0x00000001 @@ -83,34 +85,41 @@ struct termios #define ONLRET 0x00000020 #define OFILL 0x00000040 #define OFDEL 0x00000080 -#define NLDLY 0x00000100 -#define NL0 0x00000000 -#define NL1 0x00000100 -#define CRDLY 0x00000600 -#define CR0 0x00000000 -#define CR1 0x00000200 -#define CR2 0x00000400 -#define CR3 0x00000600 -#define TABDLY 0x00001800 -#define TAB0 0x00000000 -#define TAB1 0x00000800 -#define TAB2 0x00001000 -#define TAB3 0x00001800 -#define XTABS 0x00001800 -#define BSDLY 0x00002000 -#define BS0 0x00000000 -#define BS1 0x00002000 -#define VTDLY 0x00004000 -#define VT0 0x00000000 -#define VT1 0x00004000 +#if defined __USE_MISC || defined __USE_XOPEN +# define NLDLY 0x00000100 +# define NL0 0x00000000 +# define NL1 0x00000100 +# define CRDLY 0x00000600 +# define CR0 0x00000000 +# define CR1 0x00000200 +# define CR2 0x00000400 +# define CR3 0x00000600 +# define TABDLY 0x00001800 +# define TAB0 0x00000000 +# define TAB1 0x00000800 +# define TAB2 0x00001000 +# define TAB3 0x00001800 +# define BSDLY 0x00002000 +# define BS0 0x00000000 +# define BS1 0x00002000 #define FFDLY 0x00008000 #define FF0 0x00000000 #define FF1 0x00008000 +#endif +#define VTDLY 0x00004000 +#define VT0 0x00000000 +#define VT1 0x00004000 #define PAGEOUT 0x00010000 /* SUNOS specific */ #define WRAP 0x00020000 /* SUNOS specific */ +#ifdef __USE_MISC +# define XTABS 0x00001800 +#endif + /* c_cflag bit meaning */ -#define CBAUD 0x0000100f +#ifdef __USE_MISC +# define CBAUD 0x0000100f +#endif #define B0 0x00000000 /* hang up */ #define B50 0x00000001 #define B75 0x00000002 @@ -127,8 +136,10 @@ struct termios #define B9600 0x0000000d #define B19200 0x0000000e #define B38400 0x0000000f -#define EXTA B19200 -#define EXTB B38400 +#ifdef __USE_MISC +# define EXTA B19200 +# define EXTB B38400 +#endif #define CSIZE 0x00000030 #define CS5 0x00000000 #define CS6 0x00000010 @@ -140,7 +151,9 @@ struct termios #define PARODD 0x00000200 #define HUPCL 0x00000400 #define CLOCAL 0x00000800 -#define CBAUDEX 0x00001000 +#ifdef __USE_MISC +# define CBAUDEX 0x00001000 +#endif #define B57600 0x00001001 #define B115200 0x00001002 #define B230400 0x00001003 @@ -158,26 +171,32 @@ struct termios #define B2000000 0x0000100f #define __MAX_BAUD B2000000 -#define CIBAUD 0x100f0000 /* input baud rate (not used) */ -#define CMSPAR 0x40000000 /* mark or space (stick) parity */ -#define CRTSCTS 0x80000000 /* flow control */ +#ifdef __USE_MISC +# define CIBAUD 0x100f0000 /* input baud rate (not used) */ +# define CMSPAR 0x40000000 /* mark or space (stick) parity */ +# define CRTSCTS 0x80000000 /* flow control */ +#endif /* c_lflag bits */ #define ISIG 0x00000001 #define ICANON 0x00000002 -#define XCASE 0x00000004 +#if defined __USE_MISC || defined __USE_XOPEN +# define XCASE 0x00000004 +#endif #define ECHO 0x00000008 #define ECHOE 0x00000010 #define ECHOK 0x00000020 #define ECHONL 0x00000040 #define NOFLSH 0x00000080 #define TOSTOP 0x00000100 -#define ECHOCTL 0x00000200 -#define ECHOPRT 0x00000400 -#define ECHOKE 0x00000800 -#define DEFECHO 0x00001000 /* SUNOS thing, what is it? */ -#define FLUSHO 0x00002000 -#define PENDIN 0x00004000 +#ifdef __USE_MISC +# define ECHOCTL 0x00000200 +# define ECHOPRT 0x00000400 +# define ECHOKE 0x00000800 +# define DEFECHO 0x00001000 /* SUNOS thing, what is it? */ +# define FLUSHO 0x00002000 +# define PENDIN 0x00004000 +#endif #define IEXTEN 0x00008000 /* modem lines */ -- cgit v1.2.3