#endif
#if defined(PERL_IN_PERL_C) || defined(PERL_DECL_PROT)
-s |void |find_beginning |int suidscript
+s |void |find_beginning
s |void |forbid_setid |char flag|int suidscript
s |void |incpush |NULLOK const char *dir|bool addsubdirs|bool addoldvers|bool usesep|bool canrelocate
s |void |init_interp
#endif
#if defined(PERL_IN_PERL_C) || defined(PERL_DECL_PROT)
#ifdef PERL_CORE
-#define find_beginning(a) S_find_beginning(aTHX_ a)
+#define find_beginning() S_find_beginning(aTHX)
#define forbid_setid(a,b) S_forbid_setid(aTHX_ a,b)
#define incpush(a,b,c,d,e) S_incpush(aTHX_ a,b,c,d,e)
#define init_interp() S_init_interp(aTHX)
|| gMacPerl_AlwaysExtract
#endif
) {
- find_beginning(suidscript);
+
+ /* This will croak if suidscript is >= 0, as -x cannot be used with
+ setuid scripts. */
+ forbid_setid('x', suidscript);
+ /* Hence you can't get here if suidscript >= 0 */
+
+ find_beginning();
if (cddir && PerlDir_chdir( (char *)cddir ) < 0)
Perl_croak(aTHX_ "Can't chdir to %s",cddir);
}
}
STATIC void
-S_find_beginning(pTHX_ const int suidscript)
+S_find_beginning(pTHX)
{
dVAR;
register char *s;
/* skip forward in input to the real script? */
- /* This will croak if suidscript is >= 0, as -x cannot be used with
- setuid scripts. */
- forbid_setid('x', suidscript);
- /* Hence you can't get here if suidscript >= 0 */
-
#ifdef MACOS_TRADITIONAL
/* Since the Mac OS does not honor #! arguments for us, we do it ourselves */
#endif
#if defined(PERL_IN_PERL_C) || defined(PERL_DECL_PROT)
-STATIC void S_find_beginning(pTHX_ int suidscript);
+STATIC void S_find_beginning(pTHX);
STATIC void S_forbid_setid(pTHX_ char flag, int suidscript);
STATIC void S_incpush(pTHX_ const char *dir, bool addsubdirs, bool addoldvers, bool usesep, bool canrelocate);
STATIC void S_init_interp(pTHX);