]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/store/forward.h
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / store / forward.h
index 1fa913c8bc0f52b9eedf4efd139e3814ac60fd75..781420de6912c2de572cb72b77bdd4472e6807e9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -9,7 +9,17 @@
 #ifndef SQUID_STORE_FORWARD_H
 #define SQUID_STORE_FORWARD_H
 
-typedef int32_t sfileno;
+// bug 4610 see comments 22-38
+// Nasty hack, but it turns out C++ allows int32_t to be
+// unsigned when used as a bitmask (as sfile* are later)
+#if INT_MAX == INT32_MAX
+typedef signed int signed_int32_t;
+#elif SHORT_MAX == INT32_MAX
+typedef signed short int signed_int32_t;
+#else
+#error I do not know how to typedef a signed 32bit integer.
+#endif
+typedef signed_int32_t sfileno;
 typedef signed int sdirno;
 
 /// maximum number of entries per cache_dir