mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r12054] Purpose: VMS port
Description: Made small changes to sec2 driver to reflect that VMS systems ino_t is 1dim array of size 3; all changes are marked with H5_VMS variable. Defined HDremove macro for VMS to remove multiple versions of the files. Solution: Platforms tested: heping, VMS server Misc. update:
This commit is contained in:
parent
00dd94b69b
commit
3f791d1b06
@ -71,7 +71,11 @@ typedef struct H5FD_sec2_t {
|
||||
* identify a file.
|
||||
*/
|
||||
dev_t device; /*file device number */
|
||||
#ifdef H5_VMS
|
||||
ino_t inode[3]; /*file i-node number */
|
||||
#else
|
||||
ino_t inode; /*file i-node number */
|
||||
#endif /*H5_VMS*/
|
||||
#else
|
||||
/*
|
||||
* On WIN32 the low-order word of a unique identifier associated with the
|
||||
@ -382,7 +386,14 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t UNUSED fapl_id,
|
||||
file->fileindexlo = fileinfo.nFileIndexLow;
|
||||
#else
|
||||
file->device = sb.st_dev;
|
||||
#ifdef H5_VMS
|
||||
file->inode[0] = sb.st_ino[0];
|
||||
file->inode[1] = sb.st_ino[1];
|
||||
file->inode[2] = sb.st_ino[2];
|
||||
#else
|
||||
file->inode = sb.st_ino;
|
||||
#endif /*H5_VMS*/
|
||||
|
||||
#endif
|
||||
|
||||
/* Set return value */
|
||||
@ -479,8 +490,14 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
|
||||
if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))>0) HGOTO_DONE(1)
|
||||
#endif /* H5_DEV_T_IS_SCALAR */
|
||||
|
||||
#ifndef H5_VMS
|
||||
if (f1->inode < f2->inode) HGOTO_DONE(-1)
|
||||
if (f1->inode > f2->inode) HGOTO_DONE(1)
|
||||
#else
|
||||
if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))<0) HGOTO_DONE(-1)
|
||||
if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))>0) HGOTO_DONE(1)
|
||||
#endif /*H5_VMS*/
|
||||
|
||||
#endif
|
||||
|
||||
done:
|
||||
|
@ -779,7 +779,11 @@ H5_DLL void HDsrand(unsigned int seed);
|
||||
#define HDread(F,M,Z) read(F,M,Z)
|
||||
#define HDreaddir(D) readdir(D)
|
||||
#define HDrealloc(M,Z) realloc(M,Z)
|
||||
#ifdef H5_VMS
|
||||
#define HDremove(Y) remove(Y";*")
|
||||
#else
|
||||
#define HDremove(S) remove(S)
|
||||
#endif /*H5_VMS*/
|
||||
#define HDrename(OLD,NEW) rename(OLD,NEW)
|
||||
#define HDrewind(F) rewind(F)
|
||||
#define HDrewinddir(D) rewinddir(D)
|
||||
|
Loading…
Reference in New Issue
Block a user