Re: [PATCH] Git.pm: Avoid ppport.h
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:32
Johannes Schindelin [off-list ref] writes:
quoted
This makes us not include ppport.h which seems not to give us anything real anyway; it is useful for checking for portability warts but since Devel::PPPort is a portability wart itself, we shouldn't require it for build.Why do people introduce a "portability enhancer" like that? This is soo dumb.
I think that statement is a bit too harsh.
My understanding is that it's more for use by developers working
with later version to produce portability headers, so used that
way it is very sane. From its manual page:
How to use ppport.h
Don't direct the users of your module to download "Devel::PPPort".
They are most probably no XS writers. Also, don't make ppport.h
optional. Rather, just take the most recent copy of ppport.h that you
can find (e.g. by generating it with the latest "Devel::PPPort" release
from CPAN), copy it into your project, adjust your project to use it,
and distribute the header along with your module.
But in the case of source distribution, and if the source
distribution wants to be compatible with older versions, the
above advice does not apply.
Error: 'const char *' not in typemap in Git.xs, line 69 Error: 'const char *' not in typemap in Git.xs, line 79 make: *** [Git.c] Error 1 It seems like my typemap starts like this: ... So, no "const char *". See next mail for a minimal patch.
An alternative would be to carry our own typemap but I think your fix is less intrusive and fine. Pasky?
The warning
(IIRC that was mentioned already on the list) still persists:
cc -c -I. -I.. -g -pipe -pipe -fno-common -no-cpp-precomp -flat_namespace
-DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing -Os -DVERSION=\"0.01\"
-DXS_VERSION=\"0.01\" -I/System/Library/Perl/darwin/CORE -I/sw/include
-DSHA1_HEADER='<openssl/sha.h>' -DNO_STRCASESTR -DNO_STRLCPY
-DGIT_VERSION='"1.4.1.g3b26"' Git.c
In file included from /System/Library/Perl/darwin/CORE/perl.h:500,
from Git.xs:15:
/System/Library/Perl/darwin/CORE/embed.h:156:1: warning: "die" redefined
Git.xs:11:1: warning: this is the location of the previous definitionI see the same here.