No, I don't have a patch that will work against all versions you may want to
support. All I did was change all the functions that gcc complained about by
adding PL_ in front, and it eventually compiled (and is now working on a low-
volume, but live, site).
This worked for perl 5.14.1, but may break you against perl 5.8 or even 5.6
(if you still support those levels). I don't know.
However, here's the suggestion. First, download and compile/install perl
5.14.1. I installed it to ~/perl/5.14.1 (I have multiple perl versions
installed, and this keeps them apart). Then run (assuming that perl5.14.1 is
in your PATH):
perl5.14.1 -MDevel::PPPort -lE 'Devel::PPPort::WriteFile'
This will create a ppport.h for you. Then you can run:
perl5.14.1 ppport.h
This will scan your code and make recommendations on what to change.
Also, this should include C<#include "ppport.h"> at the top. This means that
you must start shipping ppport.h in your distribution. You should from time
to time use the latest perl available to do all this again. Hopefully, there
are no changes to ppport.h in a new version, in which case there's nothing
more to be done. However, the whole purpose of ppport.h is to be able to make
changes in the future to the API, and ppport.h is what will protect you, more
or less. And before every release, you would ideally rerun the latest perl
against the ppport.h just to see if there are any more recommended changes.
By the way, I do not write XS code, so I am not an expert on this. This is
all from just a few minutes' of reading.