acl/lib_fiber/cpp/include/fiber/fiber_cpp_define.hpp

36 lines
803 B
C++
Raw Normal View History

#pragma once
2018-11-30 14:38:22 +08:00
#if defined(_WIN32) || defined (_WIN64)
/* typedef intptr_t ssize_t; */
2020-10-19 22:25:35 +08:00
# ifndef HAS_SSIZE_T
# define HAS_SSIZE_T
/* typedef intptr_t ssize_t; */
# if defined(_WIN64)
typedef __int64 ssize_t;
# elif defined(_WIN32)
typedef int ssize_t;
# else
2018-11-30 14:38:22 +08:00
typedef long ssize_t;
2020-10-19 22:25:35 +08:00
# endif
# endif
2018-11-30 14:38:22 +08:00
#else
#include <sys/types.h>
#include <sys/socket.h>
#endif
#ifdef FIBER_CPP_LIB
# ifndef FIBER_CPP_API
# define FIBER_CPP_API
# endif
#elif defined(FIBER_DLL) || defined(_WINDLL)
# if defined(FIBER_CPP_EXPORTS) || defined(fibercpp_EXPORTS)
# ifndef FIBER_CPP_API
# define FIBER_CPP_API __declspec(dllexport)
# endif
# elif !defined(FIBER_CPP_API)
# define FIBER_CPP_API __declspec(dllimport)
# endif
#elif !defined(FIBER_CPP_API)
# define FIBER_CPP_API
#endif