]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Maintenance: automate header guards 1/3 (#1654) (#1669)
authorFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Tue, 13 Feb 2024 17:57:27 +0000 (17:57 +0000)
committerGitHub <noreply@github.com>
Tue, 13 Feb 2024 17:57:27 +0000 (06:57 +1300)
In preparation for merging the automated header-guards maintenance
script, merge the manual changes required for that script to succeed.

18 files changed:
lib/rfcnb/byteorder.h
lib/smblib/smbdes.h
src/acl/AnnotateClient.h
src/acl/AnnotateTransaction.h
src/acl/external/kerberos_ldap_group/support.h
src/adaptation/ecap/Registry.h
src/auth/State.h
src/auth/basic/NIS/nis_support.h
src/auth/basic/RADIUS/radius-util.h
src/auth/basic/RADIUS/radius.h
src/auth/digest/LDAP/ldap_backend.h
src/auth/digest/eDirectory/edir_ldapext.h
src/auth/digest/eDirectory/ldap_backend.h
src/auth/digest/file/text_backend.h
src/auth/negotiate/kerberos/negotiate_kerberos.h
src/dns/rfc3596.cc
src/tests/STUB.h
src/tests/TestSwapDir.h

index 1c2597783d2e126d1014d548d3ddfcb4916a2999..c2998ea8d56f2448660de48833680e0959dcf8bb 100644 (file)
@@ -34,6 +34,9 @@
  * int manipulation
  */
 
+#ifndef SQUID_LIB_RFCNB_BYTEORDER_H
+#define SQUID_LIB_RFCNB_BYTEORDER_H
+
 #undef CAREFUL_ALIGNMENT
 
 /* we know that the 386 can handle misalignment and has the "right"
@@ -87,3 +90,5 @@
 #define RSSVAL(buf,pos,val) SSVAL(buf,pos,SREV(val))
 #define RSIVAL(buf,pos,val) SIVAL(buf,pos,IREV(val))
 
+#endif /* SQUID_LIB_RFCNB_BYTEORDER_H */
+
index 94bb4434a0580f0a2fa985f55be20dee807723ef..ea8042e2cfbc1eff1ab1f0a0e25f43644f1fcaaf 100644 (file)
@@ -6,9 +6,13 @@
  * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
-/* smbdes.c */
+#ifndef SQUID_LIB_SMBLIB_SMBDES_H
+#define SQUID_LIB_SMBLIB_SMBDES_H
+
 void E_P16(unsigned char *p14, unsigned char *p16);
 void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24);
 void cred_hash1(unsigned char *out, unsigned char *in, unsigned char *key);
 void cred_hash2(unsigned char *out, unsigned char *in, unsigned char *key);
 
+#endif /* SQUID_LIB_SMBLIB_SMBDES_H */
+
index ec4df279c3aaf958961eb7d08914bea6ed6bd02d..35bb4fd3d4f4847a867c54a9f4a5ce20d3b65ee2 100644 (file)
@@ -6,8 +6,8 @@
  * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
-#ifndef SQUID_ACLANNOTATECLIENT
-#define SQUID_ACLANNOTATECLIENT
+#ifndef SQUID_SRC_ACL_ANNOTATECLIENT_H
+#define SQUID_SRC_ACL_ANNOTATECLIENT_H
 
 #include "acl/Note.h"
 #include "Notes.h"
@@ -20,5 +20,5 @@ public:
     int match(ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
-#endif /* SQUID_ACLANNOTATECLIENT */
+#endif /* SQUID_SRC_ACL_ANNOTATECLIENT_H */
 
index 08211e1039365d0f705ca4d655b49c07a17e07d6..69718011e9bc9d2513c96c02df18603c11ea8043 100644 (file)
@@ -6,8 +6,8 @@
  * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
-#ifndef SQUID_ACLANNOTATETRANSACTION
-#define SQUID_ACLANNOTATETRANSACTION
+#ifndef SQUID_SRC_ACL_ANNOTATETRANSACTION_H
+#define SQUID_SRC_ACL_ANNOTATETRANSACTION_H
 
 #include "acl/Note.h"
 #include "Notes.h"
@@ -20,5 +20,5 @@ public:
     bool requiresRequest() const override { return true; }
 };
 
-#endif /* SQUID_ACLANNOTATETRANSACTION */
+#endif /* SQUID_SRC_ACL_ANNOTATETRANSACTION_H */
 
index ffc4262373acf48492270f71729c0fbd3a9e47a1..d2b66a186f87df61d4593bd2c2b4489b569dfb2d 100644 (file)
@@ -30,6 +30,9 @@
  * -----------------------------------------------------------------------------
  */
 
+#ifndef SQUID_SRC_ACL_EXTERNAL_KERBEROS_LDAP_GROUP_SUPPORT_H
+#define SQUID_SRC_ACL_EXTERNAL_KERBEROS_LDAP_GROUP_SUPPORT_H
+
 #define KERBEROS_LDAP_GROUP_VERSION "1.4.0sq"
 
 #include "compat/krb5.h"
