1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-25 02:32:07 +00:00
serenity/LibC/sys/types.h
Andreas Kling 9d05f6b7a7 Make bash-2.05b build with minimal changes.
This is really neat. :^)
2018-11-17 00:14:07 +01:00

64 lines
1.5 KiB
C

#pragma once
#include <sys/cdefs.h>
#include <stdint.h>
__BEGIN_DECLS
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef int ptrdiff_t;
typedef unsigned long int __uintmax_t;
typedef __uintmax_t uintmax_t;
typedef long int __intmax_t;
typedef __intmax_t intmax_t;
typedef uint32_t uid_t;
typedef uint32_t gid_t;
typedef int pid_t;
typedef uint32_t size_t;
typedef int32_t ssize_t;
typedef uint32_t ino_t;
typedef int32_t off_t;
typedef uint32_t dev_t;
typedef uint32_t mode_t;
typedef uint32_t nlink_t;
typedef uint32_t blksize_t;
typedef uint32_t blkcnt_t;
typedef uint32_t time_t;
typedef uint32_t suseconds_t;
typedef uint32_t clock_t;
typedef uint32_t socklen_t;
struct timeval {
time_t tv_sec;
suseconds_t tv_usec;
};
struct stat {
dev_t st_dev; /* ID of device containing file */
ino_t st_ino; /* inode number */
mode_t st_mode; /* protection */
nlink_t st_nlink; /* number of hard links */
uid_t st_uid; /* user ID of owner */
gid_t st_gid; /* group ID of owner */
dev_t st_rdev; /* device ID (if special file) */
off_t st_size; /* total size, in bytes */
blksize_t st_blksize; /* blocksize for file system I/O */
blkcnt_t st_blocks; /* number of 512B blocks allocated */
time_t st_atime; /* time of last access */
time_t st_mtime; /* time of last modification */
time_t st_ctime; /* time of last status change */
};
#ifdef __cplusplus
#define NULL nullptr
#else
#define NULL 0
#endif
__END_DECLS