/* sswf_config.h V1.0 -- written by Alexis WILKE for Made to Order Software Corp. (c) 2002-2009 */
#ifndef SSWF_CONFIG_H
#define	SSWF_CONFIG_H

/*

Copyright (c) 2002-2009 Made to Order Software Corp.

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and
associated documentation files (the "Software"), to
deal in the Software without restriction, including
without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice
shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

*/

/** \file
 *
 * \brief This file defines configuration information
 *
 * The intend was to offer a way to configure the
 * library for different platform via this file.
 *
 * The reality is a bit more like defining different
 * types which can be used in the software whatever
 * the system in use is.
 */


#include	"sswf/libsswf-version.h"


/*
 * defines whether %lc in format string should use
 * wchar_t or wint_t (set to 0 or 1)
 */
#define	USE_WCHAR_T	1


/*
 * when the cbrt() isn't available, set the following
 * to zero
 */
#define	HAS_CBRT	1


/*
 * Apparently, MS-Windows doesn't offer a cbrt() [it's
 * probably well hidden]
 */
#ifdef _WIN32
#undef	HAS_CBRT
#define	HAS_CBRT	0
#endif


/* at this time we know that the cbrt() function
 * isn't directly available on MinGW
 */
#if defined(__MINGW32__) || defined(_MSVC)
#undef	HAS_CBRT
#define	HAS_CBRT	0
#ifndef LITTLE_ENDIAN
#define LITTLE_ENDIAN	0x03020100
#endif
#ifndef BIG_ENDIAN
#define BIG_ENDIAN	0x00010203
#endif
#ifndef BYTE_ORDER
// I assume little endian on MS-Windows!
// This is balently wrong since it also runs on PowerPC, MIPS, etc.
#define BYTE_ORDER	LITTLE_ENDIAN
#endif
#endif

#if _MSVC
typedef	__int8			int8_t;
typedef	unsigned __int8		uint8_t;
typedef	__int16			int16_t;
typedef	unsigned __int16	uint16_t;
typedef	__int32			int32_t;
typedef	unsigned __int32	uint32_t;
typedef	__int64			int64_t;
typedef	unsigned __int64	uint64_t;
#elif IRIX
#include	<inttypes.h>
#else
#include	<stdint.h>
#endif

#if USE_WCHAR_T
typedef	wchar_t		wc_t;
#else
typedef	wint_t		wc_t;
#endif

#if defined(_MSVC)
#pragma warning(disable: 4996)
#endif

#endif			/* #ifndef SSWF_CONFIG_H */
