diff --git a/configure b/configure index 2b777b70a8d..d24bdfee168 100755 --- a/configure +++ b/configure @@ -10285,6 +10285,8 @@ fi + + @@ -10293,6 +10295,7 @@ for ac_func in \ _lwp_create \ _pclose \ _popen \ + _snprintf \ _stricmp \ _strnicmp \ chsize \ @@ -10323,6 +10326,7 @@ for ac_func in \ sendmsg \ settimeofday \ sigaltstack \ + snprintf \ statfs \ strcasecmp \ strerror \ diff --git a/configure.ac b/configure.ac index 5fb801b7ec7..6bd8b7b0c81 100644 --- a/configure.ac +++ b/configure.ac @@ -857,6 +857,7 @@ AC_CHECK_FUNCS(\ _lwp_create \ _pclose \ _popen \ + _snprintf \ _stricmp \ _strnicmp \ chsize \ @@ -887,6 +888,7 @@ AC_CHECK_FUNCS(\ sendmsg \ settimeofday \ sigaltstack \ + snprintf \ statfs \ strcasecmp \ strerror \ diff --git a/include/config.h.in b/include/config.h.in index c023d279b5e..c6706f6dbf2 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -380,6 +380,9 @@ /* Define to 1 if the system has the type `size_t'. */ #undef HAVE_SIZE_T +/* Define to 1 if you have the `snprintf' function. */ +#undef HAVE_SNPRINTF + /* Define if struct sockaddr contains sa_len */ #undef HAVE_SOCKADDR_SA_LEN @@ -584,6 +587,9 @@ /* Define to 1 if you have the `_popen' function. */ #undef HAVE__POPEN +/* Define to 1 if you have the `_snprintf' function. */ +#undef HAVE__SNPRINTF + /* Define to 1 if you have the `_stricmp' function. */ #undef HAVE__STRICMP diff --git a/include/wine/port.h b/include/wine/port.h index d5065a47a0f..c4110f31192 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -116,6 +116,10 @@ struct statfs; #define pclose _pclose #endif +#if !defined(HAVE_SNPRINTF) && defined(HAVE__SNPRINTF) +#define snprintf _snprintf +#endif + #ifndef S_ISLNK # define S_ISLNK(mod) (0) #endif /* S_ISLNK */ diff --git a/tools/wrc/ppy.y b/tools/wrc/ppy.y index fc654895628..938475a9f17 100644 --- a/tools/wrc/ppy.y +++ b/tools/wrc/ppy.y @@ -29,6 +29,7 @@ %{ #include "config.h" +#include "wine/port.h" #include #include