Files

44 lines
1.1 KiB
C

/**
* @file include/ActivMiddleware/Config/Platforms/Solaris.h
*
* @brief Solaris configuration file.
*/
#if (!defined ACTIV_CONFIG_PLATFORMS_SOLARIS_H)
#define ACTIV_CONFIG_PLATFORMS_SOLARIS_H
// Include this now to get definitions of SUN_LEN, CMSG_LEN etc if available (e.g. solaris 10)
// and if not we'll define our own later.
#include <sys/socket.h>
#define ACTIV_PLATFORM_NAME "Solaris"
#define ACTIV_PLATFORM_TYPE Activ::PLATFORM_TYPE_SOLARIS
#define ACTIV_POSIX_HAS_CONTEXT_API
#define ACTIV_HAS_INTTYPES_H
#define ACTIV_FRAMEWORK_MESSAGE_TYPES_NO_REGISTRY
#if (!defined SUN_LEN)
// Using ACTIV_FIELD_OFFSET fails with 64-bit gcc builds, so use old c-style field length.
#define SUN_LEN(p) (reinterpret_cast<size_t>(&((sockaddr_un *)0)->sun_path) + strlen((p)->sun_path))
#endif
#if (!defined CMSG_SPACE)
#define CMSG_SPACE(len) (_CMSG_HDR_ALIGN(sizeof(struct cmsghdr)) + (len))
#endif
#if (!defined CMSG_LEN)
#define CMSG_LEN(len) (_CMSG_DATA_ALIGN(sizeof(struct cmsghdr)) + (len))
#endif
#if (!defined NAME_MAX)
#define NAME_MAX MAXNAMELEN
#endif
#include "Posix.h"
#include <strings.h>
#endif // (!defined ACTIV_CONFIG_PLATFORMS_SOLARIS_H)