Minor OS/2 fixes
[p5sagit/p5-mst-13.2.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 5# Create the export list for perl.
6# Needed by AIX to do dynamic linking.
71be2cbc 7#
a0d0e21e 8# This simple program relys on 'global.sym' being up to date
9# with all of the global symbols that a dynamicly link library
10# 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 36echo "Extracting perl.exp"
37
acf072ce 38rm -f perl.exp
a0d0e21e 39echo "#!" > perl.exp
40
5f05dabc 41case "$bincompat3" in
42y*)
71be2cbc 43 (
44 global=/tmp/exp$$g
45 interp=/tmp/exp$$i
46 compat3=/tmp/exp$$c
47 trap 'rm -f $global $interp $compat3' 0
48 trap 'exit 1' 1 2 3 13 15
49 grep '^[A-Za-z]' global.sym | sort >$global
50 grep '^[A-Za-z]' interp.sym | sort >$interp
51 grep '^[A-Za-z]' compat3.sym | sort >$compat3
52 comm -23 $global $compat3 | sed 's/^/Perl_/' >> perl.exp
53 comm -12 $interp $compat3 | sed 's/^/Perl_/' >> perl.exp
54 comm -12 $global $compat3 >> perl.exp
55 comm -23 $interp $compat3 >> perl.exp
56 )
5f05dabc 57 ;;
58*)
59 sed -n '/^[A-Za-z]/ s/^/Perl_/p' global.sym interp.sym >> perl.exp
60 ;;
61esac
75f92628 62
71be2cbc 63#
64# Extra globals not included above (including a few that might
65# not actually be defined, but there's no harm in that).
66#
67
a0d0e21e 68cat <<END >> perl.exp
55497cff 69perl_init_i18nl10n
bbce6d69 70perl_init_i18nl14n
71perl_new_collate
72perl_new_ctype
ff68c719 73perl_new_numeric
36477c24 74perl_set_numeric_local
75perl_set_numeric_standard
a0d0e21e 76perl_alloc
77perl_construct
78perl_destruct
79perl_free
80perl_parse
81perl_run
82perl_get_sv
83perl_get_av
84perl_get_hv
85perl_get_cv
86perl_call_argv
87perl_call_pv
88perl_call_method
89perl_call_sv
90perl_requirepv
71be2cbc 91Mymalloc
92Mycalloc
93Myremalloc
94Myfree
95Perl_malloc
96Perl_calloc
97Perl_realloc
98Perl_free
a0d0e21e 99END