]> The Tcpdump Group git mirrors - libpcap/commitdiff
Merge pull request #568 from gvanem/master
authorGuy Harris <[email protected]>
Sun, 19 Mar 2017 22:13:57 +0000 (15:13 -0700)
committerGitHub <[email protected]>
Sun, 19 Mar 2017 22:13:57 +0000 (15:13 -0700)
MSVC's strdup() in _DEBUG mode

1  2 
portability.h

diff --cc portability.h
index d4343e62d564398b75be95f0add252c29ffb439b,f050ffa2720de4fee2343f353f22d0d790bf9500..179ecd92d70bb09db83c7d6164269c93c7064828
@@@ -87,8 -85,24 +87,10 @@@ extern "C" 
   #endif
  #endif
  
 -/*
 - * For flagging arguments as format strings in MSVC.
 - */
 -#if _MSC_VER >= 1400
 - #include <sal.h>
 - #if _MSC_VER > 1400
 -  #define FORMAT_STRING(p) _Printf_format_string_ p
 - #else
 -  #define FORMAT_STRING(p) __format_string p
 - #endif
 -#else
 - #define FORMAT_STRING(p) p
 -#endif
 -
  #ifdef _MSC_VER
+   #ifndef _DEBUG
    #define strdup      _strdup
+   #endif
    #define sscanf      sscanf_s
    #define setbuf(x, y) \
        setvbuf((x), (y), _IONBF, 0)