diff options
author | Craig A. Berry <craigberry@mac.com> | 2005-01-04 15:48:54 -0600 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-01-05 10:44:59 +0000 |
commit | e0261ef804cae9bce7bdbff7f5bafb553b9260f8 (patch) | |
tree | ecc15131e1f0053c3e17da5e6abfc9627f3a9ed1 /vms | |
parent | adb2fcba926db68009c2341ac4b91b44e6f7b720 (diff) | |
download | perl-e0261ef804cae9bce7bdbff7f5bafb553b9260f8.tar.gz |
-Duselargefiles for VMS
From: "Craig A. Berry" <craigberry@mac.com>
Message-ID: <41DB63A6.7040504@mac.com>
Date: Tue, 04 Jan 2005 21:48:54 -0600
p4raw-id: //depot/perl@23748
Diffstat (limited to 'vms')
-rw-r--r-- | vms/descrip_mms.template | 14 | ||||
-rw-r--r-- | vms/vmsish.h | 57 |
2 files changed, 61 insertions, 10 deletions
diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template index 10fa736c7d..a05fdffbef 100644 --- a/vms/descrip_mms.template +++ b/vms/descrip_mms.template @@ -31,6 +31,7 @@ ~CC~ ~MT~ ~FLAGS~ +~LARGEFILE~ #: >>>>> Architecture-specific options <<<<< .ifdef IXE @@ -210,11 +211,16 @@ THREADH = .endif # C preprocessor manifest "DEBUGGING" ==> perl -D, not the VMS debugger +.IFDEF LARGEFILE +CFLAGS = $(XTRACCFLAGS)$(DBGCCFLAGS)$(FLAGS)/Define=_LARGEFILE +X2PCFLAGS = $(XTRACCFLAGS)$(DBGCCFLAGS)$(FLAGS)/Define=(PERL_FOR_X2P,_LARGEFILE) +CORECFLAGS = $(XTRACCFLAGS)$(DBGCCFLAGS)$(FLAGS)/Define=(PERL_CORE,_LARGEFILE) +.ELSE CFLAGS = $(XTRACCFLAGS)$(DBGCCFLAGS)$(FLAGS) -# Flags for a core compile -X2PCFLAGS = $(CFLAGS)/Define=PERL_FOR_X2P -# Flags for an x2p compile -CORECFLAGS = $(CFLAGS)/Define=PERL_CORE +X2PCFLAGS = $(XTRACCFLAGS)$(DBGCCFLAGS)$(FLAGS)/Define=PERL_FOR_X2P +CORECFLAGS = $(XTRACCFLAGS)$(DBGCCFLAGS)$(FLAGS)/Define=PERL_CORE +.ENDIF + LINKFLAGS = $(DBGLINKFLAGS) MAKE = $(MMS) diff --git a/vms/vmsish.h b/vms/vmsish.h index af30293659..ec1ae98358 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) |