X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=vms%2Fvmsish.h;h=dea963f23b7af594e2eed56057c80ecef0b233cb;hb=454f1e2628e3c3cf05341675e973e8df77c9b0ae;hp=af30293659e5e4c297eb61a819cb6b8fc0b3018b;hpb=670137c257a6256f68b1db438a3e2732ae609263;p=p5sagit%2Fp5-mst-13.2.git diff --git a/vms/vmsish.h b/vms/vmsish.h index af30293..dea963f 100644 --- a/vms/vmsish.h +++ b/vms/vmsish.h @@ -609,6 +609,45 @@ struct passwd { /* Since we've got to match the size of the CRTL's stat_t, we need * to mimic DECC's alignment settings. */ +#ifdef USE_LARGE_FILES +/* Mimic the new stat structure, filler fields, and alignment. */ +#if defined(__DECC) || defined(__DECCXX) +# pragma __member_alignment __save +# pragma member_alignment +#endif + +struct mystat +{ + char *st_devnam; /* pointer to device name */ + char *st_fill_dev; + unsigned st_ino; /* hack - CRTL uses unsigned short[3] for */ + unsigned short rvn; /* FID (num,seq,rvn) */ + unsigned short st_fill_ino; + unsigned short st_mode; /* file "mode" i.e. prot, dir, reg, etc. */ + unsigned short st_fill_mode; + int st_nlink; /* for compatibility - not really used */ + unsigned st_uid; /* from ACP - QIO uic field */ + unsigned short st_gid; /* group number extracted from st_uid */ + unsigned short st_fill_gid; + dev_t st_rdev; /* for compatibility - always zero */ + off_t st_size; /* file size in bytes */ + unsigned st_atime; /* file access time; always same as st_mtime */ + unsigned st_fill_atime; + unsigned st_mtime; /* last modification time */ + unsigned st_fill_mtime; + unsigned st_ctime; /* file creation time */ + unsigned st_fill_ctime; + char st_fab_rfm; /* record format */ + char st_fab_rat; /* record attributes */ + char st_fab_fsz; /* fixed header size */ + char st_fab_fill; + unsigned st_fab_mrs; /* record size */ + int st_fill_expand[7]; /* will probably fill from beginning, so put our st_dev at end */ + unsigned st_dev; /* encoded device name */ +}; + +#else /* !defined(USE_LARGE_FILES) */ + #if defined(__DECC) || defined(__DECCXX) # pragma __member_alignment __save # pragma __nomember_alignment @@ -618,6 +657,7 @@ struct passwd { # pragma __message disable (__MISALGNDSTRCT) # pragma __message disable (__MISALGNDMEM) #endif + struct mystat { char *st_devnam; /* pointer to device name */ @@ -644,6 +684,17 @@ struct mystat */ char st_fill1[sizeof(void *) - (3*sizeof(unsigned short) + 3*sizeof(char))%sizeof(void *)]; }; + +#if defined(__DECC) +# pragma __message __restore +#endif + +#endif /* defined(USE_LARGE_FILES) */ + +#if defined(__DECC) || defined(__DECCXX) +# pragma __member_alignment __restore +#endif + typedef unsigned mydev_t; typedef unsigned myino_t; @@ -673,12 +724,6 @@ typedef unsigned myino_t; # define dev_t mydev_t # define ino_t myino_t #endif -#if defined(__DECC) || defined(__DECCXX) -# pragma __member_alignment __restore -#endif -#if defined(__DECC) -# pragma __message __restore -#endif /* Cons up a 'delete' bit for testing access */ #define S_IDUSR (S_IWUSR | S_IXUSR) #define S_IDGRP (S_IWGRP | S_IXGRP) @@ -767,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); @@ -783,7 +828,7 @@ unsigned int Perl_sig_to_vmscondition (int); int Perl_my_kill (int, int); void Perl_csighandler_init (void); #endif -int Perl_my_utime (pTHX_ char *, struct utimbuf *); +int Perl_my_utime (pTHX_ const char *, const struct utimbuf *); void Perl_vms_image_init (int *, char ***); struct dirent * Perl_readdir (pTHX_ DIR *); int Perl_readdir_r(pTHX_ DIR *, struct dirent *, struct dirent **);