Commit graph

6 commits

Author SHA1 Message Date
George Koehler b9bd89914f Add back _EM_LSIZE == 8 to <stdint.h>
This will cause ACK libc to provide int64_t as long (instead of long
long) on LP64, if we ever get such a platform.

LP64 would have 64-bit long and 64-bit long long, so int64_t might be
either type.  For example on amd64, int64_t is long in NetBSD libc,
and long long in OpenBSD libc.  Support for long long in ACK remains
incomplete (no printf "%lld"), so it seems better to prefer long where
possible.  Also, int64_t being long before long long is more
consistent with int32_t being int before long.

Put suffixes on the values of INT32_MAX, INT64_MAX, and related
constants, so they have the same types as int32_t and int64_t.
2019-10-05 01:34:01 -04:00
George Koehler aeb8ed53e4 Define _EM_LLSIZE, int64_t, uint64_t for linux386.
Also change UINT32_MAX in <stdint.h> from 4294967295 to 4294967295U.
The U suffix avoids a promotion to long or unsigned long if it would
fit in unsigned int.

Define _EM_LLSIZE but not EM_LLSIZE.  The leading underscore is a
convention for such macros.  If code always uses _EM_LLSIZE, we will
never need to add EM_LLSIZE.  The flag -D_EM_LLSIZE={q} is in
plat/linux386/descr, not lib/descr/fe, so platforms without long long
don't define _EM_LLSIZE.

<stdint.h> doesn't keep the old code for _EM_LSIZE == 8, because I
change it to _EM_LLSIZE == 8.  No platform had _EM_LSIZE == 8, and the
old limits like INT64_MAX were wrong.
2019-09-12 13:40:07 -04:00
David Given 32c881474e Create a basic and probably wrong common unistd.h, which replaces the plat one.
Made this work with cpm (but nothing else yet).
2018-06-23 11:46:55 +02:00
David Given 98e745d04c Fix awful bug where uint32_t was sometimes defined as a short.
--HG--
branch : dtrg-videocore
2013-05-25 00:33:01 +01:00
dtrg 013f58f94e Added the stdint.h header file. 2007-04-27 22:42:02 +00:00
dtrg bfeb736c35 Stripped down the library to something approaching the ANSI C minimum and replaced most of the header files, to provide a reasonably consistent base to work up from. 2007-04-24 19:42:24 +00:00