From befbe94bd95d3729c4650fecd4db22e6da87932a Mon Sep 17 00:00:00 2001 From: Max Lv Date: Mon, 16 Nov 2015 09:04:30 +0800 Subject: [PATCH] try to support solaris --- libcork/include/libcork/config/config.h | 4 +++ libcork/include/libcork/config/solaris.h | 34 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 libcork/include/libcork/config/solaris.h diff --git a/libcork/include/libcork/config/config.h b/libcork/include/libcork/config/config.h index 077be5c8..8c55ee4f 100644 --- a/libcork/include/libcork/config/config.h +++ b/libcork/include/libcork/config/config.h @@ -56,6 +56,10 @@ /* Do some mingw32 autodetection. */ #include +#elif defined(__sun) +/* Do some Solaris autodetection. */ +#include + #endif /* platforms */ diff --git a/libcork/include/libcork/config/solaris.h b/libcork/include/libcork/config/solaris.h new file mode 100644 index 00000000..64bee55e --- /dev/null +++ b/libcork/include/libcork/config/solaris.h @@ -0,0 +1,34 @@ +/* -*- coding: utf-8 -*- + * ---------------------------------------------------------------------- + * Copyright © 2013, RedJack, LLC. + * All rights reserved. + * + * Please see the COPYING file in this distribution for license + * details. + * ---------------------------------------------------------------------- + */ + +#ifndef LIBCORK_CONFIG_SOLARIS_H +#define LIBCORK_CONFIG_SOLARIS_H + +/*----------------------------------------------------------------------- + * Endianness + */ + +#include + +#if BYTE_ORDER == BIG_ENDIAN +#define CORK_CONFIG_IS_BIG_ENDIAN 1 +#define CORK_CONFIG_IS_LITTLE_ENDIAN 0 +#elif BYTE_ORDER == LITTLE_ENDIAN +#define CORK_CONFIG_IS_BIG_ENDIAN 0 +#define CORK_CONFIG_IS_LITTLE_ENDIAN 1 +#else +#error "Cannot determine system endianness" +#endif + +#define CORK_HAVE_REALLOCF 1 +#define CORK_HAVE_PTHREADS 1 + + +#endif /* LIBCORK_CONFIG_SOLARIS_H */