]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
System #include overhaul
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Wed, 27 Sep 2023 21:49:57 +0000 (15:49 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Wed, 27 Sep 2023 23:24:42 +0000 (17:24 -0600)
Reorganize `#include <>`s in accordance with the IEEE Std 1003.1,
the Linux man pages (which do a pretty good job explaining portability
nuances), the documentation of the dependencies and some common sense.
(Since it seems some of this stuff is undefined.)

The algorithm still induces some unnecessary includes. (eg. the `NULL`
symbol induces `stddef.h`, `string.h`, `stdlib.h`, `stdio.h`, `unistd.h`
AND `locale.h`, because the standard states it should be defined in all
of them.) I don't think this is a problem for now; I'll optimize it
later.

237 files changed:
src/algorithm.c
src/alloc.c
src/alloc.h
src/as_number.h
src/asn1/asn1c/ANY.c
src/asn1/asn1c/ASId.c
src/asn1/asn1c/ASIdOrRange.c
src/asn1/asn1c/ASIdentifierChoice.c
src/asn1/asn1c/ASIdentifiers.c
src/asn1/asn1c/ASRange.c
src/asn1/asn1c/AlgorithmIdentifier.c
src/asn1/asn1c/AttributeType.c
src/asn1/asn1c/AttributeTypeAndValue.c
src/asn1/asn1c/AttributeValue.c
src/asn1/asn1c/BIT_STRING.c
src/asn1/asn1c/BIT_STRING_oer.c
src/asn1/asn1c/BinarySigningTime.c
src/asn1/asn1c/BinaryTime.c
src/asn1/asn1c/CMSAttribute.c
src/asn1/asn1c/CMSAttributeValue.c
src/asn1/asn1c/CMSSubjectKeyIdentifier.c
src/asn1/asn1c/CMSVersion.c
src/asn1/asn1c/CertificateList.c
src/asn1/asn1c/CertificateSerialNumber.c
src/asn1/asn1c/CertificateSet.c
src/asn1/asn1c/ContentInfo.c
src/asn1/asn1c/ContentType.c
src/asn1/asn1c/ContentTypePKCS7.c
src/asn1/asn1c/Countersignature.c
src/asn1/asn1c/DigestAlgorithmIdentifier.c
src/asn1/asn1c/DigestAlgorithmIdentifiers.c
src/asn1/asn1c/DistinguishedName.c
src/asn1/asn1c/EncapsulatedContentInfo.c
src/asn1/asn1c/EncapsulatedContentInfoPKCS7.c
src/asn1/asn1c/Extension.c
src/asn1/asn1c/Extensions.c
src/asn1/asn1c/FileAndHash.c
src/asn1/asn1c/GeneralizedTime.c
src/asn1/asn1c/GeneralizedTime.h
src/asn1/asn1c/IA5String.c
src/asn1/asn1c/INTEGER.c
src/asn1/asn1c/INTEGER_oer.c
src/asn1/asn1c/IPAddrBlocks.c
src/asn1/asn1c/IPAddress.c
src/asn1/asn1c/IPAddressChoice.c
src/asn1/asn1c/IPAddressFamily.c
src/asn1/asn1c/IPAddressOrRange.c
src/asn1/asn1c/IPAddressRange.c
src/asn1/asn1c/IssuerAndSerialNumber.c
src/asn1/asn1c/Manifest.c
src/asn1/asn1c/MessageDigest.c
src/asn1/asn1c/NULL.c
src/asn1/asn1c/Name.c
src/asn1/asn1c/OBJECT_IDENTIFIER.c
src/asn1/asn1c/OCTET_STRING.c
src/asn1/asn1c/OCTET_STRING_oer.c
src/asn1/asn1c/OPEN_TYPE.c
src/asn1/asn1c/OPEN_TYPE_oer.c
src/asn1/asn1c/OtherRevocationInfoFormat.c
src/asn1/asn1c/RDNSequence.c
src/asn1/asn1c/ROAIPAddress.c
src/asn1/asn1c/ROAIPAddressFamily.c
src/asn1/asn1c/RelativeDistinguishedName.c
src/asn1/asn1c/RevocationInfoChoice.c
src/asn1/asn1c/RevocationInfoChoices.c
src/asn1/asn1c/RouteOriginAttestation.c
src/asn1/asn1c/SignatureAlgorithmIdentifier.c
src/asn1/asn1c/SignatureValue.c
src/asn1/asn1c/SignedAttributes.c
src/asn1/asn1c/SignedData.c
src/asn1/asn1c/SignedDataPKCS7.c
src/asn1/asn1c/SignerIdentifier.c
src/asn1/asn1c/SignerInfo.c
src/asn1/asn1c/SignerInfos.c
src/asn1/asn1c/SigningTime.c
src/asn1/asn1c/TBSCertList.c
src/asn1/asn1c/Time.c
src/asn1/asn1c/UTCTime.c
src/asn1/asn1c/UTCTime.h
src/asn1/asn1c/UnsignedAttributes.c
src/asn1/asn1c/Version.c
src/asn1/asn1c/asn_SEQUENCE_OF.c
src/asn1/asn1c/asn_SET_OF.c
src/asn1/asn1c/asn_SET_OF.h
src/asn1/asn1c/asn_application.c
src/asn1/asn1c/asn_bit_data.c
src/asn1/asn1c/asn_bit_data.h
src/asn1/asn1c/asn_codecs.h
src/asn1/asn1c/asn_codecs_prim.c
src/asn1/asn1c/asn_internal.c
src/asn1/asn1c/asn_internal.h
src/asn1/asn1c/asn_random_fill.c
src/asn1/asn1c/asn_random_fill.h
src/asn1/asn1c/asn_system.h
src/asn1/asn1c/ber_decoder.c
src/asn1/asn1c/ber_tlv_length.c
src/asn1/asn1c/ber_tlv_length.h
src/asn1/asn1c/ber_tlv_tag.c
src/asn1/asn1c/ber_tlv_tag.h
src/asn1/asn1c/constr_CHOICE.c
src/asn1/asn1c/constr_CHOICE_oer.c
src/asn1/asn1c/constr_SEQUENCE.c
src/asn1/asn1c/constr_SEQUENCE_OF.c
src/asn1/asn1c/constr_SEQUENCE_oer.c
src/asn1/asn1c/constr_SET_OF.c
src/asn1/asn1c/constr_SET_OF_oer.c
src/asn1/asn1c/constr_TYPE.c
src/asn1/asn1c/constraints.c
src/asn1/asn1c/der_encoder.c
src/asn1/asn1c/oer_encoder.c
src/asn1/asn1c/oer_support.c
src/asn1/asn1c/per_decoder.c
src/asn1/asn1c/per_encoder.c
src/asn1/asn1c/per_opentype.c
src/asn1/asn1c/per_support.c
src/asn1/asn1c/xer_decoder.c
src/asn1/asn1c/xer_encoder.c
src/asn1/asn1c/xer_support.c
src/asn1/content_info.c
src/asn1/decode.c
src/asn1/decode.h
src/asn1/oid.c
src/asn1/oid.h
src/asn1/signed_data.c
src/asn1/signed_data.h
src/cache/local_cache.c
src/cache/local_cache.h
src/cache/tmp.c
src/cert_stack.c
src/cert_stack.h
src/certificate_refs.c
src/common.c
src/common.h
src/config.c
src/config.h
src/config/boolean.c
src/config/filename_format.c
src/config/incidences.c
src/config/log_conf.c
src/config/mode.c
src/config/output_format.c
src/config/str.c
src/config/string_array.c
src/config/string_array.h
src/config/types.h
src/config/uint.c
src/config/work_offline.c
src/crypto/base64.c
src/crypto/base64.h
src/crypto/hash.c
src/crypto/hash.h
src/daemon.c
src/data_structure/array_list.h
src/data_structure/common.h
src/data_structure/path_builder.c
src/data_structure/path_builder.h
src/data_structure/uthash.h
src/extension.c
src/extension.h
src/file.c
src/file.h
src/http/http.c
src/incidence/incidence.c
src/init.c
src/json_handler.c
src/json_parser.h
src/line_file.c
src/line_file.h
src/log.c
src/log.h
src/notify.c
src/object/bgpsec.h
src/object/certificate.c
src/object/certificate.h
src/object/crl.c
src/object/manifest.c
src/object/name.c
src/object/name.h
src/object/roa.c
src/object/signed_object.c
src/object/tal.c
src/object/tal.h
src/object/vcard.c
src/output_printer.c
src/resource.c
src/resource.h
src/resource/asn.c
src/resource/ip4.h
src/resource/ip6.c
src/resource/ip6.h
src/rpp.h
src/rrdp/rrdp_loader.c
src/rrdp/rrdp_objects.c
src/rrdp/rrdp_objects.h
src/rrdp/rrdp_parser.c
src/rrdp/rrdp_parser.h
src/rsync/rsync.c
src/rtr/db/db_table.c
src/rtr/db/delta.c
src/rtr/db/deltas_array.c
src/rtr/db/vrps.c
src/rtr/db/vrps.h
src/rtr/err_pdu.c
src/rtr/err_pdu.h
src/rtr/pdu.c
src/rtr/pdu.h
src/rtr/pdu_handler.c
src/rtr/pdu_sender.c
src/rtr/pdu_sender.h
src/rtr/pdu_serializer.c
src/rtr/primitive_reader.c
src/rtr/primitive_reader.h
src/rtr/primitive_writer.h
src/rtr/rtr.c
src/rtr/rtr.h
src/slurm/db_slurm.c
src/slurm/db_slurm.h
src/slurm/slurm_loader.c
src/slurm/slurm_parser.c
src/sorted_array.c
src/sorted_array.h
src/state.c
src/state.h
src/str_token.c
src/str_token.h
src/thread/thread_pool.c
src/thread_var.c
src/types/address.c
src/types/address.h
src/types/router_key.h
src/types/serial.h
src/types/uri.c
src/types/vrp.c
src/types/vrp.h
src/validation_handler.c
src/validation_run.c
src/xml/relax_ng.c

index 69f7aae4dad18c6d2fd5df94aca41dac804ad4e8..f5199bdb953c71dc52729cde5ff16c9a92e7329c 100644 (file)
@@ -1,6 +1,6 @@
 #include "algorithm.h"
 
-#include <stdbool.h>
+#include <openssl/asn1.h>
 #include <openssl/obj_mac.h>
 #include <openssl/objects.h>
 
index fab25372b8780daa226aac1320e929c976ddb493..84c8d834ca174e50fb992f7ef6d9c7e5c0910969 100644 (file)
@@ -1,6 +1,5 @@
 #include "alloc.h"
 
-#include <string.h>
 #include "log.h"
 
 void *
index c53ab304d0bb7f22f3251fe18ad5787fa3450ab6..0907905f3c5e7c815b3c4474a111eed7e6d7fe01 100644 (file)
@@ -1,7 +1,13 @@
 #ifndef SRC_ALLOC_H_
 #define SRC_ALLOC_H_
 
+#include <stddef.h>
+#include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 /* malloc(), but panic on allocation failure. */
 void *pmalloc(size_t size);
index 65af9220272a5d432a4dbebafd841495c105c92c..28aec481e3662607f78ff9c6d17679f1a4932781 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef SRC_AS_NUMBER_H_
 #define SRC_AS_NUMBER_H_
 
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <netinet/in.h>
 #include <stdint.h>
 
 struct asn_range {
index 83de12eaa4cea6018a7d67e0a0113ca51fb6b846..ba1bc3f517bbb46454513fbacc5df3fc60748c1a 100644 (file)
@@ -4,6 +4,7 @@
  */
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/ANY.h"
+#include <assert.h>
 #include <errno.h>
 
 asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs = {
@@ -274,4 +275,3 @@ ANY_encode_uper(const asn_TYPE_descriptor_t *td,
 }
 
 #endif /* ASN_DISABLE_PER_SUPPORT */
-
index 21a9ab22550a5a3ddf985102c372ce6ac6597713..d9ee1c1f6da9fe01259f7bd83d919b5f3041bc06 100644 (file)
@@ -28,4 +28,3 @@ asn_TYPE_descriptor_t asn_DEF_ASId = {
        0, 0,   /* No members */
        0       /* No specifics */
 };
-
index 1083c407009812367aa371033ae8144be9d9cee0..9b6076b070aab71365223b5dd3640dcd5f9c615a 100644 (file)
@@ -57,4 +57,3 @@ asn_TYPE_descriptor_t asn_DEF_ASIdOrRange = {
        2,      /* Elements count */
        &asn_SPC_ASIdOrRange_specs_1    /* Additional specs */
 };
-
index c5016da2e11af031b08b1bbe3463c8d4b1eb79a3..0603aad93813ab4b3f04dd426e039ed5e70653d7 100644 (file)
@@ -93,4 +93,3 @@ asn_TYPE_descriptor_t asn_DEF_ASIdentifierChoice = {
        2,      /* Elements count */
        &asn_SPC_ASIdentifierChoice_specs_1     /* Additional specs */
 };
-
index fb89b22380288b9a1710065d8b2c9cce7a95aa0b..06799fd4787b2d6840f71481f62666cacc0047bd 100644 (file)
@@ -59,4 +59,3 @@ asn_TYPE_descriptor_t asn_DEF_ASIdentifiers = {
        2,      /* Elements count */
        &asn_SPC_ASIdentifiers_specs_1  /* Additional specs */
 };
-
index 9a1063ee944c363b69408229c86c1abb7129a82a..3a14c2a49887eb3cc2d2f38698f98ba594cf4e3c 100644 (file)
@@ -57,4 +57,3 @@ asn_TYPE_descriptor_t asn_DEF_ASRange = {
        2,      /* Elements count */
        &asn_SPC_ASRange_specs_1        /* Additional specs */
 };
-
index 33e19d098ed0a1a2c55654c24b4220b6d6de8c1e..e3f1fd41b8b713e0e0c5a6b31ed197cc1d80796b 100644 (file)
@@ -58,4 +58,3 @@ asn_TYPE_descriptor_t asn_DEF_AlgorithmIdentifier = {
        2,      /* Elements count */
        &asn_SPC_AlgorithmIdentifier_specs_1    /* Additional specs */
 };
-
index d17a5c3a76fa186b6ab57a33dd96eea33c5861c5..16a68cfa41c4bb6fd8000c7ba0b165cfb1fd44d0 100644 (file)
@@ -28,4 +28,3 @@ asn_TYPE_descriptor_t asn_DEF_AttributeType = {
        0, 0,   /* No members */
        0       /* No specifics */
 };
-
index 113a31633d32f89a8fc8eadea600bbca0e1ad864..8000b3baad85a49da46a5ba09728cce24a35dd2a 100644 (file)
@@ -56,4 +56,3 @@ asn_TYPE_descriptor_t asn_DEF_AttributeTypeAndValue = {
        2,      /* Elements count */
        &asn_SPC_AttributeTypeAndValue_specs_1  /* Additional specs */
 };
-
index bcedb9690aa96954301f6ff0e745fc5129ee360d..a16615b76a12438181e51fb79a5a17e84b55188c 100644 (file)
@@ -23,4 +23,3 @@ asn_TYPE_descriptor_t asn_DEF_AttributeValue = {
        0, 0,   /* No members */
        &asn_SPC_ANY_specs      /* Additional specs */
 };
-
index 205268c7e5f6694dd1c703c96fd01f6fbaf9921e..4e0637cd0be6e63b19ecbe1f23410dbf07881bad 100644 (file)
@@ -2,6 +2,9 @@
  * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+
+#include <assert.h>
+
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/BIT_STRING.h"
 #include "asn1/asn1c/asn_internal.h"
index 8e6ac6a5776f744d50c274a894cec541ab310047..5767d33324b0eab04b6f13ae6ec12e565e85bd81 100644 (file)
@@ -7,7 +7,6 @@
 
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/BIT_STRING.h"
-#include <errno.h>
 
 asn_dec_rval_t
 BIT_STRING_decode_oer(const asn_codec_ctx_t *opt_codec_ctx,
index 4d960871cd8ff02ba92620d917e3fd519a91aa1e..821e81395f75c1aa927579fab0ee80d692aa4b74 100644 (file)
@@ -58,4 +58,3 @@ asn_TYPE_descriptor_t asn_DEF_BinarySigningTime = {
        0, 0,   /* No members */
        0       /* No specifics */
 };
-
index 0e5983d519d1ea7386296b7cd757d5e3dea98c5f..d79e99383e48c75304f296637af6af99a8179ffa 100644 (file)
@@ -58,4 +58,3 @@ asn_TYPE_descriptor_t asn_DEF_BinaryTime = {
        0, 0,   /* No members */
        0       /* No specifics */
 };
-
index 6b84bb09f11d34113729264e315c64ff0ba5b996..c72afd0f3aaf06abf5416dcf4b7483d56ff396ec 100644 (file)
@@ -93,4 +93,3 @@ asn_TYPE_descriptor_t asn_DEF_CMSAttribute = {
        2,      /* Elements count */
        &asn_SPC_CMSAttribute_specs_1   /* Additional specs */
 };
-
index f3d9bb9dc4364d2084ef31dc85fdb2c085094791..fb5db6e0de28fba705386987bfdd2dbb4dbed65c 100644 (file)
@@ -23,4 +23,3 @@ asn_TYPE_descriptor_t asn_DEF_CMSAttributeValue = {
        0, 0,   /* No members */
        &asn_SPC_ANY_specs      /* Additional specs */
 };
-
index 6a3d4c6462a8c78e840e7a47605b50b507967f6c..77355f0dbd712d46508516ad14459528c630633c 100644 (file)
@@ -28,4 +28,3 @@ asn_TYPE_descriptor_t asn_DEF_CMSSubjectKeyIdentifier = {
        0, 0,   /* No members */
        &asn_SPC_OCTET_STRING_specs     /* Additional specs */
 };
-
index 24292790ed3d1942c8fb38c88e4a5766a446b820..2122ac7639f4ed0ffeb73bd8846cf7a1308e511b 100644 (file)
@@ -28,4 +28,3 @@ asn_TYPE_descriptor_t asn_DEF_CMSVersion = {
        0, 0,   /* Defined elsewhere */
        0       /* No specifics */
 };
-
index eed479693c93bf0659bb220a5c3d254c64d867cf..f25a7fcf2cba1d76cceb0507d08d2c38bd2d709c 100644 (file)
@@ -67,4 +67,3 @@ asn_TYPE_descriptor_t asn_DEF_CertificateList = {
        3,      /* Elements count */
        &asn_SPC_CertificateList_specs_1        /* Additional specs */
 };
-
index 3a860b22949f2d2342d12b6acf61a2f6e6783ccd..e9c8428ad3211936b531f67fee8a1a34774d7f8d 100644 (file)
@@ -28,4 +28,3 @@ asn_TYPE_descriptor_t asn_DEF_CertificateSerialNumber = {
        0, 0,   /* No members */
        0       /* No specifics */
 };
-
index 64373205c53834b99b01432956a2fc8f57cbfbbd..92659187d40ebea84207f1cd2ff70b12c64b7d39 100644 (file)
@@ -41,4 +41,3 @@ asn_TYPE_descriptor_t asn_DEF_CertificateSet = {
        1,      /* Single element */
        &asn_SPC_CertificateSet_specs_1 /* Additional specs */
 };
-
index a244ec498bf4314d98e9ad29dd4ac7a67126c470..8216b1f54c02d81ed7c8e4198a1c51445cce90cc 100644 (file)
@@ -57,4 +57,3 @@ asn_TYPE_descriptor_t asn_DEF_ContentInfo = {
        2,      /* Elements count */
        &asn_SPC_ContentInfo_specs_1    /* Additional specs */
 };
-
index 5b3ef169f024bf4de2b9b804ba5418f926620516..37c24af99f7fd6ed1ac93ea8c598d2af561457ca 100644 (file)
@@ -28,4 +28,3 @@ asn_TYPE_descriptor_t asn_DEF_ContentType = {
        0, 0,   /* No members */
        0       /* No specifics */
 };
-
index 6d4067a94a50719e5eaf3ad8c7161feaa246d7fc..b38a687cd339a4326cbfcbb8026e48d9d02dab4a 100644 (file)
@@ -28,4 +28,3 @@ asn_TYPE_descriptor_t asn_DEF_ContentTypePKCS7 = {
        0, 0,   /* No members */
        &asn_SPC_OCTET_STRING_specs     /* Additional specs */
 };
-
index aeedbad41c1c84a4b3332b5e521e212ecdf344ba..8e9124edb05817d697ff0f8f3151f0d1fac337e8 100644 (file)
@@ -29,4 +29,3 @@ asn_TYPE_descriptor_t asn_DEF_Countersignature = {
        7,      /* Elements count */
        &asn_SPC_SignerInfo_specs_1     /* Additional specs */
 };
-
index b67d2f7ad74dab3725b3b46d6685605249b43113..0fe7f2bc949bbe224a6579c08f11ab1d5745aef2 100644 (file)
@@ -29,4 +29,3 @@ asn_TYPE_descriptor_t asn_DEF_DigestAlgorithmIdentifier = {
        2,      /* Elements count */
        &asn_SPC_AlgorithmIdentifier_specs_1    /* Additional specs */
 };
-
index 2e5625cf4ecd399ed75ed6b5ce84ca6426c0bbcd..ef4e770da34975b327397818ecb2e5471c61c99a 100644 (file)
@@ -41,4 +41,3 @@ asn_TYPE_descriptor_t asn_DEF_DigestAlgorithmIdentifiers = {
        1,      /* Single element */
        &asn_SPC_DigestAlgorithmIdentifiers_specs_1     /* Additional specs */
 };
-
index 71b493ea4b92e1d1f9fe7206798e782246f36576..f55032a6e6d0f05b0f6c5dab804a0fd92453dc71 100644 (file)
@@ -29,4 +29,3 @@ asn_TYPE_descriptor_t asn_DEF_DistinguishedName = {
        1,      /* Single element */
        &asn_SPC_RDNSequence_specs_1    /* Additional specs */
 };
-
index 51f7066fdf5e6cab5c14c7c669c0be42d7eb2e32..3f1169013fad45e71a515e81f17db1202db53bf2 100644 (file)
@@ -59,4 +59,3 @@ asn_TYPE_descriptor_t asn_DEF_EncapsulatedContentInfo = {
        2,      /* Elements count */
        &asn_SPC_EncapsulatedContentInfo_specs_1        /* Additional specs */
 };
-
index 8d1423e8b46329598f4ee7641bfdeea22d1a2807..d0294e8ed94999580c28e08cd3cf565b4b160f34 100644 (file)
@@ -59,4 +59,3 @@ asn_TYPE_descriptor_t asn_DEF_EncapsulatedContentInfoPKCS7 = {
        2,      /* Elements count */
        &asn_SPC_EncapsulatedContentInfoPKCS7_specs_1   /* Additional specs */
 };
-
index 9e9876118150c03617533446976b51be9a67bdf5..4d448cba21e80d65804a67c3eb50d1d02fbeb5a0 100644 (file)
@@ -92,4 +92,3 @@ asn_TYPE_descriptor_t asn_DEF_Extension = {
        3,      /* Elements count */
        &asn_SPC_Extension_specs_1      /* Additional specs */
 };
-
index 0c09f279f5ce4e14156b91114e27fc30f47f3f9d..751a645fa7ad993f62e7bae8ff494cd12e3947fd 100644 (file)
@@ -44,4 +44,3 @@ asn_TYPE_descriptor_t asn_DEF_Extensions = {
        1,      /* Single element */
        &asn_SPC_Extensions_specs_1     /* Additional specs */
 };
-
index 05185d65977037bcc22093100c64dccc42931605..4ee1ce8c3960e2f447caceda3d3d80b6ee674b27 100644 (file)
@@ -57,4 +57,3 @@ asn_TYPE_descriptor_t asn_DEF_FileAndHash = {
        2,      /* Elements count */
        &asn_SPC_FileAndHash_specs_1    /* Additional specs */
 };
-
index a7fedc39bccc810972d377ad7116f5bfd8d863df..1ce990a4cc8d946d9a524b1ae85a710c4302deb1 100644 (file)
@@ -14,8 +14,7 @@
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/GeneralizedTime.h"
 
-#include <time.h>
-#include <stdio.h>
+#include <assert.h>
 #include <errno.h>
 
 #if    defined(sun) || defined(__sun) || defined(__solaris__)
@@ -83,7 +82,6 @@
 
 #ifndef HAVE_TIMEGM
 #ifdef _EMULATE_TIMEGM
-#include <stdlib.h>
 static time_t timegm(struct tm *tm) {
        time_t tloc;
        ATZVARS;
@@ -764,4 +762,3 @@ GeneralizedTime_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
     }
 
 }
-
index 990b117b372bfdb0edd1dc43a182be21b553ac96..471f2830a8011c3a4860401972b85defc1e73320 100644 (file)
@@ -6,6 +6,8 @@
 #define        _GeneralizedTime_H_
 
 #include "asn1/asn1c/OCTET_STRING.h"
+#include <sys/stat.h>
+#include <time.h>
 
 #ifdef __cplusplus
 extern "C" {
index 6cecf82760862586cc8f96658d5c4dcdc48c6786..e2fa2f4308f5208d11d43c3af81e6f1365be7fa5 100644 (file)
@@ -90,4 +90,3 @@ IA5String_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
 
        return 0;
 }
-
index 3ac4efc10251baeed881aababe0d8bb589a58df1..1922e30765d2c3a597ec534d71cce903932e9ece 100644 (file)
@@ -6,6 +6,7 @@
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/INTEGER.h"
 #include "asn1/asn1c/asn_codecs_prim.h"        /* Encoder and decoder of a primitive type */
+#include <assert.h>
 #include <errno.h>
 
 /*
index 1d792a0223689b9441663905c58f1f969b4be926..e04665638d14149106a04766e83167ed3182a83a 100644 (file)
@@ -7,7 +7,6 @@
 
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/INTEGER.h"
-#include <errno.h>
 
 asn_dec_rval_t
 INTEGER_decode_oer(const asn_codec_ctx_t *opt_codec_ctx,
index aa7b09550ce121b6048b6f23db746faea335d1c7..4920331ae25fcb9049b0d4745dbcbc662753cf0f 100644 (file)
@@ -41,4 +41,3 @@ asn_TYPE_descriptor_t asn_DEF_IPAddrBlocks = {
        1,      /* Single element */
        &asn_SPC_IPAddrBlocks_specs_1   /* Additional specs */
 };
-
index 5e66e0d4591aa3e7f2e46dba2e79d426045bce63..26e350653a5e9ccc9a48862bf870caaf9d626945 100644 (file)
@@ -28,4 +28,3 @@ asn_TYPE_descriptor_t asn_DEF_IPAddress = {
        0, 0,   /* No members */
        &asn_SPC_BIT_STRING_specs       /* Additional specs */
 };
-
index 581a598a3f00fb766dc316a0eeb36950936f8701..67283e3c669efc4f9f2de401f8b87874722fee83 100644 (file)
@@ -93,4 +93,3 @@ asn_TYPE_descriptor_t asn_DEF_IPAddressChoice = {
        2,      /* Elements count */
        &asn_SPC_IPAddressChoice_specs_1        /* Additional specs */
 };
-
index adacc6dbf946e4063704ccf2b26495aca04019bc..c85c9cb5a8d6a1339d2d85d522f601d34198fa8e 100644 (file)
@@ -87,4 +87,3 @@ asn_TYPE_descriptor_t asn_DEF_IPAddressFamily = {
        2,      /* Elements count */
        &asn_SPC_IPAddressFamily_specs_1        /* Additional specs */
 };
-
index 98ba69b779e8870e9b9fa768be80b109447e7ead..4ae006128a8a21e2c0d42f7a9d186f1d51d9bb53 100644 (file)
@@ -57,4 +57,3 @@ asn_TYPE_descriptor_t asn_DEF_IPAddressOrRange = {
        2,      /* Elements count */
        &asn_SPC_IPAddressOrRange_specs_1       /* Additional specs */
 };
-
index 82d3b8ff7800400202e66404eecfb2fc62a80d6c..97d776cc927e7128c8c4c8037dc9ce9014c452eb 100644 (file)
@@ -57,4 +57,3 @@ asn_TYPE_descriptor_t asn_DEF_IPAddressRange = {
        2,      /* Elements count */
        &asn_SPC_IPAddressRange_specs_1 /* Additional specs */
 };
-
index 5cfb0d5acde445f3fb6eec19751693b81a98564e..6850278ff0e3c268bfcb2e8d6ff7c20e6b8f676c 100644 (file)
@@ -57,4 +57,3 @@ asn_TYPE_descriptor_t asn_DEF_IssuerAndSerialNumber = {
        2,      /* Elements count */
        &asn_SPC_IssuerAndSerialNumber_specs_1  /* Additional specs */
 };
-
index 80a6885f8f2464058b91c5c39ace756cdbfe4546..be63c3466d199eadc6a805993a9b480022fbe6c8 100644 (file)
@@ -215,4 +215,3 @@ asn_TYPE_descriptor_t asn_DEF_Manifest = {
        6,      /* Elements count */
        &asn_SPC_Manifest_specs_1       /* Additional specs */
 };
-
index 29b39e76c6baa8bf391692587334e6dda6814eb7..0794b84aec9098c417abd210076b2291743abd46 100644 (file)
@@ -28,4 +28,3 @@ asn_TYPE_descriptor_t asn_DEF_MessageDigest = {
        0, 0,   /* No members */
        &asn_SPC_OCTET_STRING_specs     /* Additional specs */
 };
-
index 80ed7231fc66089e3eb3db374dd07b9283e40a92..1aa7bb289d4dc3ddf602deb114b62e2b1bdcd9dd 100644 (file)
@@ -305,4 +305,3 @@ NULL_random_fill(const asn_TYPE_descriptor_t *td, void **sptr,
 
     return result_ok;
 }
-
index 19906fc472204b5867228c8bf80f3344714175b7..e8525d8faa8209b3473874d24ae9b30f647908a4 100644 (file)
@@ -47,4 +47,3 @@ asn_TYPE_descriptor_t asn_DEF_Name = {
        1,      /* Elements count */
        &asn_SPC_Name_specs_1   /* Additional specs */
 };
-
index eb49be3932317f84b78984d28e697d914402620b..1958ee1ed0e96547b96346cc555c835b412d12dc 100644 (file)
@@ -6,7 +6,7 @@
 #include "asn1/asn1c/INTEGER.h"
 #include "asn1/asn1c/OBJECT_IDENTIFIER.h"
 #include "asn1/asn1c/OCTET_STRING.h"
-#include <limits.h>    /* for CHAR_BIT */
+#include <assert.h>
 #include <errno.h>
 
 /*
index eedc420e4bb216e649211becdae99496ba32038d..ffbf40b53cf40725f73e8d59e9d2140f8a1e03cd 100644 (file)
@@ -6,6 +6,7 @@
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/OCTET_STRING.h"
 #include "asn1/asn1c/BIT_STRING.h"     /* for .bits_unused member */
+#include <assert.h>
 #include <errno.h>
 
 /*
index 3aca34d56988e18cfcbe57ea9edced6be64bc11d..7f917c909270f680d917abc6f32dd6a43ad7c3df 100644 (file)
@@ -7,7 +7,6 @@
 
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/OCTET_STRING.h"
-#include <errno.h>
 
 asn_dec_rval_t
 OCTET_STRING_decode_oer(const asn_codec_ctx_t *opt_codec_ctx,
index 3b4e14b2d0760834654d294c519d21be7c40ecb1..7dbe835151064e5df7445fde15e182b91bc581a9 100644 (file)
@@ -6,7 +6,7 @@
 #include "asn1/asn1c/OPEN_TYPE.h"
 #include "asn1/asn1c/constr_CHOICE.h"
 #include "asn1/asn1c/per_opentype.h"
-#include <errno.h>
+#include <assert.h>
 
 asn_TYPE_operation_t asn_OP_OPEN_TYPE = {
        OPEN_TYPE_free,
index c860144cfd6b275ac85c7086204f3bbb5971b135..3d6deb86d6a6314b4d1400ca48f5dde053c0e413 100644 (file)
@@ -5,7 +5,6 @@
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/OPEN_TYPE.h"
 #include "asn1/asn1c/constr_CHOICE.h"
-#include <errno.h>
 
 asn_dec_rval_t
 OPEN_TYPE_oer_get(const asn_codec_ctx_t *opt_codec_ctx,
index 4c5301cee9648a53fe5be0866abcf22c7258b0a3..93de37e8ab43e5c1b555df0626a75d4f9631e644 100644 (file)
@@ -56,4 +56,3 @@ asn_TYPE_descriptor_t asn_DEF_OtherRevocationInfoFormat = {
        2,      /* Elements count */
        &asn_SPC_OtherRevocationInfoFormat_specs_1      /* Additional specs */
 };
-
index ad2ad4451597fd47f305f11ea0cbdee4dc6c5bcc..d514140014b60216819b49393b97ee9e2696450e 100644 (file)
@@ -41,4 +41,3 @@ asn_TYPE_descriptor_t asn_DEF_RDNSequence = {
        1,      /* Single element */
        &asn_SPC_RDNSequence_specs_1    /* Additional specs */
 };
-
index 6500d56c729f897a21ac5484fea6cc39d8e8158c..55ba20a409cd0415b9eac7934af4536954b4e739 100644 (file)
@@ -59,4 +59,3 @@ asn_TYPE_descriptor_t asn_DEF_ROAIPAddress = {
        2,      /* Elements count */
        &asn_SPC_ROAIPAddress_specs_1   /* Additional specs */
 };
-
index 697f2eb3cdb623c6cb2fd4b08a3aa27c8103215c..43f3a5758bc4798f956e0e41a6bbb595383e7610 100644 (file)
@@ -154,4 +154,3 @@ asn_TYPE_descriptor_t asn_DEF_ROAIPAddressFamily = {
        2,      /* Elements count */
        &asn_SPC_ROAIPAddressFamily_specs_1     /* Additional specs */
 };
-
index 4cf2bdc7a2cd26dbe1728e9d4df88c802e7516e3..14fb68ceae487b19e2d1fb6f355620e430d7c816 100644 (file)
@@ -44,4 +44,3 @@ asn_TYPE_descriptor_t asn_DEF_RelativeDistinguishedName = {
        1,      /* Single element */
        &asn_SPC_RelativeDistinguishedName_specs_1      /* Additional specs */
 };
-
index 6e0f9e6798277551f352ab098335226b609ab109..163289be75348b4050492464506b11203d6b5e46 100644 (file)
@@ -57,4 +57,3 @@ asn_TYPE_descriptor_t asn_DEF_RevocationInfoChoice = {
        2,      /* Elements count */
        &asn_SPC_RevocationInfoChoice_specs_1   /* Additional specs */
 };
-
index 2df9beb628ed70220fe2bacd3725e09436d17b23..69a33e4931d0e942eb7fe555685b69277e956ef2 100644 (file)
@@ -41,4 +41,3 @@ asn_TYPE_descriptor_t asn_DEF_RevocationInfoChoices = {
        1,      /* Single element */
        &asn_SPC_RevocationInfoChoices_specs_1  /* Additional specs */
 };
-
index 04ff4b273aadeeba38057f778a803afa6700b07c..373611555ae4be47a8c50d425bff5d29648ee1b6 100644 (file)
@@ -162,4 +162,3 @@ asn_TYPE_descriptor_t asn_DEF_RouteOriginAttestation = {
        3,      /* Elements count */
        &asn_SPC_RouteOriginAttestation_specs_1 /* Additional specs */
 };
-
index 5eca1e7fb8295593ab1ba8523203c1ad1cb9439d..98ef6351474cfb1e3ebc3a28c8fa7a4dee22f96d 100644 (file)
@@ -29,4 +29,3 @@ asn_TYPE_descriptor_t asn_DEF_SignatureAlgorithmIdentifier = {
        2,      /* Elements count */
        &asn_SPC_AlgorithmIdentifier_specs_1    /* Additional specs */
 };
-
index 654cbb951d8c61554b0d29e785a8f788aba3b430..e96ef7418182de841e3652fb6924867e04462ae1 100644 (file)
@@ -28,4 +28,3 @@ asn_TYPE_descriptor_t asn_DEF_SignatureValue = {
        0, 0,   /* No members */
        &asn_SPC_OCTET_STRING_specs     /* Additional specs */
 };
-
index 06514d3b39caf8aae8aa04821f3b81680a7950b6..2a9ff2b664ac63418e98c04ee022bab095266bba 100644 (file)
@@ -44,4 +44,3 @@ asn_TYPE_descriptor_t asn_DEF_SignedAttributes = {
        1,      /* Single element */
        &asn_SPC_SignedAttributes_specs_1       /* Additional specs */
 };
-
index ca1f1f804e3bc65186ee68e05b440792f8b80a92..17be176a046058d7e377c8283ac34ec3c6c00bba 100644 (file)
@@ -99,4 +99,3 @@ asn_TYPE_descriptor_t asn_DEF_SignedData = {
        6,      /* Elements count */
        &asn_SPC_SignedData_specs_1     /* Additional specs */
 };
-
index 79d59bdcd5edd3f2ed6cdbe65c741b0cd9dc9bf0..e642b46c5f03ae5ad1c3aa7148b7f718069fcc48 100644 (file)
@@ -99,4 +99,3 @@ asn_TYPE_descriptor_t asn_DEF_SignedDataPKCS7 = {
        6,      /* Elements count */
        &asn_SPC_SignedDataPKCS7_specs_1        /* Additional specs */
 };
-
index 9f014fceef230fc007eb678617c3ab8d2f0ef5d1..24a41ea1a2b5744ec0465d4383002e7b299efb98 100644 (file)
@@ -57,4 +57,3 @@ asn_TYPE_descriptor_t asn_DEF_SignerIdentifier = {
        2,      /* Elements count */
        &asn_SPC_SignerIdentifier_specs_1       /* Additional specs */
 };
-
index ac2c6637a68fe65c50a66aa9871a6df07641f8ad..621246f77013353dff121f649cd6ba2b604e5c70 100644 (file)
@@ -110,4 +110,3 @@ asn_TYPE_descriptor_t asn_DEF_SignerInfo = {
        7,      /* Elements count */
        &asn_SPC_SignerInfo_specs_1     /* Additional specs */
 };
-
index 68a085510cc6020b59001dfb13cdd347def029a7..deb7284f379987583cec63e5f267a841f24a2803 100644 (file)
@@ -41,4 +41,3 @@ asn_TYPE_descriptor_t asn_DEF_SignerInfos = {
        1,      /* Single element */
        &asn_SPC_SignerInfos_specs_1    /* Additional specs */
 };
-
index 7e69e7c35c1a9a778da757ae2211e80d0087105b..d7adb8e88525246061bc3b0a5cf2b36b076408d3 100644 (file)
@@ -27,4 +27,3 @@ asn_TYPE_descriptor_t asn_DEF_SigningTime = {
        2,      /* Elements count */
        &asn_SPC_Time_specs_1   /* Additional specs */
 };
-
index 4f0476bcb9dd537b2a374faf9d371f3bd38e5b8f..4bbccd155365922da3027e5066525760c5d11775 100644 (file)
@@ -212,4 +212,3 @@ asn_TYPE_descriptor_t asn_DEF_TBSCertList = {
        7,      /* Elements count */
        &asn_SPC_TBSCertList_specs_1    /* Additional specs */
 };
-
index f805b5d313a898023ad5fe79c2a6cab87cb85d58..a6990b750ef77a30dfc96933977c4a18f512aa49 100644 (file)
@@ -57,4 +57,3 @@ asn_TYPE_descriptor_t asn_DEF_Time = {
        2,      /* Elements count */
        &asn_SPC_Time_specs_1   /* Additional specs */
 };
-
index 77d17912d5c4a2f247a6e4717c0224f1ef390eb2..8df18a0a939ec1fba87bfd531fc7c8dd8dd658b6 100644 (file)
@@ -6,8 +6,8 @@
 #include "asn1/asn1c/UTCTime.h"
 #include "asn1/asn1c/GeneralizedTime.h"
 
+#include <assert.h>
 #include <errno.h>
-#include <time.h>
 
 #ifndef        ASN___INTERNAL_TEST_MODE
 
@@ -266,4 +266,3 @@ UTCTime_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
         return 1;
     }
 }
