This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl.h can include embed.h in the same location on all operating systems.
authorNicholas Clark <nick@ccl4.org>
Thu, 8 Dec 2011 14:30:02 +0000 (15:30 +0100)
committerNicholas Clark <nick@ccl4.org>
Fri, 9 Dec 2011 15:49:49 +0000 (16:49 +0100)
commitf9293c5b9a0045314decf8aaed8943100c69b76e
tree3e59d6a50afee3cac0d9eec3c308a6bc93f8b5af
parentc370e5423e76f589b72f910ca2e86b534fd93248
perl.h can include embed.h in the same location on all operating systems.

Commit 22c35a8c2392967a (October 1988) added a #include "embed.h" later in
perl.h for when building with PERL_OBJECT defined. Commit d18c61170a306915
(November 1988) added an effectively duplicate #include for all WIN32.

Commit 0cb9638729211ea7 (June 1999) corrected the made the earlier #include
in perl.h also conditional on !PERL_OBJECT (in addition to the
!PERL_FOR_X2P added by 22c35a8c2392967a), but it wasn't until commit
d18c61170a306915 (November 1999) that this changed this to !WIN32, and
embed.h was included exactly once by perl.h (as a2p never actually includes
perl.h).

Commit acfe0abcedaf592f (August 2001) removed the PERL_OBJECT code from
perl.h, reducing the duplication somewhat, but commit 96e176bf068724d0
(October 2001) created analogous special case duplication for VMS, and
commit 27da23d53ccce622 (April 2005) for Symbian. Commit eb8433b7af0f2e09
(March 2006) then neatly put the same #ifndef PERL_MAD code after all 4
locations that included embed.h and commit b3f24c00097febc1 (April 2006)
made the same correction in all 4 places.

But, the daft part of all this is that there was no reason why Win32 was
special - every other operating system can build perl with embed.h included
later in perl.h

Hence the earlier 3 locations can be eliminated, and the was-just-Win32
location made unconditional.

Which saves some lines of code. But fewer lines than are in this commit
message.
perl.h