test: better fix for __APPLE__ test build

make-http-max-header-size-gyp-configurable
Fedor Indutny 11 years ago
parent 9ca484d4c6
commit efcf75d837

@ -26,6 +26,12 @@
#include <string.h> #include <string.h>
#include <stdarg.h> #include <stdarg.h>
#if defined(__APPLE__)
# undef strlcat
# undef strlncpy
# undef strlcpy
#endif /* defined(__APPLE__) */
#undef TRUE #undef TRUE
#define TRUE 1 #define TRUE 1
#undef FALSE #undef FALSE
@ -1525,15 +1531,12 @@ strlncat(char *dst, size_t len, const char *src, size_t n)
return slen + dlen; return slen + dlen;
} }
#ifndef strlcat
size_t size_t
strlcat(char *dst, const char *src, size_t len) strlcat(char *dst, const char *src, size_t len)
{ {
return strlncat(dst, len, src, (size_t) -1); return strlncat(dst, len, src, (size_t) -1);
} }
#endif /* !strlcat */
#ifndef strlncpy
size_t size_t
strlncpy(char *dst, size_t len, const char *src, size_t n) strlncpy(char *dst, size_t len, const char *src, size_t n)
{ {
@ -1551,15 +1554,12 @@ strlncpy(char *dst, size_t len, const char *src, size_t n)
assert(len > slen); assert(len > slen);
return slen; return slen;
} }
#endif /* !strlncpy */
#ifndef strlcpy
size_t size_t
strlcpy(char *dst, const char *src, size_t len) strlcpy(char *dst, const char *src, size_t len)
{ {
return strlncpy(dst, len, src, (size_t) -1); return strlncpy(dst, len, src, (size_t) -1);
} }
#endif /* !strlcpy */
int int
request_url_cb (http_parser *p, const char *buf, size_t len) request_url_cb (http_parser *p, const char *buf, size_t len)

Loading…
Cancel
Save