File: restore-2.12.1.5-filepos2z-ftbfs-414893

package info (click to toggle)
calc 2.12.7.2-4
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 7,644 kB
  • sloc: ansic: 53,991; makefile: 11,702; awk: 96; sed: 33; sh: 20
file content (38 lines) | stat: -rw-r--r-- 1,629 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
Description: Restore filepos2z() implementation from apcalc 2.12.1.5
 Fixes a FTBFS bug on big endian machines.
 This is probably not the right solution, but at least it works.
 .
 Update 2019-01-14: Still required with calc 2.12.7.2 on mips, otherwise, we
 get this (on minkus.debian.org, sid chroot):
 .
 gcc  -DCALC_SRC -DCUSTOM -Wall  -g -O2 -fdebug-prefix-map=/home/mbuck/apcalc-2.12.7.2=. -fstack-protector-strong -Wformat -Werror=format-security   -O3 -g3 -Wno-error=long-long -Wno-long-long -c file.c
 In file included from qmath.h:32,
                  from cmath.h:32,
                  from value.h:33,
                  from calc.h:33,
                  from file.c:39:
 file.c: In function 'filepos2z':
 zmath.h:85:46: error: incompatible types when assigning to type 'HALF' {aka 'long unsigned int'} from type 'FILEPOS' {aka 'struct _G_fpos_t'}
  #define SWAP_HALF_IN_B32(dest, src) (*(dest) = *(src))
                                               ^
 fposval.h:15:42: note: in expansion of macro 'SWAP_HALF_IN_B32'
  #define SWAP_HALF_IN_FILEPOS(dest, src)  SWAP_HALF_IN_B32(dest, src)
                                           ^~~~~~~~~~~~~~~~
 file.c:1370:2: note: in expansion of macro 'SWAP_HALF_IN_FILEPOS'
   SWAP_HALF_IN_FILEPOS(ret.v, &pos);
   ^~~~~~~~~~~~~~~~~~~~
Bug-Debian: http://bugs.debian.org/414893
Forwarded: yes
Author: Martin Buck <mbuck@debian.org>
---
--- a/file.c
+++ b/file.c
@@ -1367,7 +1367,7 @@
 	ret.len = FILEPOS_BITS/BASEB;
 	ret.v = alloc(ret.len);
 	zclearval(ret);
-	SWAP_HALF_IN_FILEPOS(ret.v, &pos);
+	SWAP_HALF_IN_FILEPOS(ret.v, (HALF *)&pos);
 	ret.sign = 0;
 	ztrim(&ret);