-
index eb9f61e08e8c6183e0c6d548a68cd83b76c7d4bb..04ba958be26c0754e16cccde59c5c189a75a682d 100644 (file)
@@ -6,6 +6,8 @@
 #define        _UTCTime_H_
 
 #include "asn1/asn1c/OCTET_STRING.h"
+#include <sys/stat.h>
+#include <time.h>
 
 #ifdef __cplusplus
 extern "C" {
index f5a122037f65f0c18504c448b414537663a544a2..19428fa4ed2cb858d0a940b42c21bc2d70991aaa 100644 (file)
@@ -44,4 +44,3 @@ asn_TYPE_descriptor_t asn_DEF_UnsignedAttributes = {
        1,      /* Single element */
        &asn_SPC_UnsignedAttributes_specs_1     /* Additional specs */
 };
-
index 0a708afac7a76da718f41570bee510064f65c40d..61a608396ae47ea16606080fe708e74048961a43 100644 (file)
@@ -28,4 +28,3 @@ asn_TYPE_descriptor_t asn_DEF_Version = {
        0, 0,   /* Defined elsewhere */
        0       /* No specifics */
 };
-
index c0962997f3aac03b381adad5d2f18b7674eb807c..ef80a0234ba5a5028d2b2f3a0621825de1a6ad4b 100644 (file)
@@ -38,4 +38,3 @@ asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free) {
                if(ptr) as->free(ptr);
        }
 }
