File: types.h

package info (click to toggle)
openntpd 1%3A6.2p3-4.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 2,472 kB
  • sloc: ansic: 9,413; sh: 4,425; yacc: 692; makefile: 310
file content (41 lines) | stat: -rw-r--r-- 814 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * Public domain
 * sys/types.h compatibility shim
 */

#include_next <sys/types.h>

#ifndef LIBCOMPAT_SYS_TYPES_H
#define LIBCOMPAT_SYS_TYPES_H

#include <stdint.h>

#ifdef __MINGW32__
#include <_bsd_types.h>
#endif

#if !defined(HAVE_ATTRIBUTE__DEAD) && !defined(__dead)
#define __dead		__attribute__((__noreturn__))
#endif

#if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__bounded__)
# define __bounded__(x, y, z)
#endif

#if !defined(HAVE_ATTRIBUTE__PACKED) && !defined(__packed)
# define __packed	__attribute__((__packed__))
#endif

/*
 * Define BSD-style unsigned bits types for systems that do not have them.
 */
typedef uint8_t     u_int8_t;
typedef uint16_t    u_int16_t;
typedef uint32_t    u_int32_t;
typedef uint64_t    u_int64_t;

#ifndef BYTE_ORDER
#include <machine/endian.h>
#endif

#endif