diff options
author | Rob Browning <rlb@defaultvalue.org> | 2003-03-25 23:51:57 +0000 |
---|---|---|
committer | Rob Browning <rlb@defaultvalue.org> | 2003-03-25 23:51:57 +0000 |
commit | 92e6989fda6517c717ce6e080ca1d10a28a324db (patch) | |
tree | 27839f4bba2e842c101aca5eb7639c6815721f89 | |
parent | 64c2db807da9e66438e7f7dffc8ba9e5ebf2db87 (diff) | |
download | guile-92e6989fda6517c717ce6e080ca1d10a28a324db.tar.gz |
* __scm.h: move libguile/scmconfig.h include up to the top, so
we're sure to pick up any critical defines like _GNU_SOURCE early.
#include <limits.h> removed in favor of scmconfig.h inclusion when
appropriate. STDC_HEADERS based inclusion of stdlib.h,
sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
scmconfig.h inclusion when appropriate. Various Win32 related
definitions removed in favor of scmconfig.h inclusion when
appropriate.
(HAVE_UINTPTR_T): definition removed (see NEWS).
(SIZEOF_PTRDIFF_T): definition removed (see NEWS).
(HAVE_LONG_LONGS): definition removed (see NEWS).
(HAVE_LONG_LONG): definition removed (see NEWS).
(HAVE_PTRDIFF_T): definition removed (see NEWS).
-rw-r--r-- | libguile/__scm.h | 79 |
1 files changed, 23 insertions, 56 deletions
diff --git a/libguile/__scm.h b/libguile/__scm.h index 0ce844ad5..9d5d87b8d 100644 --- a/libguile/__scm.h +++ b/libguile/__scm.h @@ -46,16 +46,36 @@ -/* "What's the difference between _scm.h and __scm.h?" +/********************************************************************** + This file is Guile's central public header. + + When included by other files, this file should preceed any include + other than __scm.h. + + Under *NO* circumstances should new items be added to the global + namespace (via adding #define, typedef, or similar to this file) with + generic names. This usually means that any new names should be + prefixed by either SCM_ or GUILE_. i.e. do *not* #define HAVE_FOO or + SIZEOF_BAR. See configure.in, gen-scmconfig.h.in, and + gen-scmconfig.c for examples of how to properly handle this issue. + The main documentation is in gen-scmconfig.c. + + "What's the difference between _scm.h and __scm.h?" _scm.h is not installed; it's only visible to the libguile sources - themselves. + themselves, and it includes config.h, the private config header. __scm.h is installed, and is #included by <libguile.h>. If both the client and libguile need some piece of information, and it doesn't fit well into the header file for any particular module, it - should go in __scm.h. */ + should go in __scm.h. __scm.h includes scmconfig.h, the public + config header. + **********************************************************************/ + +/* What did the configure script discover about the outside world? */ +#include "libguile/scmconfig.h" + /* {Compiler hints} * @@ -150,11 +170,6 @@ -/* What did the configure script discover about the outside world? */ -#include "libguile/scmconfig.h" - - - /* {Debugging Options} * * These compile time options determine whether to include code that is only @@ -272,31 +287,6 @@ * - ... add more */ -#if SIZEOF_UINTPTR_T != 0 && defined(UINTPTR_MAX) \ - && defined(INTPTR_MAX) \ - && defined(INTPTR_MIN) -/* Used as SCM if available, so we bundle related attributes to avoid possible - type incon[st][oi]n[ae]nce later. Word in tags.h. */ -#define HAVE_UINTPTR_T 1 -#endif - -#if SIZEOF_PTRDIFF_T != 0 -#define HAVE_PTRDIFF_T 1 -#endif - -#if SIZEOF_LONG_LONG != 0 -#define HAVE_LONG_LONGS 1 -#define HAVE_LONG_LONG 1 -#endif - -#ifndef HAVE_PTRDIFF_T -typedef long ptrdiff_t; -#endif - -#ifdef HAVE_LIMITS_H -# include <limits.h> -#endif - #ifdef CHAR_BIT # define SCM_CHAR_BIT CHAR_BIT #else @@ -317,29 +307,6 @@ typedef long ptrdiff_t; -#ifdef STDC_HEADERS -# include <stdlib.h> -# if HAVE_SYS_TYPES_H -# include <sys/types.h> -# endif -# if HAVE_SYS_STDTYPES_H -# include <sys/stdtypes.h> -# endif -# include <stddef.h> -#endif /* def STDC_HEADERS */ - - - -/* Define some additional CPP macros on Win32 platforms. */ -#if USE_DLL_IMPORT -# define __REGEX_IMPORT__ 1 -# define __CRYPT_IMPORT__ 1 -# define __READLINE_IMPORT__ 1 -# define QT_IMPORT 1 -#endif - - - #include "libguile/tags.h" |