]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Add include guards and extern C
authorNick Terrell <terrelln@fb.com>
Sat, 28 Jan 2017 00:00:19 +0000 (16:00 -0800)
committerNick Terrell <terrelln@fb.com>
Sat, 28 Jan 2017 00:00:19 +0000 (16:00 -0800)
lib/common/pool.h
lib/compress/zstdmt_compress.c
lib/compress/zstdmt_compress.h

index c26f543fcbd8f236faa6404cbcc1dce4191806d0..50cb25b12c9f165309e110ea9b19dc88b64ca182 100644 (file)
@@ -9,6 +9,11 @@
 #ifndef POOL_H
 #define POOL_H
 
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
+
 #include <stddef.h>   /* size_t */
 
 typedef struct POOL_ctx_s POOL_ctx;
@@ -43,4 +48,9 @@ typedef void (*POOL_add_function)(void *, POOL_function, void *);
 */
 void POOL_add(void *ctx, POOL_function function, void *opaque);
 
+
+#if defined (__cplusplus)
+}
+#endif
+
 #endif
index 5f0bf2ab15f864d04ba648940b175626612c2256..7423d9db78ddb631765ee7a1d0000cd72a08317d 100644 (file)
@@ -21,7 +21,7 @@
 /* ======   Dependencies   ====== */
 #include <stdlib.h>   /* malloc */
 #include <string.h>   /* memcpy */
-#include <pool.h>     /* threadpool */
+#include "pool.h"     /* threadpool */
 #include "threading.h"  /* mutex */
 #include "zstd_internal.h"   /* MIN, ERROR, ZSTD_*, ZSTD_highbit32 */
 #include "zstdmt_compress.h"
index 92de52d652e1bcee59c3b8b49fc5bd03dd084ff2..3a26b93d78200941f6923b3de85a0deb8e3d193c 100644 (file)
@@ -7,6 +7,13 @@
  * of patent rights can be found in the PATENTS file in the same directory.
  */
 
+ #ifndef ZSTDMT_COMPRESS_H
+ #define ZSTDMT_COMPRESS_H
+
+ #if defined (__cplusplus)
+ extern "C" {
+ #endif
+
 
 /* Note : All prototypes defined in this file shall be considered experimental.
  *        There is no guarantee of API continuity (yet) on any of these prototypes */
@@ -62,3 +69,10 @@ typedef enum {
  * Parameters not explicitly reset by ZSTDMT_init*() remain the same in consecutive compression sessions.
  * @return : 0, or an error code (which can be tested using ZSTD_isError()) */
 ZSTDLIB_API size_t ZSTDMT_setMTCtxParameter(ZSTDMT_CCtx* mtctx, ZSDTMT_parameter parameter, unsigned value);
+
+
+#if defined (__cplusplus)
+}
+#endif
+
+#endif   /* ZSTDMT_COMPRESS_H */