This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix t/base/rs.t test failures on VMS
[perl5.git] / perl_exp.SH
CommitLineData
a0d0e21e 1#!/bin/sh
71be2cbc 2#
75f92628 3# Written: Nov 1994 Wayne Scott (wscott@ichips.intel.com)
71be2cbc 4#
a0d0e21e
LW
5# Create the export list for perl.
6# Needed by AIX to do dynamic linking.
71be2cbc 7#
1553ab04
TB
8# This simple program relys on 'global.sym' and other *.sym files
9# being up to date with all of the global symbols that a dynamic
10# link library might want to access.
71be2cbc 11#
12# Most symbols have a Perl_ prefix because that's what embed.h sticks
13# in front of them. Variations depend on binary compatibility with
14# Perl 5.003.
15#
a0d0e21e 16
71be2cbc 17case $CONFIG in
18'')
19 if test -f config.sh; then TOP=.;
20 elif test -f ../config.sh; then TOP=..;
21 elif test -f ../../config.sh; then TOP=../..;
22 elif test -f ../../../config.sh; then TOP=../../..;
23 elif test -f ../../../../config.sh; then TOP=../../../..;
24 else
25 echo "Can't find config.sh."; exit 1
26 fi
27 . $TOP/config.sh
28 ;;
29esac
30: This forces SH files to create target in same directory as SH file.
31: This is so that make depend always knows where to find SH derivatives.
32case "$0" in
33*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
34esac
bbb28fc1 35
a0d0e21e
LW
36echo "Extracting perl.exp"
37
acf072ce 38rm -f perl.exp
a0d0e21e
LW
39echo "#!" > perl.exp
40
d502c9a3
AD
41# No compat3 since 5.004_50.
42# perlio.sym will added below if needed.
43syms="global.sym interp.sym thread.sym"
bd656b61
JH
44
45sed -n '/^[A-Za-z]/ s/^/Perl_/p' $syms >> perl.exp
46
ec943e08
TH
47sed -n 's/^PERLVAR.*(G\([^[,]*\).*/Perl_\1/p' perlvars.h >> perl.exp
48sed -n 's/^PERLVAR.*(T\([^[,]*\).*/Perl_\1/p' thrdvar.h >> perl.exp
75f92628 49
1553ab04
TB
50#
51# If we use the PerlIO abstraction layer, add its symbols
52#
53
54if [ $useperlio = "define" ]
55then
56 grep '^[A-Za-z]' perlio.sym >> perl.exp
57fi
58
71be2cbc 59#
60# Extra globals not included above (including a few that might
61# not actually be defined, but there's no harm in that).
62#
63
a0d0e21e 64cat <<END >> perl.exp
55497cff 65perl_init_i18nl10n
bbce6d69 66perl_init_i18nl14n
67perl_new_collate
68perl_new_ctype
ff68c719 69perl_new_numeric
36477c24 70perl_set_numeric_local
71perl_set_numeric_standard
a0d0e21e
LW
72perl_alloc
73perl_construct
74perl_destruct
75perl_free
76perl_parse
77perl_run
78perl_get_sv
79perl_get_av
80perl_get_hv
81perl_get_cv
82perl_call_argv
83perl_call_pv
84perl_call_method
85perl_call_sv
6b8afdaf
CS
86perl_eval_pv
87perl_eval_sv
88perl_require_pv
71be2cbc 89Mymalloc
90Mycalloc
91Myremalloc
92Myfree
93Perl_malloc
94Perl_calloc
95Perl_realloc
96Perl_free
a0d0e21e 97END
bd656b61
JH
98
99# The shebang line nicely sorts as the first one.
100sort -o perl.exp -u perl.exp
101
102# eof