summaryrefslogtreecommitdiff
path: root/hiredis.h
diff options
context:
space:
mode:
authormichael-grunder <michael.grunder@gmail.com>2018-05-13 18:08:57 -0700
committermichael-grunder <michael.grunder@gmail.com>2018-05-13 18:08:57 -0700
commit7a1acdfeb58b3e3a84a7b5d34af5ec1daae0f603 (patch)
treec936a04bdcf6ad8079a20a4e61aa1fbfb9def6f7 /hiredis.h
parentc1af0e849d6387a4297a1e1066c107f6f72d8469 (diff)
parent58e6b87f51ba31b4a2954d0babe6b3cf7019c985 (diff)
Merge remote-tracking branch 'justinbrewer/hiredis-pr1' into posix-build-fixes
Diffstat (limited to 'hiredis.h')
-rw-r--r--hiredis.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/hiredis.h b/hiredis.h
index 77d5797..a743760 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -80,30 +80,6 @@
* SO_REUSEADDR is being used. */
#define REDIS_CONNECT_RETRIES 10
-/* strerror_r has two completely different prototypes and behaviors
- * depending on system issues, so we need to operate on the error buffer
- * differently depending on which strerror_r we're using. */
-#ifndef _GNU_SOURCE
-/* "regular" POSIX strerror_r that does the right thing. */
-#define __redis_strerror_r(errno, buf, len) \
- do { \
- strerror_r((errno), (buf), (len)); \
- } while (0)
-#else
-/* "bad" GNU strerror_r we need to clean up after. */
-#define __redis_strerror_r(errno, buf, len) \
- do { \
- char *err_str = strerror_r((errno), (buf), (len)); \
- /* If return value _isn't_ the start of the buffer we passed in, \
- * then GNU strerror_r returned an internal static buffer and we \
- * need to copy the result into our private buffer. */ \
- if (err_str != (buf)) { \
- strncpy((buf), err_str, ((len) - 1)); \
- (buf)[(len)-1] = '\0'; \
- } \
- } while (0)
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif