This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
remove non-ANSI parts in comp/cpp.t
[perl5.git] / perlapi.h
index 0c92f99..5e5ac28 100644 (file)
--- a/perlapi.h
+++ b/perlapi.h
@@ -39,9 +39,46 @@ START_EXTERN_C
 
 END_EXTERN_C
 
-#if !defined(PERL_CORE)
+#if defined(PERL_CORE)
 
-/* accessor functions for Perl variables (provides binary compatibility) */
+/* accessor functions for Perl variables (provide binary compatibility) */
+
+/* these need to be mentioned here, or most linkers won't put them in
+   the perl executable */
+
+#ifndef PERL_NO_FORCE_LINK
+
+START_EXTERN_C
+
+#ifndef DOINIT
+EXT void *PL_force_link_funcs[];
+#else
+EXT void *PL_force_link_funcs[] = {
+#undef PERLVAR
+#undef PERLVARA
+#undef PERLVARI
+#undef PERLVARIC
+#define PERLVAR(v,t)   (void*)Perl_##v##_ptr,
+#define PERLVARA(v,n,t)        PERLVAR(v,t)
+#define PERLVARI(v,t,i)        PERLVAR(v,t)
+#define PERLVARIC(v,t,i) PERLVAR(v,t)
+
+#include "thrdvar.h"
+#include "intrpvar.h"
+#include "perlvars.h"
+
+#undef PERLVAR
+#undef PERLVARA
+#undef PERLVARI
+#undef PERLVARIC
+};
+#endif /* DOINIT */
+
+START_EXTERN_C
+
+#endif /* PERL_NO_FORCE_LINK */
+
+#else  /* !PERL_CORE */
 
 #undef  PL_Argv
 #define PL_Argv                        (*Perl_IArgv_ptr(aTHXo))
@@ -99,6 +136,8 @@ END_EXTERN_C
 #define PL_bufend              (*Perl_Ibufend_ptr(aTHXo))
 #undef  PL_bufptr
 #define PL_bufptr              (*Perl_Ibufptr_ptr(aTHXo))
+#undef  PL_checkav
+#define PL_checkav             (*Perl_Icheckav_ptr(aTHXo))
 #undef  PL_collation_ix
 #define PL_collation_ix                (*Perl_Icollation_ix_ptr(aTHXo))
 #undef  PL_collation_name
@@ -435,8 +474,6 @@ END_EXTERN_C
 #define PL_stderrgv            (*Perl_Istderrgv_ptr(aTHXo))
 #undef  PL_stdingv
 #define PL_stdingv             (*Perl_Istdingv_ptr(aTHXo))
-#undef  PL_stopav
-#define PL_stopav              (*Perl_Istopav_ptr(aTHXo))
 #undef  PL_strtab
 #define PL_strtab              (*Perl_Istrtab_ptr(aTHXo))
 #undef  PL_strtab_mutex
@@ -471,8 +508,6 @@ END_EXTERN_C
 #define PL_sys_intern          (*Perl_Isys_intern_ptr(aTHXo))
 #undef  PL_tainting
 #define PL_tainting            (*Perl_Itainting_ptr(aTHXo))
-#undef  PL_thr_key
-#define PL_thr_key             (*Perl_Ithr_key_ptr(aTHXo))
 #undef  PL_threadnum
 #define PL_threadnum           (*Perl_Ithreadnum_ptr(aTHXo))
 #undef  PL_threads_mutex
@@ -525,6 +560,8 @@ END_EXTERN_C
 #define PL_uudmap              (*Perl_Iuudmap_ptr(aTHXo))
 #undef  PL_warnhook
 #define PL_warnhook            (*Perl_Iwarnhook_ptr(aTHXo))
+#undef  PL_widesyscalls
+#define PL_widesyscalls                (*Perl_Iwidesyscalls_ptr(aTHXo))
 #undef  PL_xiv_arenaroot
 #define PL_xiv_arenaroot       (*Perl_Ixiv_arenaroot_ptr(aTHXo))
 #undef  PL_xiv_root
@@ -841,8 +878,12 @@ END_EXTERN_C
 #define PL_hexdigit            (*Perl_Ghexdigit_ptr(NULL))
 #undef  PL_malloc_mutex
 #define PL_malloc_mutex                (*Perl_Gmalloc_mutex_ptr(NULL))
+#undef  PL_op_mutex
+#define PL_op_mutex            (*Perl_Gop_mutex_ptr(NULL))
 #undef  PL_patleave
 #define PL_patleave            (*Perl_Gpatleave_ptr(NULL))
+#undef  PL_thr_key
+#define PL_thr_key             (*Perl_Gthr_key_ptr(NULL))
 
 #endif /* !PERL_CORE */
 #endif /* PERL_OBJECT || MULTIPLICITY */