]> sourceware.org Git - glibc.git/blame - sysdeps/unix/sysv/linux/bits/stat.h
elf: handle addition overflow in _dl_find_object_update_1 [BZ #32245]
[glibc.git] / sysdeps / unix / sysv / linux / bits / stat.h
CommitLineData
dff8da6b 1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
54d79e99 2 This file is part of the GNU C Library.
d2f5be2a 3
54d79e99 4 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
d2f5be2a 8
54d79e99
UD
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12 Lesser General Public License for more details.
d2f5be2a 13
41bdb6e2 14 You should have received a copy of the GNU Lesser General Public
59ba27a6 15 License along with the GNU C Library; if not, see
5a82c748 16 <https://www.gnu.org/licenses/>. */
d2f5be2a 17
f095bb72 18#if !defined _SYS_STAT_H && !defined _FCNTL_H
f4017d20
UD
19# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
20#endif
d2f5be2a 21
64c1f3af
UD
22#ifndef _BITS_STAT_H
23#define _BITS_STAT_H 1
24
d8927238 25#include <bits/struct_stat.h>
dfd2257a 26
d2f5be2a
UD
27/* Encoding of the file mode. */
28
29#define __S_IFMT 0170000 /* These bits determine file type. */
30
31/* File types. */
32#define __S_IFDIR 0040000 /* Directory. */
33#define __S_IFCHR 0020000 /* Character device. */
34#define __S_IFBLK 0060000 /* Block device. */
35#define __S_IFREG 0100000 /* Regular file. */
36#define __S_IFIFO 0010000 /* FIFO. */
d2f5be2a
UD
37#define __S_IFLNK 0120000 /* Symbolic link. */
38#define __S_IFSOCK 0140000 /* Socket. */
39
368cfb94
UD
40/* POSIX.1b objects. Note that these macros always evaluate to zero. But
41 they do it by enforcing the correct use of the macros. */
42#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
43#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
44#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
2fcbf75b 45
d2f5be2a
UD
46/* Protection bits. */
47
48#define __S_ISUID 04000 /* Set user ID on execution. */
49#define __S_ISGID 02000 /* Set group ID on execution. */
50#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
51#define __S_IREAD 0400 /* Read by owner. */
52#define __S_IWRITE 0200 /* Write by owner. */
53#define __S_IEXEC 0100 /* Execute by owner. */
c27d2078 54
3e6b0a28 55#ifdef __USE_ATFILE
c27d2078
UD
56# define UTIME_NOW ((1l << 30) - 1l)
57# define UTIME_OMIT ((1l << 30) - 2l)
58#endif
64c1f3af
UD
59
60#endif /* bits/stat.h */
This page took 0.965496 seconds and 6 git commands to generate.