S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_missing_c99.h
Go to the documentation of this file.
1/*
2 * Licensed to Systerel under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work
4 * for additional information regarding copyright ownership.
5 * Systerel licenses this file to you under the Apache
6 * License, Version 2.0 (the "License"); you may not use this
7 * file except in compliance with the License. You may obtain
8 * a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20/* Copy-paste from
21 * mcuxpressoide-10.3.1_2233/ide/plugins/com.nxp.mcuxpresso.tools.linux_10.3.0.201811011841/tools/arm-none-eabi/include/inttypes.h
22 * as there seems to be a bug: __int64_t_defined is defined,
23 * but only after the corresponding section is included,
24 * so the PRI*64 directives are not defined...
25 */
26
27/*
28 * Copyright (c) 2004, 2005 by
29 * Ralf Corsepius, Ulm/Germany. All rights reserved.
30 *
31 * Permission to use, copy, modify, and distribute this software
32 * is freely granted, provided that this notice is preserved.
33 */
34
35#ifndef SOPC_MISSING_C99_H_
36#define SOPC_MISSING_C99_H_
37
38#ifndef PRIi64
39#define __STRINGIFY(a) #a
40
41#define __PRI64(x) __INT64 __STRINGIFY(x)
42#define __SCN64(x) __INT64 __STRINGIFY(x)
43#define __PRI64LEAST(x) __LEAST64 __STRINGIFY(x)
44#define __SCN64LEAST(x) __LEAST64 __STRINGIFY(x)
45#define __PRI64FAST(x) __FAST64 __STRINGIFY(x)
46#define __SCN64FAST(x) __FAST64 __STRINGIFY(x)
47
48#define PRId64 __PRI64(d)
49#define PRIi64 __PRI64(i)
50#define PRIo64 __PRI64(o)
51#define PRIu64 __PRI64(u)
52#define PRIx64 __PRI64(x)
53#define PRIX64 __PRI64(X)
54
55#define SCNd64 __SCN64(d)
56#define SCNi64 __SCN64(i)
57#define SCNo64 __SCN64(o)
58#define SCNu64 __SCN64(u)
59#define SCNx64 __SCN64(x)
60
61#define PRIdLEAST64 __PRI64LEAST(d)
62#define PRIiLEAST64 __PRI64LEAST(i)
63#define PRIoLEAST64 __PRI64LEAST(o)
64#define PRIuLEAST64 __PRI64LEAST(u)
65#define PRIxLEAST64 __PRI64LEAST(x)
66#define PRIXLEAST64 __PRI64LEAST(X)
67
68#define SCNdLEAST64 __SCN64LEAST(d)
69#define SCNiLEAST64 __SCN64LEAST(i)
70#define SCNoLEAST64 __SCN64LEAST(o)
71#define SCNuLEAST64 __SCN64LEAST(u)
72#define SCNxLEAST64 __SCN64LEAST(x)
73
74#define PRIdFAST64 __PRI64FAST(d)
75#define PRIiFAST64 __PRI64FAST(i)
76#define PRIoFAST64 __PRI64FAST(o)
77#define PRIuFAST64 __PRI64FAST(u)
78#define PRIxFAST64 __PRI64FAST(x)
79#define PRIXFAST64 __PRI64FAST(X)
80
81#define SCNdFAST64 __SCN64FAST(d)
82#define SCNiFAST64 __SCN64FAST(i)
83#define SCNoFAST64 __SCN64FAST(o)
84#define SCNuFAST64 __SCN64FAST(u)
85#define SCNxFAST64 __SCN64FAST(x)
86
87#endif /* PRIi64 */
88
89#endif /* SOPC_MISSING_C99_H_ */