Skip to content

Commit 1bde6f6

Browse files
committed
coap_config.h*: Make the various OS coap_config.h more consistent
Add in coap_config.h.contiki.in to aid versioning updates. Make the PACKAGE_ definitions consistent.
1 parent be37ebb commit 1bde6f6

10 files changed

+303
-16
lines changed

coap_config.h.contiki

+27
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* coap_config.h.contiki -- Contiki configuration for libcoap
3+
*
4+
* [coap_config.h.contiki is re-built from coap_config.h.contiki.in by the
5+
* libcoap ./configure command, so make any permanent changes to libcoap's
6+
* coap_config.h.contiki.in for a libcoap Pull Request]
7+
*
8+
* Copyright (C) 2021-2024 Olaf Bergmann <bergmann@tzi.org> and others
9+
*
10+
* SPDX-License-Identifier: BSD-2-Clause
11+
*
12+
* This file is part of the CoAP library libcoap. Please see README for terms
13+
* of use.
14+
*/
15+
116
#ifndef COAP_CONFIG_H_
217
#define COAP_CONFIG_H_
318

@@ -82,23 +97,35 @@
8297
/* Define to 1 if you have the `snprintf' function. */
8398
#define HAVE_SNPRINTF 1
8499

100+
#ifndef PACKAGE_BUGREPORT
85101
/* Define to the address where bug reports for this package should be sent. */
86102
#define PACKAGE_BUGREPORT "libcoap-developers@lists.sourceforge.net"
103+
#endif /* PACKAGE_BUGREPORT */
87104

105+
#ifndef PACKAGE_NAME
88106
/* Define to the full name of this package. */
89107
#define PACKAGE_NAME "libcoap"
108+
#endif /* PACKAGE_NAME */
90109

110+
#ifndef PACKAGE_STRING
91111
/* Define to the full name and version of this package. */
92112
#define PACKAGE_STRING "libcoap 4.3.4"
113+
#endif /* PACKAGE_STRING */
93114

115+
#ifndef PACKAGE_TARNAME
94116
/* Define to the one symbol short name of this package. */
95117
#define PACKAGE_TARNAME "libcoap"
118+
#endif /* PACKAGE_TARNAME */
96119

120+
#ifndef PACKAGE_URL
97121
/* Define to the home page for this package. */
98122
#define PACKAGE_URL "https://libcoap.net/"
123+
#endif /* PACKAGE_URL */
99124

125+
#ifndef PACKAGE_VERSION
100126
/* Define to the version of this package. */
101127
#define PACKAGE_VERSION "4.3.4"
128+
#endif /* PACKAGE_VERSION */
102129

103130
#define WITH_CONTIKI 1
104131

