From 4554c6da427579b9eee428838823937cc624317b Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 31 Jan 2021 17:17:40 +0100 Subject: [PATCH] * builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`. --- ChangeLog | 5 ++++- builds/windows/ftdebug.c | 34 ++++++++++++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 119e71d69..319a989ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2021-01-31 Werner Lemberg + + * builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`. + 2021-01-31 Werner Lemberg Always provide logging API. @@ -8,7 +12,6 @@ Problem reported by Alexei. * src/base/ftdebug.c: Include `ftlogging.h`. - (FT_Trace_Set_Level, FT_Trace_Set_Default_Level, FT_Set_Log_Handler, FT_Set_Default_Log_Handler) [!FT_DEBUG_LOGGING]: Provide stubs. diff --git a/builds/windows/ftdebug.c b/builds/windows/ftdebug.c index 4c0bf5ef4..a1aedb8e0 100644 --- a/builds/windows/ftdebug.c +++ b/builds/windows/ftdebug.c @@ -42,6 +42,7 @@ #include +#include #include #include @@ -602,7 +603,7 @@ /* documentation is in ftlogging.h */ FT_EXPORT_DEF( void ) - FT_Set_Default_Log_Handler() + FT_Set_Default_Log_Handler( void ) { custom_output_handler = NULL; } @@ -621,7 +622,36 @@ va_end( ap ); } -#endif /* FT_DEBUG_LOGGING */ +#else /* !FT_DEBUG_LOGGING */ + + FT_EXPORT_DEF( void ) + FT_Trace_Set_Level( const char* level ) + { + FT_UNUSED( level ); + } + + + FT_EXPORT_DEF( void ) + FT_Trace_Set_Default_Level( void ) + { + /* nothing */ + } + + + FT_EXPORT_DEF( void ) + FT_Set_Log_Handler( FT_Custom_Log_Handler handler ) + { + FT_UNUSED( handler ); + } + + + FT_EXPORT_DEF( void ) + FT_Set_Default_Log_Handler( void ) + { + /* nothing */ + } + +#endif /* !FT_DEBUG_LOGGING */ /* END */