summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2023-03-29 19:09:38 +0200
committerYves Orton <demerphq@gmail.com>2023-03-30 19:04:52 +0800
commit86e7b6187ab846b0bfdab1d5d58e1cec5182cedd (patch)
tree5ee5faf575175d39751bd7917c6dd1990d290f0a /perl.c
parentf0ccf3d06975afe2d1bcdc52912395058983b8e6 (diff)
downloadperl-86e7b6187ab846b0bfdab1d5d58e1cec5182cedd.tar.gz
t/porting/bincompat.t - test the code itself not just the output
Our checks on the define info we expose via Internals::V(), especially the sorted part, did not really work properly as it only checked defines that are actually exposed in our standard builds. Many of the defines that are exposed in this list are special cases that would not be enabled in a normal build we test under CI, and indeed prior to this patch it was possible for us to produce unsorted output if certain defines were enabled. This patch adds checks that reads the actual code. It checks that the define and the string are the same, and it checks that strings would be output in sorted order assuming every define was enabled. There are two historical exceptions where the string we show and the define use internally are different, but we work around these two cases with as special case hash.
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/perl.c b/perl.c
index abd8877fc9..a8d92aef77 100644
--- a/perl.c
+++ b/perl.c
@@ -1995,6 +1995,12 @@ S_Internals_V(pTHX_ CV *cv)
# ifdef NO_MATHOMS
" NO_MATHOMS"
# endif
+# ifdef NO_PERL_INTERNAL_RAND_SEED
+ " NO_PERL_INTERNAL_RAND_SEED"
+# endif
+# ifdef NO_PERL_RAND_SEED
+ " NO_PERL_RAND_SEED"
+# endif
# ifdef NO_TAINT_SUPPORT
" NO_TAINT_SUPPORT"
# endif
@@ -2080,13 +2086,8 @@ S_Internals_V(pTHX_ CV *cv)
# ifdef USE_THREAD_SAFE_LOCALE
" USE_THREAD_SAFE_LOCALE"
# endif
-# ifdef NO_PERL_RAND_SEED
- " NO_PERL_RAND_SEED"
-# endif
-# ifdef NO_PERL_INTERNAL_RAND_SEED
- " NO_PERL_INTERNAL_RAND_SEED"
-# endif
- ;
+ ""; /* keep this on a line by itself, WITH the empty string */
+
PERL_UNUSED_ARG(cv);
PERL_UNUSED_VAR(items);