@@ -165,3 +168,5 @@ void krb5_cleanup(void);
 
 #define PROGRAM "kerberos_ldap_group"
 
+#endif /* SQUID_SRC_ACL_EXTERNAL_KERBEROS_LDAP_GROUP_SUPPORT_H */
+
index fe5d5a7842b46a60379c001caffbd8fd8a66975e..62172ae66859f403398d987547f933c86751244a 100644 (file)
@@ -6,5 +6,10 @@
  * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
+#ifndef SQUID_SRC_ADAPTATION_ECAP_REGISTRY_H
+#define SQUID_SRC_ADAPTATION_ECAP_REGISTRY_H
+
 // TBD
 
+#endif /* SQUID_SRC_ADAPTATION_ECAP_REGISTRY_H */
+
index 4931832c19f42240534e087226a424bf0220579c..6f42d93506facba4b071db09ff352daca53c401e 100644 (file)
@@ -6,8 +6,8 @@
  * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
-#ifndef __AUTH_AUTHENTICATE_STATE_T__
-#define __AUTH_AUTHENTICATE_STATE_T__
+#ifndef SQUID_SRC_AUTH_STATE_H
+#define SQUID_SRC_AUTH_STATE_H
 
 #if USE_AUTH
 
@@ -43,5 +43,5 @@ public:
 } // namespace Auth
 
 #endif /* USE_AUTH */
-#endif /* __AUTH_AUTHENTICATE_STATE_T__ */
+#endif /* SQUID_SRC_AUTH_STATE_H */
 
index ae3f1a3fd8ad6a0e8d8162b6e61ac2b7f1b030e9..4282b0ea3dc3331f378297897e8b7a7f35e23964 100644 (file)
@@ -6,5 +6,10 @@
  * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
+#ifndef SQUID_SRC_AUTH_BASIC_NIS_NIS_SUPPORT_H
+#define SQUID_SRC_AUTH_BASIC_NIS_NIS_SUPPORT_H
+
 extern char * get_nis_password(char *user, char *nisdomain, char *nismap);
 
+#endif /* SQUID_SRC_AUTH_BASIC_NIS_NIS_SUPPORT_H */
+
index 8020d4951311a939b434f690800d8f1ac6896ca8..37cea6e7ebbc2cf0137c653ce81861667ade65fe 100644 (file)
@@ -8,9 +8,14 @@
 
 // 2008-05-14: rename to radius-util.* to avoid name clashes with squid util.*
 
+#ifndef SQUID_SRC_AUTH_BASIC_RADIUS_RADIUS_UTIL_H
+#define SQUID_SRC_AUTH_BASIC_RADIUS_RADIUS_UTIL_H
+
 // uses the squid utilities
 #include "util.h"
 
 /* util.c */
 uint32_t        get_ipaddr (char *);
 
