Sujet : Re: Top 10 most common hard skills listed on resumes...
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 09. Sep 2024, 02:10:39
Autres entêtes
Organisation : None to speak of
Message-ID : <878qw13a40.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Gnus/5.13 (Gnus v5.13)
Waldek Hebisch <
antispam@fricas.org> writes:
Bart <bc@freeuk.com> wrote:
[...]
I had a problem with this code because it was so verbose. The first
thing I did was to define aliases u64 and u32 for those long types:
typedef unsigned long long u64;
typedef unsigned long u32;
>
This code runs in 33 bit i386, 32 bit ARM and 64 bit x86-64, in
all cases under Linux. As Keith noticed, most popular of those
has 64-bit long. So your definition would break it. You need
>
typedef unsigned int u32;
Just add #include <stdint.h> and use uint32_t -- or, if you value
brevity for some reason:
typedef uint32_t u32;
(Bart dislikes <stdint.h>, but there's no reason you should.)
[...]
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */