This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Okay, here's your official unofficial closure leak patch
[perl5.git] / embed_h.sh
CommitLineData
79072805
LW
1#!/bin/sh
2
748a9306 3rm -f embed.h
79072805 4cat <<'END' >embed.h
8990e307 5/* This file is derived from global.sym and interp.sym */
79072805
LW
6
7/* (Doing namespace management portably in C is really gross.) */
8
463ee0b2 9#ifdef EMBED
79072805
LW
10
11/* globals we need to hide from the world */
12END
13
8990e307 14sed <global.sym >>embed.h \
79072805
LW
15 -e 's/[ ]*#.*//' \
16 -e '/^[ ]*$/d' \
a0d0e21e 17 -e 's/\(.*\)/#define \1 Perl_\1/' \
79072805
LW
18 -e 's/\(................ \) /\1/'
19
20cat <<'END' >> embed.h
21
8990e307 22#endif /* EMBED */
463ee0b2 23
8990e307 24/* Put interpreter specific symbols into a struct? */
463ee0b2
LW
25
26#ifdef MULTIPLICITY
79072805
LW
27
28END
29
30
8990e307 31sed <interp.sym >>embed.h \
79072805
LW
32 -e 's/[ ]*#.*//' \
33 -e '/^[ ]*$/d' \
34 -e 's/\(.*\)/#define \1 (curinterp->I\1)/' \
35 -e 's/\(................ \) /\1/'
36
37cat <<'END' >> embed.h
38
8990e307 39#else /* not multiple, so translate interpreter symbols the other way... */
79072805
LW
40
41END
42
8990e307 43sed <interp.sym >>embed.h \
79072805
LW
44 -e 's/[ ]*#.*//' \
45 -e '/^[ ]*$/d' \
46 -e 's/\(.*\)/#define I\1 \1/' \
47 -e 's/\(................ \) /\1/'
48
49cat <<'END' >> embed.h
50
8990e307 51#endif /* MULTIPLICITY */
79072805
LW
52END
53