File: ppc64_short_int.patch

package info (click to toggle)
scm 5f4-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,320 kB
  • sloc: ansic: 58,822; lisp: 17,257; makefile: 1,241; sh: 555; asm: 288
file content (42 lines) | stat: -rw-r--r-- 1,060 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: "ferseiti@br.ibm.com" <ferseiti@br.ibm.com>
Date: Wed, 1 Dec 2021 12:46:29 +0000
Subject: Fixes builds on ppc64 and ppc64el architectures.

Co-authored-by: Andreas Jochens <aj@andaco.de>
Forwarded: no
---
 scmfig.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/scmfig.h b/scmfig.h
index 1725c3f..2cb4f9d 100644
--- a/scmfig.h
+++ b/scmfig.h
@@ -281,6 +281,10 @@ rgx.c	init_rgx();	regcomp and regexec. */
 #  endif
 # endif
 #endif
+#ifdef __powerpc64__
+# define SHORT_INT
+# define CDR_DOUBLES
+#endif
 #ifdef MSDOS			/* Microsoft C 5.10 and 6.00A */
 # ifndef GO32
 #  define SHORT_INT
@@ -410,14 +414,10 @@ rgx.c	init_rgx();	regcomp and regexec. */
 # define WHITE_SPACES  ' ':case '\t':case '\r':case '\f'
 #endif
 
-#ifdef __ia64__
+#if defined(__ia64__) || defined(__powerpc64__) || defined(__x86_64__)
 # define PTR2INT(x) ((long)(x))
 #else
-# ifdef __x86_64
-#  define PTR2INT(x) ((long)(x))
-# else
-#  define PTR2INT(x) ((int)(x))
-# endif
+# define PTR2INT(x) ((int)(x))
 #endif
 
 #ifndef __builtin_expect