From: Jarkko Hietaniemi Date: Tue, 19 Mar 2002 15:16:43 +0000 (+0000) Subject: Support crypt_r(const char*,const char*, CRYPTD*). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b430fd0465bf67481688d8bedfceb885abf2a170;p=p5sagit%2Fp5-mst-13.2.git Support crypt_r(const char*,const char*, CRYPTD*). p4raw-id: //depot/perl@15326 --- diff --git a/Configure b/Configure index 9678a6e..89beadc 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Mon Mar 18 16:52:30 EET 2002 [metaconfig 3.0 PL70] +# Generated on Tue Mar 19 18:17:12 EET 2002 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <&4 ;; diff --git a/reentr.h b/reentr.h index 6060fb7..14de347 100644 --- a/reentr.h +++ b/reentr.h @@ -89,75 +89,76 @@ #define REENTRANT_PROTO_B_B 1 #define REENTRANT_PROTO_B_BI 2 #define REENTRANT_PROTO_B_BW 3 -#define REENTRANT_PROTO_B_CCS 4 -#define REENTRANT_PROTO_B_IBI 5 -#define REENTRANT_PROTO_B_IBW 6 -#define REENTRANT_PROTO_B_SB 7 -#define REENTRANT_PROTO_B_SBI 8 -#define REENTRANT_PROTO_I_BI 9 -#define REENTRANT_PROTO_I_BW 10 -#define REENTRANT_PROTO_I_CCSBWR 11 -#define REENTRANT_PROTO_I_CCSD 12 -#define REENTRANT_PROTO_I_CII 13 -#define REENTRANT_PROTO_I_CIISD 14 -#define REENTRANT_PROTO_I_CSBI 15 -#define REENTRANT_PROTO_I_CSBIR 16 -#define REENTRANT_PROTO_I_CSBWR 17 -#define REENTRANT_PROTO_I_CSBWRE 18 -#define REENTRANT_PROTO_I_CSD 19 -#define REENTRANT_PROTO_I_CWISBWRE 20 -#define REENTRANT_PROTO_I_CWISD 21 -#define REENTRANT_PROTO_I_H 22 -#define REENTRANT_PROTO_I_IBI 23 -#define REENTRANT_PROTO_I_IBW 24 -#define REENTRANT_PROTO_I_ICBI 25 -#define REENTRANT_PROTO_I_ICSBWR 26 -#define REENTRANT_PROTO_I_ICSD 27 -#define REENTRANT_PROTO_I_ID 28 -#define REENTRANT_PROTO_I_IISD 29 -#define REENTRANT_PROTO_I_ISBWR 30 -#define REENTRANT_PROTO_I_ISD 31 -#define REENTRANT_PROTO_I_LISBI 32 -#define REENTRANT_PROTO_I_LISD 33 -#define REENTRANT_PROTO_I_LS 34 -#define REENTRANT_PROTO_I_S 35 -#define REENTRANT_PROTO_I_SB 36 -#define REENTRANT_PROTO_I_SBI 37 -#define REENTRANT_PROTO_I_SBIE 38 -#define REENTRANT_PROTO_I_SBIH 39 -#define REENTRANT_PROTO_I_SBIR 40 -#define REENTRANT_PROTO_I_SBWR 41 -#define REENTRANT_PROTO_I_SBWRE 42 -#define REENTRANT_PROTO_I_SD 43 -#define REENTRANT_PROTO_I_ST 44 -#define REENTRANT_PROTO_I_TISD 45 -#define REENTRANT_PROTO_I_TS 46 -#define REENTRANT_PROTO_I_TSBI 47 -#define REENTRANT_PROTO_I_TSBIR 48 -#define REENTRANT_PROTO_I_TSBWR 49 -#define REENTRANT_PROTO_I_TSR 50 -#define REENTRANT_PROTO_I_UISBWRE 51 -#define REENTRANT_PROTO_S_CBI 52 -#define REENTRANT_PROTO_S_CCSBI 53 -#define REENTRANT_PROTO_S_CIISBIE 54 -#define REENTRANT_PROTO_S_CSBI 55 -#define REENTRANT_PROTO_S_CSBIE 56 -#define REENTRANT_PROTO_S_CWISBIE 57 -#define REENTRANT_PROTO_S_CWISBWIE 58 -#define REENTRANT_PROTO_S_ICSBI 59 -#define REENTRANT_PROTO_S_ISBI 60 -#define REENTRANT_PROTO_S_LISBI 61 -#define REENTRANT_PROTO_S_SBI 62 -#define REENTRANT_PROTO_S_SBIE 63 -#define REENTRANT_PROTO_S_SBW 64 -#define REENTRANT_PROTO_S_TISBI 65 -#define REENTRANT_PROTO_S_TS 66 -#define REENTRANT_PROTO_S_TSBI 67 -#define REENTRANT_PROTO_S_TSBIE 68 -#define REENTRANT_PROTO_S_TWISBIE 69 -#define REENTRANT_PROTO_V_H 70 -#define REENTRANT_PROTO_V_ID 71 -#define REENTRANT_PROTO_V_S 72 +#define REENTRANT_PROTO_B_CCD 4 +#define REENTRANT_PROTO_B_CCS 5 +#define REENTRANT_PROTO_B_IBI 6 +#define REENTRANT_PROTO_B_IBW 7 +#define REENTRANT_PROTO_B_SB 8 +#define REENTRANT_PROTO_B_SBI 9 +#define REENTRANT_PROTO_I_BI 10 +#define REENTRANT_PROTO_I_BW 11 +#define REENTRANT_PROTO_I_CCSBWR 12 +#define REENTRANT_PROTO_I_CCSD 13 +#define REENTRANT_PROTO_I_CII 14 +#define REENTRANT_PROTO_I_CIISD 15 +#define REENTRANT_PROTO_I_CSBI 16 +#define REENTRANT_PROTO_I_CSBIR 17 +#define REENTRANT_PROTO_I_CSBWR 18 +#define REENTRANT_PROTO_I_CSBWRE 19 +#define REENTRANT_PROTO_I_CSD 20 +#define REENTRANT_PROTO_I_CWISBWRE 21 +#define REENTRANT_PROTO_I_CWISD 22 +#define REENTRANT_PROTO_I_H 23 +#define REENTRANT_PROTO_I_IBI 24 +#define REENTRANT_PROTO_I_IBW 25 +#define REENTRANT_PROTO_I_ICBI 26 +#define REENTRANT_PROTO_I_ICSBWR 27 +#define REENTRANT_PROTO_I_ICSD 28 +#define REENTRANT_PROTO_I_ID 29 +#define REENTRANT_PROTO_I_IISD 30 +#define REENTRANT_PROTO_I_ISBWR 31 +#define REENTRANT_PROTO_I_ISD 32 +#define REENTRANT_PROTO_I_LISBI 33 +#define REENTRANT_PROTO_I_LISD 34 +#define REENTRANT_PROTO_I_LS 35 +#define REENTRANT_PROTO_I_S 36 +#define REENTRANT_PROTO_I_SB 37 +#define REENTRANT_PROTO_I_SBI 38 +#define REENTRANT_PROTO_I_SBIE 39 +#define REENTRANT_PROTO_I_SBIH 40 +#define REENTRANT_PROTO_I_SBIR 41 +#define REENTRANT_PROTO_I_SBWR 42 +#define REENTRANT_PROTO_I_SBWRE 43 +#define REENTRANT_PROTO_I_SD 44 +#define REENTRANT_PROTO_I_ST 45 +#define REENTRANT_PROTO_I_TISD 46 +#define REENTRANT_PROTO_I_TS 47 +#define REENTRANT_PROTO_I_TSBI 48 +#define REENTRANT_PROTO_I_TSBIR 49 +#define REENTRANT_PROTO_I_TSBWR 50 +#define REENTRANT_PROTO_I_TSR 51 +#define REENTRANT_PROTO_I_UISBWRE 52 +#define REENTRANT_PROTO_S_CBI 53 +#define REENTRANT_PROTO_S_CCSBI 54 +#define REENTRANT_PROTO_S_CIISBIE 55 +#define REENTRANT_PROTO_S_CSBI 56 +#define REENTRANT_PROTO_S_CSBIE 57 +#define REENTRANT_PROTO_S_CWISBIE 58 +#define REENTRANT_PROTO_S_CWISBWIE 59 +#define REENTRANT_PROTO_S_ICSBI 60 +#define REENTRANT_PROTO_S_ISBI 61 +#define REENTRANT_PROTO_S_LISBI 62 +#define REENTRANT_PROTO_S_SBI 63 +#define REENTRANT_PROTO_S_SBIE 64 +#define REENTRANT_PROTO_S_SBW 65 +#define REENTRANT_PROTO_S_TISBI 66 +#define REENTRANT_PROTO_S_TS 67 +#define REENTRANT_PROTO_S_TSBI 68 +#define REENTRANT_PROTO_S_TSBIE 69 +#define REENTRANT_PROTO_S_TWISBIE 70 +#define REENTRANT_PROTO_V_H 71 +#define REENTRANT_PROTO_V_ID 72 +#define REENTRANT_PROTO_V_S 73 /* Defines for indicating which special features are supported. */ @@ -575,7 +576,11 @@ typedef struct { size_t _asctime_size; #endif /* HAS_ASCTIME_R */ #ifdef HAS_CRYPT_R +#if CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD + CRYPTD* _crypt_data; +#else struct crypt_data _crypt_struct; +#endif #endif /* HAS_CRYPT_R */ #ifdef HAS_CTIME_R char* _ctime_buffer; @@ -740,6 +745,9 @@ typedef struct { # if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCS # define crypt(a, b) crypt_r(a, b, &PL_reentrant_buffer->_crypt_struct) # endif +# if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD +# define crypt(a, b) crypt_r(a, b, &PL_reentrant_buffer->_crypt_data) +# endif #endif /* HAS_CRYPT_R */ #ifdef HAS_CTERMID_R diff --git a/reentr.pl b/reentr.pl index 1e0947a..ae56377 100644 --- a/reentr.pl +++ b/reentr.pl @@ -395,18 +395,27 @@ EOF pushinitfree $f; pushssif $endif; } - elsif ($f =~ /^(crypt|drand48|gmtime|localtime|random)$/) { + elsif ($f =~ /^(crypt)$/) { pushssif $ifdef; push @struct, <_${f}_struct.initialized = 0; #endif EOF - } + pushssif $endif; + } + elsif ($f =~ /^(drand48|gmtime|localtime|random)$/) { + pushssif $ifdef; + push @struct, <