2000-10-24 19:01:06 +02:00
|
|
|
|
2004-08-29 07:07:03 +02:00
|
|
|
/* ppport.h -- Perl/Pollution/Portability Version 2.011
|
2004-07-05 04:18:31 +02:00
|
|
|
*
|
2004-08-29 07:07:03 +02:00
|
|
|
* Automatically Created by Devel::PPPort on Sun Jul 4 09:11:52 2004
|
2004-07-05 04:18:31 +02:00
|
|
|
*
|
|
|
|
* Do NOT edit this file directly! -- Edit PPPort.pm instead.
|
|
|
|
*
|
|
|
|
* Version 2.x, Copyright (C) 2001, Paul Marquess.
|
|
|
|
* Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
|
|
|
|
* This code may be used and distributed under the same license as any
|
|
|
|
* version of Perl.
|
2004-08-29 07:07:03 +02:00
|
|
|
*
|
2004-07-05 04:18:31 +02:00
|
|
|
* This version of ppport.h is designed to support operation with Perl
|
|
|
|
* installations back to 5.004, and has been tested up to 5.8.1.
|
|
|
|
*
|
|
|
|
* If this version of ppport.h is failing during the compilation of this
|
|
|
|
* module, please check if a newer version of Devel::PPPort is available
|
|
|
|
* on CPAN before sending a bug report.
|
|
|
|
*
|
|
|
|
* If you are using the latest version of Devel::PPPort and it is failing
|
|
|
|
* during compilation of this module, please send a report to perlbug@perl.com
|
|
|
|
*
|
|
|
|
* Include all following information:
|
|
|
|
*
|
2004-08-29 07:07:03 +02:00
|
|
|
* 1. The complete output from running "perl -V"
|
2004-07-05 04:18:31 +02:00
|
|
|
*
|
2004-08-29 07:07:03 +02:00
|
|
|
* 2. This file.
|
2004-07-05 04:18:31 +02:00
|
|
|
*
|
2004-08-29 07:07:03 +02:00
|
|
|
* 3. The name & version of the module you were trying to build.
|
2004-07-05 04:18:31 +02:00
|
|
|
*
|
2004-08-29 07:07:03 +02:00
|
|
|
* 4. A full log of the build that failed.
|
2004-07-05 04:18:31 +02:00
|
|
|
*
|
2004-08-29 07:07:03 +02:00
|
|
|
* 5. Any other information that you think could be relevant.
|
2004-07-05 04:18:31 +02:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* For the latest version of this code, please retreive the Devel::PPPort
|
|
|
|
* module from CPAN.
|
2004-08-29 07:07:03 +02:00
|
|
|
*
|
2004-07-05 04:18:31 +02:00
|
|
|
*/
|
2000-10-24 19:01:06 +02:00
|
|
|
|
|
|
|
/*
|
2004-07-05 04:18:31 +02:00
|
|
|
* In order for a Perl extension module to be as portable as possible
|
|
|
|
* across differing versions of Perl itself, certain steps need to be taken.
|
|
|
|
* Including this header is the first major one, then using dTHR is all the
|
|
|
|
* appropriate places and using a PL_ prefix to refer to global Perl
|
|
|
|
* variables is the second.
|
|
|
|
*
|
|
|
|
*/
|
2000-10-24 19:01:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* If you use one of a few functions that were not present in earlier
|
2004-07-05 04:18:31 +02:00
|
|
|
* versions of Perl, please add a define before the inclusion of ppport.h
|
|
|
|
* for a static include, or use the GLOBAL request in a single module to
|
|
|
|
* produce a global definition that can be referenced from the other
|
|
|
|
* modules.
|
2004-08-29 07:07:03 +02:00
|
|
|
*
|
|
|
|
* Function: Static define: Extern define:
|
|
|
|
* newCONSTSUB() NEED_newCONSTSUB NEED_newCONSTSUB_GLOBAL
|
2004-07-05 04:18:31 +02:00
|
|
|
*
|
|
|
|
*/
|
2004-08-29 07:07:03 +02:00
|
|
|
|
2000-10-24 19:01:06 +02:00
|
|
|
|
|
|
|
/* To verify whether ppport.h is needed for your module, and whether any
|
2004-07-05 04:18:31 +02:00
|
|
|
* special defines should be used, ppport.h can be run through Perl to check
|
|
|
|
* your source code. Simply say:
|
2004-08-29 07:07:03 +02:00
|
|
|
*
|
|
|
|
* perl -x ppport.h *.c *.h *.xs foo/bar*.c [etc]
|
|
|
|
*
|
2004-07-05 04:18:31 +02:00
|
|
|
* The result will be a list of patches suggesting changes that should at
|
|
|
|
* least be acceptable, if not necessarily the most efficient solution, or a
|
|
|
|
* fix for all possible problems. It won't catch where dTHR is needed, and
|
|
|
|
* doesn't attempt to account for global macro or function definitions,
|
|
|
|
* nested includes, typemaps, etc.
|
2004-08-29 07:07:03 +02:00
|
|
|
*
|
2004-07-05 04:18:31 +02:00
|
|
|
* In order to test for the need of dTHR, please try your module under a
|
|
|
|
* recent version of Perl that has threading compiled-in.
|
|
|
|
*
|
2004-08-29 07:07:03 +02:00
|
|
|
*/
|
2000-10-24 19:01:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
#!/usr/bin/perl
|
|
|
|
@ARGV = ("*.xs") if !@ARGV;
|
|
|
|
%badmacros = %funcs = %macros = (); $replace = 0;
|
|
|
|
foreach (<DATA>) {
|
|
|
|
$funcs{$1} = 1 if /Provide:\s+(\S+)/;
|
|
|
|
$macros{$1} = 1 if /^#\s*define\s+([a-zA-Z0-9_]+)/;
|
|
|
|
$replace = $1 if /Replace:\s+(\d+)/;
|
|
|
|
$badmacros{$2}=$1 if $replace and /^#\s*define\s+([a-zA-Z0-9_]+).*?\s+([a-zA-Z0-9_]+)/;
|
|
|
|
$badmacros{$1}=$2 if /Replace (\S+) with (\S+)/;
|
|
|
|
}
|
|
|
|
foreach $filename (map(glob($_),@ARGV)) {
|
|
|
|
unless (open(IN, "<$filename")) {
|
|
|
|
warn "Unable to read from $file: $!\n";
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
print "Scanning $filename...\n";
|
|
|
|
$c = ""; while (<IN>) { $c .= $_; } close(IN);
|
|
|
|
$need_include = 0; %add_func = (); $changes = 0;
|
|
|
|
$has_include = ($c =~ /#.*include.*ppport/m);
|
|
|
|
|
|
|
|
foreach $func (keys %funcs) {
|
|
|
|
if ($c =~ /#.*define.*\bNEED_$func(_GLOBAL)?\b/m) {
|
|
|
|
if ($c !~ /\b$func\b/m) {
|
|
|
|
print "If $func isn't needed, you don't need to request it.\n" if
|
|
|
|
$changes += ($c =~ s/^.*#.*define.*\bNEED_$func\b.*\n//m);
|
|
|
|
} else {
|
|
|
|
print "Uses $func\n";
|
|
|
|
$need_include = 1;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if ($c =~ /\b$func\b/m) {
|
|
|
|
$add_func{$func} =1 ;
|
|
|
|
print "Uses $func\n";
|
|
|
|
$need_include = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (not $need_include) {
|
|
|
|
foreach $macro (keys %macros) {
|
|
|
|
if ($c =~ /\b$macro\b/m) {
|
|
|
|
print "Uses $macro\n";
|
|
|
|
$need_include = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach $badmacro (keys %badmacros) {
|
|
|
|
if ($c =~ /\b$badmacro\b/m) {
|
|
|
|
$changes += ($c =~ s/\b$badmacro\b/$badmacros{$badmacro}/gm);
|
|
|
|
print "Uses $badmacros{$badmacro} (instead of $badmacro)\n";
|
|
|
|
$need_include = 1;
|
|
|
|
}
|
|
|
|
}
|
2004-08-29 07:07:03 +02:00
|
|
|
|
2000-10-24 19:01:06 +02:00
|
|
|
if (scalar(keys %add_func) or $need_include != $has_include) {
|
|
|
|
if (!$has_include) {
|
|
|
|
$inc = join('',map("#define NEED_$_\n", sort keys %add_func)).
|
2004-08-29 07:07:03 +02:00
|
|
|
"#include \"ppport.h\"\n";
|
2000-10-24 19:01:06 +02:00
|
|
|
$c = "$inc$c" unless $c =~ s/#.*include.*XSUB.*\n/$&$inc/m;
|
|
|
|
} elsif (keys %add_func) {
|
|
|
|
$inc = join('',map("#define NEED_$_\n", sort keys %add_func));
|
|
|
|
$c = "$inc$c" unless $c =~ s/^.*#.*include.*ppport.*$/$inc$&/m;
|
|
|
|
}
|
|
|
|
if (!$need_include) {
|
|
|
|
print "Doesn't seem to need ppport.h.\n";
|
|
|
|
$c =~ s/^.*#.*include.*ppport.*\n//m;
|
|
|
|
}
|
|
|
|
$changes++;
|
|
|
|
}
|
2004-08-29 07:07:03 +02:00
|
|
|
|
2000-10-24 19:01:06 +02:00
|
|
|
if ($changes) {
|
|
|
|
open(OUT,">/tmp/ppport.h.$$");
|
|
|
|
print OUT $c;
|
|
|
|
close(OUT);
|
|
|
|
open(DIFF, "diff -u $filename /tmp/ppport.h.$$|");
|
|
|
|
while (<DIFF>) { s!/tmp/ppport\.h\.$$!$filename.patched!; print STDOUT; }
|
|
|
|
close(DIFF);
|
|
|
|
unlink("/tmp/ppport.h.$$");
|
|
|
|
} else {
|
|
|
|
print "Looks OK\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
__DATA__
|
|
|
|
*/
|
|
|
|
|
2004-07-05 04:18:31 +02:00
|
|
|
#ifndef _P_P_PORTABILITY_H_
|
|
|
|
#define _P_P_PORTABILITY_H_
|
|
|
|
|
2000-10-24 19:01:06 +02:00
|
|
|
#ifndef PERL_REVISION
|
2004-08-29 07:07:03 +02:00
|
|
|
#ifndef __PATCHLEVEL_H_INCLUDED__
|
|
|
|
#define PERL_PATCHLEVEL_H_IMPLICIT
|
|
|
|
#include <patchlevel.h>
|
|
|
|
#endif
|
|
|
|
#if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
|
|
|
|
#include <could_not_find_Perl_patchlevel.h>
|
|
|
|
#endif
|
|
|
|
#ifndef PERL_REVISION
|
|
|
|
#define PERL_REVISION (5)
|
|
|
|
/* Replace: 1 */
|
|
|
|
#define PERL_VERSION PATCHLEVEL
|
|
|
|
#define PERL_SUBVERSION SUBVERSION
|
|
|
|
/* Replace PERL_PATCHLEVEL with PERL_VERSION */
|
|
|
|
/* Replace: 0 */
|
|
|
|
#endif
|
2000-10-24 19:01:06 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define PERL_BCDVERSION ((PERL_REVISION * 0x1000000L) + (PERL_VERSION * 0x1000L) + PERL_SUBVERSION)
|
|
|
|
|
2004-08-29 07:07:03 +02:00
|
|
|
/* It is very unlikely that anyone will try to use this with Perl 6
|
2004-07-05 04:18:31 +02:00
|
|
|
(or greater), but who knows.
|
|
|
|
*/
|
|
|
|
#if PERL_REVISION != 5
|
2004-08-29 07:07:03 +02:00
|
|
|
#error ppport.h only works with Perl version 5
|
|
|
|
#endif /* PERL_REVISION != 5 */
|
2004-07-05 04:18:31 +02:00
|
|
|
|
2000-10-24 19:01:06 +02:00
|
|
|
#ifndef ERRSV
|
2004-08-29 07:07:03 +02:00
|
|
|
#define ERRSV perl_get_sv("@",FALSE)
|
2000-10-24 19:01:06 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5))
|
|
|
|
/* Replace: 1 */
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PL_Sv Sv
|
|
|
|
#define PL_compiling compiling
|
|
|
|
#define PL_copline copline
|
|
|
|
#define PL_curcop curcop
|
|
|
|
#define PL_curstash curstash
|
|
|
|
#define PL_defgv defgv
|
|
|
|
#define PL_dirty dirty
|
|
|
|
#define PL_dowarn dowarn
|
|
|
|
#define PL_hints hints
|
|
|
|
#define PL_na na
|
|
|
|
#define PL_perldb perldb
|
|
|
|
#define PL_rsfp_filters rsfp_filters
|
|
|
|
#define PL_rsfpv rsfp
|
|
|
|
#define PL_stdingv stdingv
|
|
|
|
#define PL_sv_no sv_no
|
|
|
|
#define PL_sv_undef sv_undef
|
|
|
|
#define PL_sv_yes sv_yes
|
2000-10-24 19:01:06 +02:00
|
|
|
/* Replace: 0 */
|
|
|
|
#endif
|
|
|
|
|
2004-07-05 04:18:31 +02:00
|
|
|
#ifdef HASATTRIBUTE
|
2004-08-29 07:07:03 +02:00
|
|
|
#if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER)
|
|
|
|
#define PERL_UNUSED_DECL
|
|
|
|
#else
|
|
|
|
#define PERL_UNUSED_DECL __attribute__((unused))
|
|
|
|
#endif
|
2004-07-05 04:18:31 +02:00
|
|
|
#else
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_UNUSED_DECL
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef dNOOP
|
2004-08-29 07:07:03 +02:00
|
|
|
#define NOOP (void)0
|
|
|
|
#define dNOOP extern int Perl___notused PERL_UNUSED_DECL
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
2000-10-24 19:01:06 +02:00
|
|
|
#ifndef dTHR
|
2004-08-29 07:07:03 +02:00
|
|
|
#define dTHR dNOOP
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef dTHX
|
2004-08-29 07:07:03 +02:00
|
|
|
#define dTHX dNOOP
|
|
|
|
#define dTHXa(x) dNOOP
|
|
|
|
#define dTHXoa(x) dNOOP
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef pTHX
|
2004-08-29 07:07:03 +02:00
|
|
|
#define pTHX void
|
|
|
|
#define pTHX_
|
|
|
|
#define aTHX
|
|
|
|
#define aTHX_
|
|
|
|
#endif
|
2004-07-05 04:18:31 +02:00
|
|
|
|
|
|
|
#ifndef dAX
|
2004-08-29 07:07:03 +02:00
|
|
|
#define dAX I32 ax = MARK - PL_stack_base + 1
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
#ifndef dITEMS
|
2004-08-29 07:07:03 +02:00
|
|
|
#define dITEMS I32 items = SP - MARK
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* IV could also be a quad (say, a long long), but Perls
|
|
|
|
* capable of those should have IVSIZE already. */
|
|
|
|
#if !defined(IVSIZE) && defined(LONGSIZE)
|
2004-08-29 07:07:03 +02:00
|
|
|
#define IVSIZE LONGSIZE
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
#ifndef IVSIZE
|
2004-08-29 07:07:03 +02:00
|
|
|
#define IVSIZE 4 /* A bold guess, but the best we can make. */
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef UVSIZE
|
2004-08-29 07:07:03 +02:00
|
|
|
#define UVSIZE IVSIZE
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NVTYPE
|
2004-08-29 07:07:03 +02:00
|
|
|
#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
|
|
|
|
#define NVTYPE long double
|
|
|
|
#else
|
|
|
|
#define NVTYPE double
|
|
|
|
#endif
|
2004-07-05 04:18:31 +02:00
|
|
|
typedef NVTYPE NV;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef INT2PTR
|
|
|
|
|
|
|
|
#if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PTRV UV
|
|
|
|
#define INT2PTR(any,d) (any)(d)
|
2004-07-05 04:18:31 +02:00
|
|
|
#else
|
|
|
|
#if PTRSIZE == LONGSIZE
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PTRV unsigned long
|
2004-07-05 04:18:31 +02:00
|
|
|
#else
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PTRV unsigned
|
2000-10-24 19:01:06 +02:00
|
|
|
#endif
|
2004-08-29 07:07:03 +02:00
|
|
|
#define INT2PTR(any,d) (any)(PTRV)(d)
|
|
|
|
#endif
|
|
|
|
#define NUM2PTR(any,d) (any)(PTRV)(d)
|
|
|
|
#define PTR2IV(p) INT2PTR(IV,p)
|
|
|
|
#define PTR2UV(p) INT2PTR(UV,p)
|
|
|
|
#define PTR2NV(p) NUM2PTR(NV,p)
|
|
|
|
#if PTRSIZE == LONGSIZE
|
|
|
|
#define PTR2ul(p) (unsigned long)(p)
|
|
|
|
#else
|
|
|
|
#define PTR2ul(p) INT2PTR(unsigned long,p)
|
|
|
|
#endif
|
|
|
|
#endif /* !INT2PTR */
|
2004-07-05 04:18:31 +02:00
|
|
|
|
2000-10-24 19:01:06 +02:00
|
|
|
#ifndef boolSV
|
2004-08-29 07:07:03 +02:00
|
|
|
#define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no)
|
2000-10-24 19:01:06 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef gv_stashpvn
|
2004-08-29 07:07:03 +02:00
|
|
|
#define gv_stashpvn(str,len,flags) gv_stashpv(str,flags)
|
2000-10-24 19:01:06 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef newSVpvn
|
2004-08-29 07:07:03 +02:00
|
|
|
#define newSVpvn(data,len) ((len) ? newSVpv ((data), (len)) : newSVpv ("", 0))
|
2000-10-24 19:01:06 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef newRV_inc
|
|
|
|
/* Replace: 1 */
|
2004-08-29 07:07:03 +02:00
|
|
|
#define newRV_inc(sv) newRV(sv)
|
2000-10-24 19:01:06 +02:00
|
|
|
/* Replace: 0 */
|
|
|
|
#endif
|
|
|
|
|
2004-07-05 04:18:31 +02:00
|
|
|
/* DEFSV appears first in 5.004_56 */
|
|
|
|
#ifndef DEFSV
|
2004-08-29 07:07:03 +02:00
|
|
|
#define DEFSV GvSV(PL_defgv)
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SAVE_DEFSV
|
2004-08-29 07:07:03 +02:00
|
|
|
#define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv))
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
2000-10-24 19:01:06 +02:00
|
|
|
#ifndef newRV_noinc
|
2004-08-29 07:07:03 +02:00
|
|
|
#ifdef __GNUC__
|
|
|
|
#define newRV_noinc(sv) \
|
|
|
|
({ \
|
|
|
|
SV *nsv = (SV*)newRV(sv); \
|
|
|
|
SvREFCNT_dec(sv); \
|
|
|
|
nsv; \
|
|
|
|
})
|
|
|
|
#else
|
|
|
|
#if defined(USE_THREADS)
|
|
|
|
static SV *
|
2004-08-30 04:54:42 +02:00
|
|
|
newRV_noinc(SV *sv)
|
2000-10-24 19:01:06 +02:00
|
|
|
{
|
2004-08-29 07:07:03 +02:00
|
|
|
SV *nsv = (SV *) newRV(sv);
|
|
|
|
|
|
|
|
SvREFCNT_dec(sv);
|
|
|
|
return nsv;
|
2000-10-24 19:01:06 +02:00
|
|
|
}
|
2004-08-29 07:07:03 +02:00
|
|
|
|
|
|
|
#else
|
|
|
|
#define newRV_noinc(sv) \
|
|
|
|
(PL_Sv=(SV*)newRV(sv), SvREFCNT_dec(sv), (SV*)PL_Sv)
|
|
|
|
#endif
|
|
|
|
#endif
|
2000-10-24 19:01:06 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Provide: newCONSTSUB */
|
|
|
|
|
|
|
|
/* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */
|
|
|
|
#if (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION < 63))
|
|
|
|
|
|
|
|
#if defined(NEED_newCONSTSUB)
|
|
|
|
static
|
|
|
|
#else
|
2004-08-30 04:54:42 +02:00
|
|
|
extern void newCONSTSUB(HV *stash, char *name, SV *sv);
|
2000-10-24 19:01:06 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL)
|
|
|
|
void
|
2004-08-29 07:07:03 +02:00
|
|
|
newCONSTSUB(stash, name, sv)
|
|
|
|
HV *stash;
|
|
|
|
char *name;
|
|
|
|
SV *sv;
|
2000-10-24 19:01:06 +02:00
|
|
|
{
|
2004-08-29 07:07:03 +02:00
|
|
|
U32 oldhints = PL_hints;
|
|
|
|
HV *old_cop_stash = PL_curcop->cop_stash;
|
|
|
|
HV *old_curstash = PL_curstash;
|
|
|
|
line_t oldline = PL_curcop->cop_line;
|
|
|
|
|
2000-10-24 19:01:06 +02:00
|
|
|
PL_curcop->cop_line = PL_copline;
|
|
|
|
|
|
|
|
PL_hints &= ~HINT_BLOCK_SCOPE;
|
|
|
|
if (stash)
|
|
|
|
PL_curstash = PL_curcop->cop_stash = stash;
|
|
|
|
|
|
|
|
newSUB(
|
|
|
|
|
|
|
|
#if (PERL_VERSION < 3) || ((PERL_VERSION == 3) && (PERL_SUBVERSION < 22))
|
2004-08-29 07:07:03 +02:00
|
|
|
/* before 5.003_22 */
|
|
|
|
start_subparse(),
|
2001-03-22 05:01:46 +01:00
|
|
|
#else
|
2004-08-29 07:07:03 +02:00
|
|
|
#if (PERL_VERSION == 3) && (PERL_SUBVERSION == 22)
|
|
|
|
/* 5.003_22 */
|
|
|
|
start_subparse(0),
|
|
|
|
#else
|
|
|
|
/* 5.003_23 onwards */
|
|
|
|
start_subparse(FALSE, 0),
|
|
|
|
#endif
|
2000-10-24 19:01:06 +02:00
|
|
|
#endif
|
|
|
|
|
2004-08-29 07:07:03 +02:00
|
|
|
newSVOP(OP_CONST, 0, newSVpv(name, 0)),
|
|
|
|
newSVOP(OP_CONST, 0, &PL_sv_no), /* SvPV(&PL_sv_no) == ""
|
|
|
|
* -- GMB */
|
|
|
|
newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv))
|
|
|
|
);
|
2000-10-24 19:01:06 +02:00
|
|
|
|
|
|
|
PL_hints = oldhints;
|
|
|
|
PL_curcop->cop_stash = old_cop_stash;
|
|
|
|
PL_curstash = old_curstash;
|
|
|
|
PL_curcop->cop_line = oldline;
|
|
|
|
}
|
|
|
|
#endif
|
2004-08-29 07:07:03 +02:00
|
|
|
#endif /* newCONSTSUB */
|
2004-07-05 04:18:31 +02:00
|
|
|
|
|
|
|
#ifndef START_MY_CXT
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Boilerplate macros for initializing and accessing interpreter-local
|
|
|
|
* data from C. All statics in extensions should be reworked to use
|
|
|
|
* this, if you want to make the extension thread-safe. See ext/re/re.xs
|
|
|
|
* for an example of the use of these macros.
|
|
|
|
*
|
|
|
|
* Code that uses these macros is responsible for the following:
|
|
|
|
* 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
|
|
|
|
* 2. Declare a typedef named my_cxt_t that is a structure that contains
|
2004-08-29 07:07:03 +02:00
|
|
|
* all the data that needs to be interpreter-local.
|
2004-07-05 04:18:31 +02:00
|
|
|
* 3. Use the START_MY_CXT macro after the declaration of my_cxt_t.
|
|
|
|
* 4. Use the MY_CXT_INIT macro such that it is called exactly once
|
2004-08-29 07:07:03 +02:00
|
|
|
* (typically put in the BOOT: section).
|
2004-07-05 04:18:31 +02:00
|
|
|
* 5. Use the members of the my_cxt_t structure everywhere as
|
2004-08-29 07:07:03 +02:00
|
|
|
* MY_CXT.member.
|
2004-07-05 04:18:31 +02:00
|
|
|
* 6. Use the dMY_CXT macro (a declaration) in all the functions that
|
2004-08-29 07:07:03 +02:00
|
|
|
* access MY_CXT.
|
2004-07-05 04:18:31 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \
|
2004-08-29 07:07:03 +02:00
|
|
|
defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT)
|
2004-07-05 04:18:31 +02:00
|
|
|
|
|
|
|
/* This must appear in all extensions that define a my_cxt_t structure,
|
|
|
|
* right after the definition (i.e. at file scope). The non-threads
|
|
|
|
* case below uses it to declare the data as static. */
|
|
|
|
#define START_MY_CXT
|
|
|
|
|
|
|
|
#if (PERL_VERSION < 4 || (PERL_VERSION == 4 && PERL_SUBVERSION < 68 ))
|
|
|
|
/* Fetches the SV that keeps the per-interpreter data. */
|
|
|
|
#define dMY_CXT_SV \
|
|
|
|
SV *my_cxt_sv = perl_get_sv(MY_CXT_KEY, FALSE)
|
2004-08-29 07:07:03 +02:00
|
|
|
#else /* >= perl5.004_68 */
|
2004-07-05 04:18:31 +02:00
|
|
|
#define dMY_CXT_SV \
|
|
|
|
SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY, \
|
|
|
|
sizeof(MY_CXT_KEY)-1, TRUE)
|
2004-08-29 07:07:03 +02:00
|
|
|
#endif /* < perl5.004_68 */
|
2004-07-05 04:18:31 +02:00
|
|
|
|
|
|
|
/* This declaration should be used within all functions that use the
|
|
|
|
* interpreter-local data. */
|
2004-08-29 07:07:03 +02:00
|
|
|
#define dMY_CXT \
|
2004-07-05 04:18:31 +02:00
|
|
|
dMY_CXT_SV; \
|
|
|
|
my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv))
|
|
|
|
|
|
|
|
/* Creates and zeroes the per-interpreter data.
|
|
|
|
* (We allocate my_cxtp in a Perl SV so that it will be released when
|
|
|
|
* the interpreter goes away.) */
|
|
|
|
#define MY_CXT_INIT \
|
|
|
|
dMY_CXT_SV; \
|
|
|
|
/* newSV() allocates one more than needed */ \
|
|
|
|
my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
|
|
|
|
Zero(my_cxtp, 1, my_cxt_t); \
|
|
|
|
sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
|
|
|
|
|
|
|
|
/* This macro must be used to access members of the my_cxt_t structure.
|
|
|
|
* e.g. MYCXT.some_data */
|
|
|
|
#define MY_CXT (*my_cxtp)
|
|
|
|
|
|
|
|
/* Judicious use of these macros can reduce the number of times dMY_CXT
|
|
|
|
* is used. Use is similar to pTHX, aTHX etc. */
|
|
|
|
#define pMY_CXT my_cxt_t *my_cxtp
|
|
|
|
#define pMY_CXT_ pMY_CXT,
|
|
|
|
#define _pMY_CXT ,pMY_CXT
|
|
|
|
#define aMY_CXT my_cxtp
|
|
|
|
#define aMY_CXT_ aMY_CXT,
|
|
|
|
#define _aMY_CXT ,aMY_CXT
|
|
|
|
|
2004-08-29 07:07:03 +02:00
|
|
|
#else /* single interpreter */
|
2004-07-05 04:18:31 +02:00
|
|
|
|
|
|
|
#define START_MY_CXT static my_cxt_t my_cxt;
|
|
|
|
#define dMY_CXT_SV dNOOP
|
|
|
|
#define dMY_CXT dNOOP
|
2004-08-29 07:07:03 +02:00
|
|
|
#define MY_CXT_INIT NOOP
|
2004-07-05 04:18:31 +02:00
|
|
|
#define MY_CXT my_cxt
|
|
|
|
|
|
|
|
#define pMY_CXT void
|
|
|
|
#define pMY_CXT_
|
|
|
|
#define _pMY_CXT
|
|
|
|
#define aMY_CXT
|
|
|
|
#define aMY_CXT_
|
|
|
|
#define _aMY_CXT
|
2004-08-29 07:07:03 +02:00
|
|
|
#endif
|
|
|
|
#endif /* START_MY_CXT */
|
2004-07-05 04:18:31 +02:00
|
|
|
|
|
|
|
#ifndef IVdf
|
2004-08-29 07:07:03 +02:00
|
|
|
#if IVSIZE == LONGSIZE
|
|
|
|
#define IVdf "ld"
|
|
|
|
#define UVuf "lu"
|
|
|
|
#define UVof "lo"
|
|
|
|
#define UVxf "lx"
|
|
|
|
#define UVXf "lX"
|
|
|
|
#else
|
|
|
|
#if IVSIZE == INTSIZE
|
|
|
|
#define IVdf "d"
|
|
|
|
#define UVuf "u"
|
|
|
|
#define UVof "o"
|
|
|
|
#define UVxf "x"
|
|
|
|
#define UVXf "X"
|
|
|
|
#endif
|
|
|
|
#endif
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NVef
|
2004-08-29 07:07:03 +02:00
|
|
|
#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \
|
|
|
|
defined(PERL_PRIfldbl) /* Not very likely, but let's try anyway. */
|
|
|
|
#define NVef PERL_PRIeldbl
|
|
|
|
#define NVff PERL_PRIfldbl
|
|
|
|
#define NVgf PERL_PRIgldbl
|
|
|
|
#else
|
|
|
|
#define NVef "e"
|
|
|
|
#define NVff "f"
|
|
|
|
#define NVgf "g"
|
|
|
|
#endif
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
2004-08-29 07:07:03 +02:00
|
|
|
#ifndef AvFILLp /* Older perls (<=5.003) lack AvFILLp */
|
|
|
|
#define AvFILLp AvFILL
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef SvPVbyte
|
2004-08-29 07:07:03 +02:00
|
|
|
#if PERL_REVISION == 5 && PERL_VERSION < 7
|
|
|
|
/* SvPVbyte does not work in perl-5.6.1, borrowed version for 5.7.3 */
|
|
|
|
#undef SvPVbyte
|
|
|
|
#define SvPVbyte(sv, lp) \
|
|
|
|
((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \
|
|
|
|
? ((lp = SvCUR(sv)), SvPVX(sv)) : my_sv_2pvbyte(aTHX_ sv, &lp))
|
|
|
|
static char *
|
2004-08-30 04:54:42 +02:00
|
|
|
my_sv_2pvbyte(pTHX_ register SV *sv, STRLEN *lp)
|
2004-08-29 07:07:03 +02:00
|
|
|
{
|
|
|
|
sv_utf8_downgrade(sv, 0);
|
|
|
|
return SvPV(sv, *lp);
|
|
|
|
}
|
|
|
|
#endif
|
2004-07-05 04:18:31 +02:00
|
|
|
#else
|
2004-08-29 07:07:03 +02:00
|
|
|
#define SvPVbyte SvPV
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SvPV_nolen
|
2004-08-29 07:07:03 +02:00
|
|
|
#define SvPV_nolen(sv) \
|
|
|
|
((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
|
|
|
|
? SvPVX(sv) : sv_2pv_nolen(sv))
|
|
|
|
static char *
|
2004-08-30 04:54:42 +02:00
|
|
|
sv_2pv_nolen(pTHX_ register SV *sv)
|
2004-08-29 07:07:03 +02:00
|
|
|
{
|
|
|
|
STRLEN n_a;
|
|
|
|
|
|
|
|
return sv_2pv(sv, &n_a);
|
|
|
|
}
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef get_cv
|
2004-08-29 07:07:03 +02:00
|
|
|
#define get_cv(name,create) perl_get_cv(name,create)
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef get_sv
|
2004-08-29 07:07:03 +02:00
|
|
|
#define get_sv(name,create) perl_get_sv(name,create)
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef get_av
|
2004-08-29 07:07:03 +02:00
|
|
|
#define get_av(name,create) perl_get_av(name,create)
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef get_hv
|
2004-08-29 07:07:03 +02:00
|
|
|
#define get_hv(name,create) perl_get_hv(name,create)
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef call_argv
|
2004-08-29 07:07:03 +02:00
|
|
|
#define call_argv perl_call_argv
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef call_method
|
2004-08-29 07:07:03 +02:00
|
|
|
#define call_method perl_call_method
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef call_pv
|
2004-08-29 07:07:03 +02:00
|
|
|
#define call_pv perl_call_pv
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef call_sv
|
2004-08-29 07:07:03 +02:00
|
|
|
#define call_sv perl_call_sv
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef eval_pv
|
2004-08-29 07:07:03 +02:00
|
|
|
#define eval_pv perl_eval_pv
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef eval_sv
|
2004-08-29 07:07:03 +02:00
|
|
|
#define eval_sv perl_eval_sv
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_SCAN_GREATER_THAN_UV_MAX
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_SCAN_GREATER_THAN_UV_MAX 0x02
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_SCAN_SILENT_ILLDIGIT
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_SCAN_SILENT_ILLDIGIT 0x04
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_SCAN_ALLOW_UNDERSCORES
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_SCAN_ALLOW_UNDERSCORES 0x01
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_SCAN_DISALLOW_PREFIX
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_SCAN_DISALLOW_PREFIX 0x02
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (PERL_VERSION > 6) || ((PERL_VERSION == 6) && (PERL_SUBVERSION >= 1))
|
|
|
|
#define I32_CAST
|
|
|
|
#else
|
|
|
|
#define I32_CAST (I32*)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef IN_LOCALE
|
2004-08-29 07:07:03 +02:00
|
|
|
#define IN_LOCALE \
|
2004-07-05 04:18:31 +02:00
|
|
|
(PL_curcop == &PL_compiling ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef IN_LOCALE_RUNTIME
|
2004-08-29 07:07:03 +02:00
|
|
|
#define IN_LOCALE_RUNTIME (PL_curcop->op_private & HINT_LOCALE)
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef IN_LOCALE_COMPILETIME
|
2004-08-29 07:07:03 +02:00
|
|
|
#define IN_LOCALE_COMPILETIME (PL_hints & HINT_LOCALE)
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef IS_NUMBER_IN_UV
|
2004-08-29 07:07:03 +02:00
|
|
|
#define IS_NUMBER_IN_UV 0x01
|
|
|
|
#define IS_NUMBER_GREATER_THAN_UV_MAX 0x02
|
|
|
|
#define IS_NUMBER_NOT_INT 0x04
|
|
|
|
#define IS_NUMBER_NEG 0x08
|
|
|
|
#define IS_NUMBER_INFINITY 0x10
|
|
|
|
#define IS_NUMBER_NAN 0x20
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_sv
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_sv '\0'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_overload
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_overload 'A'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_overload_elem
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_overload_elem 'a'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_overload_table
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_overload_table 'c'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_bm
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_bm 'B'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_regdata
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_regdata 'D'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_regdatum
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_regdatum 'd'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_env
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_env 'E'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_envelem
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_envelem 'e'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_fm
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_fm 'f'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_regex_global
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_regex_global 'g'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_isa
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_isa 'I'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_isaelem
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_isaelem 'i'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_nkeys
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_nkeys 'k'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_dbfile
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_dbfile 'L'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_dbline
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_dbline 'l'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_mutex
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_mutex 'm'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_shared
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_shared 'N'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_shared_scalar
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_shared_scalar 'n'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_collxfrm
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_collxfrm 'o'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_tied
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_tied 'P'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_tiedelem
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_tiedelem 'p'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_tiedscalar
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_tiedscalar 'q'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_qr
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_qr 'r'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_sig
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_sig 'S'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_sigelem
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_sigelem 's'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_taint
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_taint 't'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_uvar
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_uvar 'U'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_uvar_elem
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_uvar_elem 'u'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_vstring
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_vstring 'V'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_vec
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_vec 'v'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_utf8
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_utf8 'w'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_substr
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_substr 'x'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_defelem
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_defelem 'y'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_glob
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_glob '*'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_arylen
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_arylen '#'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_pos
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_pos '.'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_backref
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_backref '<'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PERL_MAGIC_ext
|
2004-08-29 07:07:03 +02:00
|
|
|
#define PERL_MAGIC_ext '~'
|
2004-07-05 04:18:31 +02:00
|
|
|
#endif
|
2004-08-29 07:07:03 +02:00
|
|
|
#endif /* _P_P_PORTABILITY_H_ */
|
2004-07-05 04:18:31 +02:00
|
|
|
|
|
|
|
/* End of File ppport.h */
|