summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2005-03-25 03:00:06 -0600
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-03-25 14:41:46 +0000
commit2c590a56b3b649dadb95831ca47026c0fdf301e3 (patch)
treedd5f2c1963b192d3058af23a55be015d10abb7ce /vms
parent2d1d6bf608dc9681503e57929d9632850c2e5677 (diff)
downloadperl-2c590a56b3b649dadb95831ca47026c0fdf301e3.tar.gz
const fix-up for vms/vms.c
From: "Craig A. Berry" <craigberry@mac.com> Message-ID: <42442776.8030603@mac.com> p4raw-id: //depot/perl@24076
Diffstat (limited to 'vms')
-rw-r--r--vms/vms.c12
-rw-r--r--vms/vmsish.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/vms/vms.c b/vms/vms.c
index 1b04dbedaa..db1596fd48 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -708,7 +708,7 @@ prime_env_iter(void)
/*}}}*/
-/*{{{ int vmssetenv(char *lnm, char *eqv)*/
+/*{{{ int vmssetenv(const char *lnm, const char *eqv)*/
/* Define or delete an element in the same "environment" as
* vmstrnenv(). If an element is to be deleted, it's removed from
* the first place it's found. If it's to be set, it's set in the
@@ -716,7 +716,7 @@ prime_env_iter(void)
* Like setenv() returns 0 for success, non-zero on error.
*/
int
-Perl_vmssetenv(pTHX_ char *lnm, char *eqv, struct dsc$descriptor_s **tabvec)
+Perl_vmssetenv(pTHX_ const char *lnm, const char *eqv, struct dsc$descriptor_s **tabvec)
{
char uplnm[LNM$C_NAMLENGTH], *cp1, *cp2, *c;
unsigned short int curtab, ivlnm = 0, ivsym = 0, ivenv = 0;
@@ -734,7 +734,7 @@ Perl_vmssetenv(pTHX_ char *lnm, char *eqv, struct dsc$descriptor_s **tabvec)
return SS$_IVLOGNAM;
}
- for (cp1 = lnm, cp2 = uplnm; *cp1; cp1++, cp2++) {
+ for (cp1 = (char *)lnm, cp2 = uplnm; *cp1; cp1++, cp2++) {
*cp2 = _toupper(*cp1);
if (cp1 - lnm > LNM$C_NAMLENGTH) {
set_errno(EINVAL); set_vaxc_errno(SS$_IVLOGNAM);
@@ -799,7 +799,7 @@ Perl_vmssetenv(pTHX_ char *lnm, char *eqv, struct dsc$descriptor_s **tabvec)
#endif
}
else {
- eqvdsc.dsc$a_pointer = eqv;
+ eqvdsc.dsc$a_pointer = (char *)eqv;
eqvdsc.dsc$w_length = strlen(eqv);
if ((tmpdsc.dsc$a_pointer = tabvec[0]->dsc$a_pointer) &&
!str$case_blind_compare(&tmpdsc,&clisym)) {
@@ -886,10 +886,10 @@ Perl_vmssetenv(pTHX_ char *lnm, char *eqv, struct dsc$descriptor_s **tabvec)
} /* end of vmssetenv() */
/*}}}*/
-/*{{{ void my_setenv(char *lnm, char *eqv)*/
+/*{{{ void my_setenv(const char *lnm, const char *eqv)*/
/* This has to be a function since there's a prototype for it in proto.h */
void
-Perl_my_setenv(pTHX_ char *lnm,char *eqv)
+Perl_my_setenv(pTHX_ const char *lnm, const char *eqv)
{
if (lnm && *lnm) {
int len = strlen(lnm);
diff --git a/vms/vmsish.h b/vms/vmsish.h
index ec1ae98358..319be921ee 100644
--- a/vms/vmsish.h
+++ b/vms/vmsish.h
@@ -812,7 +812,7 @@ int Perl_my_mkdir (pTHX_ char *, Mode_t);
bool Perl_vms_do_aexec (pTHX_ SV *, SV **, SV **);
#endif
char * Perl_my_getenv_len (pTHX_ const char *, unsigned long *, bool);
-int Perl_vmssetenv (pTHX_ char *, char *, struct dsc$descriptor_s **);
+int Perl_vmssetenv (pTHX_ const char *, const char *, struct dsc$descriptor_s **);
void Perl_vmssetuserlnm(pTHX_ char *name, char *eqv);
char * Perl_my_crypt (pTHX_ const char *, const char *);
Pid_t Perl_my_waitpid (pTHX_ Pid_t, int *, int);