deinstall(pTHX)
{
dTHR;
- PL_regexecp = FUNC_NAME_TO_PTR(Perl_regexec_flags);
- PL_regcompp = FUNC_NAME_TO_PTR(Perl_pregcomp);
- PL_regint_start = FUNC_NAME_TO_PTR(Perl_re_intuit_start);
- PL_regint_string = FUNC_NAME_TO_PTR(Perl_re_intuit_string);
- PL_regfree = FUNC_NAME_TO_PTR(Perl_pregfree);
+ PL_regexecp = Perl_regexec_flags;
+ PL_regcompp = Perl_pregcomp;
+ PL_regint_start = Perl_re_intuit_start;
+ PL_regint_string = Perl_re_intuit_string;
+ PL_regfree = Perl_pregfree;
if (!oldfl)
PL_debug &= ~R_DB;
PERLVAR(Inice_chunk, char *) /* a nice chunk of memory to reuse */
PERLVAR(Inice_chunk_size, U32) /* how nice the chunk of memory is */
-PERLVARI(Irunops, runops_proc_t, FUNC_NAME_TO_PTR(RUNOPS_DEFAULT))
+PERLVARI(Irunops, runops_proc_t, MEMBER_TO_FPTR(RUNOPS_DEFAULT))
PERLVARA(Itokenbuf,256, char)
#endif /* USE_THREADS */
default:
if (!(o->op_flags & OPf_REF)
- || (PL_check[o->op_type] != FUNC_NAME_TO_PTR(Perl_ck_ftst)))
+ || (PL_check[o->op_type] != MEMBER_TO_FPTR(Perl_ck_ftst)))
break;
/* FALL THROUGH */
case OP_GVSV:
thr = init_main_thread();
#endif /* USE_THREADS */
- PL_protect = FUNC_NAME_TO_PTR(Perl_default_protect); /* for exceptions */
+ PL_protect = MEMBER_TO_FPTR(Perl_default_protect); /* for exceptions */
PL_curcop = &PL_compiling; /* needed by ckWARN, right away */
oldscope = PL_scopestack_ix;
PL_dowarn = G_WARN_OFF;
- CALLPROTECT(aTHX_ &ret, FUNC_NAME_TO_PTR(S_parse_body), env, xsinit);
+ CALLPROTECT(aTHX_ &ret, MEMBER_TO_FPTR(S_parse_body), env, xsinit);
switch (ret) {
case 0:
return 0;
oldscope = PL_scopestack_ix;
redo_body:
- CALLPROTECT(aTHX_ &ret, FUNC_NAME_TO_PTR(S_run_body), oldscope);
+ CALLPROTECT(aTHX_ &ret, MEMBER_TO_FPTR(S_run_body), oldscope);
switch (ret) {
case 1:
cxstack_ix = -1; /* start context stack again */
PL_markstack_ptr++;
redo_body:
- CALLPROTECT(aTHX_ &ret, FUNC_NAME_TO_PTR(S_call_body), (OP*)&myop, FALSE);
+ CALLPROTECT(aTHX_ &ret, MEMBER_TO_FPTR(S_call_body), (OP*)&myop, FALSE);
switch (ret) {
case 0:
retval = PL_stack_sp - (PL_stack_base + oldmark);
myop.op_flags |= OPf_SPECIAL;
redo_body:
- CALLPROTECT(aTHX_ &ret, FUNC_NAME_TO_PTR(S_call_body), (OP*)&myop, TRUE);
+ CALLPROTECT(aTHX_ &ret, MEMBER_TO_FPTR(S_call_body), (OP*)&myop, TRUE);
switch (ret) {
case 0:
retval = PL_stack_sp - (PL_stack_base + oldmark);
(void) find_threadsv("@"); /* Ensure $@ is initialised early */
PL_maxscream = -1;
- PL_regcompp = FUNC_NAME_TO_PTR(Perl_pregcomp);
- PL_regexecp = FUNC_NAME_TO_PTR(Perl_regexec_flags);
- PL_regint_start = FUNC_NAME_TO_PTR(Perl_re_intuit_start);
- PL_regint_string = FUNC_NAME_TO_PTR(Perl_re_intuit_string);
- PL_regfree = FUNC_NAME_TO_PTR(Perl_pregfree);
+ PL_regcompp = MEMBER_TO_FPTR(Perl_pregcomp);
+ PL_regexecp = MEMBER_TO_FPTR(Perl_regexec_flags);
+ PL_regint_start = MEMBER_TO_FPTR(Perl_re_intuit_start);
+ PL_regint_string = MEMBER_TO_FPTR(Perl_re_intuit_string);
+ PL_regfree = MEMBER_TO_FPTR(Perl_pregfree);
PL_regindent = 0;
PL_reginterp_cnt = 0;
while (AvFILL(paramList) >= 0) {
cv = (CV*)av_shift(paramList);
SAVEFREESV(cv);
- CALLPROTECT(aTHX_ &ret, FUNC_NAME_TO_PTR(S_call_list_body), cv);
+ CALLPROTECT(aTHX_ &ret, MEMBER_TO_FPTR(S_call_list_body), cv);
switch (ret) {
case 0:
(void)SvPV(atsv, len);
# endif
#endif
-#ifndef FUNC_NAME_TO_PTR
-#define FUNC_NAME_TO_PTR(name) name
-#endif
-
/*
* USE_THREADS needs to be after unixish.h as <pthread.h> includes
* <sys/signal.h> which defines NSIG - which will stop inclusion of <signal.h>
# define STATUS_ALL_FAILURE (PL_statusvalue = 1)
#endif
+#ifndef MEMBER_TO_FPTR
+#define MEMBER_TO_FPTR(name) name
+#endif
+
/* This defines a way to flush all output buffers. This may be a
* performance issue, so we allow people to disable it.
* XXX the default needs a Configure test, as it may not work everywhere.
(void)SvREFCNT_inc(cv); /* in preparation for POPSUB */
}
PL_sortcxix = cxstack_ix;
- qsortsv((myorigmark+1), max, FUNC_NAME_TO_PTR(sortcv));
+ qsortsv((myorigmark+1), max, sortcv);
POPBLOCK(cx,PL_curpm);
PL_stack_sp = newsp;
qsortsv(ORIGMARK+1, max,
(PL_op->op_private & OPpSORT_NUMERIC)
? ( (PL_op->op_private & OPpSORT_INTEGER)
- ? ( overloading
- ? FUNC_NAME_TO_PTR(amagic_i_ncmp)
- : FUNC_NAME_TO_PTR(sv_i_ncmp))
- : ( overloading
- ? FUNC_NAME_TO_PTR(amagic_ncmp)
- : FUNC_NAME_TO_PTR(sv_ncmp)))
+ ? ( overloading ? amagic_i_ncmp : sv_i_ncmp)
+ : ( overloading ? amagic_ncmp : sv_ncmp))
: ( (PL_op->op_private & OPpLOCALE)
? ( overloading
- ? FUNC_NAME_TO_PTR(amagic_cmp_locale)
- : FUNC_NAME_TO_PTR(sv_cmp_locale_static))
- : ( overloading
- ? FUNC_NAME_TO_PTR(amagic_cmp)
- : FUNC_NAME_TO_PTR(sv_cmp_static) )));
+ ? amagic_cmp_locale
+ : sv_cmp_locale_static)
+ : ( overloading ? amagic_cmp : sv_cmp_static)));
if (PL_op->op_private & OPpSORT_REVERSE) {
SV **p = ORIGMARK+1;
SV **q = ORIGMARK+max;
#endif
PL_op = o;
redo_body:
- CALLPROTECT(aTHX_ &ret, FUNC_NAME_TO_PTR(S_docatch_body));
+ CALLPROTECT(aTHX_ &ret, MEMBER_TO_FPTR(S_docatch_body));
switch (ret) {
case 0:
break;
save_delete(SOFT_CAST(HV*)(h), SOFT_CAST(char*)(k), (I32)(l))
#define CALLDESTRUCTOR (*SSPOPDPTR)
#define SAVEDESTRUCTOR(f,p) \
- save_destructor((DESTRUCTORFUNC_t)(FUNC_NAME_TO_PTR(f)), \
- SOFT_CAST(void*)(p))
+ save_destructor((DESTRUCTORFUNC_t)(f), SOFT_CAST(void*)(p))
#define SAVESTACK_POS() \
STMT_START { \
void
Perl_sv_report_used(pTHX)
{
- visit(FUNC_NAME_TO_PTR(do_report_used));
+ visit(do_report_used);
}
void
Perl_sv_clean_objs(pTHX)
{
PL_in_clean_objs = TRUE;
- visit(FUNC_NAME_TO_PTR(do_clean_objs));
+ visit(do_clean_objs);
#ifndef DISABLE_DESTRUCTOR_KLUDGE
/* some barnacles may yet remain, clinging to typeglobs */
- visit(FUNC_NAME_TO_PTR(do_clean_named_objs));
+ visit(do_clean_named_objs);
#endif
PL_in_clean_objs = FALSE;
}
Perl_sv_clean_all(pTHX)
{
PL_in_clean_all = TRUE;
- visit(FUNC_NAME_TO_PTR(do_clean_all));
+ visit(do_clean_all);
PL_in_clean_all = FALSE;
}
PERLVAR(Ttop_env, JMPENV *) /* ptr. to current sigjmp() environment */
PERLVAR(Tstart_env, JMPENV) /* empty startup sigjmp() environment */
-PERLVARI(Tprotect, protect_proc_t, FUNC_NAME_TO_PTR(Perl_default_protect))
+PERLVARI(Tprotect, protect_proc_t, MEMBER_TO_FPTR(Perl_default_protect))
/* statics "owned" by various functions */
PERLVAR(Tav_fetch_sv, SV *) /* owned by av_fetch() */
PERLVAR(Treg_oldsaved, char*) /* old saved substr during match */
PERLVAR(Treg_oldsavedlen, STRLEN) /* old length of saved substr during match */
-PERLVARI(Tregcompp, regcomp_t, FUNC_NAME_TO_PTR(Perl_pregcomp))
+PERLVARI(Tregcompp, regcomp_t, MEMBER_TO_FPTR(Perl_pregcomp))
/* Pointer to REx compiler */
-PERLVARI(Tregexecp, regexec_t, FUNC_NAME_TO_PTR(Perl_regexec_flags))
+PERLVARI(Tregexecp, regexec_t, MEMBER_TO_FPTR(Perl_regexec_flags))
/* Pointer to REx executer */
-PERLVARI(Tregint_start, re_intuit_start_t, FUNC_NAME_TO_PTR(Perl_re_intuit_start))
+PERLVARI(Tregint_start, re_intuit_start_t, MEMBER_TO_FPTR(Perl_re_intuit_start))
/* Pointer to optimized REx executer */
-PERLVARI(Tregint_string,re_intuit_string_t, FUNC_NAME_TO_PTR(Perl_re_intuit_string))
+PERLVARI(Tregint_string,re_intuit_string_t, MEMBER_TO_FPTR(Perl_re_intuit_string))
/* Pointer to optimized REx string */
-PERLVARI(Tregfree, regfree_t, FUNC_NAME_TO_PTR(Perl_pregfree))
+PERLVARI(Tregfree, regfree_t, MEMBER_TO_FPTR(Perl_pregfree))
/* Pointer to REx free()er */
PERLVARI(Treginterp_cnt,int, 0) /* Whether `Regexp'
Zero(thr, 1, struct perl_thread);
#endif
- PL_protect = FUNC_NAME_TO_PTR(Perl_default_protect);
+ PL_protect = MEMBER_TO_FPTR(Perl_default_protect);
thr->oursv = sv;
init_stacks();
PL_statname = NEWSV(66,0);
PL_maxscream = -1;
- PL_regcompp = FUNC_NAME_TO_PTR(Perl_pregcomp);
- PL_regexecp = FUNC_NAME_TO_PTR(Perl_regexec_flags);
- PL_regint_start = FUNC_NAME_TO_PTR(Perl_re_intuit_start);
- PL_regint_string = FUNC_NAME_TO_PTR(Perl_re_intuit_string);
- PL_regfree = FUNC_NAME_TO_PTR(Perl_pregfree);
+ PL_regcompp = MEMBER_TO_FPTR(Perl_pregcomp);
+ PL_regexecp = MEMBER_TO_FPTR(Perl_regexec_flags);
+ PL_regint_start = MEMBER_TO_FPTR(Perl_re_intuit_start);
+ PL_regint_string = MEMBER_TO_FPTR(Perl_re_intuit_string);
+ PL_regfree = MEMBER_TO_FPTR(Perl_pregfree);
PL_regindent = 0;
PL_reginterp_cnt = 0;
PL_lastscream = Nullsv;
# We don't enable this by default because we want the modules to get fixed
# instead of clinging to shortcuts like this one.
#
-# Don't enable -DPERL_IMPLICIT_CONTEXT if you don't know what it is. :-)
-#
#BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE
-#BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
#
# specify semicolon-separated list of extra directories that modules will
USE_MULTI = undef
!ENDIF
+!IF "$(USE_MULTI)$(USE_THREADS)$(USE_OBJECT)" != ""
+BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
+!ENDIF
+
!IF "$(PROCESSOR_ARCHITECTURE)" == ""
PROCESSOR_ARCHITECTURE = x86
!ENDIF
# We don't enable this by default because we want the modules to get fixed
# instead of clinging to shortcuts like this one.
#
-# Don't enable -DPERL_IMPLICIT_CONTEXT if you don't know what it is. :-)
-#
#BUILDOPT += -DPERL_POLLUTE
-#BUILDOPT += -DPERL_IMPLICIT_CONTEXT
#
# specify semicolon-separated list of extra directories that modules will
# set this to your email address (perl will guess a value from
# from your loginname and your hostname, which may not be right)
#
-EMAIL *= support@activestate.com
+#EMAIL *=
##
## Build configuration ends.
USE_THREADS *= undef
USE_MULTI *= undef
+
+.IF "$(USE_MULTI)$(USE_THREADS)$(USE_OBJECT)" != ""
+BUILDOPT += -DPERL_IMPLICIT_CONTEXT
+.ENDIF
+
+
.IMPORT .IGNORE : PROCESSOR_ARCHITECTURE
PROCESSOR_ARCHITECTURE *= x86
PERLDLL_OBJ = $(CORE_OBJ)
PERLEXE_OBJ = perlmain$(o)
-.IF "$(USE_OBJECT)" != "define"
PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
-.ELSE
-PERLEXE_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
-PERL95_OBJ += DynaLoadmt$(o)
-.ENDIF
.IF "$(USE_SETARGV)" != ""
SETARGV_OBJ = setargv$(o)
int _CRT_glob = 0;
#endif
+#ifdef __BORLANDC__
+# define _stat stat
+# define _utimbuf utimbuf
+#endif
+
#define EXECF_EXEC 1
#define EXECF_SPAWN 2
#define EXECF_SPAWN_NOWAIT 3
DllExport char *
win32_crypt(const char *txt, const char *salt)
{
+ dTHXo;
#ifdef HAVE_DES_FCRYPT
dTHR;
- dTHXo;
return des_fcrypt(txt, salt, crypt_buffer);
#else
die("The crypt() function is unimplemented due to excessive paranoia.");
/* Borland is picky about a bare member function name used as its ptr */
#ifdef PERL_OBJECT
-#define FUNC_NAME_TO_PTR(name) &(name)
+# define MEMBER_TO_FPTR(name) &(name)
#endif
#endif
#define fcloseall _fcloseall
#ifdef PERL_OBJECT
-#define FUNC_NAME_TO_PTR(name) &(name)
+# define MEMBER_TO_FPTR(name) &(name)
#endif
#ifndef _O_NOINHERIT