coap_config.h.contiki.in

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
/*
2+
* coap_config.h.contiki -- Contiki configuration for libcoap
3+
*
4+
* [coap_config.h.contiki is re-built from coap_config.h.contiki.in by the
5+
* libcoap ./configure command, so make any permanent changes to libcoap's
6+
* coap_config.h.contiki.in for a libcoap Pull Request]
7+
*
8+
* Copyright (C) 2021-2024 Olaf Bergmann <bergmann@tzi.org> and others
9+
*
10+
* SPDX-License-Identifier: BSD-2-Clause
11+
*
12+
* This file is part of the CoAP library libcoap. Please see README for terms
13+
* of use.
14+
*/
15+
16+
#ifndef COAP_CONFIG_H_
17+
#define COAP_CONFIG_H_
18+
19+
/* Define to 1 if libcoap supports client mode code. */
20+
#define COAP_CLIENT_SUPPORT 1
21+
22+
/* Define to 1 if libcoap supports server mode code. */
23+
#define COAP_SERVER_SUPPORT 1
24+
25+
/* Define to 1 if the system has small stack size. */
26+
#define COAP_CONSTRAINED_STACK 1
27+
28+
/* Define to 1 to build without TCP support. */
29+
#define COAP_DISABLE_TCP 1
30+
31+
/* Define to 1 to build support for IPv4 packets. */
32+
/* #undef COAP_IPV4_SUPPORT 1 */
33+
34+
/* Define to 1 to build support for IPv6 packets. */
35+
#define COAP_IPV6_SUPPORT 1
36+
37+
/* Define to 1 to build support for Unix socket packets. */
38+
/* #undef COAP_AF_UNIX_SUPPORT 1 */
39+
40+
/* Define to 1 to build with support for async separate responses. */
41+
#define COAP_ASYNC_SUPPORT 1
42+
43+
/* Define to 1 to build support for persisting observes. */
44+
/* #undef COAP_WITH_OBSERVE_PERSIST 1 */
45+
46+
/* Define to 1 to build with WebSockets support. */
47+
/* #undef COAP_WS_SUPPORT 1 */
48+
49+
/* Define to 1 to build with Q-Block (RFC9177) support. */
50+
/* #undef COAP_Q_BLOCK_SUPPORT 1 */
51+
52+
/* Define to 1 to build with thread recursive lock detection support. */
53+
/* #undef COAP_THREAD_RECURSIVE_CHECK 1 */
54+
55+
/* Define to 1 if libcoap has thread safe support. */
56+
/* #undef COAP_THREAD_SAFE 1 */
57+
58+
/* Define to 1 if you have the <assert.h> header file. */
59+
#define HAVE_ASSERT_H 1
60+
61+
/* Define to 1 if you have the <inttypes.h> header file. */
62+
#define HAVE_INTTYPES_H 1
63+
64+
/* Define to 1 if you have the <errno.h> header file. */
65+
#define HAVE_ERRNO_H 1
66+
67+
/* Define to 1 if you have the <limits.h> header file. */
68+
#define HAVE_LIMITS_H 1
69+
70+
/* Define to 1 if you have the `memset' function. */
71+
#define HAVE_MEMSET 1
72+
73+
/* Define to 1 if you have the <stddef.h> header file. */
74+
#define HAVE_STDDEF_H 1
75+
76+
/* Define to 1 if you have the <stdint.h> header file. */
77+
#define HAVE_STDINT_H 1
78+
79+
/* Define to 1 if you have the <stdlib.h> header file. */
80+
#define HAVE_STDLIB_H 1
81+
82+
/* Define to 1 if you have the `strcasecmp' function. */
83+
#define HAVE_STRCASECMP 1
84+
85+
/* Define to 1 if you have the <strings.h> header file. */
86+
#define HAVE_STRINGS_H 1
87+
88+
/* Define to 1 if you have the <string.h> header file. */
89+
#define HAVE_STRING_H 1
90+
91+
/* Define to 1 if you have the `strnlen' function. */
92+
#define HAVE_STRNLEN 1
93+
94+
/* Define to 1 if you have the `strrchr' function. */
95+
#define HAVE_STRRCHR 1
96+
97+
/* Define to 1 if you have the `snprintf' function. */
98+
#define HAVE_SNPRINTF 1
99+
100+
#ifndef PACKAGE_BUGREPORT
101+
/* Define to the address where bug reports for this package should be sent. */
102+
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
103+
#endif /* PACKAGE_BUGREPORT */
104+
105+
#ifndef PACKAGE_NAME
106+
/* Define to the full name of this package. */
107+
#define PACKAGE_NAME "@PACKAGE_NAME@"
108+
#endif /* PACKAGE_NAME */
109+
110+
#ifndef PACKAGE_STRING
111+
/* Define to the full name and version of this package. */
112+
#define PACKAGE_STRING "@PACKAGE_STRING@"
113+
#endif /* PACKAGE_STRING */
114+
115+
#ifndef PACKAGE_TARNAME
116+
/* Define to the one symbol short name of this package. */
117+
#define PACKAGE_TARNAME "@PACKAGE_TARNAME@"
118+
#endif /* PACKAGE_TARNAME */
119+
120+
#ifndef PACKAGE_URL
121+
/* Define to the home page for this package. */
122+
#define PACKAGE_URL "@PACKAGE_URL@"
123+
#endif /* PACKAGE_URL */
124+
125+
#ifndef PACKAGE_VERSION
126+
/* Define to the version of this package. */
127+
#define PACKAGE_VERSION "@PACKAGE_VERSION@"
128+
#endif /* PACKAGE_VERSION */
129+
130+
#define WITH_CONTIKI 1
131+
132+
#define HASH_NONFATAL_OOM 1
133+
134+
#ifndef HEAPMEM_CONF_ARENA_SIZE
135+
#define HEAPMEM_CONF_ARENA_SIZE 6144
136+
#endif
137+
138+
#endif /* COAP_CONFIG_H_ */

coap_config.h.riot

