summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/Error.c18
2 files changed, 2 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index ae3db02..c75e832 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,8 +70,6 @@ case $host_os in
[Define to 1 if you have the "poll" function.]))
;;
esac
-AC_CHECK_FUNC(snprintf, AC_DEFINE(USE_SNPRINTF,1,
- [Define to 1 if you have the "snprintf" function.]))
AC_HAVE_LIBRARY(ws2_32)
diff --git a/src/Error.c b/src/Error.c
index 1112ef9..fc9b11a 100644
--- a/src/Error.c
+++ b/src/Error.c
@@ -233,11 +233,6 @@ static void DefaultMsg (
void (*fn)(_Xconst _XtString))
{
#define BIGBUF 1024
-#ifdef notyet /* older versions don't, might want to wait until more do */
-#if defined(__linux__) || defined(CSRG_BASED) /* everyone else needs to get with the program */
-#define USE_SNPRINTF
-#endif
-#endif
char buffer[BIGBUF];
char* message;
XtGetErrorDatabaseText(name,type,class,defaultp, buffer, BIGBUF);
@@ -302,18 +297,9 @@ program as a non-root user or by removing the suid bit on the executable.");
* to be a performance issue.
*/
if ((message = __XtMalloc (BIGBUF))) {
-#ifndef USE_SNPRINTF
- message[BIGBUF-1] = 0;
- (void) sprintf (message, buffer,
-#else
(void) snprintf (message, BIGBUF, buffer,
-#endif
- par[0], par[1], par[2], par[3], par[4],
- par[5], par[6], par[7], par[8], par[9]);
-#ifndef USE_SNPRINTF
- if (message[BIGBUF-1] != '\0')
- XtWarning ("Possible heap corruption in Xt{Error,Warning}MsgHandler");
-#endif
+ par[0], par[1], par[2], par[3], par[4],
+ par[5], par[6], par[7], par[8], par[9]);
(*fn)(message);
XtFree(message);
} else {