Skip to content

Commit

Permalink
Rename HDpipe() to pipe() (#3192)
Browse files Browse the repository at this point in the history
Pipe is POSIX but implemented in Microsoft's CRT
  • Loading branch information
derobins authored Jun 28, 2023
1 parent 6df0779 commit 622fcbd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 28 deletions.
3 changes: 0 additions & 3 deletions src/H5private.h
Original file line number Diff line number Diff line change
Expand Up @@ -943,9 +943,6 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation);
#ifndef HDperror
#define HDperror(S) perror(S)
#endif
#ifndef HDpipe
#define HDpipe(F) pipe(F)
#endif
#ifndef HDpow
#define HDpow(X, Y) pow(X, Y)
#endif
Expand Down
50 changes: 25 additions & 25 deletions test/swmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2491,7 +2491,7 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
FAIL_STACK_ERROR;

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/*
Expand Down Expand Up @@ -2574,9 +2574,9 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
*/

/* Create 2 pipes */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;
if (HDpipe(in_pdf) < 0)
if (pipe(in_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -2768,7 +2768,7 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
* will fail with H5Fstart_swmr_write()
*/
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -2844,7 +2844,7 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -2924,7 +2924,7 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -5232,7 +5232,7 @@ test_file_lock_concur(hid_t in_fapl)
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -5309,7 +5309,7 @@ test_file_lock_concur(hid_t in_fapl)
* Case 2: 1) RDWR 2) RDONLY : should fail
*/
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -5387,7 +5387,7 @@ test_file_lock_concur(hid_t in_fapl)
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -5465,7 +5465,7 @@ test_file_lock_concur(hid_t in_fapl)
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -5629,7 +5629,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -5707,7 +5707,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -5785,7 +5785,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -5862,7 +5862,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
* Case 4: 1) RDWR|SWMR_WRITE 2) RDWR|SWMR_WRITE : should fail
*/

if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -5939,7 +5939,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
* Case 5: 1) RDWR|SWMR_WRITE 2) RDONLY|SWMR_READ : should succeed
*/

if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -6019,7 +6019,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
* Case 6: 1) RDWR|SWMR_WRITE 2) RDONLY : should fail
*/

if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -6097,7 +6097,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -6175,7 +6175,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -6253,7 +6253,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -6334,7 +6334,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -6412,7 +6412,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -6490,7 +6490,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -6669,7 +6669,7 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
*/

/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
TEST_ERROR;

/* Fork child process */
Expand Down Expand Up @@ -7166,9 +7166,9 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format)
FAIL_STACK_ERROR;

/* Create 2 pipes */
if (HDpipe(out_pdf) < 0)
if (pipe(out_pdf) < 0)
FAIL_STACK_ERROR;
if (HDpipe(in_pdf) < 0)
if (pipe(in_pdf) < 0)
FAIL_STACK_ERROR;

/* Fork child process */
Expand Down

0 comments on commit 622fcbd

Please sign in to comment.