From 7e8f77cb23e4f3a1137f2ba9e4cea5ac034b9f68 Mon Sep 17 00:00:00 2001 From: Thomas Jahns <jahns@dkrz.de> Date: Mon, 17 Apr 2023 16:35:18 +0200 Subject: [PATCH] Always include config.h. * The macros defined in config.h might change size of off_t, symbols available from system headers etc. This effect will vary from system to system even. --- src/basetime.c | 12 ++++++++++++ src/binary.c | 12 ++++++++++++ src/calendar.c | 12 ++++++++++++ src/cdf_records.c | 12 ++++++++++++ src/cdf_util.c | 12 ++++++++++++ src/cdi_across.c | 12 ++++++++++++ src/cdi_att.c | 12 ++++++++++++ src/cdi_cksum.c | 12 ++++++++++++ src/cdi_datetime.c | 4 ++-- src/cdi_error.c | 12 ++++++++++++ src/cdi_fdb.c | 12 ++++++++++++ src/cdi_key.c | 12 ++++++++++++ src/cdi_query.c | 12 ++++++++++++ src/extralib.c | 12 ++++++++++++ src/gaussian_latitudes.c | 12 ++++++++++++ src/get_num_missvals.c | 12 ++++++++++++ src/getline.c | 12 ++++++++++++ src/ieglib.c | 12 ++++++++++++ src/input_file.c | 12 ++++++++++++ src/institution.c | 12 ++++++++++++ src/iterator.c | 12 ++++++++++++ src/iterator_fallback.c | 12 ++++++++++++ src/julian_date.c | 12 ++++++++++++ src/model.c | 14 +++++++++++++- src/pio_conf.c | 12 ++++++++++++ src/referenceCounting.c | 12 ++++++++++++ src/resource_unpack.c | 12 ++++++++++++ src/serialize.c | 12 ++++++++++++ src/servicelib.c | 12 ++++++++++++ src/stream_scan.c | 12 ++++++++++++ src/stream_var.c | 13 +++++++++++++ src/subtype.c | 12 ++++++++++++ src/swap.c | 12 ++++++++++++ src/table.c | 14 +++++++++++++- src/taxis.c | 12 ++++++++++++ src/tsteps.c | 12 ++++++++++++ src/vlist_var.c | 12 ++++++++++++ src/vlist_var_pack.c | 12 ++++++++++++ src/zaxis.c | 12 ++++++++++++ tests/calendar_test1.c | 12 ++++++++++++ tests/cksum_write_chunk.c | 12 ++++++++++++ tests/test_byteswap.c | 12 ++++++++++++ tests/test_month_adjust.c | 12 ++++++++++++ tests/test_table.c | 12 ++++++++++++ 44 files changed, 521 insertions(+), 4 deletions(-) diff --git a/src/basetime.c b/src/basetime.c index 5113a1c97..934a468b0 100644 --- a/src/basetime.c +++ b/src/basetime.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <stddef.h> // for NULL #include "cdi.h" #include "basetime.h" diff --git a/src/binary.c b/src/binary.c index c7ceb612b..d21b967b3 100644 --- a/src/binary.c +++ b/src/binary.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #define CDI_BIGENDIAN 0 // Byte order BIGENDIAN #define CDI_LITTLEENDIAN 1 // Byte order LITTLEENDIAN #include "error.h" diff --git a/src/calendar.c b/src/calendar.c index 6b84f04b8..9fb5e96a0 100644 --- a/src/calendar.c +++ b/src/calendar.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <stdio.h> #include "calendar.h" diff --git a/src/cdf_records.c b/src/cdf_records.c index 050c837ab..b047c224c 100644 --- a/src/cdf_records.c +++ b/src/cdf_records.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include "dmemory.h" #include "cdi_int.h" diff --git a/src/cdf_util.c b/src/cdf_util.c index 674078164..47c7a3c7c 100644 --- a/src/cdf_util.c +++ b/src/cdf_util.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <string.h> #include <ctype.h> diff --git a/src/cdi_across.c b/src/cdi_across.c index f8c9c6eb8..e0964a3bf 100644 --- a/src/cdi_across.c +++ b/src/cdi_across.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include "cdi_across.h" #ifdef HAVE_ACROSS diff --git a/src/cdi_att.c b/src/cdi_att.c index 69e6b8f55..4c699209d 100644 --- a/src/cdi_att.c +++ b/src/cdi_att.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <limits.h> #include <stdio.h> #include <string.h> diff --git a/src/cdi_cksum.c b/src/cdi_cksum.c index d482c937d..6ea8d2fc4 100644 --- a/src/cdi_cksum.c +++ b/src/cdi_cksum.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <inttypes.h> #include <sys/types.h> #include <stdlib.h> diff --git a/src/cdi_datetime.c b/src/cdi_datetime.c index b85463627..cfbf242fa 100644 --- a/src/cdi_datetime.c +++ b/src/cdi_datetime.c @@ -1,7 +1,7 @@ /* DO NOT REMOVE the config.h include file under any circumstances, * it's very much needed on some platforms */ -#if defined(HAVE_CONFIG_H) -#include "config.h" +#if defined (HAVE_CONFIG_H) +# include "config.h" #endif /* DO NOT REMOVE the above config.h include file under any * circumstances as long as it's the autoconf configuration header diff --git a/src/cdi_error.c b/src/cdi_error.c index 9ebc0cb58..b28705738 100644 --- a/src/cdi_error.c +++ b/src/cdi_error.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <stdio.h> #include <string.h> #include <errno.h> diff --git a/src/cdi_fdb.c b/src/cdi_fdb.c index 36d448c35..dae1a3536 100644 --- a/src/cdi_fdb.c +++ b/src/cdi_fdb.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include "cdi_fdb.h" int cdi_fdb_dummy; diff --git a/src/cdi_key.c b/src/cdi_key.c index fd7f66b8b..21da47ca8 100644 --- a/src/cdi_key.c +++ b/src/cdi_key.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include "cdi.h" #include "cdi_int.h" #include "zaxis.h" diff --git a/src/cdi_query.c b/src/cdi_query.c index a6b45d164..91dc9a7d5 100644 --- a/src/cdi_query.c +++ b/src/cdi_query.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <string.h> #include <stdlib.h> #include "cdi.h" diff --git a/src/extralib.c b/src/extralib.c index a52ea832e..37e11cf9a 100644 --- a/src/extralib.c +++ b/src/extralib.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/src/gaussian_latitudes.c b/src/gaussian_latitudes.c index 4b8992cab..b0e28056f 100644 --- a/src/gaussian_latitudes.c +++ b/src/gaussian_latitudes.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <stdio.h> #include <stdlib.h> #include <stdbool.h> diff --git a/src/get_num_missvals.c b/src/get_num_missvals.c index 5811799e9..b0219d146 100644 --- a/src/get_num_missvals.c +++ b/src/get_num_missvals.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include "get_num_missvals.h" #include "cdi_int.h" diff --git a/src/getline.c b/src/getline.c index 8b06e5f62..9e9a1cdad 100644 --- a/src/getline.c +++ b/src/getline.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + /* * getline.c --- replacement for GNU getline if not available in libc * diff --git a/src/ieglib.c b/src/ieglib.c index b228381cc..836e89c85 100644 --- a/src/ieglib.c +++ b/src/ieglib.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/src/input_file.c b/src/input_file.c index 61156846a..4a2a1bca7 100644 --- a/src/input_file.c +++ b/src/input_file.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #define _XOPEN_SOURCE 600 #include "input_file.h" diff --git a/src/institution.c b/src/institution.c index 1d7ed15a9..be445bff3 100644 --- a/src/institution.c +++ b/src/institution.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <assert.h> #include <stdlib.h> #include <limits.h> diff --git a/src/iterator.c b/src/iterator.c index 6c1522764..3018df21f 100644 --- a/src/iterator.c +++ b/src/iterator.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include "cdi.h" #include "dmemory.h" #include "iterator.h" diff --git a/src/iterator_fallback.c b/src/iterator_fallback.c index 4be6f2faf..92ac6c374 100644 --- a/src/iterator_fallback.c +++ b/src/iterator_fallback.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include "iterator_fallback.h" #include "cdi.h" diff --git a/src/julian_date.c b/src/julian_date.c index 4d2c709e9..18ddddbca 100644 --- a/src/julian_date.c +++ b/src/julian_date.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include "julian_date.h" #include <math.h> diff --git a/src/model.c b/src/model.c index bf28ce120..bd93b6eb7 100644 --- a/src/model.c +++ b/src/model.c @@ -1,5 +1,17 @@ -#include <stdlib.h> +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <limits.h> +#include <stdlib.h> #include "cdi.h" #include "cdi_int.h" diff --git a/src/pio_conf.c b/src/pio_conf.c index ac0e9ece6..9e1bf8ef4 100644 --- a/src/pio_conf.c +++ b/src/pio_conf.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <errno.h> #include <limits.h> #include <stdlib.h> diff --git a/src/referenceCounting.c b/src/referenceCounting.c index 2807b850c..3a9b76345 100644 --- a/src/referenceCounting.c +++ b/src/referenceCounting.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include "referenceCounting.h" #include "dmemory.h" diff --git a/src/resource_unpack.c b/src/resource_unpack.c index e1b3fe084..d0e25d08e 100644 --- a/src/resource_unpack.c +++ b/src/resource_unpack.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include "cdi.h" #include "dmemory.h" #include "grid.h" diff --git a/src/serialize.c b/src/serialize.c index e1a217085..e76a2d9fb 100644 --- a/src/serialize.c +++ b/src/serialize.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <inttypes.h> #include <limits.h> #include <string.h> diff --git a/src/servicelib.c b/src/servicelib.c index c14a44232..92324932e 100644 --- a/src/servicelib.c +++ b/src/servicelib.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <stdio.h> #include <stdlib.h> #include <stdarg.h> diff --git a/src/stream_scan.c b/src/stream_scan.c index 05f94a182..53f0a56e0 100644 --- a/src/stream_scan.c +++ b/src/stream_scan.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include "dmemory.h" #include "stream_scan.h" diff --git a/src/stream_var.c b/src/stream_var.c index 87fc77fb1..d8ecaff1a 100644 --- a/src/stream_var.c +++ b/src/stream_var.c @@ -1,3 +1,16 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + + #include "dmemory.h" #include "cdi.h" diff --git a/src/subtype.c b/src/subtype.c index 7361771da..d7a4ae8ec 100644 --- a/src/subtype.c +++ b/src/subtype.c @@ -29,6 +29,18 @@ /* . |--- atts [subtype_attr_t] */ /* . */ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include "cdi.h" #include "cdi_int.h" #include "dmemory.h" diff --git a/src/swap.c b/src/swap.c index 3abecb0a0..9c2a9d003 100644 --- a/src/swap.c +++ b/src/swap.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <inttypes.h> #include <stdio.h> diff --git a/src/table.c b/src/table.c index 538d96191..f978bb1dd 100644 --- a/src/table.c +++ b/src/table.c @@ -1,5 +1,17 @@ -#include <stdlib.h> +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <stddef.h> +#include <stdlib.h> #include <string.h> #include <ctype.h> diff --git a/src/taxis.c b/src/taxis.c index 9b013281b..5f2108b56 100644 --- a/src/taxis.c +++ b/src/taxis.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <stddef.h> #include <stdio.h> diff --git a/src/tsteps.c b/src/tsteps.c index e3d102a35..2fa2f916c 100644 --- a/src/tsteps.c +++ b/src/tsteps.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <limits.h> #include "cdi.h" diff --git a/src/vlist_var.c b/src/vlist_var.c index bce417e7f..6af05ca28 100644 --- a/src/vlist_var.c +++ b/src/vlist_var.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <float.h> /* FLT_MAX */ #include "dmemory.h" #include "cdi.h" diff --git a/src/vlist_var_pack.c b/src/vlist_var_pack.c index 5a877401d..b1e18a25a 100644 --- a/src/vlist_var_pack.c +++ b/src/vlist_var_pack.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include "dmemory.h" #include "cdi.h" #include "cdi_int.h" diff --git a/src/zaxis.c b/src/zaxis.c index 5f0a190e8..4d0e63844 100644 --- a/src/zaxis.c +++ b/src/zaxis.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <string.h> #include <math.h> #include <float.h> diff --git a/tests/calendar_test1.c b/tests/calendar_test1.c index 500a5c877..cd69b3a86 100644 --- a/tests/calendar_test1.c +++ b/tests/calendar_test1.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <stdio.h> #include <stdlib.h> diff --git a/tests/cksum_write_chunk.c b/tests/cksum_write_chunk.c index bd8628c19..44d1a5939 100644 --- a/tests/cksum_write_chunk.c +++ b/tests/cksum_write_chunk.c @@ -1,2 +1,14 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #define TEST_CHUNK_WRITE 1 #include "cksum_write.c" diff --git a/tests/test_byteswap.c b/tests/test_byteswap.c index c0d22436d..bf8c25638 100644 --- a/tests/test_byteswap.c +++ b/tests/test_byteswap.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <assert.h> #include <stdlib.h> diff --git a/tests/test_month_adjust.c b/tests/test_month_adjust.c index 739e81060..f50bbcb02 100644 --- a/tests/test_month_adjust.c +++ b/tests/test_month_adjust.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <stdio.h> #include <stdlib.h> #include <sys/time.h> diff --git a/tests/test_table.c b/tests/test_table.c index 71c6653e1..2b91a59a8 100644 --- a/tests/test_table.c +++ b/tests/test_table.c @@ -1,3 +1,15 @@ +/* DO NOT REMOVE the config.h include file under any circumstances, + * it's very much needed on some platforms */ +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif +/* DO NOT REMOVE the above config.h include file under any + * circumstances as long as it's the autoconf configuration header + * used to build this package. When it's missing on some platforms, + * some poor person has to do long, tedious debugging sessions, where + * struct offsets almost imperceptibly change from one file to the + * next to find out what happened */ + #include <assert.h> #include <stdlib.h> -- GitLab