home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.vms      DEC's VAX* line of computers & VMS.      264,096 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 263,276 of 264,096   
   Lawrence =?iso-8859-13?q?D=FFOlivei to Craig A. Berry   
   Re: Unix stat on VMS   
   07 Sep 25 21:52:06   
   
   From: ldo@nz.invalid   
      
   On Sun, 7 Sep 2025 16:33:03 -0500, Craig A. Berry wrote:   
      
   > You definitely want _USE_STD_STAT for anything new and/or   
   > cross-platform.   
      
   Can’t find that in any file in /usr/include on my Debian system.   
      
   > That gets you something that was POSIX-compliant a decade or two   
   > ago. It isn't compliant now because the file times are still just   
   > ints rather than structs with high-precision components as newer   
   > POSIX requires.   
      
   longs rather than ints. From /usr/include/asm-generic/stat.h:   
      
       struct stat {   
           ...   
           unsigned long   st_ino;     /* File serial number.  */   
           ...   
           long        st_atime;   /* Time of last access.  */   
           unsigned long   st_atime_nsec;   
           long        st_mtime;   /* Time of last modification.  */   
           unsigned long   st_mtime_nsec;   
           long        st_ctime;   /* Time of last status change.  */   
           unsigned long   st_ctime_nsec;   
           ...   
       };   
      
   I thought it would be time_t ...   
      
   ... Ah, I see, there is a man page stat(3type) which documents the   
   time fields as structs and st_ino as of type ino_t, as you describe.   
   The layout is compatible with the include file above, of course. Can’t   
   find any actual include file that defines it that way.   
      
   ... Yes I can: it’s /usr/include/«arch-triple»/bits/struct_stat.h.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca