[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
compilation error since 2022-12-19
From: |
Bruno Haible |
Subject: |
compilation error since 2022-12-19 |
Date: |
Sun, 29 Jan 2023 21:38:30 +0100 |
Hi,
Compiling a current sed snapshot on Android, with clang as compiler, I get
this compilation error:
CC sed/sed-sed.o
../sed/sed.c:84:10: error: redefinition of 'lcmd_out_line_len' with a different
type: 'intmax_t' (aka 'long long') vs 'idx_t' (aka 'int')
intmax_t lcmd_out_line_len = 70;
^
../sed/sed.h:242:14: note: previous declaration is here
extern idx_t lcmd_out_line_len;
^
1 error generated.
make[2]: *** [Makefile:5119: sed/sed-sed.o] Error 1
The cause it that the type of lcmd_out_line_len was set differently in the
implementation than in the declaration. (On 32-bit platforms, idx_t is typically
a signed 32-bit integer type, whereas intmax_t is typically a signed 64-bit
integer type.)
Both were set in the same commit on 2022-12-19:
9c9919ef (Paolo Bonzini 2004-10-20 21:42:31 +0000 83)/* How long
should the `l' command's output line be? */
a9b1b679 (Paul Eggert 2022-12-19 12:32:21 -0800 84)intmax_t
lcmd_out_line_len = 70;
9c9919ef (Paolo Bonzini 2004-10-20 21:42:31 +0000 241)/* How long
should the `l' command's output line be? */
a9b1b679 (Paul Eggert 2022-12-19 12:32:21 -0800 242)extern
idx_t lcmd_out_line_len;
Changing either of the two should work.
- compilation error since 2022-12-19,
Bruno Haible <=