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

C89 requirement

From:
Aaron Crane
Date:
October 21, 2017 16:30
Subject:
C89 requirement
Message ID:
CACmk_ttcJWk4jpRE_-cAyDP+h77NyKRg8d2TJ9DBxQrZfCNXGA@mail.gmail.com
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
them.

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
(xlc).

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 ** http://aaroncrane.co.uk/



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About