-
index d37d3108cf475c9abacc28c61d0827799696b3b1..fcf2ce95e70cf41c65e927c62d224f3c3f61aa15 100644 (file)
@@ -85,4 +85,3 @@ asn_set_empty(void *asn_set_of_x) {
        }
 
 }
-
index 882e1a47d4ad0b8cdfd359be63b8f577d158cd43..b51ad586bb35c0dc7f65b047d95edf360ef1b639 100644 (file)
@@ -4,6 +4,7 @@
  */
 #ifndef        ASN_SET_OF_H
 #define        ASN_SET_OF_H
+#include <stdlib.h>
 
 #ifdef __cplusplus
 #define A_SET_OF(type)                   \
index a15696ad2ad0ef147d8cc11574bb74976ad81e68..562f87b8e8742facb61dca832f70102b41b7e563 100644 (file)
@@ -4,6 +4,7 @@
  */
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/asn_application.h"
+#include <assert.h>
 #include <errno.h>
 
 static asn_enc_rval_t asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
@@ -437,4 +438,3 @@ asn_decode(const asn_codec_ctx_t *opt_codec_ctx,
         return xer_decode(opt_codec_ctx, td, sptr, buffer, size);
     }
 }
-
index 234c00075b87d2c07168389f46f034feb9ec12a6..85602f4f915078b98230d1923046f4bba9d215b1 100644 (file)
@@ -3,6 +3,9 @@
  * All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+
