diff options
author | Douglas Lankshear <doug@lankshear.net> | 1998-07-22 01:21:10 -0700 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-22 17:11:55 +0000 |
commit | ff95b63ed9e9faabe3ba15c12a39c2c97a712ee9 (patch) | |
tree | d0e1b48c7548b219ab2f45e04f8771df7dbc3abc /win32 | |
parent | e9ee4811e9cb1e626e3ac1b3b595de5ded0d4121 (diff) | |
download | perl-ff95b63ed9e9faabe3ba15c12a39c2c97a712ee9.tar.gz |
support optional crypt() with PERL_OBJECT
Message-Id: <000701bdb584$5b57c070$a32fa8c0@tau.Active>
Subject: [PATCH 5.005 maybe] for crypt with PERL_OBJECT
p4raw-id: //depot/perl@1641
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile | 2 | ||||
-rw-r--r-- | win32/makefile.mk | 2 | ||||
-rw-r--r-- | win32/perlhost.h | 4 | ||||
-rw-r--r-- | win32/win32.c | 6 | ||||
-rw-r--r-- | win32/win32iop.h | 2 |
5 files changed, 13 insertions, 3 deletions
diff --git a/win32/Makefile b/win32/Makefile index 811e32ffe1..e33cb9183a 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -68,7 +68,7 @@ INST_VER = \5.005 # # 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 diff --git a/win32/makefile.mk b/win32/makefile.mk index 57813aa0b3..249c0aad98 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -76,7 +76,7 @@ CCTYPE *= BORLAND # # 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 diff --git a/win32/perlhost.h b/win32/perlhost.h index e2d8ca70cd..842d9c3275 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -468,6 +468,10 @@ public: { win32_abort(); }; + virtual char * Crypt(const char* clear, const char* salt) + { + return win32_crypt(clear, salt); + }; virtual void Exit(int status) { exit(status); diff --git a/win32/win32.c b/win32/win32.c index 970fc3f365..03a9bd8aa9 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1162,14 +1162,20 @@ win32_alarm(unsigned int sec) 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 diff --git a/win32/win32iop.h b/win32/win32iop.h index cf2bd75db5..12fe63e38f 100644 --- a/win32/win32iop.h +++ b/win32/win32iop.h @@ -127,7 +127,7 @@ DllExport int win32_wait(int *status); 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 |