Commit 28a3d529 authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

define ISC_PLATFORM_QUADFORMAT in platform.h so that it can more easily

be overridden on Win32.  This means ISC_PLATFORM_LONGLONGEQUALLONG is no longer
needed. [RT #896]
parent 94811367
......@@ -15,7 +15,7 @@
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# From configure.in Revision: 1.232
# From configure.in Revision: 1.234
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
## Copyright (C) 1996-1999, 2000 Free Software Foundation, Inc.
......@@ -4738,27 +4738,34 @@ fi
echo $ac_n "checking for sizeof(long long int) == sizeof(long int)""... $ac_c" 1>&6
echo "configure:4743: checking for sizeof(long long int) == sizeof(long int)" >&5
#
# Determine the printf format characters to use when printing
# values of type isc_int64_t. We make the assumption that platforms
# where a "long long" is the same size as a "long" (e.g., Alpha/OSF1)
# want "%ld" and everyone else can use "%lld". Win32 uses "%I64d",
# but that's defined elsewhere since we don't use configure on Win32.
#
echo $ac_n "checking printf format modifier for 64-bit integers""... $ac_c" 1>&6
echo "configure:4750: checking printf format modifier for 64-bit integers" >&5
if test "$cross_compiling" = yes; then
echo "$ac_t""default yes" 1>&6
ISC_PLATFORM_LONGLONGEQUALLONG="#define ISC_PLATFORM_LONGLONGEQUALLONG 1"
echo "$ac_t""default ll" 1>&6
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
else
cat > conftest.$ac_ext <<EOF
#line 4749 "configure"
#line 4756 "configure"
#include "confdefs.h"
main() { exit(!(sizeof(long long int) == sizeof(long int))); }
EOF
if { (eval echo configure:4753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:4760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""yes" 1>&6
ISC_PLATFORM_LONGLONGEQUALLONG="#define ISC_PLATFORM_LONGLONGEQUALLONG 1"
echo "$ac_t""l" 1>&6
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
echo "$ac_t""no" 1>&6
ISC_PLATFORM_LONGLONGEQUALLONG="#undef ISC_PLATFORM_LONGLONGEQUALLONG"
echo "$ac_t""ll" 1>&6
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
fi
rm -fr conftest*
fi
......@@ -4769,12 +4776,12 @@ fi
# Security Stuff
#
echo $ac_n "checking for chroot""... $ac_c" 1>&6
echo "configure:4773: checking for chroot" >&5
echo "configure:4780: checking for chroot" >&5
if eval "test \"`echo '$''{'ac_cv_func_chroot'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4778 "configure"
#line 4785 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char chroot(); below. */
......@@ -4797,7 +4804,7 @@ chroot();
; return 0; }
EOF
if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_chroot=yes"
else
......@@ -4823,17 +4830,17 @@ for ac_hdr in linux/capability.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4827: checking for $ac_hdr" >&5
echo "configure:4834: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4832 "configure"
#line 4839 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4863,17 +4870,17 @@ for ac_hdr in sys/prctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4867: checking for $ac_hdr" >&5
echo "configure:4874: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4872 "configure"
#line 4879 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4904,9 +4911,9 @@ done
# BSD/OS, and perhaps some others, don't define rlim_t.
#
echo $ac_n "checking for type rlim_t""... $ac_c" 1>&6
echo "configure:4908: checking for type rlim_t" >&5
echo "configure:4915: checking for type rlim_t" >&5
cat > conftest.$ac_ext <<EOF
#line 4910 "configure"
#line 4917 "configure"
#include "confdefs.h"
#include <sys/types.h>
......@@ -4916,7 +4923,7 @@ int main() {
rlim_t rl = 19671212; return (0);
; return 0; }
EOF
if { (eval echo configure:4920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:4927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
......@@ -4931,12 +4938,12 @@ else
fi
rm -f conftest*
echo $ac_n "checking sizeof rlim_cur""... $ac_c" 1>&6
echo "configure:4935: checking sizeof rlim_cur" >&5
echo "configure:4942: checking sizeof rlim_cur" >&5
if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 4940 "configure"
#line 4947 "configure"
#include "confdefs.h"
#include <sys/types.h>
......@@ -4944,7 +4951,7 @@ else
#include <sys/resource.h>
main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}
EOF
if { (eval echo configure:4948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""int" 1>&6
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"
......@@ -4957,7 +4964,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 4961 "configure"
#line 4968 "configure"
#include "confdefs.h"
#include <sys/types.h>
......@@ -4965,7 +4972,7 @@ else
#include <sys/resource.h>
main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}
EOF
if { (eval echo configure:4969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:4976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""long int" 1>&6
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"
......@@ -4978,7 +4985,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 4982 "configure"
#line 4989 "configure"
#include "confdefs.h"
#include <sys/types.h>
......@@ -4986,7 +4993,7 @@ else
#include <sys/resource.h>
main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}
EOF
if { (eval echo configure:4990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:4997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""long long int" 1>&6
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"
......@@ -5090,7 +5097,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5094: checking for $ac_word" >&5
echo "configure:5101: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_JADE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -5137,7 +5144,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5141: checking for $ac_word" >&5
echo "configure:5148: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_TEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -5179,7 +5186,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5183: checking for $ac_word" >&5
echo "configure:5190: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PDFTEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -5224,7 +5231,7 @@ done
SGMLDIR=""
echo $ac_n "checking for SGML files""... $ac_c" 1>&6
echo "configure:5228: checking for SGML files" >&5
echo "configure:5235: checking for SGML files" >&5
for d in /usr/pkg/share/sgml /usr/local/share/sgml
do
if test -f $d/docbook/dsssl/modular/html/docbook.dsl
......@@ -5249,7 +5256,7 @@ fi
XGMLDIR=""
echo $ac_n "checking for XML files""... $ac_c" 1>&6
echo "configure:5253: checking for XML files" >&5
echo "configure:5260: checking for XML files" >&5
for d in /usr/pkg/share/xml /usr/local/share/xml
do
if test -f $d/dtd/docbook/docbookx.dtd
......@@ -5618,7 +5625,7 @@ s%@ISC_PLATFORM_NEEDSTRSEP@%$ISC_PLATFORM_NEEDSTRSEP%g
s%@ISC_PLATFORM_NEEDVSNPRINTF@%$ISC_PLATFORM_NEEDVSNPRINTF%g
s%@ISC_EXTRA_OBJS@%$ISC_EXTRA_OBJS%g
s%@ISC_EXTRA_SRCS@%$ISC_EXTRA_SRCS%g
s%@ISC_PLATFORM_LONGLONGEQUALLONG@%$ISC_PLATFORM_LONGLONGEQUALLONG%g
s%@ISC_PLATFORM_QUADFORMAT@%$ISC_PLATFORM_QUADFORMAT%g
s%@ISC_PLATFORM_RLIMITTYPE@%$ISC_PLATFORM_RLIMITTYPE%g
s%@ISC_PLATFORM_BRACEPTHREADONCEINIT@%$ISC_PLATFORM_BRACEPTHREADONCEINIT%g
s%@JADE@%$JADE%g
......
......@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.233 $)
AC_REVISION($Revision: 1.234 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13)
......@@ -1195,15 +1195,22 @@ AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
AC_SUBST(ISC_EXTRA_OBJS)
AC_SUBST(ISC_EXTRA_SRCS)
AC_MSG_CHECKING(for sizeof(long long int) == sizeof(long int))
#
# Determine the printf format characters to use when printing
# values of type isc_int64_t. We make the assumption that platforms
# where a "long long" is the same size as a "long" (e.g., Alpha/OSF1)
# want "%ld" and everyone else can use "%lld". Win32 uses "%I64d",
# but that's defined elsewhere since we don't use configure on Win32.
#
AC_MSG_CHECKING(printf format modifier for 64-bit integers)
AC_TRY_RUN([main() { exit(!(sizeof(long long int) == sizeof(long int))); }],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_LONGLONGEQUALLONG="#define ISC_PLATFORM_LONGLONGEQUALLONG 1"],
[AC_MSG_RESULT(no)
ISC_PLATFORM_LONGLONGEQUALLONG="#undef ISC_PLATFORM_LONGLONGEQUALLONG"],
[AC_MSG_RESULT(default yes)
ISC_PLATFORM_LONGLONGEQUALLONG="#define ISC_PLATFORM_LONGLONGEQUALLONG 1"])
AC_SUBST(ISC_PLATFORM_LONGLONGEQUALLONG)
[AC_MSG_RESULT(l)
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'],
[AC_MSG_RESULT(ll)
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'],
[AC_MSG_RESULT(default ll)
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'])
AC_SUBST(ISC_PLATFORM_QUADFORMAT)
#
# Security Stuff
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: platform.h.in,v 1.21 2001/02/21 06:08:31 marka Exp $ */
/* $Id: platform.h.in,v 1.22 2001/02/27 02:19:34 gson Exp $ */
#ifndef ISC_PLATFORM_H
#define ISC_PLATFORM_H 1
......@@ -123,9 +123,9 @@
@ISC_PLATFORM_NEEDVSNPRINTF@
/*
* Defined if sizeof(long long int) == sizeof(long int).
* The printf format string modifier to use with isc_uint64_t values.
*/
@ISC_PLATFORM_LONGLONGEQUALLONG@
@ISC_PLATFORM_QUADFORMAT@
/*
* Defined if we are using threads.
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: print.h,v 1.16 2001/02/22 18:01:48 gson Exp $ */
/* $Id: print.h,v 1.17 2001/02/27 02:19:33 gson Exp $ */
#ifndef ISC_PRINT_H
#define ISC_PRINT_H 1
......@@ -41,11 +41,7 @@
/***
*** Macros
***/
#ifdef ISC_PLATFORM_LONGLONGEQUALLONG
#define ISC_PRINT_QUADFORMAT "l"
#else
#define ISC_PRINT_QUADFORMAT "ll"
#endif
#define ISC_PRINT_QUADFORMAT ISC_PLATFORM_QUADFORMAT
/***
*** Functions
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment