{
public:
virtual void Abort(void) = 0;
+ virtual char * Crypt(const char* clear, const char* salt) = 0;
virtual void Exit(int status) = 0;
virtual void _Exit(int status) = 0;
virtual int Execl(const char *cmdname, const char *arg0,
};
#define PerlProc_abort() PL_piProc->Abort()
+#define PerlProc_crypt(c,s) PL_piProc->Crypt((c), (s))
#define PerlProc_exit(s) PL_piProc->Exit((s))
#define PerlProc__exit(s) PL_piProc->_Exit((s))
#define PerlProc_execl(c, w, x, y, z) \
#else /* PERL_OBJECT */
#define PerlProc_abort() abort()
+#define PerlProc_crypt(c,s) crypt((c), (s))
#define PerlProc_exit(s) exit((s))
#define PerlProc__exit(s) _exit((s))
#define PerlProc_execl(c,w,x,y,z) \
#ifdef FCRYPT
sv_setpv(TARG, fcrypt(tmps, SvPV(right, PL_na)));
#else
- sv_setpv(TARG, crypt(tmps, SvPV(right, PL_na)));
+ sv_setpv(TARG, PerlProc_crypt(tmps, SvPV(right, PL_na)));
#endif
#else
DIE(
#
# if you have the source for des_fcrypt(), uncomment this and make sure the
# file exists (see README.win32). File should be located in the same
-# directory as this file. Not (yet) supported with PERL_OBJECT.
+# directory as this file.
#
#CRYPT_SRC = des_fcrypt.c
#
# if you have the source for des_fcrypt(), uncomment this and make sure the
# file exists (see README.win32). File should be located in the same
-# directory as this file. Not (yet) supported with PERL_OBJECT.
+# directory as this file.
#
#CRYPT_SRC *= des_fcrypt.c
{
win32_abort();
};
+ virtual char * Crypt(const char* clear, const char* salt)
+ {
+ return win32_crypt(clear, salt);
+ };
virtual void Exit(int status)
{
exit(status);
return 0;
}
+#if defined(HAVE_DES_FCRYPT) || defined(PERL_OBJECT)
#ifdef HAVE_DES_FCRYPT
extern char * des_fcrypt(char *cbuf, const char *txt, const char *salt);
+#endif
DllExport char *
win32_crypt(const char *txt, const char *salt)
{
+#ifdef HAVE_DES_FCRYPT
dTHR;
return des_fcrypt(crypt_buffer, txt, salt);
+#else
+ die("The crypt() function is unimplemented due to excessive paranoia.");
+#endif
}
#endif
DllExport int win32_waitpid(int pid, int *status, int flags);
DllExport int win32_kill(int pid, int sig);
-#ifdef HAVE_DES_FCRYPT
+#if defined(HAVE_DES_FCRYPT) || defined(PERL_OBJECT)
DllExport char * win32_crypt(const char *txt, const char *salt);
#endif