+25-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/*
22
* coap_config.h.riot -- RIOT configuration for libcoap
33
*
4+
* [coap_config.h.riot is re-built from coap_config.h.riot.in by the
5+
* libcoap ./configure command, so make any permanent changes to libcoap's
6+
* coap_config.h.riot.in for a libcoap Pull Request]
7+
*
48
* Copyright (C) 2021-2024 Olaf Bergmann <bergmann@tzi.org> and others
59
*
610
* SPDX-License-Identifier: BSD-2-Clause
@@ -346,17 +350,35 @@
346350
/* Define to 1 if you have the <unistd.h> header file. */
347351
#define HAVE_UNISTD_H 1
348352

353+
#ifndef PACKAGE_BUGREPORT
349354
/* Define to the address where bug reports for this package should be sent. */
350355
#define PACKAGE_BUGREPORT "libcoap-developers@lists.sourceforge.net"
356+
#endif /* PACKAGE_BUGREPORT */
351357

358+
#ifndef PACKAGE_NAME
352359
/* Define to the full name of this package. */
353360
#define PACKAGE_NAME "libcoap"
361+
#endif /* PACKAGE_NAME */
354362

355-
/* Define to the version of this package. */
356-
#define PACKAGE_VERSION "4.3.4"
357-
363+
#ifndef PACKAGE_STRING
358364
/* Define to the full name and version of this package. */
359365
#define PACKAGE_STRING "libcoap 4.3.4"
366+
#endif /* PACKAGE_STRING */
367+
368+
#ifndef PACKAGE_TARNAME
369+
/* Define to the one symbol short name of this package. */
370+
#define PACKAGE_TARNAME "libcoap"
371+
#endif /* PACKAGE_TARNAME */
372+
373+
#ifndef PACKAGE_URL
374+
/* Define to the home page for this package. */
375+
#define PACKAGE_URL "https://libcoap.net/"
376+
#endif /* PACKAGE_URL */
377+
378+
#ifndef PACKAGE_VERSION
379+
/* Define to the version of this package. */
380+
#define PACKAGE_VERSION "4.3.4"
381+
#endif /* PACKAGE_VERSION */
360382

361383
/* Define to 1 if you have the ANSI C header files. */
362384
#define STDC_HEADERS 1

coap_config.h.riot.in

+25-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/*
22
* coap_config.h.riot -- RIOT configuration for libcoap
33
*
4+
* [coap_config.h.riot is re-built from coap_config.h.riot.in by the
5+
* libcoap ./configure command, so make any permanent changes to libcoap's
6+
* coap_config.h.riot.in for a libcoap Pull Request]
7+
*
48
* Copyright (C) 2021-2024 Olaf Bergmann <bergmann@tzi.org> and others
59
*
610
* SPDX-License-Identifier: BSD-2-Clause
@@ -346,17 +350,35 @@
346350
/* Define to 1 if you have the <unistd.h> header file. */
347351
#define HAVE_UNISTD_H 1
348352

353+
#ifndef PACKAGE_BUGREPORT
349354
/* Define to the address where bug reports for this package should be sent. */
350355
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
356+
#endif /* PACKAGE_BUGREPORT */
351357

358+
#ifndef PACKAGE_NAME
352359
/* Define to the full name of this package. */
353360
#define PACKAGE_NAME "@PACKAGE_NAME@"
361+
#endif /* PACKAGE_NAME */
354362

355-
/* Define to the version of this package. */
356-
#define PACKAGE_VERSION "@PACKAGE_VERSION@"
357-
363+
#ifndef PACKAGE_STRING
358364
/* Define to the full name and version of this package. */
359365
#define PACKAGE_STRING "@PACKAGE_STRING@"
366+
#endif /* PACKAGE_STRING */
367+
368+
#ifndef PACKAGE_TARNAME
369+
/* Define to the one symbol short name of this package. */
370+
#define PACKAGE_TARNAME "@PACKAGE_TARNAME@"
371+
#endif /* PACKAGE_TARNAME */
372+
373+
#ifndef PACKAGE_URL
374+
/* Define to the home page for this package. */
375+
#define PACKAGE_URL "@PACKAGE_URL@"
376+
#endif /* PACKAGE_URL */
377+
378+
#ifndef PACKAGE_VERSION
379+
/* Define to the version of this package. */
380+
#define PACKAGE_VERSION "@PACKAGE_VERSION@"
381+
#endif /* PACKAGE_VERSION */
360382

361383
/* Define to 1 if you have the ANSI C header files. */
362384
#define STDC_HEADERS 1

coap_config.h.windows

