This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Emulate some C99 macros and typedefs
authorKarl Williamson <khw@cpan.org>
Tue, 5 Dec 2017 20:12:48 +0000 (13:12 -0700)
committerKarl Williamson <khw@cpan.org>
Sat, 9 Dec 2017 05:27:44 +0000 (22:27 -0700)
commitf2f9e01d8bc23e50f85dd24010773519ca605d2b
tree8962eca1191f4b4f1e4175defcbb912ef078ddc6
parent46bb68f6ad0c0feabeb1ade587abd6da9c168cd3
Emulate some C99 macros and typedefs

On systems that don't have them, this emulates

U?INT(16|32)_C
U?INTMAX_C

and the typedefs

u?intmax_t

Since, these are typedefs that can't be tested for if they exist, this
creates PERL_U?INTMAX_T typedefs instead, setting them to the standard
values in stdint.h if it is available.

In addition, it moves the pre-existing emulation of U?INT64_C from
handy.h to perl.h.  This is because there was duplicate-ish logic in the
two files, and the handy.h version appears to be better thought out.

It converts the couple of places in core that were using the other
deleted logic to instead use the C99 names.
handy.h
perl.h
util.c