diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-03-02 09:19:48 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-03-02 09:19:48 +0000 |
commit | 77dc28d43e0f0a3a2ec7c61b3d6c9be8a4d0fa45 (patch) | |
tree | 9a5de720c81ad9403451b04adcb62ba010a1fad7 /contrib/zstd/debug.h | |
parent | 5e792b26110c4b84c93b2cc724d656f6d96b5135 (diff) | |
download | rspamd-77dc28d43e0f0a3a2ec7c61b3d6c9be8a4d0fa45.tar.gz rspamd-77dc28d43e0f0a3a2ec7c61b3d6c9be8a4d0fa45.zip |
[Minor] Update zstd to 1.5.4
Diffstat (limited to 'contrib/zstd/debug.h')
-rw-r--r-- | contrib/zstd/debug.h | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/contrib/zstd/debug.h b/contrib/zstd/debug.h index ac6224888..0e9817ea6 100644 --- a/contrib/zstd/debug.h +++ b/contrib/zstd/debug.h @@ -1,7 +1,7 @@ /* ****************************************************************** * debug * Part of FSE library - * Copyright (c) 2013-2020, Yann Collet, Facebook, Inc. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * You can contact the author at : * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy @@ -51,15 +51,6 @@ extern "C" { #endif -/* DEBUGFILE can be defined externally, - * typically through compiler command line. - * note : currently useless. - * Value must be stderr or stdout */ -#ifndef DEBUGFILE -# define DEBUGFILE stderr -#endif - - /* recommended values for DEBUGLEVEL : * 0 : release mode, no debug, all run-time checks disabled * 1 : enables assert() only, no display @@ -76,7 +67,8 @@ extern "C" { */ #if (DEBUGLEVEL>=1) -# include <assert.h> +# define ZSTD_DEPS_NEED_ASSERT +# include "zstd_deps.h" #else # ifndef assert /* assert may be already defined, due to prior #include <assert.h> */ # define assert(condition) ((void)0) /* disable assert (default) */ @@ -84,7 +76,8 @@ extern "C" { #endif #if (DEBUGLEVEL>=2) -# include <stdio.h> +# define ZSTD_DEPS_NEED_IO +# include "zstd_deps.h" extern int g_debuglevel; /* the variable is only declared, it actually lives in debug.c, and is shared by the whole process. @@ -92,14 +85,14 @@ extern int g_debuglevel; /* the variable is only declared, It's useful when enabling very verbose levels on selective conditions (such as position in src) */ -# define RAWLOG(l, ...) { \ - if (l<=g_debuglevel) { \ - fprintf(stderr, __VA_ARGS__); \ +# define RAWLOG(l, ...) { \ + if (l<=g_debuglevel) { \ + ZSTD_DEBUG_PRINT(__VA_ARGS__); \ } } -# define DEBUGLOG(l, ...) { \ - if (l<=g_debuglevel) { \ - fprintf(stderr, __FILE__ ": " __VA_ARGS__); \ - fprintf(stderr, " \n"); \ +# define DEBUGLOG(l, ...) { \ + if (l<=g_debuglevel) { \ + ZSTD_DEBUG_PRINT(__FILE__ ": " __VA_ARGS__); \ + ZSTD_DEBUG_PRINT(" \n"); \ } } #else # define RAWLOG(l, ...) {} /* disabled */ |