+#include <assert.h>
+
 #include "asn1/asn1c/asn_system.h"
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/asn_bit_data.h"
@@ -330,4 +333,3 @@ asn_put_aligned_flush(asn_bit_outp_t *po) {
         return 0;
     }
 }
-
index 45bdc99cd464b3a1c804d2a9fca9376e25664031..54b58077be0aa8895402691678859bb10ac4c5d1 100644 (file)
@@ -6,6 +6,8 @@
 #define        ASN_BIT_DATA
 
 #include "asn1/asn1c/asn_system.h"             /* Platform-specific types */
+#include <netdb.h>
+#include <stdint.h>
 
 #ifdef __cplusplus
 extern "C" {
index e75c2709cd956507df15791c7b602996fbced9a8..c2fbfe93fe121d91b469e709840bd35ea92f85d6 100644 (file)
@@ -5,6 +5,14 @@
 #ifndef        ASN_CODECS_H
 #define        ASN_CODECS_H
 
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index c8df910cfb0bba2f507c91189f8de0ed309a1cca..44714621185833c46675cab0016f3e07a10d7191 100644 (file)
@@ -4,7 +4,7 @@
  */
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/asn_codecs_prim.h"
-#include <errno.h>
+#include <assert.h>
 
 /*
  * Decode an always-primitive type.
@@ -314,4 +314,3 @@ xer_decode_primitive(const asn_codec_ctx_t *opt_codec_ctx,
        }
        return rc;
 }
-
index 3ffdffba571fd7bd5601ea72694602c78544724c..771ce94601704e4884f59a83511af68153abae10 100644 (file)
@@ -1,5 +1,7 @@
 #include "asn1/asn1c/asn_internal.h"
 
+#include <stdarg.h>
+
 ssize_t
 asn__format_to_callback(int (*cb)(const void *, size_t, void *key), void *key,
                         const char *fmt, ...) {
@@ -44,4 +46,3 @@ asn__format_to_callback(int (*cb)(const void *, size_t, void *key), void *key,
 
     return wrote;
 }
-
index e6bb4ee394c35b033fb27567d6404b1cadf63327..198d7238e018f1cfd05b8dc3be6debbf4fb135d9 100644 (file)
 #endif
 #include "asn1/asn1c/asn_application.h"        /* Application-visible API */
 
-#ifndef        __NO_ASSERT_H__         /* Include assert.h only for internal use. */
-#include <assert.h>            /* for assert() macro */
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index 955a029f024bed4d1378410550a904c67c95f0e3..3323641b66445819593eb565105aa1af8900c374 100644 (file)
@@ -3,6 +3,9 @@
  * All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+
+#include <assert.h>
+
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/asn_random_fill.h"
 #include "asn1/asn1c/constr_TYPE.h"
index 47f9b8af01560d91d29a774571355c424bcb20dc..0c80c4f64e3949cea7a32a5991266db5479f00e0 100644 (file)
@@ -5,6 +5,14 @@
 #ifndef        ASN_RANDOM_FILL
 #define        ASN_RANDOM_FILL
 
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 /* Forward declarations */
 struct asn_TYPE_descriptor_s;
 struct asn_encoding_constraints_s;
index a23ad8b68a4e377af618be702421812ea0cf4071..32c786e01a1d413926472ab39788b458e081e6a2 100644 (file)
@@ -8,10 +8,6 @@
 #ifndef        ASN_SYSTEM_H
 #define        ASN_SYSTEM_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #ifndef _DEFAULT_SOURCE
 #define _DEFAULT_SOURCE 1
 #endif
 #define _BSD_SOURCE /* for snprintf() on some linux systems  */
 #endif
 
-#include <stdio.h>     /* For snprintf(3) */
-#include <stdlib.h>    /* For *alloc(3) */
-#include <string.h>    /* For memcpy(3) */
-#include <sys/types.h> /* For size_t */
-#include <limits.h>    /* For LONG_MAX */
-#include <stdarg.h>    /* For va_start */
-#include <stddef.h>    /* for offsetof and ptrdiff_t */
-
-#if defined(__vxworks)
-#include <types/vxTypes.h>
-#else  /* !defined(__vxworks) */
+#include <arpa/inet.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <netinet/in.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
 
-#include <inttypes.h>  /* C99 specifies this file */
-#include <netinet/in.h> /* for ntohl() */
 #define        sys_ntohl(foo)  ntohl(foo)
-#endif /* defined(__vxworks) */
 
 #if    __GNUC__ >= 3 || defined(__clang__)
 #define CC_ATTRIBUTE(attr)    __attribute__((attr))
index 6cbcb8a3dcd09106597faf247ffe9204d616bb8f..a3d2797f5d6463bad4998107e8def4d011dae4e6 100644 (file)
@@ -2,6 +2,9 @@
  * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+
+#include <assert.h>
+
 #include "asn1/asn1c/asn_internal.h"
 
 #undef ADVANCE
index 75c53f09b832486d8dab61b33631f433ffb026bb..1e9d58d0eba7ee06e8c859ca2368963e0a15c296 100644 (file)
@@ -165,4 +165,3 @@ der_tlv_length_serialize(ber_tlv_len_t len, void *bufp, size_t size) {
 
        return required_size + 1;
 }
-
index d1e4d48dd73fecb6d5d1b3cfe5529df7e2975363..c8d2b4be43717503f78a47fa08d631768b7b6352 100644 (file)
@@ -5,6 +5,14 @@
 #ifndef        _BER_TLV_LENGTH_H_
 #define        _BER_TLV_LENGTH_H_
 
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index 1d000586d84ca30272e781d78288a90a261cd648..912ef1c83ba5b064aa029fc6705045ec2c27211e 100644 (file)
@@ -141,4 +141,3 @@ ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufp, size_t size) {
 
        return required_size + 1;
 }
-
index ce227add6d1918cbf6dbd5edbbb1ab6eb49b027d..89084cf25bffe60ac1868f6394a799ce780ca072 100644 (file)
@@ -5,6 +5,16 @@
 #ifndef        _BER_TLV_TAG_H_
 #define        _BER_TLV_TAG_H_
 
+#include <netinet/in.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index 3e9edea95193670adcd6d3eea5f0e36fd384c84d..60efb780ef95aaa023e02e385c635bfff455bffa 100644 (file)
@@ -2,6 +2,9 @@
  * Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+
+#include <assert.h>
+
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/constr_CHOICE.h"
 #include "asn1/asn1c/per_opentype.h"
index 6858ac12a42a47867cdae1d08b5aad5cb0084ccf..0b7bea90f055e72a3ea6ccfd2946c7ac41de0e47 100644 (file)
@@ -7,7 +7,6 @@
 
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/constr_CHOICE.h"
-#include <errno.h>
 
 /*
  * Return a standardized complex structure.
index 4a95dbce155a9eb5e6c44b0d00771e6aa3a9607c..73bfd8cceb37fc8075d4f19fb29529c18ea54384 100644 (file)
@@ -3,6 +3,9 @@
  * All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+
+#include <assert.h>
+
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
 #include "asn1/asn1c/OPEN_TYPE.h"
@@ -1623,4 +1626,3 @@ SEQUENCE_random_fill(const asn_TYPE_descriptor_t *td, void **sptr,
 
     return result_ok;
 }
-
index f827150744107f3de0896424e524aa9b3cda86ab..99e178c888960f0d176b15cbd3c7727e25a0fd10 100644 (file)
@@ -281,4 +281,3 @@ asn_TYPE_operation_t asn_OP_SEQUENCE_OF = {
        SEQUENCE_OF_random_fill,
        0       /* Use generic outmost tag fetcher */
 };
-
index 4e2e22c836e7176b921806eb072dc906c4556f90..a2327bdec2b697356ac84d21a4e2c7fdd0f0bad7 100644 (file)
@@ -8,7 +8,7 @@
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
 #include "asn1/asn1c/OPEN_TYPE.h"
-#include <errno.h>
+#include <assert.h>
 
 /*
  * This macro "eats" the part of the buffer which is definitely "consumed",
index bac3a351715d647017445306f22402960e4ef912..b996c7bdab719b25dce7bf392582ffe69f3057d6 100644 (file)
@@ -3,6 +3,9 @@
  * All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+
+#include <assert.h>
+
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/constr_SET_OF.h"
 #include "asn1/asn1c/asn_SET_OF.h"
@@ -1345,4 +1348,3 @@ SET_OF_random_fill(const asn_TYPE_descriptor_t *td, void **sptr,
 
     return res_ok;
 }
-
index eb84a9609849f3f99d476549436d472df8ffd025..98c2ae166dccf789e22ff20a9819c7a4424df518 100644 (file)
@@ -8,7 +8,7 @@
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/constr_SET_OF.h"
 #include "asn1/asn1c/asn_SET_OF.h"
-#include <errno.h>
+#include <assert.h>
 
 /*
  * This macro "eats" the part of the buffer which is definitely "consumed",
index aac70b5ba20f9dc441a0b26c32cdb48493d72fd8..eb3fd9df0b625cef8162ff80cd2f74811409cc09 100644 (file)
@@ -5,6 +5,7 @@
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/constr_TYPE.h"
 #include <errno.h>
+#include <stdarg.h>
 
 /*
  * Version of the ASN.1 infrastructure shipped with compiler.
index d152a3595df23865bac69b23507a6b2995685709..3cfbe94c646eb01af20d5b6f574ba1de63681f0f 100644 (file)
@@ -1,5 +1,6 @@
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/constraints.h"
+#include <stdarg.h>
 
 int
 asn_generic_no_constraint(const asn_TYPE_descriptor_t *type_descriptor,
@@ -90,4 +91,3 @@ asn_check_constraints(const asn_TYPE_descriptor_t *type_descriptor,
 
     return ret;
 }
-
index bbef4e315ba9fb7db05db58a1b0acd3ae6fbbac9..d0db21ed06239b8ec13fee2f81513a6acc7bd67f 100644 (file)
@@ -3,7 +3,7 @@
  * Redistribution and modifications are permitted subject to BSD license.
  */
 #include "asn1/asn1c/asn_internal.h"
-#include <errno.h>
+#include <assert.h>
 
 static ssize_t der_write_TL(ber_tlv_tag_t tag, ber_tlv_len_t len,
        asn_app_consume_bytes_f *cb, void *app_key, int constructed);
index ef742becaef9f1c418fa1a740dd8f120109547ef..a157450b528c7a8696e6fdbcf0038c4cae929809 100644 (file)
@@ -2,6 +2,9 @@
  * Copyright (c) 2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+
+#include <assert.h>
+
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/asn_codecs_prim.h"
 
@@ -138,4 +141,3 @@ oer_open_type_put(const asn_TYPE_descriptor_t *td,
 
     return len_len + er.encoded;
 }
-
index 10e276c68617fc9bb2717f26fa8cb1104149b1ca..4e05d1f3bf9cd16ad81c1f194f77b87797cfd6bd 100644 (file)
@@ -3,6 +3,9 @@
  * All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+
