+/*
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
#include "squid.h"
#include "compat/xstrerror.h"
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cstring>
#if _SQUID_WINDOWS_
static struct _wsaerrtext {
#if _SQUID_WINDOWS_
// Description of WSAGetLastError()
- for (size_t i = 0; i < sizeof(_wsaerrtext) / sizeof(struct _wsaerrtext); i++) {
+ for (size_t i = 0; i < sizeof(_wsaerrtext) / sizeof(struct _wsaerrtext); ++i) {
if (_wsaerrtext[i].err == error) {
// small optimization, save using a temporary buffer and two copies...
snprintf(xstrerror_buf, BUFSIZ, "(%d) %s, %s", error, _wsaerrtext[i].errconst, _wsaerrtext[i].errdesc);
return xstrerror_buf;
}
+