Conversation

i love how even when moving past autofools we are still doing superfluous checks

Checking for size of "char" : 1
3
2
4

checking if 1=1

0
0
1

@charlotte I think there are systems where the size of char is weird

1
0
1

@ellenor2000 yes but its size would still be one (byte). just not 8 bits

1
0
1

@ellenor2000 also i don’t think that a linux-aligned build system that is about 10 years old and is written in python would support bespoke 60s minicomputers

0
0
1

@jhwgh1968 no i do. why does gst-plugins-bad check for if char is 1 byte wide

0
0
2

@jhwgh1968 reading the source code of meson, it generates a test program that is basically just printf("%d", sizeof(char)); which is by definition 1

0
0
3

@jhwgh1968 then then it’s not a standard c compiler and i doubt media en/decoding runs particularly well on it either

0
0
3
Edited 3 months ago

@jhwgh1968 the definition exists since c89, the first version of C standard

0
0
3

@jhwgh1968 standard C was designed with CHAR_BIT ≥ 8 in mind. if a well formed program doesn’t work on CHAR_BIT 9 or, indeed, CHAR_BIT 64 that would be a spec bug

the size argument to malloc (same with any other size argument) is in multiples of char size. so it would allocate 80 octets of memory as expected

0
0
3

@jhwgh1968 yeah POSIX requires CHAR_BIT=8 and so is every non-posix programming environment you’d write code for nowadays

1
0
3

@jhwgh1968 my guess is that the 3 groups that would care are legacy codebase maintainers running some ancient vendor c from 20-30 years ago, c standards authors trying to support, who exactly?, and the designer of the deathstation 9k

0
0
3