std.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. /* SPDX-License-Identifier: LGPL-2.1 OR MIT */
  2. /*
  3. * Standard definitions and types for NOLIBC
  4. * Copyright (C) 2017-2021 Willy Tarreau <w@1wt.eu>
  5. */
  6. #ifndef _NOLIBC_STD_H
  7. #define _NOLIBC_STD_H
  8. /* Declare a few quite common macros and types that usually are in stdlib.h,
  9. * stdint.h, ctype.h, unistd.h and a few other common locations. Please place
  10. * integer type definitions and generic macros here, but avoid OS-specific and
  11. * syscall-specific stuff, as this file is expected to be included very early.
  12. */
  13. #include "stdint.h"
  14. #include "stddef.h"
  15. #include <linux/types.h>
  16. /* those are commonly provided by sys/types.h */
  17. typedef unsigned int dev_t;
  18. typedef uint64_t ino_t;
  19. typedef unsigned int mode_t;
  20. typedef signed int pid_t;
  21. typedef unsigned int uid_t;
  22. typedef unsigned int gid_t;
  23. typedef unsigned long nlink_t;
  24. typedef int64_t off_t;
  25. typedef signed long blksize_t;
  26. typedef signed long blkcnt_t;
  27. typedef __kernel_time64_t time_t;
  28. #endif /* _NOLIBC_STD_H */