X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=include%2Flibmemcached-1%2Fplatform.h;fp=include%2Flibmemcached-1%2Fplatform.h;h=bfc05e351f1e1da9328c6af0472595e8463d8930;hb=3ffc968aaf182bf1ff1e18157c7bde2bdb41668d;hp=0000000000000000000000000000000000000000;hpb=a20205ad8b1a30fbc419e016a633b40b739073c7;p=awesomized%2Flibmemcached diff --git a/include/libmemcached-1/platform.h b/include/libmemcached-1/platform.h new file mode 100644 index 00000000..bfc05e35 --- /dev/null +++ b/include/libmemcached-1/platform.h @@ -0,0 +1,61 @@ +/* + +--------------------------------------------------------------------+ + | libmemcached - 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. | + | You should have received a copy of the license in a bundled file | + | named LICENSE; in case you did not receive a copy you can review | + | 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 | + +--------------------------------------------------------------------+ +*/ + +#pragma once + +#include "libmemcached-1/configure.h" + +/* This seems to be required for older compilers @note + * http://stackoverflow.com/questions/8132399/how-to-printf-uint64-t */ +#ifndef __STDC_FORMAT_MACROS +# define __STDC_FORMAT_MACROS +#endif + +#ifdef __cplusplus +# include +# include +# include +#else +# include +# include +# include +# include +#endif + +#include + +#if defined HAVE_NETDB_H +# include +#endif + +#if !defined HAVE_IN_PORT_T +typedef int in_port_t; +#endif + +#if !defined HAVE_PID_T +typedef int pid_t; +#endif + +#ifndef HAVE_SSIZE_T +typedef long int ssize_t; +#endif + +#if defined _WIN32 +# include +# include +typedef SOCKET memcached_socket_t; +#else +typedef int memcached_socket_t; +#endif // _WIN32