Skip to content
Snippets Groups Projects
Commit dd991f8d authored by Steven Murray's avatar Steven Murray Committed by Steven Murray
Browse files

Fixed strerror_r_wrapper() prototype

parent 568100ea
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,6 @@
/*******************************************************************************
* strerror_r_wrapper
******************************************************************************/
extern "C" int strerror_r_wrapper(int errnum, char *buf, unsigned int buflen) {
extern "C" int strerror_r_wrapper(int errnum, char *buf, size_t buflen) {
return strerror_r(errnum, buf, buflen);
}
......@@ -27,6 +27,19 @@
#include <stddef.h>
/* The following EXTERN_C marco has been intentionally copied from */
/* h/osdep.h instead of just including h/osdep.h. The reason for this is */
/* this header file must include the minimum number of header files because */
/* the implementation file common/strerror_r_wrapper.cpp will undefine */
/* _GNU_SOURCE and define _XOPEN_SOURCE as being 600. */
/* */
/* Macros for externalization (UNIX) (J.-D.Durand) */
#if defined(__cplusplus)
#define EXTERN_C extern "C"
#else
#define EXTERN_C extern
#endif
/**
* This function wraps the XSI compliant version of strerror_r() and therefore
* writes the string representation of the specified error number to the
......@@ -36,6 +49,6 @@
* @param buf The buffer.
* @param buflen The length of the buffer.
*/
int strerror_r_wrapper(int errnum, char *buf, size_t buflen);
EXTERN_C int strerror_r_wrapper(int errnum, char *buf, size_t buflen);
#endif /* H_STRERROR_R_WRAPPER_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment