aboutsummaryrefslogtreecommitdiffstats
path: root/meta-cgl-common/recipes-cgl/ucarp/ucarp/ucarp-configure-snprintf.patch
blob: adcdf64eb57a7adcd73c1bddd8577c63b18fb71e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Configure snprintf option properly

Work around a cross-compiling configuration problem by
defaulting the CONF_SNPRINTF_TYPE option in the top-level
Makefile, as opposed through configure.

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Greff Moffatt <gregg.moffatt@windriver.com>
Signed-off-by: Aws Ismail <aws.ismail@windriver.com>

diff --git a/configure.ac b/configure.ac
index 3978c43..da18a62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -199,39 +199,6 @@ if test -r /dev/random; then
   AC_DEFINE(HAVE_DEV_RANDOM,,[Define if you have /dev/random])
 fi
 
-AC_MSG_CHECKING(whether snprintf is C99 conformant)
-AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <stdio.h>
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# if HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-int main(void)
-{
-    char buf[4];
-    
-    (void) fprintf(fopen("conftestval", "w"), "%d\n",
-        (int) snprintf(buf, sizeof buf, "12345678"));
-    return 0;
-}
-]])],[CONF_SNPRINTF_TYPE=`cat conftestval`
-],[],[])
-AC_MSG_RESULT(done)
-if test "x$CONF_SNPRINTF_TYPE" = "x" ; then
-  AC_MSG_WARN(your operating system doesn't implement snprintf)
-else
-  AC_DEFINE_UNQUOTED(CONF_SNPRINTF_TYPE, $CONF_SNPRINTF_TYPE,
-                     [return value of an overflowed snprintf])
-fi
-
 AC_MSG_CHECKING([whether syslog names are available])
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #define SYSLOG_NAMES 1