summaryrefslogtreecommitdiff
path: root/vms/vmsish.h
diff options
context:
space:
mode:
authorDan Sugalski <dan@sidhe.org>2001-05-02 07:37:27 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-02 15:35:37 +0000
commitfd8cd3a3fe489fe70b00d1da7f9034bb1c56f03c (patch)
treedd0eebd71482f83187b55d14fa0340d6ffdc2cf6 /vms/vmsish.h
parent09bf542c87dffb276bec96e979ba5437e7fc39b1 (diff)
downloadperl-fd8cd3a3fe489fe70b00d1da7f9034bb1c56f03c.tar.gz
Multiplicity and thread fixes for VMS
Message-Id: <5.0.2.1.0.20010502112909.01f24e28@24.8.96.48> p4raw-id: //depot/perl@9960
Diffstat (limited to 'vms/vmsish.h')
-rw-r--r--vms/vmsish.h163
1 files changed, 99 insertions, 64 deletions
diff --git a/vms/vmsish.h b/vms/vmsish.h
index a8551daf98..01aa644b23 100644
--- a/vms/vmsish.h
+++ b/vms/vmsish.h
@@ -63,17 +63,30 @@
#define HAS_GETENV_SV
#define HAS_GETENV_LEN
+/* All this stiff is for the x2P programs. Hopefully they'll still work */
+#if defined(PERL_FOR_X2P)
+#ifndef aTHX_
+#define aTHX_
+#endif
+#ifndef pTHX_
+#define pTHX_
+#endif
+#ifndef pTHX
+#define pTHX
+#endif
+#endif
+
#ifndef DONT_MASK_RTL_CALLS
# ifdef getenv
# undef getenv
# endif
/* getenv used for regular logical names */
-# define getenv(v) my_getenv(v,TRUE)
+# define getenv(v) Perl_my_getenv(aTHX_ v,TRUE)
#endif
#ifdef getenv_len
# undef getenv_len
#endif
-#define getenv_len(v,l) my_getenv_len(v,l,TRUE)
+#define getenv_len(v,l) Perl_my_getenv_len(aTHX_ v,l,TRUE)
/* DECC introduces this routine in the RTL as of VMS 7.0; for now,
* we'll use ours, since it gives us the full VMS exit status. */
@@ -86,12 +99,14 @@
#define DONT_DECLARE_STD 1
/* Our own contribution to PerlShr's global symbols . . . */
-#define my_getenv_len Perl_my_getenv_len
#define prime_env_iter Perl_prime_env_iter
-#define vmssetenv Perl_vmssetenv
+#define vms_image_init Perl_vms_image_init
+#define my_tmpfile Perl_my_tmpfile
+#define vmstrnenv Perl_vmstrnenv
#if !defined(PERL_IMPLICIT_CONTEXT)
+#define my_getenv_len Perl_my_getenv_len
+#define vmssetenv Perl_vmssetenv
#define my_trnlnm Perl_my_trnlnm
-#define vmstrnenv Perl_vmstrnenv
#define my_setenv Perl_my_setenv
#define my_getenv Perl_my_getenv
#define tounixspec Perl_tounixspec
@@ -110,9 +125,31 @@
#define trim_unixpath Perl_trim_unixpath
#define opendir Perl_opendir
#define rmscopy Perl_rmscopy
+#define my_mkdir Perl_my_mkdir
+#define vms_do_aexec Perl_vms_do_aexec
+#define vms_do_exec Perl_vms_do_exec
+#define my_waitpid Perl_my_waitpid
+#define my_crypt Perl_my_crypt
+#define kill_file Perl_kill_file
+#define my_utime Perl_my_utime
+#define my_chdir Perl_my_chdir
+#define do_aspawn Perl_do_aspawn
+#define seekdir Perl_seekdir
+#define my_gmtime Perl_my_gmtime
+#define my_localtime Perl_my_localtime
+#define my_time Perl_my_time
+#define do_spawn Perl_do_spawn
+#define flex_fstat Perl_flex_fstat
+#define flex_stat Perl_flex_stat
+#define cando_by_name Perl_cando_by_name
+#define my_getpwnam Perl_my_getpwnam
+#define my_getpwuid Perl_my_getpwuid
+#define my_flush Perl_my_flush
+#define readdir Perl_readdir
#else
+#define my_getenv_len(a,b,c) Perl_my_getenv_len(aTHX_ a,b,c)
+#define vmssetenv(a,b,c) Perl_vmssetenv(aTHX_ a,b,c)
#define my_trnlnm(a,b,c) Perl_my_trnlnm(aTHX_ a,b,c)
-#define vmstrnenv(a,b,c,d,e) Perl_vmstrnenv(aTHX_ a,b,c,d,e)
#define my_setenv(a,b) Perl_my_setenv(aTHX_ a,b)
#define my_getenv(a,b) Perl_my_getenv(aTHX_ a,b)
#define tounixspec(a,b) Perl_tounixspec(aTHX_ a,b)
@@ -133,44 +170,42 @@
#define trim_unixpath(a,b,c) Perl_trim_unixpath(aTHX_ a,b,c)
#define opendir(a) Perl_opendir(aTHX_ a)
#define rmscopy(a,b,c) Perl_rmscopy(aTHX_ a,b,c)
+#define my_mkdir(a,b) Perl_my_mkdir(aTHX_ a,b)
+#define vms_do_aexec(a,b,c) Perl_vms_do_aexec(aTHX_ a,b,c)
+#define vms_do_exec(a) Perl_vms_do_exec(aTHX_ a)
+#define my_waitpid(a,b,c) Perl_my_waitpid(aTHX_ a,b,c)
+#define my_crypt(a,b) Perl_my_crypt(aTHX_ a,b)
+#define kill_file(a) Perl_kill_file(aTHX_ a)
+#define my_utime(a,b) Perl_my_utime(aTHX_ a,b)
+#define my_chdir(a) Perl_my_chdir(aTHX_ a)
+#define do_aspawn(a,b,c) Perl_do_aspawn(aTHX_ a,b,c)
+#define seekdir(a,b) Perl_seekdir(aTHX_ a,b)
+#define my_gmtime(a) Perl_my_gmtime(aTHX_ a)
+#define my_localtime(a) Perl_my_localtime(aTHX_ a)
+#define my_time(a) Perl_my_time(aTHX_ a)
+#define do_spawn(a) Perl_do_spawn(aTHX_ a)
+#define flex_fstat(a,b) Perl_flex_fstat(aTHX_ a,b)
+#define cando_by_name(a,b,c) Perl_cando_by_name(aTHX_ a,b,c)
+#define flex_stat(a,b) Perl_flex_stat(aTHX_ a,b)
+#define my_getpwnam(a) Perl_my_getpwnam(aTHX_ a)
+#define my_getpwuid(a) Perl_my_getpwuid(aTHX_ a)
+#define my_flush(a) Perl_my_flush(aTHX_ a)
+#define readdir(a) Perl_readdir(aTHX_ a)
#endif
-#define my_crypt Perl_my_crypt
-#define my_waitpid Perl_my_waitpid
#define my_gconvert Perl_my_gconvert
-#define kill_file Perl_kill_file
-#define my_mkdir Perl_my_mkdir
-#define my_chdir Perl_my_chdir
-#define my_tmpfile Perl_my_tmpfile
-#define my_utime Perl_my_utime
-#define vms_image_init Perl_vms_image_init
-#define readdir Perl_readdir
#define telldir Perl_telldir
-#define seekdir Perl_seekdir
#define closedir Perl_closedir
#define vmsreaddirversions Perl_vmsreaddirversions
-#define my_gmtime Perl_my_gmtime
-#define my_localtime Perl_my_localtime
-#define my_time Perl_my_time
#define my_sigemptyset Perl_my_sigemptyset
#define my_sigfillset Perl_my_sigfillset
#define my_sigaddset Perl_my_sigaddset
#define my_sigdelset Perl_my_sigdelset
#define my_sigismember Perl_my_sigismember
#define my_sigprocmask Perl_my_sigprocmask
-#define cando_by_name Perl_cando_by_name
-#define flex_fstat Perl_flex_fstat
-#define flex_stat Perl_flex_stat
#define my_vfork Perl_my_vfork
-#define vms_do_aexec Perl_vms_do_aexec
-#define vms_do_exec Perl_vms_do_exec
-#define do_aspawn Perl_do_aspawn
-#define do_spawn Perl_do_spawn
#define my_fdopen Perl_my_fdopen
#define my_fclose Perl_my_fclose
#define my_fwrite Perl_my_fwrite
-#define my_flush Perl_my_flush
-#define my_getpwnam Perl_my_getpwnam
-#define my_getpwuid Perl_my_getpwuid
#define my_getpwent Perl_my_getpwent
#define my_endpwent Perl_my_endpwent
#define my_getlogin Perl_my_getlogin
@@ -197,7 +232,7 @@
* from a specific directory to permit creation of files).
*/
#ifndef DONT_MASK_RTL_CALLS
-# define tmpfile my_tmpfile
+# define tmpfile Perl_my_tmpfile
#endif
@@ -476,15 +511,15 @@ struct utimbuf {
#define getlogin my_getlogin
/* Ditto for sys$hash_password() . . . */
-#define crypt my_crypt
+#define crypt(a,b) Perl_my_crypt(aTHX_ a,b)
/* Tweak arg to mkdir & chdir first, so we can tolerate trailing /. */
-#define Mkdir(dir,mode) my_mkdir((dir),(mode))
+#define Mkdir(dir,mode) Perl_my_mkdir(aTHX_ (dir),(mode))
#define Chdir(dir) my_chdir((dir))
/* Use our own stat() clones, which handle Unix-style directory names */
#define Stat(name,bufptr) flex_stat(name,bufptr)
-#define Fstat(fd,bufptr) flex_fstat(fd,bufptr)
+#define Fstat(fd,bufptr) Perl_flex_fstat(aTHX_ fd,bufptr)
/* Setup for the dirent routines:
* opendir(), closedir(), readdir(), seekdir(), telldir(), and
@@ -655,9 +690,9 @@ void prime_env_iter (void);
void init_os_extras ();
/* prototype section start marker; `typedef' passes through cpp */
typedef char __VMS_PROTOTYPES__;
+int Perl_vmstrnenv (const char *, char *, unsigned long int, struct dsc$descriptor_s **, unsigned long int);
#if !defined(PERL_IMPLICIT_CONTEXT)
char * Perl_my_getenv (const char *, bool);
-int Perl_vmstrnenv (const char *, char *, unsigned long int, struct dsc$descriptor_s **, unsigned long int);
int Perl_my_trnlnm (const char *, char *, unsigned long int);
char * Perl_tounixspec (char *, char *);
char * Perl_tounixspec_ts (char *, char *);
@@ -677,8 +712,9 @@ char * Perl_rmsexpand_ts (char *, char *, char *, unsigned);
int Perl_trim_unixpath (char *, char*, int);
DIR * Perl_opendir (char *);
int Perl_rmscopy (char *, char *, int);
+int Perl_my_mkdir (char *, Mode_t);
+bool Perl_vms_do_aexec (SV *, SV **, SV **);
#else
-int Perl_vmstrnenv (pTHX_ const char *, char *, unsigned long int, struct dsc$descriptor_s **, unsigned long int);
char * Perl_my_getenv (pTHX_ const char *, bool);
int Perl_my_trnlnm (pTHX_ const char *, char *, unsigned long int);
char * Perl_tounixspec (pTHX_ char *, char *);
@@ -699,27 +735,28 @@ char * Perl_rmsexpand_ts (pTHX_ char *, char *, char *, unsigned);
int Perl_trim_unixpath (pTHX_ char *, char*, int);
DIR * Perl_opendir (pTHX_ char *);
int Perl_rmscopy (pTHX_ char *, char *, int);
-#endif
-char * my_getenv_len (const char *, unsigned long *, bool);
-int vmssetenv (char *, char *, struct dsc$descriptor_s **);
-void Perl_vmssetuserlnm(char *name, char *eqv);
-char * my_crypt (const char *, const char *);
-Pid_t my_waitpid (Pid_t, int *, int);
+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 **);
+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);
char * my_gconvert (double, int, int, char *);
-int kill_file (char *);
-int my_mkdir (char *, Mode_t);
-int my_chdir (char *);
-FILE * my_tmpfile (void);
-int my_utime (char *, struct utimbuf *);
-void vms_image_init (int *, char ***);
-struct dirent * readdir (DIR *);
+int Perl_kill_file (pTHX_ char *);
+int Perl_my_chdir (pTHX_ char *);
+FILE * Perl_my_tmpfile ();
+int Perl_my_utime (pTHX_ char *, struct utimbuf *);
+void Perl_vms_image_init (int *, char ***);
+struct dirent * Perl_readdir (pTHX_ DIR *);
long telldir (DIR *);
-void seekdir (DIR *, long);
+void Perl_seekdir (pTHX_ DIR *, long);
void closedir (DIR *);
void vmsreaddirversions (DIR *, int);
-struct tm * my_gmtime (const time_t *);
-struct tm * my_localtime (const time_t *);
-time_t my_time (time_t *);
+struct tm * Perl_my_gmtime (pTHX_ const time_t *);
+struct tm * Perl_my_localtime (pTHX_ const time_t *);
+time_t Perl_my_time (pTHX_ time_t *);
#ifdef HOMEGROWN_POSIX_SIGNALS
int my_sigemptyset (sigset_t *);
int my_sigfillset (sigset_t *);
@@ -728,21 +765,19 @@ int my_sigdelset (sigset_t *, int);
int my_sigismember (sigset_t *, int);
int my_sigprocmask (int, sigset_t *, sigset_t *);
#endif
-I32 cando_by_name (I32, Uid_t, char *);
-int flex_fstat (int, Stat_t *);
-int flex_stat (const char *, Stat_t *);
+I32 Perl_cando_by_name (pTHX_ I32, Uid_t, char *);
+int Perl_flex_fstat (pTHX_ int, Stat_t *);
+int Perl_flex_stat (pTHX_ const char *, Stat_t *);
int my_vfork ();
-bool vms_do_aexec (SV *, SV **, SV **);
-bool vms_do_exec (char *);
-unsigned long int do_aspawn (void *, void **, void **);
-unsigned long int do_spawn (char *);
-FILE * my_fdopen (int, const char *);
+bool Perl_vms_do_exec (pTHX_ char *);
+unsigned long int Perl_do_aspawn (pTHX_ void *, void **, void **);
+unsigned long int Perl_do_spawn (pTHX_ char *);
+FILE * my_fdopen (int, char *);
int my_fclose (FILE *);
int my_fwrite (void *, size_t, size_t, FILE *);
-int my_flush (FILE *);
-struct passwd * my_getpwnam (char *name);
-struct passwd * my_getpwuid (Uid_t uid);
-struct passwd * my_getpwent ();
+int Perl_my_flush (pTHX_ FILE *);
+struct passwd * Perl_my_getpwnam (pTHX_ char *name);
+struct passwd * Perl_my_getpwuid (pTHX_ Uid_t uid);
void my_endpwent ();
char * my_getlogin ();
typedef char __VMS_SEPYTOTORP__;