+16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/*
22
* coap_config.h.windows -- Windows configuration for libcoap
33
*
4+
* [coap_config.h.windows is re-built from coap_config.h.windows.in by the
5+
* libcoap ./configure command, so make any permanent changes to libcoap's
6+
* coap_config.h.windows.in for a libcoap Pull Request]
7+
*
48
* Copyright (C) 2017-2024 Olaf Bergmann <bergmann@tzi.org> and others
59
*
610
* SPDX-License-Identifier: BSD-2-Clause
@@ -148,23 +152,35 @@
148152
#define COAP_THREAD_RECURSIVE_CHECK 0
149153
#endif
150154

155+
#ifndef PACKAGE_BUGREPORT
151156
/* Define to the address where bug reports for this package should be sent. */
152157
#define PACKAGE_BUGREPORT "libcoap-developers@lists.sourceforge.net"
158+
#endif /* PACKAGE_BUGREPORT */
153159

160+
#ifndef PACKAGE_NAME
154161
/* Define to the full name of this package. */
155162
#define PACKAGE_NAME "libcoap"
163+
#endif /* PACKAGE_NAME */
156164

165+
#ifndef PACKAGE_STRING
157166
/* Define to the full name and version of this package. */
158167
#define PACKAGE_STRING "libcoap 4.3.4"
168+
#endif /* PACKAGE_STRING */
159169

170+
#ifndef PACKAGE_TARNAME
160171
/* Define to the one symbol short name of this package. */
161172
#define PACKAGE_TARNAME "libcoap"
173+
#endif /* PACKAGE_TARNAME */
162174

175+
#ifndef PACKAGE_URL
163176
/* Define to the home page for this package. */
164177
#define PACKAGE_URL "https://libcoap.net/"
178+
#endif /* PACKAGE_URL */
165179

180+
#ifndef PACKAGE_VERSION
166181
/* Define to the version of this package. */
167182
#define PACKAGE_VERSION "4.3.4"
183+
#endif /* PACKAGE_VERSION */
168184

169185
/* Define to 1 if you have the ANSI C header files. */
170186
#define STDC_HEADERS 1

coap_config.h.windows.in

+16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/*
22
* coap_config.h.windows -- Windows configuration for libcoap
33
*
4+
* [coap_config.h.windows is re-built from coap_config.h.windows.in by the
5+
* libcoap ./configure command, so make any permanent changes to libcoap's
6+
* coap_config.h.windows.in for a libcoap Pull Request]
7+
*
48
* Copyright (C) 2017-2024 Olaf Bergmann <bergmann@tzi.org> and others
59
*
610
* SPDX-License-Identifier: BSD-2-Clause
@@ -148,23 +152,35 @@
148152
#define COAP_THREAD_RECURSIVE_CHECK 0
149153
#endif
150154

155+
#ifndef PACKAGE_BUGREPORT
151156
/* Define to the address where bug reports for this package should be sent. */
152157
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
158+
#endif /* PACKAGE_BUGREPORT */
153159

160+
#ifndef PACKAGE_NAME
154161
/* Define to the full name of this package. */
155162
#define PACKAGE_NAME "@PACKAGE_NAME@"
163+
#endif /* PACKAGE_NAME */
156164

165+
#ifndef PACKAGE_STRING
157166
/* Define to the full name and version of this package. */
158167
#define PACKAGE_STRING "@PACKAGE_STRING@"
168+
#endif /* PACKAGE_STRING */
159169

170+
#ifndef PACKAGE_TARNAME
160171
/* Define to the one symbol short name of this package. */
161172
#define PACKAGE_TARNAME "@PACKAGE_TARNAME@"
173+
#endif /* PACKAGE_TARNAME */
162174

175+
#ifndef PACKAGE_URL
163176
/* Define to the home page for this package. */
164177
#define PACKAGE_URL "@PACKAGE_URL@"
178+
#endif /* PACKAGE_URL */
165179

180+
#ifndef PACKAGE_VERSION
166181
/* Define to the version of this package. */
167182
#define PACKAGE_VERSION "@PACKAGE_VERSION@"
183+
#endif /* PACKAGE_VERSION */
168184

169185
/* Define to 1 if you have the ANSI C header files. */
170186
#define STDC_HEADERS 1

configure.ac

+1
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,7 @@ CFLAGS="$CFLAGS $ADDITIONAL_CFLAGS"
11511151
#
11521152
AC_CONFIG_FILES([
11531153
Makefile
1154+
coap_config.h.contiki
11541155
coap_config.h.riot
11551156
coap_config.h.windows
11561157
doc/Makefile

0 commit comments

Comments
 (0)