]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
added simple guard macros
authorYann Collet <cyan@fb.com>
Wed, 24 Oct 2018 00:55:23 +0000 (17:55 -0700)
committerYann Collet <cyan@fb.com>
Wed, 24 Oct 2018 00:55:23 +0000 (17:55 -0700)
in case of accidental multi-includes

lib/decompress/zstd_ddict.h
lib/decompress/zstd_decompress_internal.h

index 01449d29121a66cdf1c2993daa36c7c2467d9067..87bbbca6e1604d6e4e3bd01cd7dc24df2697e7f7 100644 (file)
@@ -8,7 +8,11 @@
  * You may select, at your option, one of the above-listed licenses.
  */
 
- /*-*******************************************************
+
+#ifndef ZSTD_DDICT_H
+#define ZSTD_DDICT_H
+
+/*-*******************************************************
  *  Dependencies
  *********************************************************/
 #include <stddef.h>   /* size_t */
 
 
 /*-*******************************************************
-*  Interface
-*********************************************************/
+ *  Interface
+ *********************************************************/
 
 const void* ZSTD_DDict_dictContent(const ZSTD_DDict* ddict);
 size_t ZSTD_DDict_dictSize(const ZSTD_DDict* ddict);
 
 void ZSTD_copyDDictParameters(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict);
+
+
+#endif /* ZSTD_DDICT_H */
index f450b3dcf22f69f17c1feed5376e8d15d3e7a4e7..3de8e4e7def86f3ab5b2dcfda469396edb98f3a8 100644 (file)
@@ -12,6 +12,9 @@
 /* zstd_decompress_internal:
  * objects and definitions shared within lib/decompress modules */
 
+ #ifndef ZSTD_DECOMPRESS_INTERNAL_H
+ #define ZSTD_DECOMPRESS_INTERNAL_H
+
 
 /*-*******************************************************
  *  Dependencies
@@ -115,3 +118,6 @@ struct ZSTD_DCtx_s
   * @return : size of entropy tables read */
  size_t ZSTD_loadDEntropy(ZSTD_entropyDTables_t* entropy,
                     const void* const dict, size_t const dictSize);
+
+
+#endif /* ZSTD_DECOMPRESS_INTERNAL_H */