diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 20:03:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 20:03:45 (GMT) |
commit | 605cea4af60cfcbe03a54f697de392eec75e5a85 (patch) | |
tree | 20b6c58c39883d0ab983f99685d5de05b5cbe753 /src/H5FDdirect.c | |
parent | 96d89bcae7b47402b97e87787a007d558ddcb66b (diff) | |
download | hdf5-605cea4af60cfcbe03a54f697de392eec75e5a85.zip hdf5-605cea4af60cfcbe03a54f697de392eec75e5a85.tar.gz hdf5-605cea4af60cfcbe03a54f697de392eec75e5a85.tar.bz2 |
Remove HD from HDposix_memalign() (#3196)
The posix_memalign call is only used in the direct VFD, which can only
be built if posix_memalign() is available.
Diffstat (limited to 'src/H5FDdirect.c')
-rw-r--r-- | src/H5FDdirect.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index d2896e6..7275bb5 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -550,11 +550,11 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad * than the one where the program is running. */ /* NOTE: Use HDmalloc and HDfree here to ensure compatibility with - * HDposix_memalign. + * posix_memalign. */ buf1 = HDmalloc(sizeof(int)); - if (HDposix_memalign(&buf2, file->fa.mboundary, file->fa.fbsize) != 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "HDposix_memalign failed") + if (posix_memalign(&buf2, file->fa.mboundary, file->fa.fbsize) != 0) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "posix_memalign failed") if (o_flags & O_CREAT) { if (HDwrite(file->fd, buf1, sizeof(int)) < 0) { @@ -944,8 +944,8 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U if (alloc_size > _cbsize) alloc_size = _cbsize; assert(!(alloc_size % _fbsize)); - if (HDposix_memalign(©_buf, _boundary, alloc_size) != 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed") + if (posix_memalign(©_buf, _boundary, alloc_size) != 0) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "posix_memalign failed") /* look for the aligned position for reading the data */ assert(!(((addr / _fbsize) * _fbsize) % _fbsize)); @@ -1125,8 +1125,8 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_ alloc_size = _cbsize; assert(!(alloc_size % _fbsize)); - if (HDposix_memalign(©_buf, _boundary, alloc_size) != 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed") + if (posix_memalign(©_buf, _boundary, alloc_size) != 0) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "posix_memalign failed") /* look for the right position for reading or writing the data */ if (HDlseek(file->fd, (HDoff_t)write_addr, SEEK_SET) < 0) |