Skip to content

vutil.c: Use new SvVSTRING() macro #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jkeenan
Copy link

@jkeenan jkeenan commented Jun 9, 2025

Committer: Originally submitted by Paul Evans to Perl core distribution as Perl/perl5#23154. It was recommended that it be submitted upstream first.

Committer: Originally submitted by Paul Evans to Perl core distribution as
Perl/perl5#23154.  It was recommended that it be
submitted upstream first.
@jkeenan
Copy link
Author

jkeenan commented Jun 9, 2025

@leonerd @Leont, this p.r. should replace core's Perl/perl5#23154. However, in this branch make emits build-time warnings on Linux and fails on two CI runs.

make[1]: Entering directory '/home/jkeenan/gitwork/zzzothers/version.pm/vutil'
cp lib/version/vxs.pm ../blib/lib/version/vxs.pm
Running Mkbootstrap for vxs ()
chmod 644 "vxs.bs"
"/home/jkeenan/perl5/perlbrew/perls/perl-5.40.1/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- vxs.bs ../blib/arch/auto/version/vxs/vxs.bs 644
"/home/jkeenan/perl5/perlbrew/perls/perl-5.40.1/bin/perl" "/home/jkeenan/perl5/perlbrew/perls/perl-5.40.1/lib/5.40.1/ExtUtils/xsubpp"  -typemap '/home/jkeenan/perl5/perlbrew/perls/perl-5.40.1/lib/5.40.1/ExtUtils/typemap'  vxs.xs > vxs.xsc
mv vxs.xsc vxs.c
cc -c   -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"0.9933\" -DXS_VERSION=\"0.9933\" -fPIC "-I/home/jkeenan/perl5/perlbrew/perls/perl-5.40.1/lib/5.40.1/x86_64-linux/CORE"   vxs.c
In file included from vxs.xs:18:
vutil.c: In function ‘Perl_new_version2’:
vutil.c:549:42: warning: implicit declaration of function ‘SvVSTRING’; did you mean ‘SvVSTRING_mg’? [-Wimplicit-function-declaration]
  549 |             const char * const version = SvVSTRING(ver, len);
      |                                          ^~~~~~~~~
      |                                          SvVSTRING_mg
vutil.c:549:42: warning: initialization of ‘const char * const’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
vutil.c: In function ‘Perl_upg_version2’:
vutil.c:821:26: warning: initialization of ‘const char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  821 |         const char *pv = SvVSTRING(ver, len);
      |                          ^~~~~~~~~
rm -f ../blib/arch/auto/version/vxs/vxs.so
cc  -shared -O2 -L/usr/local/lib -fstack-protector-strong  vxs.o  -o ../blib/arch/auto/version/vxs/vxs.so  \
      \
  
chmod 755 ../blib/arch/auto/version/vxs/vxs.so

@Leont
Copy link
Collaborator

Leont commented Jun 9, 2025

This is only half of the required change. It first needs ppport to be updated to provide SvVSTRING

@jkeenan
Copy link
Author

jkeenan commented Jun 9, 2025

This is only half of the required change. It first needs ppport to be update to provide SvVSTRING

Thanks for your rapid response.

Does the ppport change need to be done in core or upstream? Are there tickets open for that?

@karenetheridge
Copy link
Member

Does the ppport change need to be done in core or upstream? Are there tickets open for that?

Devel-PPPort lives in dist/, not cpan/, meaning it is updated in blead first and then the cpan release comes later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants