more build dependency changes, we should make sure that cflags is updated whenever...
[p5sagit/p5-mst-13.2.git] / vms / vmsish.h
index 328da31..48a474a 100644 (file)
@@ -1,13 +1,14 @@
-/*  vmsish.h
+/*    vmsish.h
  *
- * VMS-specific C header file for perl5.
+ *    VMS-specific C header file for perl5.
  *
- * revised: 16-Sep-1998 by Charles Bailey  bailey@newman.upenn.edu
- * Version: 5.5.2
+ *    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ *    2002, 2003, 2004, 2005, 2006, 2007 by Charles Bailey and others.
  *
- * Last revised: 10-Oct-2005 by John Malmberg (HP OpenVMS) wb8twy@qsl.net
- *                          Add SYMLINK support, and updated Craig Berry's
- *                          largefile support.
+ *    You may distribute under the terms of either the GNU General Public
+ *    License or the Artistic License, as specified in the README file.
+ *
+ *    Please see Changes*.* or the Perl Repository Browser for revision history.
  */
 
 #ifndef __vmsish_h_included
 #define pathify_dirspec_utf8_ts        Perl_pathify_dirspec_utf8_ts
 #define trim_unixpath          Perl_trim_unixpath
 #define opendir                        Perl_opendir
+#define rename                 Perl_rename
 #define rmscopy                        Perl_rmscopy
 #define my_mkdir               Perl_my_mkdir
 #define vms_do_aexec           Perl_vms_do_aexec
 #define kill_file              Perl_kill_file
 #define my_utime               Perl_my_utime
 #define my_chdir               Perl_my_chdir
+#define my_chmod               Perl_my_chmod
 #define do_aspawn              Perl_do_aspawn
 #define seekdir                        Perl_seekdir
 #define my_gmtime              Perl_my_gmtime
 #define rmsexpand_utf8_ts(a,b,c,d,e,f) Perl_rmsexpand_utf8_ts(aTHX_ a,b,c,d,e,f)
 #define trim_unixpath(a,b,c)   Perl_trim_unixpath(aTHX_ a,b,c)
 #define opendir(a)             Perl_opendir(aTHX_ a)
+#define rename(a,b)            Perl_rename(aTHX_ a,b)
 #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 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 my_chmod(a,b)          Perl_my_chmod(aTHX_ a,b)
 #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 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 flex_lstat(a,b)                Perl_flex_lstat(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 my_getpwent()          Perl_my_getpwent(aTHX)
 #define my_endpwent()          Perl_my_endpwent(aTHX)
 #define my_getlogin            Perl_my_getlogin
+#ifdef HAS_SYMLINK
+#  define my_symlink(a, b)     Perl_my_symlink(aTHX_ a, b)
+#endif
 #define init_os_extras         Perl_init_os_extras
 #define vms_realpath(a, b, c)  Perl_vms_realpath(aTHX_ a,b,c)
+#define vms_realname(a, b, c)  Perl_vms_realname(aTHX_ a,b,c)
 #define vms_case_tolerant(a)   Perl_vms_case_tolerant(a)
 
 /* Delete if at all possible, changing protections if necessary. */
