[PATCH libXmu 1/1] config: remove config test for snprintf

Gaetan Nadon memsize at videotron.ca
Wed Feb 2 17:02:59 PST 2011


The macro HAS_SNPRINTF is hard coded to always be defined.
If it were not defined, Lower.c would include snprintf.c
which does not exit. Seems to be relics from IMakefile

Other modules are using snprintf unconditionally.

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 configure.ac |   17 -----------------
 src/Lower.c  |    7 -------
 2 files changed, 0 insertions(+), 24 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9775463..880fc5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,23 +31,6 @@ PKG_CHECK_MODULES(XMUU, x11)
 # conversion routines for
 XTRANS_CONNECTION_FLAGS
 
-#
-# Assume that we have sprintf. If a system shows up
-# that doesn't, we will deal with it at that point.
-#
-# The way to deal with it is:
-#
-#  1. Add a test for sprintf it here in configure.ac
-#     that sets or unsets HAS_SNPRINTF as appropriate
-#
-#  2. add a copy of xc/lib/misc/snprintf.c
-#
-# The source file in question is Lower.c
-#
-
-AC_DEFINE(HAS_SNPRINTF, [], [Whether we have snprintf()])
-AC_SUBST(HAS_SNPRINTF)
-
 # Allow checking code with lint, sparse, etc.
 XORG_WITH_LINT
 XORG_LINT_LIBRARY([Xmu])
diff --git a/src/Lower.c b/src/Lower.c
index 4e44be1..7522cc1 100644
--- a/src/Lower.c
+++ b/src/Lower.c
@@ -33,13 +33,6 @@ in this Software without prior written authorization from The Open Group.
 #include <X11/Xmu/SysUtil.h>
 
 #include <stdio.h>
-
-#ifndef HAS_SNPRINTF
-#undef SCOPE
-#define SCOPE static
-#include "snprintf.c"
-#endif
-
 #include <stdarg.h>
 
 /*
-- 
1.6.0.4



More information about the xorg-devel mailing list