+#endif /* SQUID_SRC_AUTH_BASIC_RADIUS_RADIUS_UTIL_H */
+
index ccbebdf058fbacd67a644b2ec191ff089454fc8e..da7ccdeb7cef3e3d48138c9c04e4a0c9a829bd87 100644 (file)
@@ -37,6 +37,9 @@
  *  @(#)radius.h    2.0  03-Aug-1996
  */
 
+#ifndef SQUID_SRC_AUTH_BASIC_RADIUS_RADIUS_H
+#define SQUID_SRC_AUTH_BASIC_RADIUS_RADIUS_H
+
 #define AUTH_VECTOR_LEN     16
 #define AUTH_PASS_LEN       16
 #define AUTH_STRING_LEN     128 /* maximum of 254 */
@@ -200,3 +203,5 @@ typedef struct pw_auth_hdr {
 #define PW_STATUS_ACCOUNTING_ON     7
 #define PW_STATUS_ACCOUNTING_OFF    8
 
+#endif /* SQUID_SRC_AUTH_BASIC_RADIUS_RADIUS_H */
+
index a76dd3b2b5135120c1b6785b1625da2bf42f55f3..959db56a4cfb3d1fbfb3692138e84ee9b3419b6f 100644 (file)
  * AUTHOR: Flavio Pescuma. <flavio@marasystems.com>
  */
 
+#ifndef SQUID_SRC_AUTH_DIGEST_LDAP_LDAP_BACKEND_H
+#define SQUID_SRC_AUTH_DIGEST_LDAP_LDAP_BACKEND_H
+
 #include "auth/digest/LDAP/digest_common.h"
 
 extern int LDAPArguments(int argc, char **argv);
 extern void LDAPHHA1(RequestData * requestData);
 
+#endif /* SQUID_SRC_AUTH_DIGEST_LDAP_LDAP_BACKEND_H */
+
index 2a8051122ac39e1b124335d265a3aabd41d78b0c..aaea9cc8820944372932986656b02a5f6bfa1867 100644 (file)
@@ -6,5 +6,14 @@
  * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
+#ifndef SQUID_SRC_AUTH_DIGEST_EDIRECTORY_EDIR_LDAPEXT_H
+#define SQUID_SRC_AUTH_DIGEST_EDIRECTORY_EDIR_LDAPEXT_H
+
+#if HAVE_LDAP_H
+#include <ldap.h>
+#endif
+
 int nds_get_password(LDAP *ld, char *object_dn, size_t * pwd_len, char *pwd);
 
+#endif /* SQUID_SRC_AUTH_DIGEST_EDIRECTORY_EDIR_LDAPEXT_H */
+
index 16e2b04a22a4bf76ee60741af4b8f4fa927480d5..5b3d90133f1b8a31177987a6d62213a4f5b238c1 100644 (file)
  * AUTHOR: Flavio Pescuma. <flavio@marasystems.com>
  */
 
+#ifndef SQUID_SRC_AUTH_DIGEST_EDIRECTORY_LDAP_BACKEND_H
+#define SQUID_SRC_AUTH_DIGEST_EDIRECTORY_LDAP_BACKEND_H
+
 #include "auth/digest/eDirectory/digest_common.h"
 extern int LDAPArguments(int argc, char **argv);
 extern void LDAPHHA1(RequestData * requestData);
 
+#endif /* SQUID_SRC_AUTH_DIGEST_EDIRECTORY_LDAP_BACKEND_H */
+
index 16db88ffe7778cc2d4cef8e52a26c1cfd464e92e..0bbf687defd57e41f8a6bffed1fff0b97b35558d 100644 (file)
@@ -6,8 +6,13 @@
  * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
+#ifndef SQUID_SRC_AUTH_DIGEST_FILE_TEXT_BACKEND_H
+#define SQUID_SRC_AUTH_DIGEST_FILE_TEXT_BACKEND_H
+
 #include "auth/digest/file/digest_common.h"
 
 extern void TextArguments(int argc, char **argv);
 extern void TextHHA1(RequestData * requestData);
 
+#endif /* SQUID_SRC_AUTH_DIGEST_FILE_TEXT_BACKEND_H */
+
index 9f309c4ee69e3d8aa2a4f0e1f0040be7249e9da7..6ea228b24bb43da0e66755807a64f3bb43598f43 100644 (file)
@@ -35,6 +35,9 @@
  * -----------------------------------------------------------------------------
  */
 
+#ifndef SQUID_SRC_AUTH_NEGOTIATE_KERBEROS_NEGOTIATE_KERBEROS_H
+#define SQUID_SRC_AUTH_NEGOTIATE_KERBEROS_NEGOTIATE_KERBEROS_H
+
 #include <cstring>
 #include <ctime>
 #if HAVE_NETDB_H
@@ -148,3 +151,5 @@ char *get_ad_groups(char *ad_groups, krb5_context context, krb5_pac pac);
 #endif
 int check_k5_err(krb5_context context, const char *msg, krb5_error_code code);
 
+#endif /* SQUID_SRC_AUTH_NEGOTIATE_KERBEROS_NEGOTIATE_KERBEROS_H */
+
index d489bdfb291de29be1dc0f2ffc1c49e6c25aaae7..7573aac667667f68b351dccef784444100018502 100644 (file)
@@ -27,7 +27,7 @@
 #include <strings.h>
 #endif
 
-#ifndef SQUID_RFC1035_H
+#if !defined(RFC1035_MAXHOSTNAMESZ)
 #error RFC3596 Library depends on RFC1035
 #endif
 
index ed2c0d67dd7745eff38725d09b8b470373808ab8..12d79f3ecea9bf0e0f20b2cb1274dc7e509a4ec8 100644 (file)
@@ -6,7 +6,8 @@
  * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
-#ifndef STUB
+#ifndef SQUID_SRC_TESTS_STUB_H
+#define SQUID_SRC_TESTS_STUB_H
 
 /** \group STUB
  *
@@ -53,5 +54,5 @@
 /** Same as STUB_RETREF(). TODO: Remove */
 #define STUB_RETSTATREF(x) STUB_RETREF(x)
 
-#endif /* STUB */
+#endif /* SQUID_SRC_TESTS_STUB_H */
 
index 60009f35c2cbb56d388258ba8e38da6e79c576b1..e8e7bb3e718587e74f0fe23f03482673b27e4b50 100644 (file)
@@ -6,8 +6,8 @@
  * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
-#ifndef TEST_TESTSWAPDIR
-#define TEST_TESTSWAPDIR
+#ifndef SQUID_SRC_TESTS_TESTSWAPDIR_H
+#define SQUID_SRC_TESTS_TESTSWAPDIR_H
 
 #include "store/Disk.h"
 
@@ -41,5 +41,5 @@ public:
 
 typedef RefCount<TestSwapDir> TestSwapDirPointer;
 
-#endif  /* TEST_TESTSWAPDIR */
+#endif /* SQUID_SRC_TESTS_TESTSWAPDIR_H */