Skip to content

Commit 38a60a4

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 9d1fa9f commit 38a60a4

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
@@ -91,7 +91,7 @@
9191
!defined(PERL_WANT_VARARGS) */
9292
# endif /* !defined(PERL_NOCOMPAT) */
9393
#endif /* !defined(PERL_CORE) */
94-
#if !defined(PERL_NO_SHORT_NAMES)
94+
#if defined(PERL_CORE) || !defined(PERL_NO_SHORT_NAMES)
9595

9696
/* Hide global symbols */
9797

@@ -2490,6 +2490,6 @@
24902490
# else
24912491
# define get_context Perl_get_context
24922492
# endif
2493-
#endif /* !defined(PERL_NO_SHORT_NAMES) */
2493+
#endif /* defined(PERL_CORE) || !defined(PERL_NO_SHORT_NAMES) */
24942494

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

regen/embed.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ sub generate_embed_h {
886886
* BEWARE that a bunch of macros don't have long names, so either must be
887887
* added or don't use them if you define this symbol */
888888
889-
#ifndef PERL_NO_SHORT_NAMES
889+
#if ! defined(PERL_NO_SHORT_NAMES) || defined(PERL_CORE)
890890
891891
/* Hide global symbols */
892892
@@ -898,7 +898,7 @@ sub generate_embed_h {
898898

899899
print $em <<~'END';
900900
901-
#endif /* #ifndef PERL_NO_SHORT_NAMES */
901+
#endif /* if !defined(PERL_NO_SHORT_NAMES) || defined(PERL_CORE) */
902902
903903
#if !defined(PERL_CORE)
904904
/* Compatibility stubs. Compile extensions with -DPERL_NOCOMPAT to

0 commit comments

Comments
 (0)