zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: "Zsh hackers list" <zsh-workers@sunsite.auc.dk>
Subject: Re: PATCH: pws-18: 64-bit integer support
Date: Wed, 19 May 1999 09:39:06 +0200	[thread overview]
Message-ID: <9905190739.AA46208@ibmth.df.unipi.it> (raw)
In-Reply-To: ""Andrej Borsenkow""'s message of "Tue, 18 May 1999 20:07:04 DFT." <003101bea148$786a9240$21c9ca95@mow.siemens.ru>

"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 <sys/types.h>
+#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 <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


      reply	other threads:[~1999-05-19  8:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-18 14:31 Peter Stephenson
1999-05-18 16:07 ` Andrej Borsenkow
1999-05-19  7:39   ` Peter Stephenson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9905190739.AA46208@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).