Wheefun I/O Library  0.0.5
Useful I/O Primitives.
integer.h
Go to the documentation of this file.
1 /* WFIO - the Wheefun IO Library
2  Copyright (C) 2018 Phillip Kilgore
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <https://www.gnu.org/licenses/>.
16 
17  Additionally, you should have recieved a copy of the GNU Classpath
18  exception, which amends the license to generally permit linking against
19  the software provided herein.
20 */
21 
33 #ifndef WFIO_INTEGER_H
34 #define WFIO_INTEGER_H
35 
36 #include <wfio/host.h>
37 #include <wfcnfo/int.h>
38 
40 
81 #ifdef WFCNFO_HAVE_INTN_DEFS_
82 typedef wfcnfo_sint8_t wfio_sint8_t;
83 typedef wfcnfo_uint8_t wfio_uint8_t;
84 typedef wfcnfo_sint16_t wfio_sint16_t;
85 typedef wfcnfo_uint16_t wfio_uint16_t;
86 typedef wfcnfo_sint32_t wfio_sint32_t;
87 typedef wfcnfo_uint32_t wfio_uint32_t;
88 typedef wfcnfo_sint64_t wfio_sint64_t;
89 typedef wfcnfo_uint64_t wfio_uint64_t;
90 #define WFIO_HAVE_INTDEF_
91 #else
92 /* Must source from automatically generated definitions */
93 #include <wfio/bits/intdef.h>
94 #endif
95 
96 #ifdef WFCNFO_HAVE_INTN_LITS_
97 #define WFIO_SINT8_LIT(X) WFCNFO_SINT8_LIT(X)
98 #define WFIO_UINT8_LIT(X) WFCNFO_UINT8_LIT(X)
99 #define WFIO_SINT16_LIT(X) WFCNFO_SINT16_LIT(X)
100 #define WFIO_UINT16_LIT(X) WFCNFO_UINT16_LIT(X)
101 #define WFIO_SINT32_LIT(X) WFCNFO_SINT32_LIT(X)
102 #define WFIO_UINT32_LIT(X) WFCNFO_UINT32_LIT(X)
103 #define WFIO_SINT64_LIT(X) WFCNFO_SINT64_LIT(X)
104 #define WFIO_UINT64_LIT(X) WFCNFO_UINT64_LIT(X)
105 #endif
106 
108 
109 #ifdef __cplusplus
110 namespace wfio {
111 
113  typedef ::wfio_sint8_t sint8_t;
114 
116  typedef ::wfio_uint8_t uint8_t;
117 
119  typedef ::wfio_sint16_t sint16_t;
120 
122  typedef ::wfio_uint16_t uint16_t;
123 
125  typedef ::wfio_sint32_t sint32_t;
126 
128  typedef ::wfio_uint32_t uint32_t;
129 
131  typedef ::wfio_sint64_t sint64_t;
132 
134  typedef ::wfio_uint64_t uint64_t;
135 }
136 #endif
137 
138 
139 #endif
The root namespace for WFIO.
Definition: bin.h:879
::wfio_uint32_t uint32_t
Definition: integer.h:128
#define WFIO_C_BEGIN
Definition: host.h:477
::wfio_uint16_t uint16_t
Definition: integer.h:122
::wfio_uint64_t uint64_t
Definition: integer.h:134
::wfio_sint32_t sint32_t
Definition: integer.h:125
Host environment detection.
::wfio_sint8_t sint8_t
Definition: integer.h:113
::wfio_sint16_t sint16_t
Definition: integer.h:119
#define WFIO_C_END
Definition: host.h:485
::wfio_sint64_t sint64_t
Definition: integer.h:131
::wfio_uint8_t uint8_t
Definition: integer.h:116