]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - tools/purge/squid-tlv.hh
Source Format Enforcement (#763)
[thirdparty/squid.git] / tools / purge / squid-tlv.hh
index 07a582a3295de6e1822103d4abc2f2865fede7b3..84df518c2bf8537ccae0c4b7ed0a3d4650bd2e0c 100644 (file)
@@ -1,6 +1,11 @@
-//
-// $Id: squid-tlv.hh,v 1.1 1999/06/15 21:10:16 voeckler Exp $
-//
+/*
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
 // Author:  Jens-S. V?ckler <voeckler@rvs.uni-hannover.de>
 //
 // File:    squid-tlv.hh
 // Revision 1.1  1999/06/15 21:10:16  voeckler
 // Initial revision
 //
-#ifndef _SQUID_TLV_HH
-#define _SQUID_TLV_HH
+#ifndef SQUID_TLV_HH
+#define SQUID_TLV_HH
 
-#if defined(__GNUC__) || defined(__GNUG__)
-#pragma interface
-#else
-#ifndef HAS_BOOL
-#define HAS_BOOL
+#if !defined(__cplusplus)
+#ifndef HAVE_BOOL
+#define HAVE_BOOL
 typedef int bool;
 #define false 0
 #define true  1
 #endif
-#endif
+#endif /* __cplusplus */
 
 #include <sys/types.h>
 #include <netinet/in.h>
@@ -66,7 +69,7 @@ enum SquidMetaType {
   STORE_META_VALID,
   STORE_META_VARY_HEADERS,     // Stores Vary request headers
   STORE_META_STD_LFS,          // standard metadata in lfs format
-  STORE_META_OBJSIZE,          // object size, if its known
+  STORE_META_OBJSIZE           // object size, if its known
 };
 
 // taken from Squid-2.x
@@ -76,8 +79,8 @@ struct StoreMetaStd {
   time_t  expires;
   time_t  lastmod;
   size_t  swap_file_sz;
-  u_short refcount;
-  u_short flags;
+  uint16_t refcount;
+  uint16_t flags;
 };
 
 struct StoreMetaStdLFS {
@@ -85,9 +88,9 @@ struct StoreMetaStdLFS {
   time_t  lastref;
   time_t  expires;
   time_t  lastmod;
-  uint64_t  swap_file_sz;
-  u_short refcount;
-  u_short flags;
+  uint64_t swap_file_sz;
+  uint16_t refcount;
+  uint16_t flags;
 };
 
 struct SquidTLV {
@@ -115,4 +118,4 @@ private:
   SquidTLV* tail;
 };
 
-#endif // _SQUID_TLV_HH
+#endif // SQUID_TLV_HH