Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 276661 Details for
Bug 409811
SIZEOF_LONG is not defined
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
My proposal patch.
net-snmp-5.1.2-SIZEOF_LONG.patch (text/plain), 12.50 KB, created by
Atsushi Nakabayashi
on 2007-12-04 08:12:42 UTC
(
hide
)
Description:
My proposal patch.
Filename:
MIME Type:
Creator:
Atsushi Nakabayashi
Created:
2007-12-04 08:12:42 UTC
Size:
12.50 KB
patch
obsolete
>diff -uNrp net-snmp-5.1.2.org/configure net-snmp-5.1.2/configure >--- net-snmp-5.1.2.org/configure 2007-12-03 15:26:33.000000000 +0900 >+++ net-snmp-5.1.2/configure 2007-12-03 15:25:42.000000000 +0900 >@@ -9279,7 +9279,419 @@ cat >>confdefs.h <<_ACEOF > #define SNMPCONFPATH "$SNMPCONFPATH" > _ACEOF > >+echo "$as_me:$LINENO: checking for long" >&5 >+echo $ECHO_N "checking for long... $ECHO_C" >&6 >+if test "${ac_cv_type_long+set}" = set; then >+ echo $ECHO_N "(cached) $ECHO_C" >&6 >+else >+ cat >conftest.$ac_ext <<_ACEOF >+/* confdefs.h. */ >+_ACEOF >+cat confdefs.h >>conftest.$ac_ext >+cat >>conftest.$ac_ext <<_ACEOF >+/* end confdefs.h. */ >+$ac_includes_default >+int >+main () >+{ >+if ((long *) 0) >+ return 0; >+if (sizeof (long)) >+ return 0; >+ ; >+ return 0; >+} >+_ACEOF >+rm -f conftest.$ac_objext >+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >+ (eval $ac_compile) 2>conftest.er1 >+ ac_status=$? >+ grep -v '^ *+' conftest.er1 >conftest.err >+ rm -f conftest.er1 >+ cat conftest.err >&5 >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); } && >+ { ac_try='test -z "$ac_c_werror_flag" >+ || test ! -s conftest.err' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; } && >+ { ac_try='test -s conftest.$ac_objext' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; }; then >+ ac_cv_type_long=yes >+else >+ echo "$as_me: failed program was:" >&5 >+sed 's/^/| /' conftest.$ac_ext >&5 >+ >+ac_cv_type_long=no >+fi >+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext >+fi >+echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 >+echo "${ECHO_T}$ac_cv_type_long" >&6 >+ >+echo "$as_me:$LINENO: checking size of long" >&5 >+echo $ECHO_N "checking size of long... $ECHO_C" >&6 >+if test "${ac_cv_sizeof_long+set}" = set; then >+ echo $ECHO_N "(cached) $ECHO_C" >&6 >+else >+ if test "$ac_cv_type_long" = yes; then >+ # The cast to unsigned long works around a bug in the HP C Compiler >+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects >+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. >+ # This bug is HP SR number 8606223364. >+ if test "$cross_compiling" = yes; then >+ # Depending upon the size, compute the lo and hi bounds. >+cat >conftest.$ac_ext <<_ACEOF >+/* confdefs.h. */ >+_ACEOF >+cat confdefs.h >>conftest.$ac_ext >+cat >>conftest.$ac_ext <<_ACEOF >+/* end confdefs.h. */ >+$ac_includes_default >+int >+main () >+{ >+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; >+test_array [0] = 0 > >+ ; >+ return 0; >+} >+_ACEOF >+rm -f conftest.$ac_objext >+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >+ (eval $ac_compile) 2>conftest.er1 >+ ac_status=$? >+ grep -v '^ *+' conftest.er1 >conftest.err >+ rm -f conftest.er1 >+ cat conftest.err >&5 >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); } && >+ { ac_try='test -z "$ac_c_werror_flag" >+ || test ! -s conftest.err' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; } && >+ { ac_try='test -s conftest.$ac_objext' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; }; then >+ ac_lo=0 ac_mid=0 >+ while :; do >+ cat >conftest.$ac_ext <<_ACEOF >+/* confdefs.h. */ >+_ACEOF >+cat confdefs.h >>conftest.$ac_ext >+cat >>conftest.$ac_ext <<_ACEOF >+/* end confdefs.h. */ >+$ac_includes_default >+int >+main () >+{ >+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; >+test_array [0] = 0 >+ >+ ; >+ return 0; >+} >+_ACEOF >+ >+rm -f conftest.$ac_objext >+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >+ (eval $ac_compile) 2>conftest.er1 >+ ac_status=$? >+ grep -v '^ *+' conftest.er1 >conftest.err >+ rm -f conftest.er1 >+ cat conftest.err >&5 >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); } && >+ { ac_try='test -z "$ac_c_werror_flag" >+ || test ! -s conftest.err' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; } && >+ { ac_try='test -s conftest.$ac_objext' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; }; then >+ ac_hi=$ac_mid; break >+else >+ echo "$as_me: failed program was:" >&5 >+sed 's/^/| /' conftest.$ac_ext >&5 >+ >+ac_lo=`expr $ac_mid + 1` >+ if test $ac_lo -le $ac_mid; then >+ ac_lo= ac_hi= >+ break >+ fi >+ ac_mid=`expr 2 '*' $ac_mid + 1` >+fi >+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext >+ done >+else >+ echo "$as_me: failed program was:" >&5 >+sed 's/^/| /' conftest.$ac_ext >&5 >+ >+cat >conftest.$ac_ext <<_ACEOF >+/* confdefs.h. */ >+_ACEOF >+cat confdefs.h >>conftest.$ac_ext >+cat >>conftest.$ac_ext <<_ACEOF >+/* end confdefs.h. */ >+$ac_includes_default >+int >+main () >+{ >+static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; >+test_array [0] = 0 >+ >+ ; >+ return 0; >+} >+_ACEOF >+rm -f conftest.$ac_objext >+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >+ (eval $ac_compile) 2>conftest.er1 >+ ac_status=$? >+ grep -v '^ *+' conftest.er1 >conftest.err >+ rm -f conftest.er1 >+ cat conftest.err >&5 >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); } && >+ { ac_try='test -z "$ac_c_werror_flag" >+ || test ! -s conftest.err' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; } && >+ { ac_try='test -s conftest.$ac_objext' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; }; then >+ ac_hi=-1 ac_mid=-1 >+ while :; do >+ cat >conftest.$ac_ext <<_ACEOF >+/* confdefs.h. */ >+_ACEOF >+cat confdefs.h >>conftest.$ac_ext >+cat >>conftest.$ac_ext <<_ACEOF >+/* end confdefs.h. */ >+$ac_includes_default >+int >+main () >+{ >+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; >+test_array [0] = 0 >+ >+ ; >+ return 0; >+} >+_ACEOF >+rm -f conftest.$ac_objext >+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >+ (eval $ac_compile) 2>conftest.er1 >+ ac_status=$? >+ grep -v '^ *+' conftest.er1 >conftest.err >+ rm -f conftest.er1 >+ cat conftest.err >&5 >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); } && >+ { ac_try='test -z "$ac_c_werror_flag" >+ || test ! -s conftest.err' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; } && >+ { ac_try='test -s conftest.$ac_objext' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; }; then >+ ac_lo=$ac_mid; break >+else >+ echo "$as_me: failed program was:" >&5 >+sed 's/^/| /' conftest.$ac_ext >&5 >+ >+ac_hi=`expr '(' $ac_mid ')' - 1` >+ if test $ac_mid -le $ac_hi; then >+ ac_lo= ac_hi= >+ break >+ fi >+ ac_mid=`expr 2 '*' $ac_mid` >+fi >+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext >+ done >+else >+ echo "$as_me: failed program was:" >&5 >+sed 's/^/| /' conftest.$ac_ext >&5 >+ >+ac_lo= ac_hi= >+fi >+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext >+fi >+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext >+# Binary search between lo and hi bounds. >+while test "x$ac_lo" != "x$ac_hi"; do >+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` >+ cat >conftest.$ac_ext <<_ACEOF >+/* confdefs.h. */ >+_ACEOF >+cat confdefs.h >>conftest.$ac_ext >+cat >>conftest.$ac_ext <<_ACEOF >+/* end confdefs.h. */ >+$ac_includes_default >+int >+main () >+{ >+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; >+test_array [0] = 0 >+ >+ ; >+ return 0; >+} >+_ACEOF >+rm -f conftest.$ac_objext >+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >+ (eval $ac_compile) 2>conftest.er1 >+ ac_status=$? >+ grep -v '^ *+' conftest.er1 >conftest.err >+ rm -f conftest.er1 >+ cat conftest.err >&5 >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); } && >+ { ac_try='test -z "$ac_c_werror_flag" >+ || test ! -s conftest.err' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; } && >+ { ac_try='test -s conftest.$ac_objext' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; }; then >+ ac_hi=$ac_mid >+else >+ echo "$as_me: failed program was:" >&5 >+sed 's/^/| /' conftest.$ac_ext >&5 >+ >+ac_lo=`expr '(' $ac_mid ')' + 1` >+fi >+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext >+done >+case $ac_lo in >+?*) ac_cv_sizeof_long=$ac_lo;; >+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 >+See \`config.log' for more details." >&5 >+echo "$as_me: error: cannot compute sizeof (long), 77 >+See \`config.log' for more details." >&2;} >+ { (exit 1); exit 1; }; } ;; >+esac >+else >+ if test "$cross_compiling" = yes; then >+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling >+See \`config.log' for more details." >&5 >+echo "$as_me: error: cannot run test program while cross compiling >+See \`config.log' for more details." >&2;} >+ { (exit 1); exit 1; }; } >+else >+ cat >conftest.$ac_ext <<_ACEOF >+/* confdefs.h. */ >+_ACEOF >+cat confdefs.h >>conftest.$ac_ext >+cat >>conftest.$ac_ext <<_ACEOF >+/* end confdefs.h. */ >+$ac_includes_default >+long longval () { return (long) (sizeof (long)); } >+unsigned long ulongval () { return (long) (sizeof (long)); } >+#include <stdio.h> >+#include <stdlib.h> >+int >+main () >+{ >+ >+ FILE *f = fopen ("conftest.val", "w"); >+ if (! f) >+ exit (1); >+ if (((long) (sizeof (long))) < 0) >+ { >+ long i = longval (); >+ if (i != ((long) (sizeof (long)))) >+ exit (1); >+ fprintf (f, "%ld\n", i); >+ } >+ else >+ { >+ unsigned long i = ulongval (); >+ if (i != ((long) (sizeof (long)))) >+ exit (1); >+ fprintf (f, "%lu\n", i); >+ } >+ exit (ferror (f) || fclose (f) != 0); >+ >+ ; >+ return 0; >+} >+_ACEOF >+rm -f conftest$ac_exeext >+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >+ (eval $ac_link) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; }; then >+ ac_cv_sizeof_long=`cat conftest.val` >+else >+ echo "$as_me: program exited with status $ac_status" >&5 >+echo "$as_me: failed program was:" >&5 >+sed 's/^/| /' conftest.$ac_ext >&5 >+ >+( exit $ac_status ) >+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 >+See \`config.log' for more details." >&5 >+echo "$as_me: error: cannot compute sizeof (long), 77 >+See \`config.log' for more details." >&2;} >+ { (exit 1); exit 1; }; } >+fi >+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext >+fi >+fi >+rm -f conftest.val >+else >+ ac_cv_sizeof_long=0 >+fi >+fi >+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 >+echo "${ECHO_T}$ac_cv_sizeof_long" >&6 >+cat >>confdefs.h <<_ACEOF >+#define SIZEOF_LONG $ac_cv_sizeof_long >+_ACEOF > > # guess IPv6 stack type. > if test "x$enable_ipv6" = "xyes"; then >diff -uNrp net-snmp-5.1.2.org/include/net-snmp/net-snmp-config.h.in net-snmp-5.1.2/include/net-snmp/net-snmp-config.h.in >--- net-snmp-5.1.2.org/include/net-snmp/net-snmp-config.h.in 2004-06-29 03:54:17.000000000 +0900 >+++ net-snmp-5.1.2/include/net-snmp/net-snmp-config.h.in 2007-12-03 15:26:14.000000000 +0900 >@@ -884,6 +884,9 @@ > /* Define as the return type of signal handlers (`int' or `void'). */ > #undef RETSIGTYPE > >+/* The size of a `long', as computed by sizeof. */ >+#undef SIZEOF_LONG >+ > /* If using the C implementation of alloca, define if you know the > direction of stack growth for your system; otherwise it will be > automatically deduced at run-time. >--- net-snmp-5.1.2.org/configure.in 2007-12-03 15:26:34.000000000 +0900 >+++ net-snmp-5.1.2/configure.in 2007-12-03 16:57:11.000000000 +0900 >@@ -865,6 +865,8 @@ done > AC_DEFINE_UNQUOTED(SNMPCONFPATH,"$SNMPCONFPATH") > AC_SUBST(SNMPCONFPATH) > >+AC_CHECK_SIZEOF(long) >+ > # guess IPv6 stack type. > if test "x$enable_ipv6" = "xyes"; then > v6type=unknown
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 409811
: 276661