2001-03-11 01:29:38 +01:00
|
|
|
#ifndef __config_H
|
|
|
|
|
#define __config_H
|
|
|
|
|
/*
|
2009-01-30 02:23:09 +01:00
|
|
|
* Copyright (c) 2001-2009 Stephen Williams (steve@icarus.com)
|
2001-03-11 01:29:38 +01:00
|
|
|
*
|
|
|
|
|
* This source code is free software; you can redistribute it
|
|
|
|
|
* and/or modify it in source code form under the terms of the GNU
|
|
|
|
|
* General Public License as published by the Free Software
|
|
|
|
|
* Foundation; either version 2 of the License, or (at your option)
|
|
|
|
|
* any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
|
|
|
|
*/
|
2005-04-13 08:34:20 +02:00
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
|
# if !defined(__GNUC__)
|
|
|
|
|
using namespace std;
|
|
|
|
|
# elif (__GNUC__ == 3)
|
|
|
|
|
using namespace std;
|
|
|
|
|
# endif
|
2001-03-11 01:29:38 +01:00
|
|
|
#endif
|
|
|
|
|
|
2002-05-24 02:43:16 +02:00
|
|
|
# define SIZEOF_UNSIGNED_LONG_LONG 0
|
2004-05-18 20:45:11 +02:00
|
|
|
#ifndef SIZEOF_UNSIGNED_LONG
|
2001-03-11 01:29:38 +01:00
|
|
|
# define SIZEOF_UNSIGNED_LONG 0
|
2004-05-18 20:45:11 +02:00
|
|
|
#endif
|
2001-03-11 01:29:38 +01:00
|
|
|
# define SIZEOF_UNSIGNED 0
|
|
|
|
|
|
2001-09-18 00:26:33 +02:00
|
|
|
# undef NEED_LU
|
2004-10-04 03:10:51 +02:00
|
|
|
# undef NEED_TU
|
2001-09-18 00:26:33 +02:00
|
|
|
# undef WLU
|
|
|
|
|
# undef WTU
|
2005-04-13 08:34:20 +02:00
|
|
|
# undef HAVE_IOSFWD
|
2001-03-16 02:44:34 +01:00
|
|
|
# undef HAVE_DLFCN_H
|
|
|
|
|
# undef HAVE_DL_H
|
2001-05-11 04:06:14 +02:00
|
|
|
# undef HAVE_GETOPT_H
|
2001-09-15 20:27:04 +02:00
|
|
|
# undef HAVE_MALLOC_H
|
2001-05-06 01:55:46 +02:00
|
|
|
# undef HAVE_LIBREADLINE
|
2003-05-16 05:50:28 +02:00
|
|
|
# undef HAVE_READLINE_READLINE_H
|
|
|
|
|
# undef HAVE_READLINE_HISTORY_H
|
2007-02-02 05:33:00 +01:00
|
|
|
# undef HAVE_INTTYPES_H
|
2006-04-27 07:04:59 +02:00
|
|
|
# undef HAVE_LROUND
|
2007-06-13 03:03:57 +02:00
|
|
|
# undef HAVE_NAN
|
2003-05-16 05:50:28 +02:00
|
|
|
|
2009-01-30 02:23:09 +01:00
|
|
|
/*
|
|
|
|
|
* Define this is you want to compile vvp with memory freeing and
|
|
|
|
|
* special valgrind hooks for the memory pools.
|
|
|
|
|
*/
|
|
|
|
|
# undef CHECK_WITH_VALGRIND
|
|
|
|
|
|
2003-05-16 05:50:28 +02:00
|
|
|
/* Figure if I can use readline. */
|
|
|
|
|
#undef USE_READLINE
|
2003-05-20 05:48:23 +02:00
|
|
|
#ifdef HAVE_LIBREADLINE
|
2003-05-16 05:50:28 +02:00
|
|
|
#ifdef HAVE_READLINE_READLINE_H
|
|
|
|
|
# define USE_READLINE
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
2001-03-16 02:44:34 +01:00
|
|
|
|
2001-03-22 22:26:53 +01:00
|
|
|
#ifndef MODULE_DIR
|
|
|
|
|
# define MODULE_DIR "."
|
|
|
|
|
#endif
|
|
|
|
|
|
2007-02-02 05:33:00 +01:00
|
|
|
#ifdef HAVE_INTTYPES_H
|
|
|
|
|
# include <inttypes.h>
|
2006-04-26 00:41:10 +02:00
|
|
|
#endif
|
2005-09-14 04:50:07 +02:00
|
|
|
|
2002-04-20 06:33:23 +02:00
|
|
|
#if SIZEOF_UNSIGNED >= 8
|
|
|
|
|
typedef unsigned vvp_time64_t;
|
2003-03-13 21:31:40 +01:00
|
|
|
# define TIME_FMT ""
|
2002-04-20 06:33:23 +02:00
|
|
|
#else
|
|
|
|
|
# if SIZEOF_UNSIGNED_LONG >= 8
|
|
|
|
|
typedef unsigned long vvp_time64_t;
|
2008-09-18 00:16:33 +02:00
|
|
|
# define UL_AND_TIME64_SAME
|
2003-03-13 21:31:40 +01:00
|
|
|
# define TIME_FMT "l"
|
2002-04-20 06:33:23 +02:00
|
|
|
# else
|
|
|
|
|
# if SIZEOF_UNSIGNED_LONG_LONG > SIZEOF_UNSIGNED_LONG
|
|
|
|
|
typedef unsigned long long vvp_time64_t;
|
2003-03-13 21:31:40 +01:00
|
|
|
# define TIME_FMT "ll"
|
2002-04-20 06:33:23 +02:00
|
|
|
# else
|
|
|
|
|
typedef unsigned long vvp_time64_t;
|
2008-09-18 00:16:33 +02:00
|
|
|
# define UL_AND_TIME64_SAME
|
2003-03-13 21:31:40 +01:00
|
|
|
# define TIME_FMT "l"
|
2002-04-20 06:33:23 +02:00
|
|
|
# endif
|
|
|
|
|
# endif
|
|
|
|
|
#endif
|
|
|
|
|
|
2007-06-13 03:03:57 +02:00
|
|
|
# include <math.h>
|
|
|
|
|
|
2001-10-20 03:03:42 +02:00
|
|
|
/* getrusage, /proc/self/statm */
|
2001-07-16 20:40:19 +02:00
|
|
|
|
2001-10-20 03:03:42 +02:00
|
|
|
# undef HAVE_SYS_RESOURCE_H
|
|
|
|
|
# undef LINUX
|
2001-09-18 00:26:33 +02:00
|
|
|
|
2006-04-27 07:04:59 +02:00
|
|
|
#if !defined(HAVE_LROUND)
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
|
extern "C" long lround(double x);
|
|
|
|
|
#else
|
|
|
|
|
extern long lround(double x);
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
2007-06-13 03:03:57 +02:00
|
|
|
#if !defined(HAVE_NAN)
|
|
|
|
|
# define nan(x) (NAN)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if !defined(INFINITY)
|
|
|
|
|
# define INFINITY HUGE_VAL
|
|
|
|
|
#endif
|
2003-05-16 05:50:28 +02:00
|
|
|
|
2001-09-18 00:26:33 +02:00
|
|
|
/*
|
|
|
|
|
* When doing dynamic linking, we need a uniform way to identify the
|
|
|
|
|
* symbol. Some compilers put leading _, some trailing _. The
|
|
|
|
|
* configure script figures out which is the local convention and
|
|
|
|
|
* defines NEED_LU and NEED_TU as required.
|
|
|
|
|
*/
|
|
|
|
|
#ifdef NEED_LU
|
|
|
|
|
#define LU "_"
|
|
|
|
|
#else
|
|
|
|
|
#define LU ""
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef NEED_TU
|
|
|
|
|
#define TU "_"
|
|
|
|
|
#else
|
|
|
|
|
#define TU ""
|
|
|
|
|
#endif
|
|
|
|
|
|
2001-03-11 01:29:38 +01:00
|
|
|
#endif
|