+#include <assert.h>
+
 #include "asn1/asn1c/asn_system.h"
 #include "asn1/asn1c/asn_internal.h"
 
@@ -119,4 +122,3 @@ oer_serialize_length(size_t length, asn_app_consume_bytes_f *cb,
 
     return sp - scratch;
 }
-
index 15492f5ae1c9df9d7c9ebe3b034ad4dcde45e910..5099a40cff7a1aa7ec595b38c76727c06a77fcf7 100644 (file)
@@ -1,3 +1,5 @@
+#include <assert.h>
+
 #include "asn1/asn1c/asn_application.h"
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/per_decoder.h"
@@ -94,4 +96,3 @@ uper_decode(const asn_codec_ctx_t *opt_codec_ctx,
        }
        return rval;
 }
-
index 8f9fe1cfa22f3fc8fa5e04f964b49ab31b754982..8e061e13956c2921a8b715c4b98a4467d4e01ff7 100644 (file)
@@ -162,4 +162,3 @@ _uper_encode_flush_outp(asn_per_outp_t *po) {
 
        return po->output(po->tmpspace, buf - po->tmpspace, po->op_key);
 }
-
index 8d509fdbf9c23334d07f7825e7f1db170c1f9891..49b1e8de59a9f271f257e456764c7bbece4987d2 100644 (file)
@@ -2,6 +2,9 @@
  * Copyright (c) 2007 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+
+#include <assert.h>
+
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/per_support.h"
 #include "asn1/asn1c/constr_TYPE.h"
index 0b3fa7dcff9b6d516924575dc6c218b89d6940a5..5633293ee5b78a9b0073313cf1da9871686a2458 100644 (file)
@@ -2,6 +2,9 @@
  * Copyright (c) 2005-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+
+#include <assert.h>
+
 #include "asn1/asn1c/asn_system.h"
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/per_support.h"
index 6faf1b5d85fe31373633b8982d8356c6ddadb13f..7a345e1d838ebafab141867ac6244f467cb514f7 100644 (file)
@@ -2,6 +2,9 @@
  * Copyright (c) 2004-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+
+#include <assert.h>
+
 #include "asn1/asn1c/asn_application.h"
 #include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/xer_support.h"            /* XER/XML parsing support */
index 71e600dbc5a0b4b99af31565e3c6e7778a51f3ed..1c05767f0dafbfc549a16a3962df126f495d82a2 100644 (file)
@@ -3,8 +3,6 @@
  * Redistribution and modifications are permitted subject to BSD license.
  */
 #include "asn1/asn1c/asn_internal.h"
-#include <stdio.h>
-#include <errno.h>
 
 /*
  * The XER encoder of any type. May be invoked by the application.
@@ -234,4 +232,3 @@ xer_equivalent(const struct asn_TYPE_descriptor_s *td, const void *struct1,
        FREEMEM(xb2.buffer);
        return XEQ_SUCCESS;
 }
-
index 0bcd595821280acd931387a99a5a2ea32f5bdb1d..bb803e81989affde7e44c8f460a4120b59e70ce2 100644 (file)
@@ -224,4 +224,3 @@ finish:
        *stateContext = (int)state;
        return chunk_start - (const char *)xmlbuf;
 }
-
index c5a2a27c80b2485afdef6ab010709076be77af65..1e3e489f819ad083832257d16dde804c988f0033 100644 (file)
@@ -1,6 +1,5 @@
 #include "asn1/content_info.h"
 
-#include <errno.h>
 #include "file.h"
 #include "log.h"
 #include "asn1/oid.h"
index ca99b776682d7e74577f1a4c42be5c6571311840..b416e3397b1c262ab12d253424baf926200e2bd8 100644 (file)
@@ -1,6 +1,5 @@
 #include "asn1/decode.h"
 
-#include <errno.h>
 #include "common.h"
 #include "config.h"
 #include "log.h"
index bd3a024144d7a85da3f2e2baa17c2a6e92780b04..977742e5a8c1093ce6d8c7a62cc1eb90d7acb6bc 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef SRC_ASN1_DECODE_H_
 #define SRC_ASN1_DECODE_H_
 
-#include <stdbool.h>
 #include "file.h"
 #include "asn1/asn1c/ANY.h"
 #include "asn1/asn1c/constr_TYPE.h"
index ee569be8d299cf0c3b4664b77d47a06bad5284a7..53271b4f62c263b782f2353f38e7c5509dbd31de 100644 (file)
@@ -1,6 +1,5 @@
 #include "asn1/oid.h"
 
-#include <errno.h>
 #include "alloc.h"
 #include "common.h"
 #include "log.h"
index b013d80989e7ab6fbd7735675aa1955ca682b9f0..8718e3b9f7484d4865568944ca7df853d242f12e 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef SRC_OID_H_
 #define SRC_OID_H_
 
-#include <stdbool.h>
 #include "common.h"
 #include "asn1/asn1c/ANY.h"
 #include "asn1/asn1c/OBJECT_IDENTIFIER.h"
index c4e178e0a119a565b8864d1b09d619c3e7532d59..d2f85d7a7c89b00fa323737ff57717d465f44fdd 100644 (file)
@@ -1,7 +1,5 @@
 #include "asn1/signed_data.h"
 
-#include <errno.h>
-
 #include "algorithm.h"
 #include "alloc.h"
 #include "config.h"
index b27b404c3d01030fe373754836e6272c359a3128..0504cd9ed1a1fc2d5bcf6ea67adc03b976226899 100644 (file)
@@ -3,7 +3,6 @@
 
 /* Some wrappers for asn1/asn1c/SignedData.h. */
 
-#include <openssl/x509.h>
 #include "resource.h"
 #include "asn1/asn1c/SignedData.h"
 #include "object/certificate.h"
index c879e93c5559861e48fd4d4e4d52d8f0cc8a9f1f..59b0ae79389dfc8daaef2eac4a34e220a0b89d40 100644 (file)
@@ -2,16 +2,10 @@
 
 #include "cache/local_cache.h"
 
-#include <dirent.h> /* opendir(), readdir(), closedir() */
-#include <jansson.h>
-#include <strings.h> /* strcasecmp */
-#include <sys/types.h> /* opendir(), closedir(), stat() */
-#include <sys/stat.h> /* stat() */
-#include <sys/queue.h> /* STAILQ */
 #include <time.h>
-#include <unistd.h> /* stat() */
 
 #include "alloc.h"
+#include "config.h"
 #include "file.h"
 #include "log.h"
 #include "data_structure/path_builder.h"
index bb041ca0e0ef0211da1122e7e38d7d008e859a57..6aa4416e9047641e723dfbff5bf65568ed290fa4 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef SRC_CACHE_LOCAL_CACHE_H_
 #define SRC_CACHE_LOCAL_CACHE_H_
 
-#include <stdbool.h>
 #include "types/uri.h"
 
 /* Warms up cache for new validation run */
index 23f93ad382a0ca650faeafbca5ace76d698db2be..8507f88cbd8c54c1486813a9065107d6c969d62f 100644 (file)
@@ -1,6 +1,7 @@
 #include "cache/tmp.h"
 
 #include <stdatomic.h>
+
 #include "config.h"
 #include "data_structure/path_builder.h"
 
index c411c4f69d95f84f576f65ba7ae9a9bc438deebc..2fd64c685f753d3ba42ca768a8c83b838ee06967 100644 (file)
@@ -1,5 +1,6 @@
 #include "cert_stack.h"
 
+#include <errno.h>
 #include <sys/queue.h>
 
 #include "alloc.h"
index 9be5468504ea512c555209bcf64b8897bf4536ff..e2fedb6b55ebd6dd6fb3183b988edfc5cd54b1cb 100644 (file)
@@ -1,8 +1,7 @@
 #ifndef SRC_CERT_STACK_H_
 #define SRC_CERT_STACK_H_
 
-#include <openssl/x509.h>
-#include <stdbool.h>
+#include <openssl/bn.h>
 #include "resource.h"
 #include "object/certificate.h"
 #include "object/name.h"
index 61bc698cc31c6090dde473eec8f5ffaa8cb19c91..acbf3ba761e72d7227c783684709d520c5bb2359 100644 (file)
@@ -1,6 +1,5 @@
 #include "certificate_refs.h"
 
-#include <errno.h>
 #include "log.h"
 #include "thread_var.h"
 
index 0bcc7f1554dd9012757b624eea4564d22d218525..b3bb81b7e54b55243196fa62589ebb51343f1df6 100644 (file)
@@ -1,13 +1,8 @@
 #include "common.h"
 
-#include <dirent.h> /* readdir(), closedir() */
-#include <limits.h> /* realpath() */
-#include <stdlib.h> /* free(), realpath() */
-#include <stdio.h> /* remove() */
-#include <string.h> /* strrchr(), strcmp(), strcat(), etc */
-#include <unistd.h> /* stat(), rmdir() */
-#include <sys/stat.h> /* stat(), mkdir() */
-#include <sys/types.h> /* stat(), closedir(), mkdir() */
+#include <dirent.h>
+#include <errno.h>
+#include <time.h>
 
 #include "alloc.h"
 #include "config.h"
@@ -196,7 +191,6 @@ process_file_or_dir(char const *location, char const *file_ext, bool empty_err,
        return process_dir_files(location, file_ext, empty_err, cb, arg);
 }
 
-
 bool
 valid_file_or_dir(char const *location, bool check_file, bool check_dir,
     int (*error_fn)(const char *format, ...))
index 7aa479d62f10cdeb6fd5fd3a86cb3b2c833c7a41..b2012b095c0318e20a2f3fc551bfcdf8ffbab67f 100644 (file)
@@ -3,7 +3,8 @@
 
 #include <pthread.h>
 #include <stdbool.h>
-#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 /* "I think that this is not supposed to be implemented." */
 #define ENOTSUPPORTED 3172
index 463c3b29fcc4396fa17f4a6da01c6fbcba0be79d..531f55003a6afcef246d75ae8f583a622874bf75 100644 (file)
@@ -1,10 +1,7 @@
 #include "config.h"
 
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
 #include <getopt.h>
+#include <limits.h>
 #include <sys/socket.h>
 #include <syslog.h>
 
@@ -1037,7 +1034,6 @@ print_usage(FILE *stream, bool print_doc)
        }
 }
 
