From 0a8e15abfbc812e96d66038f250ecc117ed3623a Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Fri, 10 May 2002 01:33:40 +0000 Subject: [PATCH] Detect snprintf && _snprintf, use _snprintf on stupid platforms (windows). --- configure | 4 ++++ configure.ac | 2 ++ include/config.h.in | 6 ++++++ include/wine/port.h | 4 ++++ tools/wrc/ppy.y | 1 + 5 files changed, 17 insertions(+) diff --git a/configure b/configure index 2b777b70a8d..d24bdfee168 100755 --- a/configure +++ b/configure @@ -10288,11 +10288,14 @@ fi + + for ac_func in \ __libc_fork \ _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 -- 2.11.4.GIT