Prechádzať zdrojové kódy

structure: CAvl, CHash: detect if CAvl.h or CHash.h is not included in _header.h

ambrop7 13 rokov pred
rodič
commit
8d14680c53
2 zmenil súbory, kde vykonal 8 pridanie a 0 odobranie
  1. 4 0
      structure/CAvl_header.h
  2. 4 0
      structure/CHash_header.h

+ 4 - 0
structure/CAvl_header.h

@@ -51,6 +51,10 @@
 // CAVL_PARAM_MEMBER_COUNT - name of the count member in entry (type is CAVL_PARAM_TYPE_COUNT)
 //   (only if CAVL_PARAM_FEATURE_COUNTS)
 
+#ifndef BADVPN_CAVL_H
+#error CAvl.h has not been included
+#endif
+
 #if CAVL_PARAM_FEATURE_KEYS_ARE_INDICES && !CAVL_PARAM_FEATURE_COUNTS
 #error CAVL_PARAM_FEATURE_KEYS_ARE_INDICES requires CAVL_PARAM_FEATURE_COUNTS
 #endif

+ 4 - 0
structure/CHash_header.h

@@ -42,6 +42,10 @@
 // CHASH_PARAM_COMPARE_KEY_ENTRY(arg, key1, entry2) - compares key and entry; returns 1 for equality, 0 otherwise
 // CHASH_PARAM_ENTRY_NEXT - next member in entry
 
+#ifndef BADVPN_CHASH_H
+#error CHash.h has not been included
+#endif
+
 // types
 #define CHash CHASH_PARAM_NAME
 #define CHashEntry CHASH_PARAM_ENTRY