mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-09-22 10:43:39 -04:00
Cleaner way to handle MSVC's _snprintf() underscore damage
Some versions of MSVC have snprintf() and vsnprintf() only with a leading underscore. Handle that a bit more cleanly.
This commit is contained in:
10
compiler.h
10
compiler.h
@@ -37,4 +37,14 @@
|
||||
# define _unused
|
||||
#endif
|
||||
|
||||
/* Some versions of MSVC have these only with underscores in front */
|
||||
|
||||
#if !defined(HAVE_SNPRINTF) && defined(HAVE__SNPRINTF)
|
||||
# define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_VSNPRINTF) && defined(HAVE__VSNPRINTF)
|
||||
# define vsnprintf _vsnprintf
|
||||
#endif
|
||||
|
||||
#endif /* COMPILER_H */
|
||||
|
Reference in New Issue
Block a user