From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1066 invoked from network); 19 May 1999 08:03:50 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 May 1999 08:03:50 -0000 Received: (qmail 18587 invoked by alias); 19 May 1999 08:03:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6312 Received: (qmail 18580 invoked from network); 19 May 1999 08:03:33 -0000 Message-Id: <9905190739.AA46208@ibmth.df.unipi.it> To: "Zsh hackers list" Subject: Re: PATCH: pws-18: 64-bit integer support In-Reply-To: ""Andrej Borsenkow""'s message of "Tue, 18 May 1999 20:07:04 DFT." <003101bea148$786a9240$21c9ca95@mow.siemens.ru> Date: Wed, 19 May 1999 09:39:06 +0200 From: Peter Stephenson "Andrej Borsenkow" wrote: > checking if long is 64 bits... yes > ./configure: syntax error at line 3371: `zsh_64_BIT_TYPE' unexpected > > zsh_64_BIT_TYPE is not defined anywhere (as far a I can tell) Something's gone wrong with autoconf: that should be substituted into configure.in from aczsh.m4. It has been in mine. Oh, but I didn't send the patch for aczsh.m4. Here it is. > [AC_TRY_RUN([int main() { return sizeof(long) < 8; }], > zsh_cv_long_is_64_bit=yes, > zsh_cv_long_is_64_bit=no, > zsh_cv_long_is_64_bit=no)]) > > Should it not be "return sizeof(long) >= 8"? Or at least sizeof(long) == 8? Status 0 is a `yes', so if sizeof(long) < 8 it returns 1. That makes it consistent with a failure to compile, which would also give status 1. --- aczsh.m4.z64_2 Wed May 19 09:37:22 1999 +++ aczsh.m4 Mon May 17 17:57:54 1999 @@ -72,6 +72,39 @@ ]) dnl +dnl zsh_64_BIT_TYPE +dnl Check whether the first argument works as a 64-bit type. +dnl If there is a non-zero second argument, we just assume it works +dnl when we're cross compiling. This is to allow a type to be +dnl specified directly as --enable-lfs="long long". +dnl Sets zsh_cv_64_bit_type to the first argument if the test worked, +dnl `no' otherwise. Be careful testing this, as it may produce +dnl two words `long long' on an unquoted substitution. +dnl This macro does not produce messages as it may be run several times +dnl before finding the right type. +dnl + +AC_DEFUN(zsh_64_BIT_TYPE, +[AC_TRY_RUN([ +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +main() +{ + $1 foo = 0; + return sizeof($1) != 8; +} +], zsh_cv_64_bit_type="$1", zsh_cv_64_bit_type=no, + [if test x$2 != x ; then + zsh_cv_64_bit_type="$1" + else + zsh_cv_64_bit_type=no + fi]) +]) + + +dnl dnl zsh_SYS_DYNAMIC_BROKEN dnl Check whether static/shared library linking is broken. dnl -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy