[libdvdcss-devel] [PATCH 2/2] win32: Drop #define of snprintf() to _snprintf() if the former is undefined.

Diego Biurrun diego at biurrun.de
Sat Oct 22 16:54:25 CEST 2011


This workaround was added for MinGW originally, but nowadays MinGW supports
snprintf() directly so it has become unnecessary.

Furthermore this can play havoc with Cygwin which does not have a _snprintf()
declaration and gives implicit function declaration warnings.  Depending on
compiler flags, this can be a fatal error.
---
 src/common.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/common.h b/src/common.h
index bee5aad..801b8c5 100644
--- a/src/common.h
+++ b/src/common.h
@@ -76,10 +76,6 @@ typedef __int64 off_t;
 #       define stat _stati64
 #   endif
 
-#   ifndef snprintf
-#       define snprintf _snprintf  /* snprintf not defined in mingw32 (bug?) */
-#   endif
-
 #endif
 
 #endif /* DVDCSS_COMMON_H */
-- 
1.7.3.4



More information about the libdvdcss-devel mailing list