|
Packit Service |
82fcde |
/* Copyright (C) 1992-2018 Free Software Foundation, Inc.
|
|
Packit Service |
82fcde |
This file is part of the GNU C Library.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit Service |
82fcde |
modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
82fcde |
License as published by the Free Software Foundation; either
|
|
Packit Service |
82fcde |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit Service |
82fcde |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
82fcde |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
82fcde |
Lesser General Public License for more details.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
82fcde |
License along with the GNU C Library; if not, see
|
|
Packit Service |
82fcde |
<http://www.gnu.org/licenses/>. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#if !defined _SYS_STAT_H && !defined _FCNTL_H
|
|
Packit Service |
82fcde |
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#ifndef _BITS_STAT_H
|
|
Packit Service |
82fcde |
#define _BITS_STAT_H 1
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* This structure needs to be defined in accordance with the
|
|
Packit Service |
82fcde |
implementation of __stat, __fstat, and __lstat. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#include <bits/types.h>
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* Structure describing file characteristics. */
|
|
Packit Service |
82fcde |
struct stat
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
/* These are the members that POSIX.1 requires. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
__mode_t st_mode; /* File mode. */
|
|
Packit Service |
82fcde |
#ifndef __USE_FILE_OFFSET64
|
|
Packit Service |
82fcde |
__ino_t st_ino; /* File serial number. */
|
|
Packit Service |
82fcde |
#else
|
|
Packit Service |
82fcde |
__ino64_t st_ino; /* File serial number. */
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
__dev_t st_dev; /* Device containing the file. */
|
|
Packit Service |
82fcde |
__nlink_t st_nlink; /* Link count. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
__uid_t st_uid; /* User ID of the file's owner. */
|
|
Packit Service |
82fcde |
__gid_t st_gid; /* Group ID of the file's group. */
|
|
Packit Service |
82fcde |
#ifndef __USE_FILE_OFFSET64
|
|
Packit Service |
82fcde |
__off_t st_size; /* Size of file, in bytes. */
|
|
Packit Service |
82fcde |
#else
|
|
Packit Service |
82fcde |
__off64_t st_size; /* Size of file, in bytes. */
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
__time_t st_atime; /* Time of last access. */
|
|
Packit Service |
82fcde |
__time_t st_mtime; /* Time of last modification. */
|
|
Packit Service |
82fcde |
__time_t st_ctime; /* Time of last status change. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* This should be defined if there is a `st_blksize' member. */
|
|
Packit Service |
82fcde |
#undef _STATBUF_ST_BLKSIZE
|
|
Packit Service |
82fcde |
};
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* Encoding of the file mode. These are the standard Unix values,
|
|
Packit Service |
82fcde |
but POSIX.1 does not specify what values should be used. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#define __S_IFMT 0170000 /* These bits determine file type. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* File types. */
|
|
Packit Service |
82fcde |
#define __S_IFDIR 0040000 /* Directory. */
|
|
Packit Service |
82fcde |
#define __S_IFCHR 0020000 /* Character device. */
|
|
Packit Service |
82fcde |
#define __S_IFBLK 0060000 /* Block device. */
|
|
Packit Service |
82fcde |
#define __S_IFREG 0100000 /* Regular file. */
|
|
Packit Service |
82fcde |
#define __S_IFIFO 0010000 /* FIFO. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* POSIX.1b objects. */
|
|
Packit Service |
82fcde |
#define __S_TYPEISMQ(buf) 0
|
|
Packit Service |
82fcde |
#define __S_TYPEISSEM(buf) 0
|
|
Packit Service |
82fcde |
#define __S_TYPEISSHM(buf) 0
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* Protection bits. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#define __S_ISUID 04000 /* Set user ID on execution. */
|
|
Packit Service |
82fcde |
#define __S_ISGID 02000 /* Set group ID on execution. */
|
|
Packit Service |
82fcde |
#define __S_IREAD 0400 /* Read by owner. */
|
|
Packit Service |
82fcde |
#define __S_IWRITE 0200 /* Write by owner. */
|
|
Packit Service |
82fcde |
#define __S_IEXEC 0100 /* Execute by owner. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#ifdef __USE_LARGEFILE64
|
|
Packit Service |
82fcde |
struct stat64
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
__mode_t st_mode; /* File mode. */
|
|
Packit Service |
82fcde |
__ino64_t st_ino; /* File serial number. */
|
|
Packit Service |
82fcde |
__dev_t st_dev; /* Device. */
|
|
Packit Service |
82fcde |
__nlink_t st_nlink; /* Link count. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
__uid_t st_uid; /* User ID of the file's owner. */
|
|
Packit Service |
82fcde |
__gid_t st_gid; /* Group ID of the file's group.*/
|
|
Packit Service |
82fcde |
__off64_t st_size; /* Size of file, in bytes. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
__time_t st_atime; /* Time of last access. */
|
|
Packit Service |
82fcde |
__time_t st_mtime; /* Time of last modification. */
|
|
Packit Service |
82fcde |
__time_t st_ctime; /* Time of last status change. */
|
|
Packit Service |
82fcde |
};
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#endif /* bits/stat.h */
|