2022-02-07 17:23:15 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
|
|
|
|
|
/*
|
|
|
|
|
* Standard definitions and types for NOLIBC
|
|
|
|
|
* Copyright (C) 2017-2021 Willy Tarreau <w@1wt.eu>
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _NOLIBC_STD_H
|
|
|
|
|
#define _NOLIBC_STD_H
|
|
|
|
|
|
|
|
|
|
/* Declare a few quite common macros and types that usually are in stdlib.h,
|
|
|
|
|
* stdint.h, ctype.h, unistd.h and a few other common locations. Please place
|
|
|
|
|
* integer type definitions and generic macros here, but avoid OS-specific and
|
|
|
|
|
* syscall-specific stuff, as this file is expected to be included very early.
|
|
|
|
|
*/
|
|
|
|
|
|
2023-03-04 15:26:03 +01:00
|
|
|
#include "stdint.h"
|
2025-05-15 21:57:54 +02:00
|
|
|
#include "stddef.h"
|
2022-02-07 17:23:15 +01:00
|
|
|
|
2025-07-12 11:00:55 +02:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
2022-02-07 17:23:15 +01:00
|
|
|
/* those are commonly provided by sys/types.h */
|
2026-04-04 10:08:21 +02:00
|
|
|
typedef uint64_t dev_t;
|
2025-10-29 17:02:51 +01:00
|
|
|
typedef uint64_t ino_t;
|
2022-02-07 17:23:15 +01:00
|
|
|
typedef unsigned int mode_t;
|
|
|
|
|
typedef signed int pid_t;
|
|
|
|
|
typedef unsigned int uid_t;
|
|
|
|
|
typedef unsigned int gid_t;
|
|
|
|
|
typedef unsigned long nlink_t;
|
2025-10-29 17:02:54 +01:00
|
|
|
typedef int64_t off_t;
|
2022-02-07 17:23:15 +01:00
|
|
|
typedef signed long blksize_t;
|
|
|
|
|
typedef signed long blkcnt_t;
|
2025-12-20 14:55:53 +01:00
|
|
|
typedef __kernel_time64_t time_t;
|
2022-02-07 17:23:15 +01:00
|
|
|
|
|
|
|
|
#endif /* _NOLIBC_STD_H */
|