@@ -397,8 +407,8 @@ struct interp_intern {
 #else
 #define BIT_BUCKET "/dev/null"
 #endif
-#define PERL_SYS_INIT(c,v)     MALLOC_CHECK_TAINT2(*c,*v) vms_image_init((c),(v)); PERLIO_INIT; MALLOC_INIT
-#define PERL_SYS_TERM()                HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM
+#define PERL_SYS_INIT_BODY(c,v)        MALLOC_CHECK_TAINT2(*c,*v) vms_image_init((c),(v)); PERLIO_INIT; MALLOC_INIT
+#define PERL_SYS_TERM_BODY()           HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM
 #define dXSUB_SYS
 #define HAS_KILL
 #define HAS_WAIT
@@ -439,7 +449,11 @@ struct interp_intern {
  *     getgrgid() routines are available to get group entries.
  *     The getgrent() has a separate definition, HAS_GETGRENT.
  */
+#if __CRTL_VER >= 70302000
+#define HAS_GROUP              /**/
+#else
 #undef HAS_GROUP               /**/
+#endif
 
 /* HAS_PASSWD
  *     This symbol, if defined, indicates that the getpwnam() and
@@ -502,6 +516,9 @@ struct interp_intern {
 #  define fwrite my_fwrite     /* for PerlSIO_fwrite */
 #  define fdopen my_fdopen
 #  define fclose my_fclose
+#ifdef HAS_SYMLINK
+#  define symlink my_symlink
+#endif
 #endif
 
 
@@ -624,12 +641,15 @@ struct utimbuf {
 /* Tweak arg to mkdir & chdir first, so we can tolerate trailing /. */
 #define Mkdir(dir,mode) Perl_my_mkdir(aTHX_ (dir),(mode))
 #define Chdir(dir) my_chdir((dir))
+#ifndef DONT_MASK_RTL_CALLS
+#define chmod(file_spec, mode) my_chmod((file_spec), (mode))
+#endif
 
 /* Use our own stat() clones, which handle Unix-style directory names */
 #define Stat(name,bufptr) flex_stat(name,bufptr)
 #define Fstat(fd,bufptr) Perl_flex_fstat(aTHX_ fd,bufptr)
 #ifndef DONT_MASK_RTL_CALLS
-#define lstat(name, bufptr) Perl_flex_lstat(name, bufptr)
+#define lstat(name, bufptr) flex_lstat(name, bufptr)
 #endif
 
 /* Setup for the dirent routines:
@@ -859,6 +879,7 @@ char *      Perl_rmsexpand_utf8 (const char *, char *, const char *, unsigned, int *,
 char * Perl_rmsexpand_utf8_ts (const char *, char *, const char *, unsigned, int *, int *);
 int    Perl_trim_unixpath (char *, const char*, int);
 DIR  * Perl_opendir (const char *);
+int    Perl_rename(const char *, const char *);
 int    Perl_rmscopy (const char *, const char *, int);
 int    Perl_my_mkdir (const char *, Mode_t);
 bool   Perl_vms_do_aexec (SV *, SV **, SV **);
@@ -896,6 +917,7 @@ char *      Perl_rmsexpand_utf8 (pTHX_ const char *, char *, const char *, unsigned,
 char * Perl_rmsexpand_utf8_ts (pTHX_ const char *, char *, const char *, unsigned, int *, int *);
 int    Perl_trim_unixpath (pTHX_ char *, const char*, int);
 DIR * Perl_opendir (pTHX_ const char *);
+int    Perl_rename (pTHX_ const char *, const char *);
 int    Perl_rmscopy (pTHX_ const char *, const char *, int);
 int    Perl_my_mkdir (pTHX_ const char *, Mode_t);
 bool   Perl_vms_do_aexec (pTHX_ SV *, SV **, SV **);
@@ -909,6 +931,7 @@ Pid_t       Perl_my_waitpid (pTHX_ Pid_t, int *, int);
 char * my_gconvert (double, int, int, char *);
 int    Perl_kill_file (pTHX_ const char *);
 int    Perl_my_chdir (pTHX_ const char *);
+int    Perl_my_chmod(pTHX_ const char *, mode_t);
 FILE * Perl_my_tmpfile (void);
 #ifndef HOMEGROWN_POSIX_SIGNALS
 int    Perl_my_sigaction (pTHX_ int, const struct sigaction*, struct sigaction*);
@@ -943,11 +966,12 @@ int       Perl_flex_lstat (pTHX_ const char *, Stat_t *);
 int    Perl_flex_stat (pTHX_ const char *, Stat_t *);
 int    my_vfork (void);
 bool   Perl_vms_do_exec (pTHX_ const char *);
-unsigned long int      Perl_do_aspawn (pTHX_ void *, void **, void **);
-unsigned long int      Perl_do_spawn (pTHX_ const char *);
 FILE *  my_fdopen (int, const char *);
 int     my_fclose (FILE *);
-int    my_fwrite (const void *, size_t, size_t, FILE *);
+int     my_fwrite (const void *, size_t, size_t, FILE *);
+#ifdef HAS_SYMLINK
+int     Perl_my_symlink(pTHX_ const char *path1, const char *path2);
+#endif
 int    Perl_my_flush (pTHX_ FILE *);
 struct passwd *        Perl_my_getpwnam (pTHX_ const char *name);
 struct passwd *        Perl_my_getpwuid (pTHX_ Uid_t uid);