- flex
- libevent
- pkgconf
- - py38-sphinx
- - py38-m2r
+ - py39-sphinx
+ - py39-m2r
- rsync
- tbb
sources:
cd memcached
echo bin/memcached > pkg-plist
maybe make all install PREFIX=/home/build \
- INSTALL_AS_USER=1 NO_PKG_REGISTER=1 \
+ INSTALL_AS_USER=1 NO_PKG_REGISTER=1 PKG_REGISTER=/usr/bin/true \
SASLPWDB_CONFIGURE_ENABLE=sasl-pwdb \
OPTIONS_SET="SASL SASLPWDB" \
OPTIONS_DEFINE="SASL SASLPWDB"
-configure_define(HAVE_PTHREAD_H)
set(THREADS_PREFER_PTHREAD_FLAG ON)
set(CMAKE_THREAD_PREFER_PTHREAD ON)
find_package(Threads)
-set(HAVE_PTHREAD_H ${CMAKE_HAVE_PTHREAD_H} CACHE INTERNAL "FindThreads found pthread.h")
+if(CMAKE_HAVE_PTHREAD_H)
+ configure_define(HAVE_PTHREAD_H)
+ set(HAVE_PTHREAD_H ${CMAKE_HAVE_PTHREAD_H} CACHE INTERNAL "FindThreads found pthread.h")
+elseif(CMAKE_USE_PTHREADS_INIT)
+ check_cxx_include(pthread.h)
+endif()
# libmemcached
#
-set(LIBMEMCACHED_VERSION 1.1.1)
+set(LIBMEMCACHED_VERSION 1.1.2)
set(LIBMEMCACHED_VERSION_INC 1.0)
-set(LIBMEMCACHED_VERSION_HEX 0x001001001)
+set(LIBMEMCACHED_VERSION_HEX 0x001001002)
# libmemcached.so
# ChangeLog v1.1
+## v 1.1.2
+
+> released 2022-08-10
+
+* Fix handling of negative expiration values, which are somehow allowed by legacy.
+ See also [gh #125](https://github.com/awesomized/libmemcached/issues/125),
+ and [gh #76](https://github.com/awesomized/libmemcached/issues/76).
+* Fix [gh #122](https://github.com/awesomized/libmemcached/issues/122):
+ If libcrypto implementation of AES is used, do not compile internal.
+* Fix missing include of <array> in tests.
+* Fix warnings with non-SASL builds.
+* Fix pthread.h detection.
+
## v 1.1.1
> released 2021-09-16
ChangeLog v1.1
==============
+v 1.1.2
+-------
+
+..
+
+ released 2022-08-10
+
+
+
+* Fix handling of negative expiration values, which are somehow allowed by legacy.\ :raw-html-m2r:`<br>`
+ See also `gh #125 <https://github.com/awesomized/libmemcached/issues/125>`_\ ,
+ and `gh #76 <https://github.com/awesomized/libmemcached/issues/76>`_.
+* Fix `gh #122 <https://github.com/awesomized/libmemcached/issues/122>`_\ :
+ If libcrypto implementation of AES is used, do not compile internal.
+* Fix missing include of :raw-html-m2r:`<array>` in tests.
+* Fix warnings with non-SASL builds.
+* Fix pthread.h detection.
+
v 1.1.1
-------
static memcached_return_t memcached_flush_textual(Memcached *ptr, time_t expiration,
const bool reply) {
- char buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH + 1];
+ char buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH + 1 + 1];
int send_length = 0;
if (expiration) {
- send_length = snprintf(buffer, sizeof(buffer), "%llu", (unsigned long long) expiration);
+ send_length = snprintf(buffer, sizeof(buffer), "%lld", (long long) expiration);
}
if (size_t(send_length) >= sizeof(buffer) or send_length < 0) {
return "set ";
}
-static inline bool can_by_encrypted(const memcached_storage_action_t verb) {
+static inline bool can_be_encrypted(const memcached_storage_action_t verb) {
switch (verb) {
case SET_OP:
case ADD_OP:
memcached_literal_param("snprintf(MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH)"));
}
- char expiration_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH + 1];
- int expiration_buffer_length = snprintf(expiration_buffer, sizeof(expiration_buffer), " %llu",
- (unsigned long long) expiration);
+ char expiration_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH + 1 + 1];
+ int expiration_buffer_length = snprintf(expiration_buffer, sizeof(expiration_buffer), " %lld",
+ (long long) expiration);
if (size_t(expiration_buffer_length) >= sizeof(expiration_buffer) or expiration_buffer_length < 0)
{
return memcached_set_error(
hashkit_string_st *destination = NULL;
if (memcached_is_encrypted(ptr)) {
- if (can_by_encrypted(verb) == false) {
+ if (can_be_encrypted(verb) == false) {
return memcached_set_error(
*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT,
memcached_literal_param("Operation not allowed while encyrption is enabled"));
static memcached_return_t ascii_touch(memcached_instance_st *instance, const char *key,
size_t key_length, time_t expiration) {
- char expiration_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH + 1];
- int expiration_buffer_length = snprintf(expiration_buffer, sizeof(expiration_buffer), " %llu",
- (unsigned long long) expiration);
+ char expiration_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH + 1 + 1];
+ int expiration_buffer_length = snprintf(expiration_buffer, sizeof(expiration_buffer), " %lld",
+ (long long) expiration);
if (size_t(expiration_buffer_length) >= sizeof(expiration_buffer) + 1
or expiration_buffer_length < 0)
{
#pragma once
+#include <array>
#include <chrono>
#include <cstring>
#include <iostream>
--- /dev/null
+#include "test/lib/common.hpp"
+#include "test/lib/MemcachedCluster.hpp"
+
+TEST_CASE("memcached_regression_gh_0125") {
+ auto test = MemcachedCluster::network();
+ auto memc = &test.memc;
+ auto blob = random_ascii_string(1024);
+ auto binary = GENERATE(0, 1);
+
+ test.enableBinaryProto(binary);
+ INFO("binary: " << binary);
+
+ memcached_return_t rc = memcached_set(memc, S("key"), blob.c_str(), blob.length(), -123, 0);
+ REQUIRE_SUCCESS(rc);
+}