develooper Front page | perl.perl5.porters | Postings from October 2017

C89 requirement

Aaron Crane
October 21, 2017 16:30
C89 requirement
Message ID:
I've just pushed 3d10fa085102a79a96d9e335384c3f56f3b6b9cc to blead, as follows:

[MERGE] Rely on a C89 compiler

We have claimed to need a C89 compiler for building since at least
October 1998 (see commit 5effff0b18af479fcc5e67b74bc41c4bc53342f6).
This branch finally makes good on that promise: we no longer probe for
required features of C89 (whether language features, cpp syntax, the
presence or behaviour of library routines, or the availability or
contents of header files).

This permits substantial simplification of our header files, as well as
a pleasing reduction in the size of the Configure script and the number
of compilation probes it does.

That said, this set of changes is a little conservative. Notably, I have
not attempted to unpick our maze of malloc/free/realloc macros to rely
on things like free(NULL); nor have I attempted to rely on adequate
locale support (since AIUI the libc on Android in particular claims to
have locale support but doesn't). It's also possible that I've simply
missed some opportunities to simplify the code and/or Configure script,
but I hope that we can collectively fix those as and when we discover

These changes have been tested on the following platforms: Mac OS (gcc,
clang), Linux (gcc), FreeBSD (gcc), Win32 (MSVC), HP/UX (HP C), and AIX

This work was undertaken at the Perl 5 Hackathon 2017. I thank the
Hackathon's sponsors for making it possible for me to attend; I would
not have been able to do this otherwise.

We already had a lot of code that quietly assumed C89 support, so I
don't expect this to have caused any new portability problems, but I
thought it worth alerting the list to this change.

Aaron Crane ** Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About