-
 static int
 handle_opt(int opt)
 {
index 806e701f1928ca1d508bd14bec2829e33115c75d..8f17a20a6015e35a1bb7923c0a332faf3ac06e26 100644 (file)
@@ -1,7 +1,9 @@
 #ifndef SRC_CONFIG_H_
 #define SRC_CONFIG_H_
 
-#include <stdbool.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <netinet/in.h>
 #include <stdint.h>
 
 #include "config/filename_format.h"
index 19bbc982bd22ab9ca325e0586ce3279c87d13f4f..39a60444a73786d8d4b87ce45585e0b03e9021d5 100644 (file)
@@ -1,8 +1,6 @@
 #include "config/boolean.h"
 
 #include <getopt.h>
-#include <stdbool.h>
-#include <string.h>
 #include "log.h"
 
 #define DEREFERENCE(void_value) (*((bool *) void_value))
index 8f7e9d891020f12851441bcffb5f3573259627fb..35253f24bf608da5e5b014336e858c2a39d22d54 100644 (file)
@@ -1,8 +1,6 @@
 #include "config/filename_format.h"
 
 #include <getopt.h>
-#include <stdlib.h>
-#include <string.h>
 
 #include "log.h"
 #include "config/str.h"
index cc06816474933edc05658ef58d9399a0a45b184b..99e17c4085d572151d6041bcf600d51f8ffd64be 100644 (file)
@@ -1,6 +1,5 @@
 #include "config/incidences.h"
 
-#include <getopt.h>
 #include "incidence/incidence.h"
 
 static void
index da598d96a9b91c3fe61a3b8f33648c7eb980fa1c..a5fc14ced24addf769a31d809b41a75739f48b8d 100644 (file)
@@ -1,8 +1,10 @@
 #include "config/log_conf.h"
 
+#include <arpa/inet.h>
 #include <getopt.h>
-#include <stdlib.h>
-#include <string.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <stdint.h>
 #include <syslog.h>
 
 #include "log.h"
index 9e425524398c1aa706d567b632a7689faf0bf8b3..c0eb3f4eaec0dea12b5b08cd94e935eee79e4539 100644 (file)
@@ -1,8 +1,6 @@
 #include "config/mode.h"
 
 #include <getopt.h>
-#include <stdlib.h>
-#include <string.h>
 
 #include "log.h"
 #include "config/str.h"
index 525d4b05faefc2d8db5c450534af1a1008d87f73..471102b14c9267271ea72c10141b61527e0a093c 100644 (file)
@@ -1,8 +1,6 @@
 #include "config/output_format.h"
 
 #include <getopt.h>
-#include <stdlib.h>
-#include <string.h>
 
 #include "log.h"
 #include "config/str.h"
index 99e4227ec175f80ff05f8c508969da5b24091702..e3b2a9a11926870453f22ddcf8f97364638c47e1 100644 (file)
@@ -1,8 +1,6 @@
 #include "config/str.h"
 
 #include <getopt.h>
-#include <stdlib.h>
-#include <string.h>
 
 #include "alloc.h"
 #include "log.h"
index fde9393d95cf6f79aa676365ae119fcafdcd8a96..4bb2734e0b977388e50f4239eabe5e183337878c 100644 (file)
@@ -1,9 +1,6 @@
 #include "config/string_array.h"
 
-#include <errno.h>
 #include <getopt.h>
-#include <stdlib.h>
-#include <string.h>
 
 #include "alloc.h"
 #include "log.h"
index 65f9c9e107cf65eedd611a48c49ddb7ca71d0f36..adb90291ba9ad2b371cda48509ecef0918ddc85f 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef SRC_CONFIG_STRING_ARRAY_H_
 #define SRC_CONFIG_STRING_ARRAY_H_
 
-#include <stddef.h>
 #include "config/types.h"
 
 struct string_array {
index 0c33858008acd05c2c0b4df98f5f466df7ef9d5c..c5c3d19d942285aaedb4eb899b450e0c31ce0029 100644 (file)
@@ -3,8 +3,13 @@
 
 #include <jansson.h>
 #include <stdbool.h>
-#include <stdint.h>
+#include <stddef.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 struct option_field;
 struct group_fields;
index c3dad8584e5a76defc048121a56d58c06ea2dd3c..a7487a9f4b527f03370fdf2d9f13f8c88fa7a22f 100644 (file)
@@ -1,9 +1,7 @@
 #include "config/uint.h"
 
-#include <getopt.h>
 #include <errno.h>
-#include <stdlib.h>
-#include <string.h>
+#include <getopt.h>
 #include "log.h"
 
 static void
index 2343094f8904ce23066e43c8504803d7857704b6..11bbc45dfb60fcd462b86b4a347832e64d3e4383 100644 (file)
@@ -1,7 +1,6 @@
 #include "config/work_offline.h"
 
 #include <getopt.h>
-#include <stdbool.h>
 
 #include "config.h"
 #include "config/boolean.h"
index 2fa87d6546ec9b1511c7d513608e1cc1721672dc..aec71ad157e21973983c76ebbacfca746e2375ef 100644 (file)
@@ -1,10 +1,9 @@
 #include "crypto/base64.h"
 
+#include <errno.h>
+#include <openssl/buffer.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
-#include <openssl/buffer.h>
-#include <errno.h>
-#include <string.h>
 #include "alloc.h"
 #include "log.h"
 
index a545b0f930c73c6461d4aced5beaf508ef2b5263..16901693d6dc00bb28f51d429cf76e4027096d5f 100644 (file)
@@ -1,9 +1,15 @@
 #ifndef SRC_BASE64_H_
 #define SRC_BASE64_H_
 
+#include <openssl/bio.h>
 #include <stdbool.h>
 #include <stddef.h>
-#include <openssl/bio.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 int base64_decode(BIO *, unsigned char *, bool, size_t, size_t *);
 int base64url_decode(char const *, unsigned char **, size_t *);
index a17f6dded2cf0031f6685a810564663463dd4b25..a6e05b6ad51e01684e5368443f96bea381c1037e 100644 (file)
@@ -1,9 +1,6 @@
 #include "crypto/hash.h"
 
-#include <errno.h>
 #include <openssl/evp.h>
-#include <sys/stat.h>
-#include <sys/types.h> /* For blksize_t */
 
 #include "alloc.h"
 #include "common.h"
index 744b2431e1b21cec06ff0f8a6a681d8cf6474047..f27fc336f4a477db64abcef3b7215699779b3ef9 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef SRC_HASH_H_
 #define SRC_HASH_H_
 
-#include <stdbool.h>
-#include <stddef.h>
 #include "types/uri.h"
 #include "asn1/asn1c/BIT_STRING.h"
 
index 98cb670e74d71debd9198e32c4b91dadc364a1e4..e28a230b6e28c5f52494f41d6e92ee1b402a6b7b 100644 (file)
@@ -1,10 +1,14 @@
 #include "daemon.h"
 
-#include <sys/stat.h>
-#include <sys/types.h>
 #include <errno.h>
+#include <fcntl.h>
 #include <signal.h>
+#include <stddef.h>
 #include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/wait.h>
 #include <unistd.h>
 #include "log.h"
 
index 686165c949e501f99c6defbb56e82a77b558df19..7aa56fa88fae915df1d387f7bff8bd7489b0ba93 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef SRC_DATA_STRUCTURE_ARRAY_LIST_H_
 #define SRC_DATA_STRUCTURE_ARRAY_LIST_H_
 
-#include <errno.h>
-#include <stdlib.h>
 #include "log.h"
 #include "data_structure/common.h"
 
index ff5cdc73388fcd30dbb075e7d2925c73069718d4..f1ffa8f5be9e9756c63d9443b6c618d7f57bbec3 100644 (file)
@@ -2,6 +2,12 @@
 #define SRC_DATA_STRUCTURE_COMMON_H_
 
 #include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 typedef size_t array_index;
 
index 78611c2440300de1bacd22caecb2349c4ca27b8e..0599f0323fe84fd680694c7a2e62ff471f134896 100644 (file)
@@ -1,6 +1,6 @@
 #include "data_structure/path_builder.h"
 
-#include <openssl/evp.h>
+#include <errno.h>
 
 #include "alloc.h"
 #include "log.h"
index a8c9131765e0a79d69e3640fd42588fc2aa1b30a..2971b7224def450134bf88695491f1d253e13316 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef SRC_DATA_STRUCTURE_PATH_BUILDER_H_
 #define SRC_DATA_STRUCTURE_PATH_BUILDER_H_
 
-#include <stdbool.h>
-#include <stddef.h>
 #include "types/uri.h"
 
 struct path_builder {
index d0ac4a7f52be3a8ed3c4e509cc6b45fd7f441bd2..b6564586b3d063f7f74acf73dd21d0d81b40ba7f 100644 (file)
@@ -26,9 +26,17 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #define UTHASH_VERSION 2.1.0
 
-#include <string.h>   /* memcmp, memset, strlen */
-#include <stddef.h>   /* ptrdiff_t */
-#include <stdlib.h>   /* exit */
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 /* These macros use decltype or the earlier __typeof GNU extension.
    As decltype is only available in newer compilers (VS2010 or gcc 4.3+
@@ -62,7 +70,6 @@ do {
 } while (0)
 #endif
 
-#include <stdint.h>
 
 #ifndef uthash_malloc
 #define uthash_malloc(sz) malloc(sz)      /* malloc fcn                      */
index e4bb06b2c689ea215e0c6c4bd3675c77b6ea52de..11d3e3c32b7b8239acbaee1fda9fc5b336ea7ea7 100644 (file)
@@ -1,6 +1,8 @@
 #include "extension.h"
 
-#include <errno.h>
+#include <openssl/asn1t.h>
+#include <openssl/objects.h>
+#include <openssl/x509v3.h>
 #include "cert_stack.h"
 #include "common.h"
 #include "log.h"
index 543731860ada9ed9fb44172d6c427cc969147a32..33a4022d39429cf103ca6aab6ea68f062219ba7a 100644 (file)
@@ -1,8 +1,10 @@
 #ifndef SRC_EXTENSION_H_
 #define SRC_EXTENSION_H_
 
-#include <stdbool.h>
+#include <openssl/asn1.h>
+#include <openssl/safestack.h>
 #include <openssl/x509.h>
+#include <stdbool.h>
 
 struct extension_metadata {
        char const *name;
index c265665013ff2aee7fe3795583fcfd6359af44ca..816d83b6202fc4ef4158e75161bf8f6d53c56924 100644 (file)
@@ -2,12 +2,7 @@
 
 #include "file.h"
 
-#include <errno.h>
-#include <stdlib.h>
-#include <ftw.h> /* nftw() */
-#include <sys/types.h> /* opendir(), closedir() */
-#include <dirent.h> /* opendir(), readdir(), closedir() */
-
+#include <ftw.h>
 
 #include "alloc.h"
 #include "log.h"
index 497f35fbb0e0ec67cc4d9a9f205550f3f3069c7c..21e128db19dde3aeade7f4211ed0c81de9dcd3e7 100644 (file)
@@ -1,10 +1,17 @@
 #ifndef SRC_FILE_H_
 #define SRC_FILE_H_
 
+#include <dirent.h>
+#include <errno.h>
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
 #include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 /*
  * The entire contents of the file, loaded into a buffer.
index 09d1e9336a3d8f8ee98403e59a5ec02ce1c0c11a..73dc7338f1a483ab03348cda07d7f6f9cf98d09b 100644 (file)
@@ -1,8 +1,5 @@
 #include "http/http.h"
 
-#include <errno.h>
-#include <stdio.h>
-#include <unistd.h>
 #include <curl/curl.h>
 
 #include "alloc.h"
index fafbd15344b78254cf3640a74e903dfeaabc8a60..e8689394c35064bf9aff363b1155d834a644700c 100644 (file)
@@ -1,8 +1,6 @@
 #include "incidence/incidence.h"
 
 #include <assert.h>
-#include <stdbool.h>
-#include <string.h>
 #include "common.h"
 #include "json_parser.h"
 #include "log.h"
index ff88a7ea9a2f3b6f3b48a062e438aa8aea1e512b..e2b06747b965eff7b4389b49a5069235d5c2b4bb 100644 (file)
@@ -1,11 +1,7 @@
 #include "init.h"
 
-#include <errno.h>
-#include <stdio.h>
-#include <stdbool.h>
-#include <unistd.h>
-
 #include "alloc.h"
+#include "config.h"
 #include "log.h"
 #include "http/http.h"
 
index 5643dd251867bbcf3a7783bd986441cd7bf6a8f3..19f3cd687fccfeaca3186a163b039efa180129d1 100644 (file)
@@ -1,7 +1,6 @@
 #include "json_handler.h"
 
 #include <errno.h>
-#include <string.h>
 
 #include "alloc.h"
 #include "config.h"
index b3afe5563577bcee7c656fe5fbe2c8fc46f50d54..2c183d1711bac37d98df1c06c4581707659d6c62 100644 (file)
@@ -3,6 +3,13 @@
 
 #include <jansson.h>
 #include <stdbool.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 int json_get_string(json_t *, char const *, char const **);
 int json_get_int(json_t *, char const *, json_int_t *);
index abde7d346daaf394ad4f2bb6df4b58b001ea24a4..81144511596ff79d18b38c9064166ab76c6cebf1 100644 (file)
@@ -1,10 +1,5 @@
 #include "line_file.h"
 
-#include <err.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "alloc.h"
 #include "file.h"
 #include "log.h"
index 01103137d4e4ca8abd3dd27aa556d760377122d5..4152550b05cfbfaddebe13ed56953c7ead55fc69 100644 (file)
 
 #include <stddef.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 struct line_file;
 
index 9d69774fce3ac70ca0941c11bbd1a85cb0f9bcbb..b82370c01749369642de9e9dce05cb62b1a5d023 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -4,13 +4,14 @@
 #include <execinfo.h>
 #endif
 
-#include <openssl/bio.h>
+#include <errno.h>
 #include <openssl/err.h>
 #include <pthread.h>
 #include <signal.h>
+#include <stdarg.h>
+#include <sys/stat.h>
 #include <syslog.h>
 #include <time.h>
-#include <unistd.h>
 
 #include "config.h"
 #include "thread_var.h"
index c261940fd06d5dadfd906c3f6ece49617f436b6d..8b0c6cfad321914a9eae6331285b27431c14755b 100644 (file)
--- a/src/log.h
+++ b/src/log.h
@@ -1,9 +1,8 @@
 #ifndef SRC_LOG_H_
 #define SRC_LOG_H_
 
-#include <errno.h>
-#include <string.h>
 #include <stdbool.h>
+#include <stdio.h>
 #include "incidence/incidence.h"
 
 /*
index 9bfa4a7c679ac820b698ac68c30ee7d55a8c2386..0c7bd398739cd4d0583754f8b57084e61ae756ea 100644 (file)
@@ -1,7 +1,5 @@
 #include "notify.h"
 
-#include <err.h>
-#include <stddef.h>
 #include "log.h"
 #include "rtr/rtr.h"
 #include "rtr/pdu_sender.h"
index 62456a32124240c4cd313a7abc6664b1ce26259d..0485c23b2c081335746010ecc7a0d67773e859fb 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef SRC_OBJECT_BGPSEC_H_
 #define SRC_OBJECT_BGPSEC_H_
 
-#include <openssl/x509.h>
 #include "resource.h"
 #include "rpp.h"
 
index 26e9cea6301500305c844f2ce258c2455877abf5..142547f863e5c06813d80d0dc9b0eb18fc9a9c86 100644 (file)
@@ -1,18 +1,17 @@
 #include "object/certificate.h"
 
-#include <errno.h>
-#include <stdint.h> /* SIZE_MAX */
+#include <openssl/asn1t.h>
+#include <openssl/bio.h>
+#include <openssl/evp.h>
+#include <openssl/objects.h>
+#include <openssl/rsa.h>
+#include <openssl/x509v3.h>
 #include <syslog.h>
-#include <time.h>
-#include <openssl/asn1.h>
-#include <openssl/opensslv.h>
 
 #if OPENSSL_VERSION_MAJOR >= 3
 #include <openssl/core_names.h>
 #endif
 
-#include <sys/socket.h>
-
 #include "algorithm.h"
 #include "alloc.h"
 #include "cert_stack.h"
index 84ad0806419cdf1f32fd6ac5d6c043c76ea296ac..ad4c2a39a6719d2dae7f4a2ac43d4a13eb869c54 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef SRC_OBJECT_CERTIFICATE_H_
 #define SRC_OBJECT_CERTIFICATE_H_
 
-#include <stdbool.h>
-#include <openssl/x509.h>
 #include "certificate_refs.h"
 #include "resource.h"
 #include "rpp.h"
index bd9093440bf5d7b17794c0ed6554f1771ba4df4f..407d8d5983626d33fc0e9dba569b12e4964d4a0b 100644 (file)
@@ -1,6 +1,7 @@
 #include "object/crl.h"
 
-#include <errno.h>
+#include <openssl/bio.h>
+#include <openssl/bn.h>
 #include <syslog.h>
 #include "algorithm.h"
 #include "extension.h"
index ba0e476b89e6137d55ba4886e59bca1dc22b525b..d4177d38e232aaa62e02a1aeff1bcc2d91ff26f2 100644 (file)
@@ -1,7 +1,5 @@
 #include "object/manifest.h"
 
-#include <errno.h>
-
 #include "algorithm.h"
 #include "common.h"
 #include "log.h"
index b86cf45dd17ff822e7a9e59353e53dd1cd29760a..fa59cf25cf0e93299e237bdd54683ce7105c38b0 100644 (file)
@@ -1,8 +1,7 @@
 #include "object/name.h"
 
-#include <errno.h>
-#include <stdbool.h>
-#include <string.h>
+#include <openssl/asn1.h>
+#include <openssl/objects.h>
 #include <syslog.h>
 
 #include "alloc.h"
index eaa4ec44aa9c4d9acaabd5ca6273487b60e32620..4ded9d2ec7e443f8f35b3d3f22ea694c55dc4144 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef SRC_OBJECT_NAME_H_
 #define SRC_OBJECT_NAME_H_
 
-#include <stdbool.h>
 #include <openssl/x509.h>
+#include <stdbool.h>
 
 struct rfc5280_name;
 
index a0998cf859cae3cad0d6501f11ded0b07219fb12..95066f8b3122d4074ebda486461db1286c33cd65 100644 (file)
@@ -1,9 +1,5 @@
 #include "object/roa.h"
 
-#include <errno.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
-
 #include "config.h"
 #include "log.h"
 #include "thread_var.h"
index aa66e68bf74d8526dbe8c7b77bc512093b55cdc0..a5b6667e18647e8a284e8ccdc4500367f8186242 100644 (file)
@@ -1,6 +1,5 @@
 #include "object/signed_object.h"
 
-#include <errno.h>
 #include "log.h"
 #include "asn1/content_info.h"
 
index d02c9dfb4f79b0d57fb6bcd47ef4b015f9c45bc4..74bc0f0a2486fa4dd62d6c01c7451ffaa0af56ef 100644 (file)
@@ -1,14 +1,8 @@
 #include "object/tal.h"
 
 #include <errno.h>
-#include <pthread.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/queue.h>
-#include <sys/stat.h>
 #include <openssl/evp.h>
+#include <sys/queue.h>
 
 #include "alloc.h"
 #include "cert_stack.h"
index aa376dfb3f58fcc645571721bbd5cdc3ee57ed66..f0f7b62821daac9e71759481e1fe61ca31119dc7 100644 (file)
@@ -3,7 +3,6 @@
 
 /* This is RFC 8630. */
 
-#include <stddef.h>
 #include "types/uri.h"
 #include "rtr/db/db_table.h"
 #include "thread/thread_pool.h"
index 1a056a66c923ff4f57a71cd57f3b3405670abd84..45687db95985d0f616142dbe1f0093b4f7dab7d7 100644 (file)
@@ -1,7 +1,6 @@
 #include "object/vcard.h"
 
 #include <errno.h>
-#include <stdbool.h>
 
 #include "alloc.h"
 #include "log.h"
index 570ef2f2e1ea26d030112677062a98ca32fe316d..6e95e4f03cbb91dd7d4d5099f77052e99f6e6a2d 100644 (file)
@@ -1,6 +1,5 @@
 #include "output_printer.h"
 
-#include <arpa/inet.h>
 #include "common.h"
 #include "config.h"
 #include "file.h"
index 3a034d77af1bda1d612edd35ead62a763e15a85c..123c73d5dfd6057f66dea2d8b74c526e0cd6ff36 100644 (file)
@@ -1,7 +1,6 @@
 #include "resource.h"
 
 #include <errno.h>
-#include <stdint.h> /* UINT32_MAX */
 
 #include "alloc.h"
 #include "cert_stack.h"
@@ -11,8 +10,6 @@
 #include "types/address.h"
 #include "resource/ip4.h"
 #include "resource/ip6.h"
-#include <sys/socket.h>
-
 
 /* The resources we extracted from one certificate. */
 struct resources {
index 6be0124643547508fc5c5ed567258eb8c245e5d7..f40877a9ea517dc43411d5d62efe377180c98efd 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef SRC_RESOURCE_H_
 #define SRC_RESOURCE_H_
 
-#include <stdbool.h>
 #include "resource/asn.h"
 #include "types/address.h"
 #include "asn1/asn1c/ASIdentifiers.h"
index 60df25c348cbbb4c7f50ccd96b5a41114e0ece03..cdc513463070adc6cb3671672ee1c7bf212a9f9f 100644 (file)
@@ -1,8 +1,5 @@
 #include "resource/asn.h"
 
-#include <errno.h>
-#include <limits.h>
-
 #include "log.h"
 #include "sorted_array.h"
 
index 5a9a871e70829c94e20fa1fdffa9e17cd63e88cf..ee0b3b75a562b25ad5aa456388abc40dd9ddfa39 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef SRC_RESOURCE_IP4_H_
 #define SRC_RESOURCE_IP4_H_
 
-#include <stdbool.h>
 #include "types/address.h"
 
 struct resources_ipv4;
index 83bfa2b36e5bf057e91533f2359cd3c047e7c502..aad0aaa10360e57a330b1ca15899bfcb0955ccf7 100644 (file)
@@ -1,6 +1,5 @@
 #include "resource/ip6.h"
 
-#include <string.h>
 #include "sorted_array.h"
 
 static int
index b1530c6e397ae76616f58c2f9930af46221b81d0..9ed3df169eacbb8c428ffa9783d29b67bdf2a836 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef SRC_RESOURCE_IP6_H_
 #define SRC_RESOURCE_IP6_H_
 
-#include <stdbool.h>
 #include "types/address.h"
 
 struct resources_ipv6;
index 50f3313e52245c38651f436ecb4213960cbeddcf..f8eb4dde41ac132c1f63e9363d6423b2ff630ed0 100644 (file)
--- a/src/rpp.h
+++ b/src/rpp.h
@@ -1,6 +1,7 @@
 #ifndef SRC_RPP_H_
 #define SRC_RPP_H_
 
+#include <openssl/safestack.h>
 #include <openssl/x509.h>
 #include "types/uri.h"
 
index 1d4a36d15796b84cd4a2b47b9131d0d49881afd2..79d7c0454c207986f97dc176af5b0e13cc857ede 100644 (file)
@@ -1,8 +1,7 @@
 #include "rrdp/rrdp_loader.h"
 
-#include <sys/types.h>
+#include <errno.h>
 #include <sys/stat.h>
-#include <unistd.h>
 
 #include "log.h"
 #include "thread_var.h"
index b74c9abb25ab0a3354d6df6bdcc309892a8338a0..e05bdd398a7ecdf1713a1ae22e76d3bf286e837e 100644 (file)
@@ -1,8 +1,6 @@
 #include "rrdp/rrdp_objects.h"
 
 #include <errno.h>
-#include <stdlib.h>
-#include <string.h>
 #include "alloc.h"
 #include "log.h"
 #include "types/uri.h"
index e2c4b46eb0ec0facdd76e6c77f5981e1884af1e8..6f89d3ba1e6d9b4eb356725a0eb0609782b13bc8 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef SRC_RRDP_RRDP_OBJECTS_H_
 #define SRC_RRDP_RRDP_OBJECTS_H_
 
-#include <stddef.h>
-#include <stdbool.h>
 #include "data_structure/array_list.h"
 
 /* Global RRDP files data */
index 3217afeb9b3e6be29ee0e191ed72c7466c2c04a7..079974447e1285d8a6fc234b7540d708cc0cc9b4 100644 (file)
@@ -1,13 +1,7 @@
 #include "rrdp/rrdp_parser.h"
 
-#include <libxml/xmlreader.h>
-#include <openssl/evp.h>
-#include <sys/stat.h>
 #include <ctype.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
+#include <openssl/evp.h>
 
 #include "crypto/base64.h"
 #include "crypto/hash.h"
index 9215b70b29ae55e490e0f908eafb66483d3067c8..ae256ed9dd2c842b5ceff7450622a6fd83f6d3e4 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef SRC_RRDP_RRDP_PARSER_H_
 #define SRC_RRDP_RRDP_PARSER_H_
 
-#include <stdbool.h>
 #include "types/uri.h"
 #include "rrdp/rrdp_objects.h"
 
index a9a07c155960cfb7a6b0f0d036f3fe010dbbc3e1..11d91dab371616e95a43cf0c034240d1ca72fd5b 100644 (file)
@@ -1,13 +1,10 @@
 #include "rsync/rsync.h"
 
 #include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <signal.h> /* SIGINT, SIGQUIT, etc */
-#include <syslog.h>
-#include <sys/queue.h>
-#include <sys/stat.h>
+#include <fcntl.h>
+#include <signal.h>
 #include <sys/wait.h>
+#include <syslog.h>
 
 #include "alloc.h"
 #include "common.h"
index 77ff11f4cce920d277a9807804209892fa7ddff7..9ae70e3dd71848c0c1fd6f2ddba9d877d2825302 100644 (file)
@@ -1,7 +1,6 @@
 #include "rtr/db/db_table.h"
 
-#include <sys/types.h> /* AF_INET, AF_INET6 (needed in OpenBSD) */
-#include <sys/socket.h> /* AF_INET, AF_INET6 (needed in OpenBSD) */
+#include <errno.h>
 
 #include "alloc.h"
 #include "log.h"
index 551cbd09efdc7666a96a1d38ac0ba8e17e8ce635..1875a64071a27b82e88bd4165b6bef7d59fb80bc 100644 (file)
@@ -1,8 +1,6 @@
 #include "rtr/db/delta.h"
 
 #include <stdatomic.h>
-#include <sys/types.h> /* AF_INET, AF_INET6 (needed in OpenBSD) */
-#include <sys/socket.h> /* AF_INET, AF_INET6 (needed in OpenBSD) */
 #include "alloc.h"
 #include "types/address.h"
 #include "data_structure/array_list.h"
index d733215a0b13c4dc02276b5a830fcc3a428a4b8b..48b9069e4f17848313e04328c2079ab7b78ebe81 100644 (file)
@@ -1,7 +1,8 @@
 #include "rtr/db/deltas_array.h"
 
-#include <limits.h>
 #include <errno.h>
+#include <limits.h>
+
 #include "alloc.h"
 #include "config.h"
 #include "log.h"
index 8bcda2fb3e4d2dc24967419b774e39da7cd24fa2..0e5133df68ef8c08ecb7b4e0529b3f51544e93c9 100644 (file)
@@ -1,13 +1,11 @@
 #include "rtr/db/vrps.h"
 
-#include <pthread.h>
-#include <string.h>
-#include <syslog.h>
+#include <errno.h>
 #include <time.h>
-#include <sys/queue.h>
 
 #include "alloc.h"
 #include "common.h"
+#include "config.h"
 #include "output_printer.h"
 #include "validation_handler.h"
 #include "types/router_key.h"
index 4a82c7800310c58106463d00f390a21d1a6649b8..73a66dbad3e30339cb51a7f9331fb80ba81ad1c6 100644 (file)
@@ -7,7 +7,6 @@
  * This module stores VRPs and their serials.
  */
 
-#include <stdbool.h>
 #include "as_number.h"
 #include "types/address.h"
 #include "rtr/db/deltas_array.h"
index 825e0f84d445787794efc83811955614e55436f6..2a27f7b4c5a30bb59add59f91638507e5e8bf46d 100644 (file)
@@ -1,6 +1,6 @@
 #include "rtr/err_pdu.h"
 
-#include <unistd.h>
+#include <errno.h>
 #include "alloc.h"
 #include "rtr/pdu_sender.h"
 #include "log.h"
index 5e8cda69f7c350968929c8e7721b3767795fe4e9..89323c1d778bfcb4b8b07e1f34e97c9f381ca65e 100644 (file)
@@ -1,9 +1,6 @@
 #ifndef SRC_RTR_ERR_PDU_H_
 #define SRC_RTR_ERR_PDU_H_
 
-#include <stdbool.h>
-#include <stdint.h>
-
 #include "rtr/pdu.h"
 
 /*
index 7524e478269c9b348b74637f53889313159f5c17..5d26c628bb0d0bacd89c40bd35c74e6f4c3fb192 100644 (file)
@@ -1,9 +1,6 @@
 #include "rtr/pdu.h"
 
 #include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <syslog.h>
 
 #include "alloc.h"
 #include "common.h"
index 1c7d76308237bb571a2fd2c149eefa4507f0d212..eb93e89776d476be6e3e37836446b9baa7ba760c 100644 (file)
@@ -1,9 +1,6 @@
 #ifndef RTR_PDU_H_
 #define RTR_PDU_H_
 
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 #include "common.h"
 #include "types/router_key.h"
 #include "rtr/primitive_reader.h"
index 7c9499049190619e1573a1334793f57c7dc1b221..f7576d9bca24d287c7093bc387314587c12828cf 100644 (file)
@@ -1,8 +1,6 @@
 #include "rtr/pdu_handler.h"
 
 #include <errno.h>
-#include <stddef.h>
-#include <unistd.h>
 
 #include "rtr/err_pdu.h"
 #include "log.h"
@@ -160,8 +158,6 @@ send_base_roa(struct vrp const *vrp, void *arg)
        return send_prefix_pdu(args->fd, args->version, vrp, FLAG_ANNOUNCEMENT);
 }
 
-
-
 static int
 send_base_router_key(struct router_key const *key, void *arg)
 {
index edc27865cfe024f4d0f3e3e554a74a2c7fd50975..563a10e38e6f96b484d1f3106ba85591e4667fb9 100644 (file)
@@ -2,12 +2,7 @@
 
 #include <errno.h>
 #include <poll.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <string.h>
 #include <syslog.h>
-#include <unistd.h>
-#include <arpa/inet.h> /* INET_ADDRSTRLEN */
 
 #include "alloc.h"
 #include "common.h"
index af81c49365a17b765b4521ce29998941d9a96b49..ad91531da31958bac83976c76b52b8fa97df4204 100644 (file)
@@ -14,5 +14,4 @@ int send_end_of_data_pdu(int, uint8_t, serial_t);
 int send_error_report_pdu(int, uint8_t, uint16_t, struct rtr_request const *,
     char *);
 
-
 #endif /* SRC_RTR_PDU_SENDER_H_ */
index 84397b835de3b57158a34acc62bd1d030232611a..9eb40efc72af8d22b657af1d643445dc08c2e049 100644 (file)
@@ -1,7 +1,5 @@
 #include "rtr/pdu_serializer.h"
 
-#include <stdlib.h>
-#include <string.h>
 #include "rtr/primitive_writer.h"
 
 static size_t
index 1e8425114e2a5865543afd28f7f3447a70d5b7eb..2ab92d1f67b929d47ed9e42e5150c22e9a0f858f 100644 (file)
@@ -1,12 +1,6 @@
 #include "rtr/primitive_reader.h"
 
-#include <err.h>
 #include <errno.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <string.h>
-#include <unistd.h>
-#include <netinet/in.h>
 
 #include "alloc.h"
 #include "log.h"
index 803adac276af6731de922a0596e60a9cfa655b9e..6f5c5948e9efe998a2d351e7aee4a777a252e0e5 100644 (file)
@@ -1,7 +1,16 @@
 #ifndef RTR_PRIMITIVE_READER_H_
 #define RTR_PRIMITIVE_READER_H_
 
-#include <netinet/in.h> /* in_addr, in6_addr */
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <unistd.h>
 
 #include "common.h"
 
index badd1019c46a8ff82a4ed39195a16ef41e8ba7f0..6b8d713b471f33bb0c80193a0b8d0bfd6f320d69 100644 (file)
@@ -1,7 +1,10 @@
 #ifndef RTR_PRIMITIVE_WRITER_H_
 #define RTR_PRIMITIVE_WRITER_H_
 
+#include <arpa/inet.h>
+#include <netdb.h>
 #include <netinet/in.h>
+#include <stdint.h>
 
 unsigned char *write_int8(unsigned char *, uint8_t);
 unsigned char *write_int16(unsigned char *, uint16_t);
index 4c50a370448ef3c7c158dd9cacad22ca44e19fa7..17c5cf488679b2852849840ac44271d4803d4e89 100644 (file)
@@ -2,15 +2,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
-#include <limits.h>
-#include <log.h>
 #include <poll.h>
-#include <pthread.h>
-#include <stdbool.h>
-#include <unistd.h>
-#include <netdb.h>
-#include <sys/types.h>
-#include <sys/socket.h>
 
 #include "alloc.h"
 #include "config.h"
index 51e69546586b01dc3b0ba8fca4554784a253fd7f..8575bb8d69f76a3bd5735f6d6f38004b026e1c12 100644 (file)
@@ -2,6 +2,7 @@
 #define RTR_RTR_H_
 
 #include <arpa/inet.h>
+#include <netinet/in.h>
 
 struct rtr_server {
        int fd;
index 3b033524ec4a442358559c86d1977ccbac178e78..e61aba2ab64f79f481f7086bf5c8716c53e6fd0b 100644 (file)
@@ -1,8 +1,7 @@
 #include "slurm/db_slurm.h"
 
-#include <string.h>
+#include <errno.h>
 #include <time.h>
-#include <arpa/inet.h>
 
 #include "alloc.h"
 #include "common.h"
@@ -621,4 +620,3 @@ db_slurm_get_csum_list(struct db_slurm *db, struct slurm_csum_list *result)
        result->list_size = db->csum_list.list_size;
        result->slh_first = db->csum_list.slh_first;
 }
-
index 7eed54956eab4f4a2f45c26f798e14185e1d2c66..5dd988fb4f2c02f5583d983caa8b85f9ae67a521 100644 (file)
@@ -1,9 +1,8 @@
 #ifndef SRC_SLURM_db_slurm_H_
 #define SRC_SLURM_db_slurm_H_
 
-#include <stdbool.h>
-#include <sys/queue.h>
 #include <openssl/evp.h>
+#include <sys/queue.h>
 #include "types/vrp.h"
 #include "types/router_key.h"
 
@@ -30,7 +29,6 @@ struct slurm_bgpsec {
        unsigned char   *router_public_key;
 };
 
-
 struct slurm_file_csum {
        unsigned char csum[EVP_MAX_MD_SIZE];
        unsigned int csum_len;
index 32bbf252ac9a79a30210251bd7dd4f94bd127623..8d40d53b442b44198aced647527dbf2ae67ea74f 100644 (file)
@@ -1,10 +1,5 @@
 #include "slurm/slurm_loader.h"
 
-#include <stdlib.h>
-#include <stdbool.h>
-#include <sys/types.h> /* AF_INET, AF_INET6 (needed in OpenBSD) */
-#include <sys/socket.h> /* AF_INET, AF_INET6 (needed in OpenBSD) */
-
 #include "alloc.h"
 #include "log.h"
 #include "config.h"
index 5951bdcee7eb77d553a2b14c674ce48b6d6e4d28..3aa13c0c9ab53c317f4eb0e951c3268812c29e14 100644 (file)
@@ -1,12 +1,7 @@
 #include "slurm/slurm_parser.h"
 
 #include <errno.h>
-#include <stdint.h>
-#include <string.h>
-#include <openssl/evp.h>
-#include <openssl/x509.h>
-#include <sys/types.h> /* AF_INET, AF_INET6 (needed in OpenBSD) */
-#include <sys/socket.h> /* AF_INET, AF_INET6 (needed in OpenBSD) */
+#include <openssl/asn1.h>
 
 #include "crypto/base64.h"
 #include "algorithm.h"
index 24de54f4d9dc1b0b4b111c1d3e0c36283cfc4561..c5447e605238d8df4bb28b02316ecde9fb0b5845 100644 (file)
@@ -1,9 +1,5 @@
 #include "sorted_array.h"
 
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include "alloc.h"
 #include "log.h"
 
index b06a685d642dfcdbc9c64d3158e7c3f19845f5dd..12db6c98493111f33a34e5cd297014de0bbb2aaf 100644 (file)
@@ -3,6 +3,12 @@
 
 #include <stdbool.h>
 #include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 /*
  * This implementation is not a generic sorted array; It's intended to store RFC
index 2ec37c6f3ecb9560f5547fb7e45a047fd6d96820..b314c0d58377a95f33ea50133f65bad698ffc237 100644 (file)
@@ -1,6 +1,5 @@
 #include "state.h"
 
-#include <errno.h>
 #include "alloc.h"
 #include "cert_stack.h"
 #include "log.h"
index 88eaf65d1ab283f3438f7249ef0e48784a0b0d11..b1386ccf617dfccae7ee78bfc2b9321b11f28bd8 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef SRC_STATE_H_
 #define SRC_STATE_H_
 
-#include <openssl/x509.h>
 #include "validation_handler.h"
 #include "object/tal.h"
 
index 0ecad62cea632d4d713cd8cae6e1d40d009b011d..a38c33444baee27edec051730be4d731eee2410c 100644 (file)
@@ -1,7 +1,7 @@
 #include "str_token.h"
 
-#include <errno.h>
-#include <string.h>
+#include <openssl/bio.h>
+#include <stdint.h>
 
 #include "alloc.h"
 #include "log.h"
index a74d272af80cdddaa6e24c6db4bea1d5655558ff..aaaf10dd758e254389a7fdb6b60dd92beb5cbe07 100644 (file)
@@ -1,10 +1,16 @@
 #ifndef SRC_STR_TOKEN_H_
 #define SRC_STR_TOKEN_H_
 
+#include <openssl/asn1.h>
+#include <openssl/bn.h>
 #include <stdbool.h>
 #include <stddef.h>
-#include <openssl/asn1.h>
-#include <openssl/x509.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 int ia5s2string(ASN1_IA5STRING *, char **);
 int BN2string(BIGNUM *, char **);
index 8f56aca783b2ecfaa416a102933b322140f5fedd..186a28452e24d8fbb485182b6bbb97374c1dfcc9 100644 (file)
@@ -1,9 +1,6 @@
 #include "thread/thread_pool.h"
 
 #include <sys/queue.h>
-#include <pthread.h>
-#include <stdlib.h>
-#include <string.h>
 #include "alloc.h"
 #include "common.h"
 #include "log.h"
index ba4dccdd5b18137c613517079a3a779bdebfa9ef..bf474c5bcc5071359e4df7d81a5a3879ba48312f 100644 (file)
@@ -1,12 +1,6 @@
 #include "thread_var.h"
 
-#include <errno.h>
 #include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include "alloc.h"
 #include "config.h"
index f918224c715ce918f0979e49f8d0ff1d933fe832..e7a34047351d83836317c3022b37043268672e07 100644 (file)
@@ -1,8 +1,6 @@
 #include "types/address.h"
 
-#include <stdlib.h> /* strtoul() */
-#include <string.h> /* memset(), memcpy() */
-#include <arpa/inet.h> /* inet_ntop(), htonl() */
+#include <errno.h>
 
 #include "log.h"
 #include "thread_var.h"
@@ -548,4 +546,3 @@ sockaddr2str(struct sockaddr_storage *sockaddr, char *buffer)
        if (str == NULL)
                strcpy(buffer, "(unprintable address)");
 }
-
index 9ac412633df2abbe06d5091574cda0df6246039c..e586bcd48a9b79d295e361872d18755ada508941 100644 (file)
@@ -2,7 +2,6 @@
 #define SRC_TYPES_ADDRESS_H_
 
 #include <stdbool.h>
-#include <netinet/in.h>
 #include <sys/socket.h>
 #include "asn1/asn1c/IPAddress.h"
 #include "asn1/asn1c/IPAddressRange.h"
index 9609981a3f8168c70d9e87599d99a227ecfd1575..20549a031bd30ecb5c8ca8f53f11e2f2b999eede 100644 (file)
@@ -1,8 +1,10 @@
 #ifndef SRC_TYPES_ROUTER_KEY_H_
 #define SRC_TYPES_ROUTER_KEY_H_
 
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <netinet/in.h>
 #include <stdint.h>
-#include <stdlib.h>
 
 /*
  * SKI is always 20 bytes long rfc6487#section-4.8.2:
index a9b1683d455979aeae360ddfede4fffe3198ed32..117789e7e56b2676283e3b55323eac0e46e529b2 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef SRC_TYPES_SERIAL_H_
 #define SRC_TYPES_SERIAL_H_
 
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <netinet/in.h>
 #include <stdbool.h>
 #include <stdint.h>
 
index 4b40a6e1bd98fbcd91341e86f488a169ddf6409b..2fb7dbb30e74c0441f86c00eff557670870d4343 100644 (file)
@@ -1,13 +1,13 @@
 #include "types/uri.h"
 
-#include <errno.h>
-#include <strings.h>
 #include "alloc.h"
 #include "common.h"
+#include "config.h"
 #include "log.h"
 #include "state.h"
 #include "str_token.h"
 #include "thread_var.h"
+#include "config/filename_format.h"
 #include "data_structure/path_builder.h"
 
 /**
index b2548a4743b9f0495614019308d42793a0f29495..1585bc47bd5077dd4fdcf0b1d78b20c05ea0e025 100644 (file)
@@ -1,6 +1,5 @@
 #include "types/vrp.h"
 
-#include <arpa/inet.h>
 #include "log.h"
 #include "types/address.h"
 
index 3be86f8e94213bdf1bcf6b73d11c67008e3a9e56..a1673c5a5a48647dc0ee0ce3dedad831d48f6262 100644 (file)
@@ -1,9 +1,11 @@
 #ifndef SRC_TYPES_VRP_H_
 #define SRC_TYPES_VRP_H_
 
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <netinet/in.h>
 #include <stdbool.h>
 #include <stdint.h>
-#include <netinet/in.h>
 
 /*
  * A ROA.
index 34d074ac2be7b2684ee1c1f1758f8bfc34229618..9b02ac1e0a86c1f22cfafd773805a0b3496877f0 100644 (file)
@@ -1,6 +1,5 @@
 #include "validation_handler.h"
 
-#include <errno.h>
 #include "log.h"
 #include "thread_var.h"
 
index 9e9b98ca10b048c219d48ec76a872ad25d376d1a..e8221ae9a6f66275ec896230b3ad821e99487c5b 100644 (file)
@@ -1,7 +1,6 @@
 #include "validation_run.h"
 
-#include <stdbool.h>
-#include <unistd.h>
+#include <errno.h>
 
 #include "config.h"
 #include "log.h"
index df71a2de7d245d5b902a9f3422f51b803c31877f..00d8a109ffe28b6527236d543e2d01071b09b215 100644 (file)
@@ -1,10 +1,9 @@
 #include "xml/relax_ng.h"
 
-#include <libxml/parser.h>
-#include <libxml/relaxng.h>
-#include <libxml/xmlmemory.h>
-#include <errno.h>
+#include <stdarg.h>
+#include <stddef.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 #include "log.h"