PS_Fgen_FW
4da88f4073c1cc65ea45c3a652a2751e495e50db
Firmware for an Power Supply and Function Generator build from an ATX power supply
Loading...
Searching...
No Matches
cc.h
Go to the documentation of this file.
1
/*-
2
* BSD 2-Clause License
3
*
4
* Copyright (c) 2012-2018, Jan Breuer
5
* All rights reserved.
6
*
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions are met:
9
*
10
* * Redistributions of source code must retain the above copyright notice, this
11
* list of conditions and the following disclaimer.
12
*
13
* * Redistributions in binary form must reproduce the above copyright notice,
14
* this list of conditions and the following disclaimer in the documentation
15
* and/or other materials provided with the distribution.
16
*
17
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
*/
28
36
37
#ifndef __SCPI_CC_H_
38
#define __SCPI_CC_H_
39
40
#ifdef __cplusplus
41
extern
"C"
{
42
#endif
43
44
#if defined(__STDC__)
45
# define C89 1
46
# if defined(__STDC_VERSION__)
47
# define C90 1
48
# if (__STDC_VERSION__ >= 199409L)
49
# define C94 1
50
# endif
51
# if (__STDC_VERSION__ >= 199901L)
52
# define C99 1
53
# endif
54
# endif
55
#endif
56
57
#if (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200809L) || \
58
(defined _XOPEN_SOURCE && _XOPEN_SOURCE >= 700)
59
#define HAVE_STRNDUP 1
60
#define HAVE_STRNLEN 1
61
#endif
62
63
#if (defined _BSD_SOURCE && _BSD_SOURCE) || \
64
(defined _XOPEN_SOURCE && _XOPEN_SOURCE >= 500) || \
65
(defined _ISOC99_SOURCE && _ISOC99_SOURCE) || \
66
(defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200112L) || \
67
C99
68
#define HAVE_SNPRINTF 1
69
#endif
70
71
#if (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200112L)
72
#define HAVE_STRNCASECMP 1
73
#endif
74
75
#if (defined _BSD_SOURCE && _BSD_SOURCE) || \
76
(defined _SVID_SOURCE && _SVID_SOURCE) || \
77
(defined _XOPEN_SOURCE && _XOPEN_SOURCE) || \
78
(defined _ISOC99_SOURCE && _ISOC99_SOURCE) || \
79
(defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200112L) ||\
80
C99
81
#define HAVE_ISNAN 1
82
#endif
83
84
#if (defined _XOPEN_SOURCE && _XOPEN_SOURCE >= 600)|| \
85
(defined _ISOC99_SOURCE && _ISOC99_SOURCE) || \
86
(defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200112L) || \
87
C99
88
#define HAVE_ISFINITE 1
89
#define HAVE_SIGNBIT 1
90
#endif
91
92
#if (defined _XOPEN_SOURCE && XOPEN_SOURCE >= 600) || \
93
(defined _BSD_SOURCE && _BSD_SOURCE) || \
94
(defined _SVID_SOURCE && _SVID_SOURCE) || \
95
(defined _ISOC99_SOURCE && _ISOC99_SOURCE) || \
96
(defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200112L)
97
#define HAVE_STRTOLL 1
98
#endif
99
100
#if (defined _XOPEN_SOURCE && _XOPEN_SOURCE >= 600) || \
101
(defined _ISOC99_SOURCE && _ISOC99_SOURCE) || \
102
(defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200112L) || \
103
C99
104
#define HAVE_STRTOF 1
105
#endif
106
107
#if (defined _ISOC99_SOURCE && _ISOC99_SOURCE) || C99
108
#define HAVE_STDBOOL 1
109
#endif
110
111
/* Compiler specific */
112
/* RealView/Keil ARM Compiler, e.g. Cortex-M CPUs */
113
#if defined(__CC_ARM)
114
#define HAVE_STRNCASECMP 1
115
#endif
116
117
/* National Instruments (R) CVI x86/x64 PC platform */
118
#if defined(_CVI_)
119
#define HAVE_STRNICMP 1
120
#endif
121
122
/* 8bit PIC - PIC16, etc */
123
#if defined(_MPC_)
124
#define HAVE_STRNICMP 1
125
#endif
126
127
/* PIC24 */
128
#if defined(__C30__)
129
#endif
130
131
/* PIC32mx */
132
#if defined(__C32__)
133
#define HAVE_FINITE 1
134
#endif
135
136
/* AVR libc */
137
#if defined(__AVR__)
138
#include <stdlib.h>
139
#define HAVE_DTOSTRE 1
140
#undef HAVE_STRTOF
141
#define HAVE_STRTOF 0
142
#endif
143
144
/* default values */
145
#ifndef HAVE_STRNLEN
146
#define HAVE_STRNLEN 0
147
#endif
148
149
#ifndef HAVE_STRDUP
150
#define HAVE_STRDUP 0
151
#endif
152
153
#ifndef HAVE_STRNDUP
154
#define HAVE_STRNDUP 0
155
#endif
156
157
#ifndef HAVE_STRNICMP
158
#define HAVE_STRNICMP 0
159
#endif
160
161
#ifndef HAVE_STDBOOL
162
#define HAVE_STDBOOL 1
163
#endif
164
165
#ifndef HAVE_SNPRINTF
166
#define HAVE_SNPRINTF 0
167
#endif
168
169
#ifndef HAVE_STRNCASECMP
170
#define HAVE_STRNCASECMP 0
171
#endif
172
173
#ifndef HAVE_ISNAN
174
#define HAVE_ISNAN 0
175
#endif
176
177
#ifndef HAVE_ISFINITE
178
#define HAVE_ISFINITE 0
179
#endif
180
181
#ifndef HAVE_FINITE
182
#define HAVE_FINITE 0
183
#endif
184
185
#ifndef HAVE_SIGNBIT
186
#define HAVE_SIGNBIT 0
187
#endif
188
189
#ifndef HAVE_STRTOLL
190
#define HAVE_STRTOLL 0
191
#endif
192
193
#ifndef HAVE_STRTOF
194
#define HAVE_STRTOF 0
195
#endif
196
197
#ifndef HAVE_DTOSTRE
198
#define HAVE_DTOSTRE 0
199
#endif
200
201
#ifdef __cplusplus
202
}
203
#endif
204
205
#endif
/* __SCPI_CC_H_ */
PS_Fgen_FW
libraries
scpi-parser
inc
scpi
cc.h
Generated on Mon Jan 20 2025 17:33:36 for PS_Fgen_FW by
1.13.2