|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H |
|
# include <config.h> |
|
#endif |
|
|
|
#include <stdint.h> |
|
#include <stddef.h> |
|
#include <stdio.h> |
|
#include <string.h> |
|
|
|
#include "gen-scmconfig.h" |
|
|
|
#define pf printf |
|
|
|
int |
|
main (int argc, char *argv[]) |
|
{ |
|
pf ("/* This file is automatically generated --" |
|
" see configure.in for details */\n" |
|
"\n" |
|
"#ifndef SCM_SCMCONFIG_H\n" |
|
"#define SCM_SCMCONFIG_H\n"); |
|
|
|
|
|
pf ("\n"); |
|
pf ("/* Important headers */\n"); |
|
pf ("#include <stdint.h>\n"); |
|
pf ("#include <stddef.h>\n"); |
|
pf ("#include <limits.h>\n"); |
|
|
|
#if HAVE_SYS_TIME_H |
|
pf ("#include <sys/time.h>\n"); |
|
#else |
|
pf ("/* sys/time.h not available */\n"); |
|
#endif |
|
|
|
pf ("#include <time.h>\n"); |
|
pf("\n"); |
|
|
|
pf ("#include <stdlib.h>\n"); |
|
# ifdef HAVE_SYS_TYPES_H |
|
pf ("#include <sys/types.h>\n"); |
|
# endif |
|
# ifdef HAVE_SYS_STDTYPES_H |
|
pf ("#include <sys/stdtypes.h>\n"); |
|
# endif |
|
pf ("#include <stddef.h>\n"); |
|
|
|
pf("\n"); |
|
#ifdef HAVE_SYS_SELECT_H |
|
pf ("#define SCM_HAVE_SYS_SELECT_H 1 /* 0 or 1 */\n"); |
|
#else |
|
pf ("#define SCM_HAVE_SYS_SELECT_H 0 /* 0 or 1 */\n"); |
|
#endif |
|
|
|
#ifdef HAVE_WINSOCK2_H |
|
pf ("#define SCM_HAVE_WINSOCK2_H 1 /* 0 or 1 */\n"); |
|
#else |
|
pf ("#define SCM_HAVE_WINSOCK2_H 0 /* 0 or 1 */\n"); |
|
#endif |
|
|
|
|
|
pf ("\n"); |
|
pf ("/* Define to include various undocumented debugging functions. */\n"); |
|
if (SCM_I_GSC_GUILE_DEBUG) |
|
pf ("#define GUILE_DEBUG 1 /* defined or undefined */\n"); |
|
else |
|
pf ("/* #undef GUILE_DEBUG */\n"); |
|
|
|
|
|
pf ("\n"); |
|
pf ("/* Set to 1 if you want to enable deprecated features. */\n"); |
|
pf ("/* (value will be 0 or 1). */\n"); |
|
pf ("#define SCM_ENABLE_DEPRECATED %d\n", SCM_I_GSC_ENABLE_DEPRECATED); |
|
|
|
|
|
pf ("\n"); |
|
pf ("/* Set to 1 if the stack grows up, 0 otherwise. */\n"); |
|
pf ("#define SCM_STACK_GROWS_UP %d /* 0 or 1 */\n", |
|
SCM_I_GSC_STACK_GROWS_UP); |
|
|
|
|
|
pf ("\n"); |
|
pf ("/* C compiler's syntax for inline functions if any,\n" |
|
" otherwise undefined. */\n"); |
|
if (SCM_I_GSC_C_INLINE) |
|
pf ("#define SCM_C_INLINE %s\n", SCM_I_GSC_C_INLINE); |
|
else |
|
pf ("/* #undef SCM_C_INLINE */\n"); |
|
|
|
pf ("\n"); |
|
pf ("/* Standard types. */\n"); |
|
|
|
pf ("#define SCM_SIZEOF_CHAR %d\n", SIZEOF_CHAR); |
|
pf ("#define SCM_SIZEOF_UNSIGNED_CHAR %d\n", SIZEOF_UNSIGNED_CHAR); |
|
pf ("#define SCM_SIZEOF_SHORT %d\n", SIZEOF_SHORT); |
|
pf ("#define SCM_SIZEOF_UNSIGNED_SHORT %d\n", SIZEOF_UNSIGNED_SHORT); |
|
pf ("#define SCM_SIZEOF_LONG %d\n", SIZEOF_LONG); |
|
pf ("#define SCM_SIZEOF_UNSIGNED_LONG %d\n", SIZEOF_UNSIGNED_LONG); |
|
pf ("#define SCM_SIZEOF_INT %d\n", SIZEOF_INT); |
|
pf ("#define SCM_SIZEOF_UNSIGNED_INT %d\n", SIZEOF_UNSIGNED_INT); |
|
pf ("#define SCM_SIZEOF_SIZE_T %d\n", SIZEOF_SIZE_T); |
|
pf ("#define SCM_SIZEOF_LONG_LONG %d\n", SIZEOF_LONG_LONG); |
|
pf ("#define SCM_SIZEOF_UNSIGNED_LONG_LONG %d\n", SIZEOF_UNSIGNED_LONG_LONG); |
|
pf ("#define SCM_SIZEOF_INTMAX %d\n", SIZEOF_INTMAX_T); |
|
pf ("#define SCM_SIZEOF_SCM_T_PTRDIFF %d\n", SIZEOF_PTRDIFF_T); |
|
pf ("#define SCM_SIZEOF_INTPTR_T %d\n", SIZEOF_INTPTR_T); |
|
pf ("#define SCM_SIZEOF_UINTPTR_T %d\n", SIZEOF_UINTPTR_T); |
|
|
|
pf ("\n"); |
|
pf ("/* same as POSIX \"struct timespec\" -- always defined */\n"); |
|
#ifdef HAVE_SYSTEM_STRUCT_TIMESPEC |
|
pf ("typedef struct timespec scm_t_timespec;\n"); |
|
#else |
|
pf ("/* POSIX.4 structure for a time value. This is like a `struct timeval'" |
|
" but has nanoseconds instead of microseconds. */\n"); |
|
pf ("typedef struct\n" |
|
"{\n" |
|
" long int tv_sec; /* Seconds. */\n" |
|
" long int tv_nsec; /* Nanoseconds. */\n" |
|
"} scm_t_timespec;\n"); |
|
#endif |
|
|
|
pf ("\n"); |
|
pf ("/*** Threading model (scmconfig.h support not finished) ***/\n"); |
|
|
|
pf ("/* Define to 1 if using pthread multithreading. */\n"); |
|
pf ("#define SCM_USE_PTHREAD_THREADS %d /* 0 or 1 */\n", |
|
SCM_I_GSC_USE_PTHREAD_THREADS); |
|
|
|
pf ("/* Define to 1 if using one-thread 'multi'threading. */\n"); |
|
pf ("#define SCM_USE_NULL_THREADS %d /* 0 or 1 */\n", |
|
SCM_I_GSC_USE_NULL_THREADS); |
|
|
|
pf ("/* Define to 1 if need braces around PTHREAD_ONCE_INIT (for Solaris). */\n"); |
|
pf ("#define SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT %d /* 0 or 1 */\n", |
|
SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT); |
|
|
|
pf ("/* Define to 1 if need braces around PTHREAD_MUTEX_INITIALIZER\n" |
|
" (for IRIX with GCC) */\n"); |
|
pf ("#define SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER %d /* 0 or 1 */\n", |
|
SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER); |
|
|
|
#ifdef HAVE_PTHREAD_SIGMASK |
|
pf ("#define SCM_HAVE_PTHREAD_SIGMASK 1 /* 0 or 1 */\n"); |
|
#else |
|
pf ("#define SCM_HAVE_PTHREAD_SIGMASK 0 /* 0 or 1 */\n"); |
|
#endif |
|
|
|
#ifdef HAVE_GC_PTHREAD_CANCEL |
|
pf ("#define SCM_HAVE_GC_PTHREAD_CANCEL 1 /* 0 or 1 */\n"); |
|
#else |
|
pf ("#define SCM_HAVE_GC_PTHREAD_CANCEL 0 /* 0 or 1 */\n"); |
|
#endif |
|
|
|
#ifdef HAVE_GC_PTHREAD_EXIT |
|
pf ("#define SCM_HAVE_GC_PTHREAD_EXIT 1 /* 0 or 1 */\n"); |
|
#else |
|
pf ("#define SCM_HAVE_GC_PTHREAD_EXIT 0 /* 0 or 1 */\n"); |
|
#endif |
|
|
|
#ifdef HAVE_GC_PTHREAD_SIGMASK |
|
pf ("#define SCM_HAVE_GC_PTHREAD_SIGMASK 1 /* 0 or 1 */\n"); |
|
#else |
|
pf ("#define SCM_HAVE_GC_PTHREAD_SIGMASK 0 /* 0 or 1 */\n"); |
|
#endif |
|
|
|
pf ("\n\n/*** File system access ***/\n"); |
|
|
|
pf ("/* Define to 1 if `struct dirent64' is available. */\n"); |
|
pf ("#define SCM_HAVE_STRUCT_DIRENT64 %d /* 0 or 1 */\n", |
|
SCM_I_GSC_HAVE_STRUCT_DIRENT64); |
|
|
|
pf ("/* Define to 1 if `readdir64_r ()' is available. */\n"); |
|
#ifdef HAVE_READDIR64_R |
|
pf ("#define SCM_HAVE_READDIR64_R 1 /* 0 or 1 */\n"); |
|
#else |
|
pf ("#define SCM_HAVE_READDIR64_R 0 /* 0 or 1 */\n"); |
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined GUILE_USE_64_CALLS && defined HAVE_STAT64 |
|
pf ("typedef int64_t scm_t_off;\n"); |
|
pf ("#define SCM_T_OFF_MAX INT64_MAX\n"); |
|
pf ("#define SCM_T_OFF_MIN INT64_MIN\n"); |
|
#elif SIZEOF_OFF_T == SIZEOF_INT |
|
pf ("typedef int scm_t_off;\n"); |
|
pf ("#define SCM_T_OFF_MAX INT_MAX\n"); |
|
pf ("#define SCM_T_OFF_MIN INT_MIN\n"); |
|
#else |
|
pf ("typedef long int scm_t_off;\n"); |
|
pf ("#define SCM_T_OFF_MAX LONG_MAX\n"); |
|
pf ("#define SCM_T_OFF_MIN LONG_MIN\n"); |
|
#endif |
|
|
|
pf ("/* Define to 1 if the compiler supports the " |
|
"`__thread' storage class. */\n"); |
|
if (SCM_I_GSC_HAVE_THREAD_STORAGE_CLASS) |
|
pf ("#define SCM_HAVE_THREAD_STORAGE_CLASS\n"); |
|
else |
|
pf ("/* #undef SCM_HAVE_THREAD_STORAGE_CLASS */\n"); |
|
|
|
#ifdef USE_DLL_IMPORT |
|
pf ("\n"); |
|
pf ("/* Define some additional CPP macros on Win32 platforms. */\n"); |
|
pf ("# define __REGEX_IMPORT__ 1\n"); |
|
pf ("# define __CRYPT_IMPORT__ 1\n"); |
|
pf ("# define __READLINE_IMPORT__ 1\n"); |
|
pf ("# define QT_IMPORT 1\n"); |
|
#endif |
|
|
|
pf ("\n"); |
|
pf ("/* Constants from uniconv.h. */\n"); |
|
pf ("#define SCM_ICONVEH_ERROR %d\n", SCM_I_GSC_ICONVEH_ERROR); |
|
pf ("#define SCM_ICONVEH_QUESTION_MARK %d\n", |
|
SCM_I_GSC_ICONVEH_QUESTION_MARK); |
|
pf ("#define SCM_ICONVEH_ESCAPE_SEQUENCE %d\n", |
|
SCM_I_GSC_ICONVEH_ESCAPE_SEQUENCE); |
|
|
|
pf ("\n"); |
|
pf ("/* Define to 1 if there is an auxiliary stack, as in ia64. */\n"); |
|
pf ("#define SCM_HAVE_AUXILIARY_STACK %d\n", SCM_I_GSC_HAVE_AUXILIARY_STACK); |
|
|
|
pf ("\n"); |
|
pf ("/* Define to 1 to use mini GMP. */\n"); |
|
#if SCM_I_GSC_ENABLE_MINI_GMP == 1 |
|
pf ("#define SCM_ENABLE_MINI_GMP 1\n"); |
|
#else |
|
pf ("#define SCM_ENABLE_MINI_GMP 0\n"); |
|
#endif |
|
|
|
printf ("#endif\n"); |
|
|
|
return 0; |
|
} |
|
|