diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/sys')
26 files changed, 111 insertions, 317 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/acct.h b/sysdeps/unix/sysv/linux/sys/acct.h index ea0e7fde23..3f93393558 100644 --- a/sysdeps/unix/sysv/linux/sys/acct.h +++ b/sysdeps/unix/sysv/linux/sys/acct.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2016 Free Software Foundation, Inc. +/* Copyright (C) 1996-2018 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 @@ -18,12 +18,10 @@ #ifndef _SYS_ACCT_H #define _SYS_ACCT_H 1 -#include <features.h> - -#include <endian.h> -#define __need_time_t -#include <time.h> #include <sys/types.h> +#include <stdint.h> +#include <endian.h> +#include <bits/types/time_t.h> __BEGIN_DECLS @@ -35,15 +33,15 @@ __BEGIN_DECLS specific encoding system used. */ -typedef u_int16_t comp_t; +typedef uint16_t comp_t; struct acct { char ac_flag; /* Flags. */ - u_int16_t ac_uid; /* Real user ID. */ - u_int16_t ac_gid; /* Real group ID. */ - u_int16_t ac_tty; /* Controlling terminal. */ - u_int32_t ac_btime; /* Beginning time. */ + uint16_t ac_uid; /* Real user ID. */ + uint16_t ac_gid; /* Real group ID. */ + uint16_t ac_tty; /* Controlling terminal. */ + uint32_t ac_btime; /* Beginning time. */ comp_t ac_utime; /* User time. */ comp_t ac_stime; /* System time. */ comp_t ac_etime; /* Elapsed time. */ @@ -53,7 +51,7 @@ struct acct comp_t ac_minflt; /* Minor pagefaults. */ comp_t ac_majflt; /* Major pagefaults. */ comp_t ac_swaps; /* Number of swaps. */ - u_int32_t ac_exitcode; /* Process exitcode. */ + uint32_t ac_exitcode; /* Process exitcode. */ char ac_comm[ACCT_COMM+1]; /* Command name. */ char ac_pad[10]; /* Padding bytes. */ }; @@ -63,13 +61,13 @@ struct acct_v3 { char ac_flag; /* Flags */ char ac_version; /* Always set to ACCT_VERSION */ - u_int16_t ac_tty; /* Control Terminal */ - u_int32_t ac_exitcode; /* Exitcode */ - u_int32_t ac_uid; /* Real User ID */ - u_int32_t ac_gid; /* Real Group ID */ - u_int32_t ac_pid; /* Process ID */ - u_int32_t ac_ppid; /* Parent Process ID */ - u_int32_t ac_btime; /* Process Creation Time */ + uint16_t ac_tty; /* Control Terminal */ + uint32_t ac_exitcode; /* Exitcode */ + uint32_t ac_uid; /* Real User ID */ + uint32_t ac_gid; /* Real Group ID */ + uint32_t ac_pid; /* Process ID */ + uint32_t ac_ppid; /* Parent Process ID */ + uint32_t ac_btime; /* Process Creation Time */ float ac_etime; /* Elapsed Time */ comp_t ac_utime; /* User Time */ comp_t ac_stime; /* System Time */ diff --git a/sysdeps/unix/sysv/linux/sys/epoll.h b/sysdeps/unix/sysv/linux/sys/epoll.h index 72ec211b95..2937774da5 100644 --- a/sysdeps/unix/sysv/linux/sys/epoll.h +++ b/sysdeps/unix/sysv/linux/sys/epoll.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2016 Free Software Foundation, Inc. +/* Copyright (C) 2002-2018 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,13 +21,7 @@ #include <stdint.h> #include <sys/types.h> -/* Get __sigset_t. */ -#include <bits/sigset.h> - -#ifndef __sigset_t_defined -# define __sigset_t_defined -typedef __sigset_t sigset_t; -#endif +#include <bits/types/sigset_t.h> /* Get the platform-dependent flags. */ #include <bits/epoll.h> @@ -61,6 +55,8 @@ enum EPOLL_EVENTS #define EPOLLHUP EPOLLHUP EPOLLRDHUP = 0x2000, #define EPOLLRDHUP EPOLLRDHUP + EPOLLEXCLUSIVE = 1u << 28, +#define EPOLLEXCLUSIVE EPOLLEXCLUSIVE EPOLLWAKEUP = 1u << 29, #define EPOLLWAKEUP EPOLLWAKEUP EPOLLONESHOT = 1u << 30, diff --git a/sysdeps/unix/sysv/linux/sys/eventfd.h b/sysdeps/unix/sysv/linux/sys/eventfd.h index 8f8a518245..616a9d331b 100644 --- a/sysdeps/unix/sysv/linux/sys/eventfd.h +++ b/sysdeps/unix/sysv/linux/sys/eventfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2016 Free Software Foundation, Inc. +/* Copyright (C) 2007-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/fanotify.h b/sysdeps/unix/sysv/linux/sys/fanotify.h index d79ef5e7c4..84b9efede1 100644 --- a/sysdeps/unix/sysv/linux/sys/fanotify.h +++ b/sysdeps/unix/sysv/linux/sys/fanotify.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 Free Software Foundation, Inc. +/* Copyright (C) 2010-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/fsuid.h b/sysdeps/unix/sysv/linux/sys/fsuid.h index ac7f286c0e..6b891e9c15 100644 --- a/sysdeps/unix/sysv/linux/sys/fsuid.h +++ b/sysdeps/unix/sysv/linux/sys/fsuid.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2016 Free Software Foundation, Inc. +/* Copyright (C) 1997-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/inotify.h b/sysdeps/unix/sysv/linux/sys/inotify.h index e42dba0f3b..49cc374851 100644 --- a/sysdeps/unix/sysv/linux/sys/inotify.h +++ b/sysdeps/unix/sysv/linux/sys/inotify.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2016 Free Software Foundation, Inc. +/* Copyright (C) 2005-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/kd.h b/sysdeps/unix/sysv/linux/sys/kd.h index bb20603290..6c929c45b6 100644 --- a/sysdeps/unix/sysv/linux/sys/kd.h +++ b/sysdeps/unix/sysv/linux/sys/kd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2016 Free Software Foundation, Inc. +/* Copyright (C) 1996-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/klog.h b/sysdeps/unix/sysv/linux/sys/klog.h index 21c3950616..11dc07c028 100644 --- a/sysdeps/unix/sysv/linux/sys/klog.h +++ b/sysdeps/unix/sysv/linux/sys/klog.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2016 Free Software Foundation, Inc. +/* Copyright (C) 1996-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h index 3b667ed34b..ce2838e3a7 100644 --- a/sysdeps/unix/sysv/linux/sys/mount.h +++ b/sysdeps/unix/sysv/linux/sys/mount.h @@ -1,5 +1,5 @@ /* Header file for mounting/unmount Linux filesystems. - Copyright (C) 1996-2016 Free Software Foundation, Inc. + Copyright (C) 1996-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/pci.h b/sysdeps/unix/sysv/linux/sys/pci.h index 331f2e1669..e420933d78 100644 --- a/sysdeps/unix/sysv/linux/sys/pci.h +++ b/sysdeps/unix/sysv/linux/sys/pci.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2016 Free Software Foundation, Inc. +/* Copyright (C) 1997-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/personality.h b/sysdeps/unix/sysv/linux/sys/personality.h index af2ece6cf9..956f318e0a 100644 --- a/sysdeps/unix/sysv/linux/sys/personality.h +++ b/sysdeps/unix/sysv/linux/sys/personality.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2016 Free Software Foundation, Inc. +/* Copyright (C) 2002-2018 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 @@ -26,7 +26,9 @@ These occupy the top three bytes. */ enum { + UNAME26 = 0x0020000, ADDR_NO_RANDOMIZE = 0x0040000, + FDPIC_FUNCPTRS = 0x0080000, MMAP_PAGE_ZERO = 0x0100000, ADDR_COMPAT_LAYOUT = 0x0200000, READ_IMPLIES_EXEC = 0x0400000, @@ -45,6 +47,7 @@ enum { PER_LINUX = 0x0000, PER_LINUX_32BIT = 0x0000 | ADDR_LIMIT_32BIT, + PER_LINUX_FDPIC = 0x0000 | FDPIC_FUNCPTRS, PER_SVR4 = 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, PER_SVR3 = 0x0002 | STICKY_TIMEOUTS | SHORT_INODE, PER_SCOSVR3 = 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS | SHORT_INODE, diff --git a/sysdeps/unix/sysv/linux/sys/prctl.h b/sysdeps/unix/sysv/linux/sys/prctl.h index 83049d5fe2..683d16748f 100644 --- a/sysdeps/unix/sysv/linux/sys/prctl.h +++ b/sysdeps/unix/sysv/linux/sys/prctl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2016 Free Software Foundation, Inc. +/* Copyright (C) 1997-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/procfs.h b/sysdeps/unix/sysv/linux/sys/procfs.h index 4e16346b07..3c417bab29 100644 --- a/sysdeps/unix/sysv/linux/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/sys/procfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2016 Free Software Foundation, Inc. +/* Copyright (C) 1996-2018 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 @@ -58,7 +58,7 @@ struct elf_prstatus unsigned long int pr_sigpend; /* Set of pending signals. */ unsigned long int pr_sighold; /* Set of held signals. */ #if 0 - struct sigaltstack pr_altstack; /* Alternate stack info. */ + stack_t pr_altstack; /* Alternate stack info. */ struct sigaction pr_action; /* Signal action for current sig. */ #endif __pid_t pr_pid; diff --git a/sysdeps/unix/sysv/linux/sys/ptrace.h b/sysdeps/unix/sysv/linux/sys/ptrace.h index ee88271e0e..3c71a0ebd6 100644 --- a/sysdeps/unix/sysv/linux/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/sys/ptrace.h @@ -1,5 +1,6 @@ /* `ptrace' debugger support interface. Linux version. - Copyright (C) 1996-2016 Free Software Foundation, Inc. + Copyright (C) 1996-2018 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 @@ -65,29 +66,28 @@ enum __ptrace_request PTRACE_KILL = 8, #define PT_KILL PTRACE_KILL - /* Single step the process. - This is not supported on all machines. */ + /* Single step the process. */ PTRACE_SINGLESTEP = 9, #define PT_STEP PTRACE_SINGLESTEP /* Get all general purpose registers used by a processes. This is not supported on all machines. */ - PTRACE_GETREGS = 12, + PTRACE_GETREGS = 12, #define PT_GETREGS PTRACE_GETREGS /* Set all general purpose registers used by a processes. This is not supported on all machines. */ - PTRACE_SETREGS = 13, + PTRACE_SETREGS = 13, #define PT_SETREGS PTRACE_SETREGS /* Get all floating point registers used by a processes. This is not supported on all machines. */ - PTRACE_GETFPREGS = 14, + PTRACE_GETFPREGS = 14, #define PT_GETFPREGS PTRACE_GETFPREGS /* Set all floating point registers used by a processes. This is not supported on all machines. */ - PTRACE_SETFPREGS = 15, + PTRACE_SETFPREGS = 15, #define PT_SETFPREGS PTRACE_SETFPREGS /* Attach to a process that is already running. */ @@ -100,15 +100,15 @@ enum __ptrace_request /* Get all extended floating point registers used by a processes. This is not supported on all machines. */ - PTRACE_GETFPXREGS = 18, + PTRACE_GETFPXREGS = 18, #define PT_GETFPXREGS PTRACE_GETFPXREGS /* Set all extended floating point registers used by a processes. This is not supported on all machines. */ - PTRACE_SETFPXREGS = 19, + PTRACE_SETFPXREGS = 19, #define PT_SETFPXREGS PTRACE_SETFPXREGS - /* Continue and stop at the next (return from) syscall. */ + /* Continue and stop at the next entry to or return from syscall. */ PTRACE_SYSCALL = 24, #define PT_SYSCALL PTRACE_SYSCALL @@ -149,78 +149,29 @@ enum __ptrace_request PTRACE_LISTEN = 0x4208, #define PTRACE_LISTEN PTRACE_LISTEN + /* Retrieve siginfo_t structures without removing signals from a queue. */ PTRACE_PEEKSIGINFO = 0x4209, #define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + /* Get the mask of blocked signals. */ PTRACE_GETSIGMASK = 0x420a, #define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + /* Change the mask of blocked signals. */ PTRACE_SETSIGMASK = 0x420b, #define PTRACE_SETSIGMASK PTRACE_SETSIGMASK - PTRACE_SECCOMP_GET_FILTER = 0x420c + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER -}; - -/* Flag for PTRACE_LISTEN. */ -enum __ptrace_flags -{ - PTRACE_SEIZE_DEVEL = 0x80000000 -}; - -/* Options set using PTRACE_SETOPTIONS. */ -enum __ptrace_setoptions -{ - PTRACE_O_TRACESYSGOOD = 0x00000001, - PTRACE_O_TRACEFORK = 0x00000002, - PTRACE_O_TRACEVFORK = 0x00000004, - PTRACE_O_TRACECLONE = 0x00000008, - PTRACE_O_TRACEEXEC = 0x00000010, - PTRACE_O_TRACEVFORKDONE = 0x00000020, - PTRACE_O_TRACEEXIT = 0x00000040, - PTRACE_O_TRACESECCOMP = 0x00000080, - PTRACE_O_EXITKILL = 0x00100000, - PTRACE_O_SUSPEND_SECCOMP = 0x00200000, - PTRACE_O_MASK = 0x003000ff -}; - -/* Wait extended result codes for the above trace options. */ -enum __ptrace_eventcodes -{ - PTRACE_EVENT_FORK = 1, - PTRACE_EVENT_VFORK = 2, - PTRACE_EVENT_CLONE = 3, - PTRACE_EVENT_EXEC = 4, - PTRACE_EVENT_VFORK_DONE = 5, - PTRACE_EVENT_EXIT = 6, - PTRACE_EVENT_SECCOMP = 7 -}; - -/* Arguments for PTRACE_PEEKSIGINFO. */ -struct __ptrace_peeksiginfo_args -{ - __uint64_t off; /* From which siginfo to start. */ - __uint32_t flags; /* Flags for peeksiginfo. */ - __int32_t nr; /* How many siginfos to take. */ -}; - -enum __ptrace_peeksiginfo_flags -{ - /* Read signals from a shared (process wide) queue. */ - PTRACE_PEEKSIGINFO_SHARED = (1 << 0) + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA }; -/* Perform process tracing functions. REQUEST is one of the values - above, and determines the action to be taken. - For all requests except PTRACE_TRACEME, PID specifies the process to be - traced. - PID and the other arguments described above for the various requests should - appear (those that are used for the particular request) as: - pid_t PID, void *ADDR, int DATA, void *ADDR2 - after REQUEST. */ -extern long int ptrace (enum __ptrace_request __request, ...) __THROW; +#include <bits/ptrace-shared.h> __END_DECLS diff --git a/sysdeps/unix/sysv/linux/sys/quota.h b/sysdeps/unix/sysv/linux/sys/quota.h index 5aa0ec07d2..23f569ee9a 100644 --- a/sysdeps/unix/sysv/linux/sys/quota.h +++ b/sysdeps/unix/sysv/linux/sys/quota.h @@ -1,6 +1,22 @@ /* This just represents the non-kernel parts of <linux/quota.h>. - * - * here's the corresponding copyright: + Copyright (C) 1998-2018 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 + 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. + + 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. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +/* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. * @@ -38,13 +54,7 @@ #include <features.h> #include <sys/types.h> -/* - * Select between different incompatible quota versions. - * Default to the version used by Linux kernel version 2.4.22 - * or later. */ -#ifndef _LINUX_QUOTA_VERSION -# define _LINUX_QUOTA_VERSION 2 -#endif +#include <linux/quota.h> /* * Convert diskblocks to blocks and the other way around. @@ -54,10 +64,10 @@ #define btodb(num) ((num) >> 10) /* - * Convert count of filesystem blocks to diskquota blocks, meant - * for filesystems where i_blksize != BLOCK_SIZE + * Convert count of filesystem blocks to diskquota blocks, meant for + * filesystems where i_blksize != 1024. */ -#define fs_to_dq_blocks(num, blksize) (((num) * (blksize)) / BLOCK_SIZE) +#define fs_to_dq_blocks(num, blksize) (((num) * (blksize)) / 1024) /* * Definitions for disk quotas imposed on the average user @@ -71,154 +81,54 @@ #define MAX_IQ_TIME 604800 /* (7*24*60*60) 1 week */ #define MAX_DQ_TIME 604800 /* (7*24*60*60) 1 week */ -#define MAXQUOTAS 2 -#define USRQUOTA 0 /* element used for user quotas */ -#define GRPQUOTA 1 /* element used for group quotas */ - -/* - * Definitions for the default names of the quotas files. - */ -#define INITQFNAMES { \ - "user", /* USRQUOTA */ \ - "group", /* GRPQUOTA */ \ - "undefined", \ -}; - #define QUOTAFILENAME "quota" #define QUOTAGROUP "staff" #define NR_DQHASH 43 /* Just an arbitrary number any suggestions ? */ #define NR_DQUOTS 256 /* Number of quotas active at one time */ -/* - * Command definitions for the 'quotactl' system call. - * The commands are broken into a main command defined below - * and a subcommand that is used to convey the type of - * quota that is being manipulated (see above). - */ -#define SUBCMDMASK 0x00ff -#define SUBCMDSHIFT 8 -#define QCMD(cmd, type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK)) - -#if _LINUX_QUOTA_VERSION < 2 -# define Q_QUOTAON 0x0100 /* enable quotas */ -# define Q_QUOTAOFF 0x0200 /* disable quotas */ -# define Q_GETQUOTA 0x0300 /* get limits and usage */ -# define Q_SETQUOTA 0x0400 /* set limits and usage */ -# define Q_SETUSE 0x0500 /* set usage */ -# define Q_SYNC 0x0600 /* sync disk copy of a filesystems quotas */ -# define Q_SETQLIM 0x0700 /* set limits */ -# define Q_GETSTATS 0x0800 /* get collected stats */ -# define Q_RSQUASH 0x1000 /* set root_squash option */ -#else -# define Q_SYNC 0x800001 /* sync disk copy of a filesystems quotas */ -# define Q_QUOTAON 0x800002 /* turn quotas on */ -# define Q_QUOTAOFF 0x800003 /* turn quotas off */ -# define Q_GETFMT 0x800004 /* get quota format used on given filesystem */ -# define Q_GETINFO 0x800005 /* get information about quota files */ -# define Q_SETINFO 0x800006 /* set information about quota files */ -# define Q_GETQUOTA 0x800007 /* get user quota structure */ -# define Q_SETQUOTA 0x800008 /* set user quota structure */ -#endif - -/* - * The following structure defines the format of the disk quota file - * (as it appears on disk) - the file is an array of these structures - * indexed by user or group number. - */ -#if _LINUX_QUOTA_VERSION < 2 -struct dqblk - { - u_int32_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ - u_int32_t dqb_bsoftlimit; /* preferred limit on disk blks */ - u_int32_t dqb_curblocks; /* current block count */ - u_int32_t dqb_ihardlimit; /* maximum # allocated inodes */ - u_int32_t dqb_isoftlimit; /* preferred inode limit */ - u_int32_t dqb_curinodes; /* current # allocated inodes */ - time_t dqb_btime; /* time limit for excessive disk use */ - time_t dqb_itime; /* time limit for excessive files */ - }; -#else - -/* Flags that indicate which fields in dqblk structure are valid. */ -#define QIF_BLIMITS 1 -#define QIF_SPACE 2 -#define QIF_ILIMITS 4 -#define QIF_INODES 8 -#define QIF_BTIME 16 -#define QIF_ITIME 32 -#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS) -#define QIF_USAGE (QIF_SPACE | QIF_INODES) -#define QIF_TIMES (QIF_BTIME | QIF_ITIME) -#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES) - +/* Old name for struct if_dqblk. */ struct dqblk { - u_int64_t dqb_bhardlimit; /* absolute limit on disk quota blocks alloc */ - u_int64_t dqb_bsoftlimit; /* preferred limit on disk quota blocks */ - u_int64_t dqb_curspace; /* current quota block count */ - u_int64_t dqb_ihardlimit; /* maximum # allocated inodes */ - u_int64_t dqb_isoftlimit; /* preferred inode limit */ - u_int64_t dqb_curinodes; /* current # allocated inodes */ - u_int64_t dqb_btime; /* time limit for excessive disk use */ - u_int64_t dqb_itime; /* time limit for excessive files */ - u_int32_t dqb_valid; /* bitmask of QIF_* constants */ + __uint64_t dqb_bhardlimit; /* absolute limit on disk quota blocks alloc */ + __uint64_t dqb_bsoftlimit; /* preferred limit on disk quota blocks */ + __uint64_t dqb_curspace; /* current quota block count */ + __uint64_t dqb_ihardlimit; /* maximum # allocated inodes */ + __uint64_t dqb_isoftlimit; /* preferred inode limit */ + __uint64_t dqb_curinodes; /* current # allocated inodes */ + __uint64_t dqb_btime; /* time limit for excessive disk use */ + __uint64_t dqb_itime; /* time limit for excessive files */ + __uint32_t dqb_valid; /* bitmask of QIF_* constants */ }; -#endif /* * Shorthand notation. */ #define dq_bhardlimit dq_dqb.dqb_bhardlimit #define dq_bsoftlimit dq_dqb.dqb_bsoftlimit -#if _LINUX_QUOTA_VERSION < 2 -# define dq_curblocks dq_dqb.dqb_curblocks -#else -# define dq_curspace dq_dqb.dqb_curspace -# define dq_valid dq_dqb.dqb_valid -#endif +#define dq_curspace dq_dqb.dqb_curspace +#define dq_valid dq_dqb.dqb_valid #define dq_ihardlimit dq_dqb.dqb_ihardlimit #define dq_isoftlimit dq_dqb.dqb_isoftlimit #define dq_curinodes dq_dqb.dqb_curinodes #define dq_btime dq_dqb.dqb_btime #define dq_itime dq_dqb.dqb_itime -#define dqoff(UID) ((loff_t)((UID) * sizeof (struct dqblk))) - -#if _LINUX_QUOTA_VERSION < 2 -struct dqstats - { - u_int32_t lookups; - u_int32_t drops; - u_int32_t reads; - u_int32_t writes; - u_int32_t cache_hits; - u_int32_t pages_allocated; - u_int32_t allocated_dquots; - u_int32_t free_dquots; - u_int32_t syncs; - }; -#else - -/* Flags that indicate which fields in dqinfo structure are valid. */ -# define IIF_BGRACE 1 -# define IIF_IGRACE 2 -# define IIF_FLAGS 4 -# define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS) +#define dqoff(UID) ((__loff_t)((UID) * sizeof (struct dqblk))) +/* Old name for struct if_dqinfo. */ struct dqinfo { - u_int64_t dqi_bgrace; - u_int64_t dqi_igrace; - u_int32_t dqi_flags; - u_int32_t dqi_valid; + __uint64_t dqi_bgrace; + __uint64_t dqi_igrace; + __uint32_t dqi_flags; + __uint32_t dqi_valid; }; -#endif __BEGIN_DECLS extern int quotactl (int __cmd, const char *__special, int __id, - caddr_t __addr) __THROW; + __caddr_t __addr) __THROW; __END_DECLS diff --git a/sysdeps/unix/sysv/linux/sys/raw.h b/sysdeps/unix/sysv/linux/sys/raw.h index bd7266df5c..7069c7a426 100644 --- a/sysdeps/unix/sysv/linux/sys/raw.h +++ b/sysdeps/unix/sysv/linux/sys/raw.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2016 Free Software Foundation, Inc. +/* Copyright (C) 1999-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/reboot.h b/sysdeps/unix/sysv/linux/sys/reboot.h index df1076fe58..98249674f6 100644 --- a/sysdeps/unix/sysv/linux/sys/reboot.h +++ b/sysdeps/unix/sysv/linux/sys/reboot.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2016 Free Software Foundation, Inc. +/* Copyright (C) 1996-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/signalfd.h b/sysdeps/unix/sysv/linux/sys/signalfd.h index 6f75bc0aa9..f39eed5f12 100644 --- a/sysdeps/unix/sysv/linux/sys/signalfd.h +++ b/sysdeps/unix/sysv/linux/sys/signalfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2016 Free Software Foundation, Inc. +/* Copyright (C) 2007-2018 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 @@ -18,9 +18,8 @@ #ifndef _SYS_SIGNALFD_H #define _SYS_SIGNALFD_H 1 -#define __need_sigset_t -#include <signal.h> #include <stdint.h> +#include <bits/types/sigset_t.h> /* Get the platform-dependent flags. */ #include <bits/signalfd.h> diff --git a/sysdeps/unix/sysv/linux/sys/swap.h b/sysdeps/unix/sysv/linux/sys/swap.h index 469907b7c4..c79e9378cd 100644 --- a/sysdeps/unix/sysv/linux/sys/swap.h +++ b/sysdeps/unix/sysv/linux/sys/swap.h @@ -1,5 +1,5 @@ /* Calls to enable and disable swapping on specified locations. Linux version. - Copyright (C) 1996-2016 Free Software Foundation, Inc. + Copyright (C) 1996-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/syscall.h b/sysdeps/unix/sysv/linux/sys/syscall.h index d925a1de45..6434dde604 100644 --- a/sysdeps/unix/sysv/linux/sys/syscall.h +++ b/sysdeps/unix/sysv/linux/sys/syscall.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2016 Free Software Foundation, Inc. +/* Copyright (C) 1995-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/sysctl.h b/sysdeps/unix/sysv/linux/sys/sysctl.h index 687d1a2b4d..d125a83450 100644 --- a/sysdeps/unix/sysv/linux/sys/sysctl.h +++ b/sysdeps/unix/sysv/linux/sys/sysctl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2016 Free Software Foundation, Inc. +/* Copyright (C) 1996-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/sysinfo.h b/sysdeps/unix/sysv/linux/sys/sysinfo.h index 4fc51860e1..80e2d096d8 100644 --- a/sysdeps/unix/sysv/linux/sys/sysinfo.h +++ b/sysdeps/unix/sysv/linux/sys/sysinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2016 Free Software Foundation, Inc. +/* Copyright (C) 1996-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/sysmacros.h b/sysdeps/unix/sysv/linux/sys/sysmacros.h deleted file mode 100644 index 4c4a6978b5..0000000000 --- a/sysdeps/unix/sysv/linux/sys/sysmacros.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Definitions of macros to access `dev_t' values. - Copyright (C) 1996-2016 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 - 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. - - 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. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SYSMACROS_H -#define _SYS_SYSMACROS_H 1 - -#include <features.h> - -__BEGIN_DECLS - -__extension__ -extern unsigned int gnu_dev_major (unsigned long long int __dev) - __THROW __attribute_const__; -__extension__ -extern unsigned int gnu_dev_minor (unsigned long long int __dev) - __THROW __attribute_const__; -__extension__ -extern unsigned long long int gnu_dev_makedev (unsigned int __major, - unsigned int __minor) - __THROW __attribute_const__; - -#ifdef __USE_EXTERN_INLINES -__extension__ __extern_inline __attribute_const__ unsigned int -__NTH (gnu_dev_major (unsigned long long int __dev)) -{ - return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); -} - -__extension__ __extern_inline __attribute_const__ unsigned int -__NTH (gnu_dev_minor (unsigned long long int __dev)) -{ - return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); -} - -__extension__ __extern_inline __attribute_const__ unsigned long long int -__NTH (gnu_dev_makedev (unsigned int __major, unsigned int __minor)) -{ - return ((__minor & 0xff) | ((__major & 0xfff) << 8) - | (((unsigned long long int) (__minor & ~0xff)) << 12) - | (((unsigned long long int) (__major & ~0xfff)) << 32)); -} -#endif -__END_DECLS - -/* Access the functions with their traditional names. */ -#define major(dev) gnu_dev_major (dev) -#define minor(dev) gnu_dev_minor (dev) -#define makedev(maj, min) gnu_dev_makedev (maj, min) - -#endif /* sys/sysmacros.h */ diff --git a/sysdeps/unix/sysv/linux/sys/timerfd.h b/sysdeps/unix/sysv/linux/sys/timerfd.h index 3286997cc0..4d75e150a1 100644 --- a/sysdeps/unix/sysv/linux/sys/timerfd.h +++ b/sysdeps/unix/sysv/linux/sys/timerfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2016 Free Software Foundation, Inc. +/* Copyright (C) 2008-2018 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 @@ -19,6 +19,7 @@ #define _SYS_TIMERFD_H 1 #include <time.h> +#include <bits/types/struct_itimerspec.h> /* Get the platform-dependent flags. */ #include <bits/timerfd.h> @@ -27,15 +28,17 @@ /* Bits to be set in the FLAGS parameter of `timerfd_settime'. */ enum { - TFD_TIMER_ABSTIME = 1 << 0 + TFD_TIMER_ABSTIME = 1 << 0, #define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME + TFD_TIMER_CANCEL_ON_SET = 1 << 1 +#define TFD_TIMER_CANCEL_ON_SET TFD_TIMER_CANCEL_ON_SET }; __BEGIN_DECLS /* Return file descriptor for new interval timer source. */ -extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW; +extern int timerfd_create (__clockid_t __clock_id, int __flags) __THROW; /* Set next expiration time of interval timer source UFD to UTMR. If FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is diff --git a/sysdeps/unix/sysv/linux/sys/timex.h b/sysdeps/unix/sysv/linux/sys/timex.h index 75e86ddfb7..0d652c8aeb 100644 --- a/sysdeps/unix/sysv/linux/sys/timex.h +++ b/sysdeps/unix/sysv/linux/sys/timex.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2016 Free Software Foundation, Inc. +/* Copyright (C) 1995-2018 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 diff --git a/sysdeps/unix/sysv/linux/sys/ultrasound.h b/sysdeps/unix/sysv/linux/sys/ultrasound.h deleted file mode 100644 index a65c385bc0..0000000000 --- a/sysdeps/unix/sysv/linux/sys/ultrasound.h +++ /dev/null @@ -1 +0,0 @@ -#include <linux/ultrasound.h> |