/*
+--------------------------------------------------------------------+
- | libmemcached - C/C++ Client Library for memcached |
+ | libmemcached-awesome - C/C++ Client Library for memcached |
+--------------------------------------------------------------------+
| Redistribution and use in source and binary forms, with or without |
| modification, are permitted under the terms of the BSD license. |
| the terms online at: https://opensource.org/licenses/BSD-3-Clause |
+--------------------------------------------------------------------+
| Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ |
- | Copyright (c) 2020 Michael Wallner <mike@php.net> |
+ | Copyright (c) 2020-2021 Michael Wallner https://awesome.co/ |
+--------------------------------------------------------------------+
*/
#elif defined(HAVE_STRERROR_R) && HAVE_STRERROR_R
strerror_r(local_errno, errmsg, sizeof(errmsg));
errmsg_ptr = errmsg;
-#elif defined(HAVE_STRERROR) && HAVE_STRERROR
+#else
snprintf(errmsg, sizeof(errmsg), "%s", strerror(local_errno));
errmsg_ptr = errmsg;
#endif
return memcached_set_error(self, rc, at, tmp);
}
-#ifndef __INTEL_COMPILER
-# pragma GCC diagnostic ignored "-Wformat-nonliteral"
-#endif
-
memcached_return_t memcached_set_error(Memcached &memc, memcached_return_t rc, const char *at,
memcached_string_t &str) {
assert_msg(rc != MEMCACHED_ERRNO,