Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: NCR compiler problems on NCR
- X-seq: zsh-workers 12956
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: <zsh-workers@xxxxxxxxxxxxxx>
- Subject: PATCH: NCR compiler problems on NCR
- Date: Wed, 11 Oct 2000 12:55:03 +0400
- Cc: "Cosmo" <cosmo@xxxxxxxxxxxx>
- Importance: Normal
- In-reply-to: <002f01c0329f$4026fe20$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
>
> Better yet is a configure check that compiler can cast long long to int. As
> long as you are the only person who can reproduce it - would you
> mind to write
> a patch? Or at least would you take time to check if it works?
>
Cosmo, could you please check, that this patch fixes your problem? (I mean,
that configure now autodetects broken 64 bit type)? It does not break things
here, at least :-)
cheers
-andrej
Index: aczsh.m4
===================================================================
RCS file: /cvsroot/zsh/zsh/aczsh.m4,v
retrieving revision 1.5
diff -u -r1.5 aczsh.m4
--- aczsh.m4 2000/09/06 15:50:16 1.5
+++ aczsh.m4 2000/10/11 08:49:56
@@ -87,9 +87,14 @@
dnl This macro does not produce messages as it may be run several times
dnl before finding the right type.
dnl
+dnl Cosmo <cosmo@xxxxxxxxxxxx> reported, that NCR C compiler
+dnl (High Performance C Compiler R1.0 (SCDE 2.03.00)) supports long long
+dnl but cannot cast it to int. Check for this too.
AC_DEFUN(zsh_64_BIT_TYPE,
-[AC_TRY_RUN([
+[
+zsh_64_bit_type_found=no
+AC_TRY_RUN([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -99,12 +104,25 @@
$1 foo = 0;
return sizeof($1) != 8;
}
-], $2="$1", $2=no,
- [if test x$3 != x ; then
+], zsh_64_bit_type_found=yes)
+if test x$zsh_64_bit_type_found = xyes; then
+AC_TRY_COMPILE([
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+extern long long func1();],
+[int Z1 = (int)func1();], , zsh_64_bit_type_found=no)
+fi
+[if test x$zsh_64_bit_type_found = xyes; then
+ $2="$1"
+else
+ $2=no
+ if test x$3 != x ; then
$2="$1"
else
$2=no
- fi])
+ fi
+fi]
])
Messages sorted by:
Reverse Date,
Date,
Thread,
Author