diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-15 22:13:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-15 22:13:18 (GMT) |
commit | 44a00ef876ad3e1922847e93feac57c479217fbe (patch) | |
tree | 5e9fc677913a06a71eba1342633f92e93bd07a6c /test/thread_id.c | |
parent | 59a90368cdb696205bdf15040d1a48b4f69af97f (diff) | |
download | hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.zip hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.tar.gz hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.tar.bz2 |
Strip HD prefix from string/char C API calls (#3540)
* Strip HD prefix from string/char C API calls
* HD(f)(put|get)(s|c)
* HDstr*
* HDv*printf
* HD(s)(print|scan)f
* HDperror
But NOT:
* HDstrcase*
* HDvasprintf
* HDstrtok_r
* HDstrndup
As those are not C99 and have portability work-around
implementations. They will be handled later.
* Fix th5_system.c screwup
Diffstat (limited to 'test/thread_id.c')
-rw-r--r-- | test/thread_id.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/thread_id.c b/test/thread_id.c index d42a483..ed1e0a8 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -36,9 +36,9 @@ my_errx(int code, const char *fmt, ...) (void)fprintf(stderr, "thread_id: "); va_start(ap, fmt); - (void)HDvfprintf(stderr, fmt, ap); + (void)vfprintf(stderr, fmt, ap); va_end(ap); - (void)HDfputc('\n', stderr); + (void)fputc('\n', stderr); exit(code); } @@ -96,7 +96,7 @@ barrier_lock(pthread_barrier_t *barrier) int rc; if ((rc = pthread_mutex_lock(&barrier->mtx)) != 0) { - my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, HDstrerror(rc)); + my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, strerror(rc)); } } @@ -106,7 +106,7 @@ barrier_unlock(pthread_barrier_t *barrier) int rc; if ((rc = pthread_mutex_unlock(&barrier->mtx)) != 0) { - my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, HDstrerror(rc)); + my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, strerror(rc)); } } @@ -178,15 +178,15 @@ my_err(int code, const char *fmt, ...) (void)fprintf(stderr, "thread_id: "); va_start(ap, fmt); - (void)HDvfprintf(stderr, fmt, ap); + (void)vfprintf(stderr, fmt, ap); va_end(ap); - (void)fprintf(stderr, ": %s\n", HDstrerror(errno_copy)); + (void)fprintf(stderr, ": %s\n", strerror(errno_copy)); exit(code); } #define threads_failure(_call, _result) \ do { \ - my_errx(EXIT_FAILURE, "%s.%d: " #_call ": %s", __func__, __LINE__, HDstrerror(_result)); \ + my_errx(EXIT_FAILURE, "%s.%d: " #_call ": %s", __func__, __LINE__, strerror(_result)); \ } while (false) #define NTHREADS 5 @@ -204,7 +204,7 @@ atomic_printf(const char *fmt, ...) ssize_t nprinted, nwritten; va_start(ap, fmt); - nprinted = HDvsnprintf(buf, sizeof(buf), fmt, ap); + nprinted = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); if (nprinted == -1) |