3 open(EM, ">embed.h") || die "Can't create embed.h: $!\n";
6 /* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
7 This file is built by embed.pl from global.sym and interp.sym.
8 Any changes made here will be lost
11 /* (Doing namespace management portably in C is really gross.) */
13 /* EMBED has no run-time penalty, but helps keep the Perl namespace
14 from colliding with that used by other libraries pulled in
15 by extensions or by embedding perl. Allow a cc -DNO_EMBED
16 override, however, to keep binary compatability with previous
25 /* globals we need to hide from the world */
28 open(GL, "<global.sym") || die "Can't open global.sym: $!\n";
31 s/[ \t]*#.*//; # Delete comments.
33 s/^\s*(\S+).*$/#define $1\t\tPerl_$1/;
35 s/(................\t)\t/$1/;
39 close(GL) || warn "Can't close global.sym: $!\n";
45 /* Put interpreter specific symbols into a struct? */
49 /* Undefine symbols that were defined by EMBED. Somewhat ugly */
54 open(INT, "<interp.sym") || die "Can't open interp.sym: $!\n";
56 s/[ \t]*#.*//; # Delete comments.
58 s/^\s*(\S*).*$/#undef $1/;
59 print EM $_ if (exists $global{$1});
61 close(INT) || warn "Can't close interp.sym: $!\n";
65 open(INT, "<interp.sym") || die "Can't open interp.sym: $!\n";
67 s/[ \t]*#.*//; # Delete comments.
69 s/^\s*(\S+).*$/#define $1\t\t(curinterp->I$1)/;
70 s/(................\t)\t/$1/;
73 close(INT) || warn "Can't close interp.sym: $!\n";
77 #else /* not multiple, so translate interpreter symbols the other way... */
81 open(INT, "<interp.sym") || die "Can't open interp.sym: $!\n";
83 s/[ \t]*#.*//; # Delete comments.
85 s/^\s*(\S+).*$/#define I$1\t\t$1/;
86 s/(................\t)\t/$1/;
89 close(INT) || warn "Can't close interp.sym: $!\n";
93 #endif /* MULTIPLICITY */