Skip to content

Commit 470f175

Browse files
committed
Make sure miniperl compiles with -DNO_SHORT_NAMES
This simple change makes the perl core compile even with this flag.
1 parent e04df5d commit 470f175

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

embed.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
!defined(PERL_WANT_VARARGS) */
9090
# endif /* !defined(PERL_NOCOMPAT) */
9191
#endif /* !defined(PERL_CORE) */
92-
#if !defined(PERL_NO_SHORT_NAMES)
92+
#if defined(PERL_CORE) || !defined(PERL_NO_SHORT_NAMES)
9393

9494
/* Hide global symbols */
9595

@@ -2486,6 +2486,6 @@
24862486
# else
24872487
# define get_context Perl_get_context
24882488
# endif
2489-
#endif /* !defined(PERL_NO_SHORT_NAMES) */
2489+
#endif /* defined(PERL_CORE) || !defined(PERL_NO_SHORT_NAMES) */
24902490

24912491
/* ex: set ro ft=c: */

regen/embed.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ sub generate_embed_h {
905905
* BEWARE that a bunch of macros don't have long names, so either must be
906906
* added or don't use them if you define this symbol */
907907
908-
#ifndef PERL_NO_SHORT_NAMES
908+
#if ! defined(PERL_NO_SHORT_NAMES) || defined(PERL_CORE)
909909
910910
/* Hide global symbols */
911911
@@ -917,7 +917,7 @@ sub generate_embed_h {
917917

918918
print $em <<~'END';
919919
920-
#endif /* #ifndef PERL_NO_SHORT_NAMES */
920+
#endif /* if !defined(PERL_NO_SHORT_NAMES) || defined(PERL_CORE) */
921921
922922
#if !defined(PERL_CORE)
923923
/* Compatibility stubs. Compile extensions with -DPERL_NOCOMPAT to

0 commit comments

Comments
 (0)