]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Remove unnecessary extern C declarations from programs/ and contrib/
authorVictor Zhang <csv@meta.com>
Fri, 20 Dec 2024 00:20:23 +0000 (16:20 -0800)
committerVictor Zhang <csv@meta.com>
Fri, 20 Dec 2024 00:20:23 +0000 (16:20 -0800)
contrib/pzstd/test/PzstdTest.cpp
contrib/pzstd/test/RoundTripTest.cpp
programs/benchfn.h
programs/benchzstd.h
programs/datagen.h
programs/fileio.h
programs/fileio_asyncio.h
programs/fileio_common.h
programs/timefn.h

index 75453f5f6f3ea3737e2634761cc760c06e072e8f..3249f860af01946a1096a2a409694c981729200a 100644 (file)
@@ -7,9 +7,7 @@
  * in the COPYING file in the root directory of this source tree).
  */
 #include "Pzstd.h"
-extern "C" {
 #include "datagen.h"
-}
 #include "test/RoundTrip.h"
 #include "utils/ScopeGuard.h"
 
index c37646d1c446153e149a93d03d19b21eb4b43415..27c5028e8803a4bcc0e01db38cf20d736da46f13 100644 (file)
@@ -6,9 +6,7 @@
  * LICENSE file in the root directory of this source tree) and the GPLv2 (found
  * in the COPYING file in the root directory of this source tree).
  */
-extern "C" {
 #include "datagen.h"
-}
 #include "Options.h"
 #include "test/RoundTrip.h"
 #include "utils/ScopeGuard.h"
index 3ba3a4f5504b6f9cf1ede6afa1822ad77224535f..3fc6e0d0455180e2926b2d7206a2187854b6ad81 100644 (file)
 /* ===  Dependencies  === */
 #include <stddef.h>   /* size_t */
 
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
 /* ====  Benchmark any function, iterated on a set of blocks  ==== */
 
 /* BMK_runTime_t: valid result return type */
@@ -175,9 +170,4 @@ typedef union {
 } BMK_timedFnState_shell;
 BMK_timedFnState_t* BMK_initStatic_timedFnState(void* buffer, size_t size, unsigned total_ms, unsigned run_ms);
 
-
 #endif   /* BENCH_FN_H_23876 */
-
-#if defined (__cplusplus)
-}
-#endif
index 7ea018b12f18d473cd1e43baef9354ed4c8cc56a..5125c20e8afb6b23ec9b1ec1d7cddf553acff19b 100644 (file)
 #define ZSTD_STATIC_LINKING_ONLY   /* ZSTD_compressionParameters */
 #include "../lib/zstd.h"     /* ZSTD_compressionParameters */
 
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
 /* ===  Constants  === */
 
 #define MB_UNIT 1000000
@@ -194,7 +189,3 @@ BMK_benchOutcome_t BMK_benchMemAdvanced(const void* srcBuffer, size_t srcSize,
 
 
 #endif   /* BENCH_ZSTD_H_3242387 */
-
-#if defined (__cplusplus)
-}
-#endif
index ca72700063fda51c2df5d13464edb97f6f728e47..461fb716c43693aa87000a3373dc0f1a2af519b6 100644 (file)
 
 #include <stddef.h>   /* size_t */
 
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
 void RDG_genStdout(unsigned long long size, double matchProba, double litProba, unsigned seed);
 void RDG_genBuffer(void* buffer, size_t size, double matchProba, double litProba, unsigned seed);
 /*!RDG_genBuffer
@@ -27,4 +31,8 @@ void RDG_genBuffer(void* buffer, size_t size, double matchProba, double litProba
    Same as RDG_genBuffer, but generates data into stdout
 */
 
+#if defined (__cplusplus)
+} /* extern "C" */
+#endif
+
 #endif
index 224d89525dc2b39bf95b63bb30df84a1a0ce31f5..6babf40e1b1c3587e8a8b1406665570fb6ed7257 100644 (file)
 #define ZSTD_STATIC_LINKING_ONLY   /* ZSTD_compressionParameters */
 #include "../lib/zstd.h"           /* ZSTD_* */
 
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
 /* *************************************
 *  Special i/o constants
 **************************************/
@@ -173,9 +168,4 @@ char const* FIO_zlibVersion(void);
 char const* FIO_lz4Version(void);
 char const* FIO_lzmaVersion(void);
 
-
-#if defined (__cplusplus)
-}
-#endif
-
 #endif  /* FILEIO_H_23981798732 */
index 1c30a73da89d570fb85cec567aec49e19102f9fd..d4980ef5b01ee9acc3e9e80e70ca220374f17f80 100644 (file)
 
 #define MAX_IO_JOBS          (10)
 
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
 typedef struct {
     /* These struct fields should be set only on creation and not changed afterwards */
     POOL_ctx* threadPool;
@@ -196,8 +192,4 @@ FILE* AIO_ReadPool_getFile(const ReadPoolCtx_t *ctx);
  * Closes the current set file. Waits for all current enqueued tasks to complete and resets state. */
 int AIO_ReadPool_closeFile(ReadPoolCtx_t *ctx);
 
-#if defined (__cplusplus)
-}
-#endif
-
 #endif /* ZSTD_FILEIO_ASYNCIO_H */
index 87f99cda90ddbfe56fb39998efac36d62edf3da8..e073dc101730df34736b6ade490a4f60630e7ba4 100644 (file)
 #   include <windows.h>
 #endif
 
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
 /*-*************************************
 *  Macros
 ***************************************/
@@ -124,7 +120,4 @@ extern UTIL_time_t g_displayClock;
 #   define LONG_TELL ftell
 #endif
 
-#if defined (__cplusplus)
-}
-#endif
 #endif /* ZSTD_FILEIO_COMMON_H */
index dc7463be35272062c42ce53325b9d3cf9450239f..80f72e228a3541d518d25eb986433fe132eafda3 100644 (file)
   typedef unsigned long long PTime;  /* does not support compilers without long long support */
 #endif
 
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
 /* UTIL_time_t contains a nanosecond time counter.
  * The absolute value is not meaningful.
  * It's only valid to compute the difference between 2 measurements. */
@@ -61,9 +56,4 @@ PTime UTIL_clockSpanMicro(UTIL_time_t clockStart);
 
 #define SEC_TO_MICRO ((PTime)1000000)  /* nb of microseconds in a second */
 
-
-#if defined (__cplusplus)
-}
-#endif
-
 #endif /* TIME_FN_H_MODULE_287987 */