[patchteam] Add mrtg software package - Signed-off: Paolo Pisati <p.pisati@gmail...
[openwrt/svn-archive/archive.git] / net / mrtg / patches / 001-rm-printf-longlong-fmt-test.patch
1 --- mrtg-2.17.3.orig/configure.in 2011-12-25 23:54:18.284584003 +0100
2 +++ mrtg-2.17.3/configure.in 2011-12-25 23:54:52.377260252 +0100
3 @@ -19,47 +19,6 @@
4
5 AC_PATH_PROGS(NROFF, groff nroff)
6
7 -dnl Check for long long type (64 bit rateup)
8 -AC_CHECK_HEADERS(inttypes.h)
9 -AC_CHECK_TYPE(unsigned long long)
10 -AC_CHECK_TYPE(long long)
11 -AC_CHECK_FUNCS(strtoll)
12 -
13 -# Taken from libIDL-0.8.2
14 -AC_MSG_CHECKING([for printf long long format specifier])
15 -AC_CACHE_VAL(long_long_format_specifier,[
16 - for format in ll l q I64; do
17 - AC_TRY_RUN([#include <stdio.h>
18 - int main()
19 - {
20 - long long b, a = -0x3AFAFAFAFAFAFAFALL;
21 - char buffer[1000];
22 - sprintf (buffer, "%${format}u", a);
23 - sscanf (buffer, "%${format}u", &b);
24 - exit (b!=a);
25 - }
26 - ],
27 - long_long_format_specifier="%${format}d"
28 - long_long_format="${format}d"
29 - break)
30 - done])
31 -AC_MSG_RESULT($long_long_format_specifier)
32 -AC_DEFINE_UNQUOTED(LLD, "$long_long_format_specifier",
33 - [How to print a long long])
34 -AC_DEFINE_UNQUOTED(LLD_FORMAT, "$long_long_format",
35 - [long long format without % specifier])
36 -
37 -AH_BOTTOM(
38 -#ifndef HAVE_STRTOLL
39 -long long int strtoll(const char *str, char **ptr, int base)
40 -{
41 - long long int ll;
42 - sscanf(str, LLD, &ll);
43 - return ll;
44 -}
45 -#endif
46 -)
47 -
48 dnl Checks for libraries.
49 AC_CHECK_LIB(m, pow, [ MATHLIBS="-lm" ])
50
51 --- mrtg-2.17.3.orig/configure 2011-12-26 00:02:43.178539074 +0100
52 +++ mrtg-2.17.3/configure 2011-12-26 00:04:09.056241468 +0100
53 @@ -3609,60 +3609,6 @@
54 done
55
56
57 -# Taken from libIDL-0.8.2
58 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf long long format specifier" >&5
59 -$as_echo_n "checking for printf long long format specifier... " >&6; }
60 -if test "${long_long_format_specifier+set}" = set; then :
61 - $as_echo_n "(cached) " >&6
62 -else
63 -
64 - for format in ll l q I64; do
65 - if test "$cross_compiling" = yes; then :
66 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
67 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
68 -as_fn_error $? "cannot run test program while cross compiling
69 -See \`config.log' for more details" "$LINENO" 5 ; }
70 -else
71 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72 -/* end confdefs.h. */
73 -#include <stdio.h>
74 - int main()
75 - {
76 - long long b, a = -0x3AFAFAFAFAFAFAFALL;
77 - char buffer[1000];
78 - sprintf (buffer, "%${format}u", a);
79 - sscanf (buffer, "%${format}u", &b);
80 - exit (b!=a);
81 - }
82 -
83 -_ACEOF
84 -if ac_fn_c_try_run "$LINENO"; then :
85 - long_long_format_specifier="%${format}d"
86 - long_long_format="${format}d"
87 - break
88 -fi
89 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
90 - conftest.$ac_objext conftest.beam conftest.$ac_ext
91 -fi
92 -
93 - done
94 -fi
95 -
96 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $long_long_format_specifier" >&5
97 -$as_echo "$long_long_format_specifier" >&6; }
98 -
99 -cat >>confdefs.h <<_ACEOF
100 -#define LLD "$long_long_format_specifier"
101 -_ACEOF
102 -
103 -
104 -cat >>confdefs.h <<_ACEOF
105 -#define LLD_FORMAT "$long_long_format"
106 -_ACEOF
107 -
108 -
109 -
110 -
111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
112 $as_echo_n "checking for pow in -lm... " >&6; }
113 if test "${ac_cv_lib_m_pow+set}" = set; then :