2 * Copyright (C) 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
13 #if defined(__cplusplus)
17 #if !defined(__GLIBC__) || \
18 ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE))
21 * Version using XSI strerror_r.
23 #define PERROR_NO_LOGGER(msg, args...) \
25 char _perror_buf[200]; \
26 strerror_r(errno, _perror_buf, sizeof(_perror_buf)); \
27 fprintf(stderr, msg ": %s\n", ##args, _perror_buf); \
31 * Version using GNU strerror_r, for linux with appropriate defines.
33 #define PERROR_NO_LOGGER(msg, args...) \
36 char _perror_tmp[200]; \
37 _perror_buf = strerror_r(errno, _perror_tmp, sizeof(_perror_tmp)); \
38 fprintf(stderr, msg ": %s\n", ##args, _perror_buf); \
42 int usleep_safe(useconds_t usec
);
43 int create_file(const char *path
);
44 int wait_on_file(const char *path
);
46 #if defined(__cplusplus)
50 #endif /* TEST_UTILS_H */
This page took 0.031215 seconds and 4 git commands to generate.