Bugzilla – Attachment 1006 Details for
Bug 1104
Compile error "ldLL" not declared in strtonum.c under Tru64 Unix 4.0f
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
relocate llong_max test and add Tru64-specific test
openssh-4.2p1-osf-LLONG_MAX.patch (text/plain), 4.15 KB, created by
Darren Tucker
on 2005-10-18 20:52:15 AEST
(
hide
)
Description:
relocate llong_max test and add Tru64-specific test
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2005-10-18 20:52:15 AEST
Size:
4.15 KB
patch
obsolete
>Index: configure.ac >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/configure.ac,v >retrieving revision 1.292 >diff -u -p -r1.292 configure.ac >--- configure.ac 31 Aug 2005 16:59:49 -0000 1.292 >+++ configure.ac 18 Oct 2005 10:44:44 -0000 >@@ -103,70 +103,6 @@ if test "$GCC" = "yes" || test "$GCC" = > fi > fi > >-if test -z "$have_llong_max"; then >- AC_MSG_CHECKING([for max value of long long]) >- AC_RUN_IFELSE( >- [AC_LANG_SOURCE([[ >-#include <stdio.h> >-/* Why is this so damn hard? */ >-#ifdef __GNUC__ >-# undef __GNUC__ >-#endif >-#define __USE_ISOC99 >-#include <limits.h> >-#define DATA "conftest.llminmax" >-int main(void) { >- FILE *f; >- long long i, llmin, llmax = 0; >- >- if((f = fopen(DATA,"w")) == NULL) >- exit(1); >- >-#if defined(LLONG_MIN) && defined(LLONG_MAX) >- fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n"); >- llmin = LLONG_MIN; >- llmax = LLONG_MAX; >-#else >- fprintf(stderr, "Calculating LLONG_MIN and LLONG_MAX\n"); >- /* This will work on one's complement and two's complement */ >- for (i = 1; i > llmax; i <<= 1, i++) >- llmax = i; >- llmin = llmax + 1LL; /* wrap */ >-#endif >- >- /* Sanity check */ >- if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax >- || llmax - 1 > llmax) { >- fprintf(f, "unknown unknown\n"); >- exit(2); >- } >- >- if (fprintf(f ,"%lld %lld", llmin, llmax) < 0) >- exit(3); >- >- exit(0); >-} >- ]])], >- [ >- llong_min=`$AWK '{print $1}' conftest.llminmax` >- llong_max=`$AWK '{print $2}' conftest.llminmax` >- AC_MSG_RESULT($llong_max) >- AC_DEFINE_UNQUOTED(LLONG_MAX, [${llong_max}LL], >- [max value of long long calculated by configure]) >- AC_MSG_CHECKING([for min value of long long]) >- AC_MSG_RESULT($llong_min) >- AC_DEFINE_UNQUOTED(LLONG_MIN, [${llong_min}LL], >- [min value of long long calculated by configure]) >- ], >- [ >- AC_MSG_RESULT(not found) >- ], >- [ >- AC_MSG_WARN([cross compiling: not checking]) >- ] >- ) >-fi >- > AC_ARG_WITH(rpath, > [ --without-rpath Disable auto-added -R linker paths], > [ >@@ -1953,6 +1889,84 @@ if test "x$ac_cv_sizeof_long_long_int" = > ac_cv_sizeof_long_long_int=0 > fi > >+# compute LLONG_MIN and LLONG_MAX if we don't know them. >+if test -z "$have_llong_max"; then >+ AC_MSG_CHECKING([for max value of long long]) >+ AC_RUN_IFELSE( >+ [AC_LANG_SOURCE([[ >+#include <stdio.h> >+/* Why is this so damn hard? */ >+#ifdef __GNUC__ >+# undef __GNUC__ >+#endif >+#define __USE_ISOC99 >+#include <limits.h> >+#define DATA "conftest.llminmax" >+int main(void) { >+ FILE *f; >+ long long i, llmin, llmax = 0; >+ >+ if((f = fopen(DATA,"w")) == NULL) >+ exit(1); >+ >+#if defined(LLONG_MIN) && defined(LLONG_MAX) >+ fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n"); >+ llmin = LLONG_MIN; >+ llmax = LLONG_MAX; >+#else >+ fprintf(stderr, "Calculating LLONG_MIN and LLONG_MAX\n"); >+ /* This will work on one's complement and two's complement */ >+ for (i = 1; i > llmax; i <<= 1, i++) >+ llmax = i; >+ llmin = llmax + 1LL; /* wrap */ >+#endif >+ >+ /* Sanity check */ >+ if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax >+ || llmax - 1 > llmax) { >+ fprintf(f, "unknown unknown\n"); >+ exit(2); >+ } >+ >+ if (fprintf(f ,"%lld %lld", llmin, llmax) < 0) >+ exit(3); >+ >+ exit(0); >+} >+ ]])], >+ [ >+ llong_min=`$AWK '{print $1}' conftest.llminmax` >+ llong_max=`$AWK '{print $2}' conftest.llminmax` >+ >+ # snprintf on some Tru64s doesn't understand "%lld" >+ case "$host" in >+ alpha-dec-osf*) >+ if test "x$ac_cv_sizeof_long_long_int" = "x8" && >+ "x$llong_min" = "xld"; then >+ llong_min="-9223372036854775808" >+ llong_max="9223372036854775807" >+ fi >+ ;; >+ esac >+ >+ AC_MSG_RESULT($llong_max) >+ AC_DEFINE_UNQUOTED(LLONG_MAX, [${llong_max}LL], >+ [max value of long long calculated by configure]) >+ AC_MSG_CHECKING([for min value of long long]) >+ AC_MSG_RESULT($llong_min) >+ AC_DEFINE_UNQUOTED(LLONG_MIN, [${llong_min}LL], >+ [min value of long long calculated by configure]) >+ ], >+ [ >+ AC_MSG_RESULT(not found) >+ ], >+ [ >+ AC_MSG_WARN([cross compiling: not checking]) >+ ] >+ ) >+fi >+ >+ > # More checks for data types > AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [ > AC_TRY_COMPILE(
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 1104
:
996
|
997
|
1003
|
1006
|
1007
|
1008
|
1009