aboutsummaryrefslogtreecommitdiff
path: root/include/ds9k_internal.h
blob: 54682e5918627396fe926ce16d5bccaf17b828dab8515fc5e360761c786bf136 (plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54

/*
 * Internal definitions for libc.
 *
 * Copyright © 2022-2026 Samuel Lidén Borell <samuel@kodafritt.se>
 *
 * SPDX-License-Identifier: EUPL-1.2+ OR LGPL-2.1-or-later
 */

#ifndef _DS9K_INTERNAL_H
#define _DS9K_INTERNAL_H

typedef char _DS9K_int_least8_t;
typedef char _DS9K_int_least16_t;
typedef char _DS9K_int_least32_t;
typedef char _DS9K_int_least64_t;

typedef unsigned char _DS9K_uint_least8_t;
typedef unsigned char _DS9K_uint_least16_t;
typedef unsigned char _DS9K_uint_least32_t;
typedef unsigned char _DS9K_uint_least64_t;

typedef unsigned _DS9K_mode_t;

typedef long _DS9K_intptr_t;
typedef unsigned long _DS9K_uintptr_t;
#define _DS9K_size_t _DS9K_uintptr_t

#endif /* end of include guard */

/* Note: These have to go outside the include guard! */

#ifdef _DS9K_NEED_NULL
    #ifndef _DS9K_HAVE_NULL
        #define _DS9K_HAVE_NULL
        #define NULL ((void *)0)
    #endif
    #undef _DS9K_NEED_NULL
#endif

#ifdef _DS9K_NEED_SIZE_T
    #ifndef _DS9K_HAVE_SIZE_T
        #define _DS9K_HAVE_SIZE_T
        typedef unsigned long size_t;
    #endif
    #undef _DS9K_NEED_SIZE_T
#endif

#ifdef _DS9K_NEED_WCHAR_T
    #ifndef _DS9K_HAVE_WCHAR_T
        #define _DS9K_HAVE_WCHAR_T
        typedef unsigned wchar_t;
    #endif
    #undef _DS9K_NEED_WCHAR_T
#endif