diff options
author | Craig A. Berry <craigberry@mac.com> | 2015-07-11 22:37:56 -0500 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2015-07-12 08:32:01 -0500 |
commit | 931a625beed2a34b7d28dca23d41b17e658509d5 (patch) | |
tree | 1e7edeaf2bef5a90569960dd42df630cd75ff95d | |
parent | ba4fc2b447d5c04e1ada54027c446d03452dcb25 (diff) | |
download | perl-931a625beed2a34b7d28dca23d41b17e658509d5.tar.gz |
Use CRTL getlogin and getlogin_r on VMS.
The CRTL has supplied getlogin since v7.0, so let's not use the
home-made one anymore. Plus the CRTL als has a reentrant version,
so we'll use that under threads.
-rw-r--r-- | configure.com | 9 | ||||
-rw-r--r-- | makedef.pl | 1 | ||||
-rw-r--r-- | vms/vms.c | 11 | ||||
-rw-r--r-- | vms/vmsish.h | 5 |
4 files changed, 7 insertions, 19 deletions
diff --git a/configure.com b/configure.com index efa3390f44..2d3dc55f7f 100644 --- a/configure.com +++ b/configure.com @@ -6861,7 +6861,7 @@ $ WC "d_getgrnam_r='" + d_getgrnam_r + "'" $ WC "d_gethostbyaddr_r='undef'" $ WC "d_gethostbyname_r='undef'" $ WC "d_gethostent_r='undef'" -$ WC "d_getlogin_r='undef'" +$ WC "d_getlogin_r='define'" $ WC "d_getnetbyaddr_r='undef'" $ WC "d_getnetbyname_r='undef'" $ WC "d_getnetent_r='undef'" @@ -6910,7 +6910,12 @@ $ WC "getgrnam_r_proto='" + getgrnam_r_proto + "'" $ WC "gethostbyaddr_r_proto='0'" $ WC "gethostbyname_r_proto='0'" $ WC "gethostent_r_proto='0'" -$ WC "getlogin_r_proto='0'" +$ IF use_threads +$ THEN +$ WC "getlogin_r_proto='REENTRANT_PROTO_I_BW'" +$ ELSE +$ WC "getlogin_r_proto='0'" +$ ENDIF $ WC "getnetbyaddr_r_proto='0'" $ WC "getnetbyname_r_proto='0'" $ WC "getnetent_r_proto='0'" diff --git a/makedef.pl b/makedef.pl index 297cbc7591..999655c6a5 100644 --- a/makedef.pl +++ b/makedef.pl @@ -954,7 +954,6 @@ elsif ($ARGS{PLATFORM} eq 'vms') { Perl_my_gconvert Perl_my_getenv Perl_my_getenv_len - Perl_my_getlogin Perl_my_getpwnam Perl_my_getpwuid Perl_my_gmtime @@ -12160,17 +12160,6 @@ Perl_flex_lstat(pTHX_ const char *fspec, Stat_t *statbufp) /*}}}*/ -/*{{{char *my_getlogin()*/ -/* VMS cuserid == Unix getlogin, except calling sequence */ -char * -my_getlogin(void) -{ - static char user[L_cuserid]; - return cuserid(user); -} -/*}}}*/ - - /* rmscopy - copy a file using VMS RMS routines * * Copies contents and attributes of spec_in to spec_out, except owner diff --git a/vms/vmsish.h b/vms/vmsish.h index b7aea852dc..d175b181be 100644 --- a/vms/vmsish.h +++ b/vms/vmsish.h @@ -150,7 +150,6 @@ #define my_gconvert(a,b,c,d) Perl_my_gconvert(a,b,c,d) #define my_getenv(a,b) Perl_my_getenv(aTHX_ a,b) #define my_getenv_len(a,b,c) Perl_my_getenv_len(aTHX_ a,b,c) -#define my_getlogin Perl_my_getlogin #define my_getpwent() Perl_my_getpwent(aTHX) #define my_getpwnam(a) Perl_my_getpwnam(aTHX_ a) #define my_getpwuid(a) Perl_my_getpwuid(aTHX_ a) @@ -493,9 +492,6 @@ struct utimbuf { #define ENVgetenv_len(v,l) my_getenv_len(v,l,FALSE) -/* Thin jacket around cuserid() to match Unix' calling sequence */ -#define getlogin my_getlogin - /* Ditto for sys$hash_password() . . . */ #define crypt(a,b) Perl_my_crypt(aTHX_ a,b) @@ -748,7 +744,6 @@ int Perl_my_flush (pTHX_ FILE *); struct passwd * Perl_my_getpwnam (pTHX_ const char *name); struct passwd * Perl_my_getpwuid (pTHX_ Uid_t uid); void Perl_my_endpwent (pTHX); -char * my_getlogin (void); #ifdef __cplusplus } |