aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dlfcn.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/dlfcn.c b/dlfcn.c
index cd1ca83..475b069 100644
--- a/dlfcn.c
+++ b/dlfcn.c
@@ -46,10 +46,6 @@
46#endif 46#endif
47#include "dlfcn.h" 47#include "dlfcn.h"
48 48
49#if ((defined(_WIN32) || defined(WIN32)) && (defined(_MSC_VER)) )
50#define snprintf sprintf_s
51#endif
52
53/* Note: 49/* Note:
54 * MSDN says these functions are not thread-safe. We make no efforts to have 50 * MSDN says these functions are not thread-safe. We make no efforts to have
55 * any kind of thread safety. 51 * any kind of thread safety.
@@ -191,7 +187,11 @@ static void save_err_ptr_str( const void *ptr )
191{ 187{
192 char ptr_buf[19]; /* 0x<pointer> up to 64 bits. */ 188 char ptr_buf[19]; /* 0x<pointer> up to 64 bits. */
193 189
194 snprintf( ptr_buf, 19, "0x%p", ptr ); 190#ifdef _MSC_VER
191/* Supress warning C4996: 'sprintf': This function or variable may be unsafe */
192#pragma warning( suppress: 4996 )
193#endif
194 sprintf( ptr_buf, "0x%p", ptr );
195 195
196 save_err_str( ptr_buf ); 196 save_err_str( ptr_buf );
197} 197}