From: craigberry@nospam.mac.com   
      
   On 9/7/25 5:46 PM, Arne Vajhøj wrote:   
   > On 9/7/2025 5:33 PM, Craig A. Berry wrote:   
   >>>> Waldek Hebisch wrote:   
   >>>>> And fundamental thing: Posix promises that two files are in   
   >>>>> fact the same file if and only if both 'st_dev' field and   
   >>>>> 'st_ino' fields match. And libgfortran depends on this.   
   >>>>> Does it hold on VMS?   
   >> If st_ino is an integral type, then I think the answer is yes. If it's   
   >> the array type, then it probably depends on who's doing the comparisons.   
   >> If you pass the stat structure to existing code that does the   
   >> comparison, it may or may not handle the array correctly.   
   >   
   > I believe it contains FID.   
   >   
   > Same disk and same FID must mean same file.   
   >   
   > Different file must mean either different disk or different FID.   
   >   
   > So either 3 comparisons of int16_t or one comparison of int64_t   
   > should do it. Assuming that the last 16 bit of the int64_t always   
   > has same value (like 0).   
      
   Right, so you do something like the following, and then have to make   
   sure that everything everywhere uses only the macros for doing the   
   comparisons:   
      
   #if defined(_USE_STD_STAT) || defined(_LARGEFILE)   
   #define VMS_INO_T_COMPARE(__a, __b) (__a != __b)   
   #define VMS_INO_T_COPY(__a, __b) __a = __b   
   #else   
   #define VMS_INO_T_COMPARE(__a, __b) memcmp(&__a, &__b, 6)   
   #define VMS_INO_T_COPY(__a, __b) memcpy(&__a, &__b, 6)   
   #endif   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|