Mercurial > hg > xemacs-beta
view src/config.h.in @ 665:fdefd0186b75
[xemacs-hg @ 2001-09-20 06:28:42 by ben]
The great integral types renaming.
The purpose of this is to rationalize the names used for various
integral types, so that they match their intended uses and follow
consist conventions, and eliminate types that were not semantically
different from each other.
The conventions are:
-- All integral types that measure quantities of anything are
signed. Some people disagree vociferously with this, but their
arguments are mostly theoretical, and are vastly outweighed by
the practical headaches of mixing signed and unsigned values,
and more importantly by the far increased likelihood of
inadvertent bugs: Because of the broken "viral" nature of
unsigned quantities in C (operations involving mixed
signed/unsigned are done unsigned, when exactly the opposite is
nearly always wanted), even a single error in declaring a
quantity unsigned that should be signed, or even the even more
subtle error of comparing signed and unsigned values and
forgetting the necessary cast, can be catastrophic, as
comparisons will yield wrong results. -Wsign-compare is turned
on specifically to catch this, but this tends to result in a
great number of warnings when mixing signed and unsigned, and
the casts are annoying. More has been written on this
elsewhere.
-- All such quantity types just mentioned boil down to EMACS_INT,
which is 32 bits on 32-bit machines and 64 bits on 64-bit
machines. This is guaranteed to be the same size as Lisp
objects of type `int', and (as far as I can tell) of size_t
(unsigned!) and ssize_t. The only type below that is not an
EMACS_INT is Hashcode, which is an unsigned value of the same
size as EMACS_INT.
-- Type names should be relatively short (no more than 10
characters or so), with the first letter capitalized and no
underscores if they can at all be avoided.
-- "count" == a zero-based measurement of some quantity. Includes
sizes, offsets, and indexes.
-- "bpos" == a one-based measurement of a position in a buffer.
"Charbpos" and "Bytebpos" count text in the buffer, rather than
bytes in memory; thus Bytebpos does not directly correspond to
the memory representation. Use "Membpos" for this.
-- "Char" refers to internal-format characters, not to the C type
"char", which is really a byte.
-- For the actual name changes, see the script below.
I ran the following script to do the conversion. (NOTE: This script
is idempotent. You can safely run it multiple times and it will
not screw up previous results -- in fact, it will do nothing if
nothing has changed. Thus, it can be run repeatedly as necessary
to handle patches coming in from old workspaces, or old branches.)
There are two tags, just before and just after the change:
`pre-integral-type-rename' and `post-integral-type-rename'. When
merging code from the main trunk into a branch, the best thing to
do is first merge up to `pre-integral-type-rename', then apply the
script and associated changes, then merge from
`post-integral-type-change' to the present. (Alternatively, just do
the merging in one operation; but you may then have a lot of
conflicts needing to be resolved by hand.)
Script `fixtypes.sh' follows:
----------------------------------- cut ------------------------------------
files="*.[ch] s/*.h m/*.h config.h.in ../configure.in Makefile.in.in ../lib-src/*.[ch] ../lwlib/*.[ch]"
gr Memory_Count Bytecount $files
gr Lstream_Data_Count Bytecount $files
gr Element_Count Elemcount $files
gr Hash_Code Hashcode $files
gr extcount bytecount $files
gr bufpos charbpos $files
gr bytind bytebpos $files
gr memind membpos $files
gr bufbyte intbyte $files
gr Extcount Bytecount $files
gr Bufpos Charbpos $files
gr Bytind Bytebpos $files
gr Memind Membpos $files
gr Bufbyte Intbyte $files
gr EXTCOUNT BYTECOUNT $files
gr BUFPOS CHARBPOS $files
gr BYTIND BYTEBPOS $files
gr MEMIND MEMBPOS $files
gr BUFBYTE INTBYTE $files
gr MEMORY_COUNT BYTECOUNT $files
gr LSTREAM_DATA_COUNT BYTECOUNT $files
gr ELEMENT_COUNT ELEMCOUNT $files
gr HASH_CODE HASHCODE $files
----------------------------------- cut ------------------------------------
`fixtypes.sh' is a Bourne-shell script; it uses 'gr':
----------------------------------- cut ------------------------------------
#!/bin/sh
# Usage is like this:
# gr FROM TO FILES ...
# globally replace FROM with TO in FILES. FROM and TO are regular expressions.
# backup files are stored in the `backup' directory.
from="$1"
to="$2"
shift 2
echo ${1+"$@"} | xargs global-replace "s/$from/$to/g"
----------------------------------- cut ------------------------------------
`gr' in turn uses a Perl script to do its real work,
`global-replace', which follows:
----------------------------------- cut ------------------------------------
: #-*- Perl -*-
### global-modify --- modify the contents of a file by a Perl expression
## Copyright (C) 1999 Martin Buchholz.
## Copyright (C) 2001 Ben Wing.
## Authors: Martin Buchholz <martin@xemacs.org>, Ben Wing <ben@xemacs.org>
## Maintainer: Ben Wing <ben@xemacs.org>
## Current Version: 1.0, May 5, 2001
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, 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 XEmacs; see the file COPYING. If not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
eval 'exec perl -w -S $0 ${1+"$@"}'
if 0;
use strict;
use FileHandle;
use Carp;
use Getopt::Long;
use File::Basename;
(my $myName = $0) =~ s@.*/@@; my $usage="
Usage: $myName [--help] [--backup-dir=DIR] [--line-mode] [--hunk-mode]
PERLEXPR FILE ...
Globally modify a file, either line by line or in one big hunk.
Typical usage is like this:
[with GNU print, GNU xargs: guaranteed to handle spaces, quotes, etc.
in file names]
find . -name '*.[ch]' -print0 | xargs -0 $0 's/\bCONST\b/const/g'\n
[with non-GNU print, xargs]
find . -name '*.[ch]' -print | xargs $0 's/\bCONST\b/const/g'\n
The file is read in, either line by line (with --line-mode specified)
or in one big hunk (with --hunk-mode specified; it's the default), and
the Perl expression is then evalled with \$_ set to the line or hunk of
text, including the terminating newline if there is one. It should
destructively modify the value there, storing the changed result in \$_.
Files in which any modifications are made are backed up to the directory
specified using --backup-dir, or to `backup' by default. To disable this,
use --backup-dir= with no argument.
Hunk mode is the default because it is MUCH MUCH faster than line-by-line.
Use line-by-line only when it matters, e.g. you want to do a replacement
only once per line (the default without the `g' argument). Conversely,
when using hunk mode, *ALWAYS* use `g'; otherwise, you will only make one
replacement in the entire file!
";
my %options = ();
$Getopt::Long::ignorecase = 0;
&GetOptions (
\%options,
'help', 'backup-dir=s', 'line-mode', 'hunk-mode',
);
die $usage if $options{"help"} or @ARGV <= 1;
my $code = shift;
die $usage if grep (-d || ! -w, @ARGV);
sub SafeOpen {
open ((my $fh = new FileHandle), $_[0]);
confess "Can't open $_[0]: $!" if ! defined $fh;
return $fh;
}
sub SafeClose {
close $_[0] or confess "Can't close $_[0]: $!";
}
sub FileContents {
my $fh = SafeOpen ("< $_[0]");
my $olddollarslash = $/;
local $/ = undef;
my $contents = <$fh>;
$/ = $olddollarslash;
return $contents;
}
sub WriteStringToFile {
my $fh = SafeOpen ("> $_[0]");
binmode $fh;
print $fh $_[1] or confess "$_[0]: $!\n";
SafeClose $fh;
}
foreach my $file (@ARGV) {
my $changed_p = 0;
my $new_contents = "";
if ($options{"line-mode"}) {
my $fh = SafeOpen $file;
while (<$fh>) {
my $save_line = $_;
eval $code;
$changed_p = 1 if $save_line ne $_;
$new_contents .= $_;
}
} else {
my $orig_contents = $_ = FileContents $file;
eval $code;
if ($_ ne $orig_contents) {
$changed_p = 1;
$new_contents = $_;
}
}
if ($changed_p) {
my $backdir = $options{"backup-dir"};
$backdir = "backup" if !defined ($backdir);
if ($backdir) {
my ($name, $path, $suffix) = fileparse ($file, "");
my $backfulldir = $path . $backdir;
my $backfile = "$backfulldir/$name";
mkdir $backfulldir, 0755 unless -d $backfulldir;
print "modifying $file (original saved in $backfile)\n";
rename $file, $backfile;
}
WriteStringToFile ($file, $new_contents);
}
}
----------------------------------- cut ------------------------------------
In addition to those programs, I needed to fix up a few other
things, particularly relating to the duplicate definitions of
types, now that some types merged with others. Specifically:
1. in lisp.h, removed duplicate declarations of Bytecount. The
changed code should now look like this: (In each code snippet
below, the first and last lines are the same as the original, as
are all lines outside of those lines. That allows you to locate
the section to be replaced, and replace the stuff in that
section, verifying that there isn't anything new added that
would need to be kept.)
--------------------------------- snip -------------------------------------
/* Counts of bytes or chars */
typedef EMACS_INT Bytecount;
typedef EMACS_INT Charcount;
/* Counts of elements */
typedef EMACS_INT Elemcount;
/* Hash codes */
typedef unsigned long Hashcode;
/* ------------------------ dynamic arrays ------------------- */
--------------------------------- snip -------------------------------------
2. in lstream.h, removed duplicate declaration of Bytecount.
Rewrote the comment about this type. The changed code should
now look like this:
--------------------------------- snip -------------------------------------
#endif
/* The have been some arguments over the what the type should be that
specifies a count of bytes in a data block to be written out or read in,
using Lstream_read(), Lstream_write(), and related functions.
Originally it was long, which worked fine; Martin "corrected" these to
size_t and ssize_t on the grounds that this is theoretically cleaner and
is in keeping with the C standards. Unfortunately, this practice is
horribly error-prone due to design flaws in the way that mixed
signed/unsigned arithmetic happens. In fact, by doing this change,
Martin introduced a subtle but fatal error that caused the operation of
sending large mail messages to the SMTP server under Windows to fail.
By putting all values back to be signed, avoiding any signed/unsigned
mixing, the bug immediately went away. The type then in use was
Lstream_Data_Count, so that it be reverted cleanly if a vote came to
that. Now it is Bytecount.
Some earlier comments about why the type must be signed: This MUST BE
SIGNED, since it also is used in functions that return the number of
bytes actually read to or written from in an operation, and these
functions can return -1 to signal error.
Note that the standard Unix read() and write() functions define the
count going in as a size_t, which is UNSIGNED, and the count going
out as an ssize_t, which is SIGNED. This is a horrible design
flaw. Not only is it highly likely to lead to logic errors when a
-1 gets interpreted as a large positive number, but operations are
bound to fail in all sorts of horrible ways when a number in the
upper-half of the size_t range is passed in -- this number is
unrepresentable as an ssize_t, so code that checks to see how many
bytes are actually written (which is mandatory if you are dealing
with certain types of devices) will get completely screwed up.
--ben
*/
typedef enum lstream_buffering
--------------------------------- snip -------------------------------------
3. in dumper.c, there are four places, all inside of switch()
statements, where XD_BYTECOUNT appears twice as a case tag. In
each case, the two case blocks contain identical code, and you
should *REMOVE THE SECOND* and leave the first.
author | ben |
---|---|
date | Thu, 20 Sep 2001 06:31:11 +0000 |
parents | 4f50f8a33f96 |
children | 76d5a3dd827a |
line wrap: on
line source
/* XEmacs site configuration template file. -*- C -*- Copyright (C) 1986, 1991-1994, 1998, 1999 Free Software Foundation, Inc. This file is part of XEmacs. XEmacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Significantly divergent from FSF. */ /* No code in XEmacs #includes config.h twice, but some of the code intended to work with other packages as well (like gmalloc.c) think they can include it as many times as they like. */ #ifndef _SRC_CONFIG_H_ #define _SRC_CONFIG_H_ /* Use this to add code in a structured way to FSF-maintained source files so as to make it obvious where XEmacs changes are. */ #define XEMACS 1 /* Program name */ #undef EMACS_PROGNAME /* Allow s&m files to differentiate OS versions without having multiple files to maintain. */ #undef OS_RELEASE /* The configuration name. This is used as the install directory name for the lib-src programs. */ #undef EMACS_CONFIGURATION /* The configuration options. This is exported to Lisp. */ #undef EMACS_CONFIG_OPTIONS /* The version info from version.sh. Used in #pragma ident in emacs.c */ #undef EMACS_MAJOR_VERSION #undef EMACS_MINOR_VERSION #undef EMACS_PATCH_LEVEL #undef EMACS_BETA_VERSION #undef EMACS_VERSION #undef XEMACS_CODENAME /* InfoDock versions, not used with XEmacs */ #undef INFODOCK_MAJOR_VERSION #undef INFODOCK_MINOR_VERSION #undef INFODOCK_BUILD_VERSION /* Make functions from IEEE Stds 1003.[123] available. */ #undef _POSIX_C_SOURCE /* Make some functions from Unix98 available. */ #undef _XOPEN_SOURCE /* Make "extensions" from Unix98 available. */ #undef _XOPEN_SOURCE_EXTENDED /* Make all functions available on AIX. See AC_AIX. */ #undef _ALL_SOURCE /* Make all functions available on GNU libc systems. See features.h. */ #undef _GNU_SOURCE /* Make all functions available on Solaris 2 systems. */ #undef __EXTENSIONS__ /* Used to identify the XEmacs version in stack traces. */ #undef STACK_TRACE_EYE_CATCHER /* Allow the configurer to specify if she wants site-lisp. */ #undef INHIBIT_SITE_LISP /* Allow the configurer to specify if she wants site-modules. */ #undef INHIBIT_SITE_MODULES /* This will be removed in 19.15. */ /* Hah! Try 20.3 ... */ /* Hah! Try never ... */ /* If at first you don't succeed, try, try again. */ /* #define LOSING_BYTECODE */ /* Undefine on systems which don't have processes */ #undef HAVE_UNIX_PROCESSES /* Does XEmacs support floating-point numbers? */ #undef LISP_FLOAT_TYPE /* Define GNU_MALLOC if you want to use the GNU memory allocator. */ #undef GNU_MALLOC /* Define if you are using the GNU C Library. -- experimental. */ #undef DOUG_LEA_MALLOC /* Define if you are using libmcheck.a from the GNU C Library. */ #undef HAVE_LIBMCHECK /* Define if you are using dlmalloc from the Linux C library. */ #undef _NO_MALLOC_WARNING_ /* Use the system malloc? */ #undef USE_SYSTEM_MALLOC /* Use a debugging malloc? -- experimental */ #undef USE_DEBUG_MALLOC /* Compile in TTY support? */ #undef HAVE_TTY /* Compile in support for MS windows? */ #undef HAVE_MS_WINDOWS /* special cygwin process handling? */ #undef HAVE_MSG_SELECT /* Compile in support for the X window system? */ #undef HAVE_X_WINDOWS /* Defines for building X applications */ #ifdef HAVE_X_WINDOWS /* The following will be defined if xmkmf thinks they are necessary */ #undef SVR4 #undef SYSV #undef AIXV3 #undef _POSIX_SOURCE #undef _BSD_SOURCE #undef _SVID_SOURCE #undef X_LOCALE #undef NARROWPROTO /* The following should always be defined, no matter what xmkmf thinks. */ #ifndef NeedFunctionPrototypes #define NeedFunctionPrototypes 1 #endif #ifndef FUNCPROTO #define FUNCPROTO 15 #endif #endif /* HAVE_X_WINDOWS */ /* Defines for building Gtk applications */ #undef HAVE_GNOME #undef HAVE_GTK #undef HAVE_GDK_IMLIB_INIT #undef HAVE_GLADE_GLADE_H #undef HAVE_GLADE_H #undef LIBGLADE_XML_TXTDOMAIN /* Define HAVE_WINDOW_SYSTEM if any windowing system is available. */ #if defined (HAVE_GTK) || defined (HAVE_X_WINDOWS) || defined(HAVE_MS_WINDOWS) /* || defined (HAVE_NEXTSTEP) */ #define HAVE_WINDOW_SYSTEM #endif /* Define HAVE_UNIXOID_EVENT_LOOP if we use select() to wait for events. */ #if defined (HAVE_X_WINDOWS) || defined (HAVE_TTY) || defined(HAVE_MSG_SELECT) #define HAVE_UNIXOID_EVENT_LOOP #endif /* XFree86 has a different prototype for this function */ #undef HAVE_XREGISTERIMINSTANTIATECALLBACK #undef XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE #undef THIS_IS_X11R4 #undef THIS_IS_X11R5 #undef THIS_IS_X11R6 #undef HAVE_XCONVERTCASE #undef HAVE_BALLOON_HELP /* Where do we find bitmaps? */ #undef BITMAPDIR /* USER_FULL_NAME returns a string that is the user's full name. It can assume that the variable `pw' points to the password file entry for this user. At some sites, the pw_gecos field contains the user's full name. If neither this nor any other field contains the right thing, use pw_name, giving the user's login name, since that is better than nothing. */ #define USER_FULL_NAME pw->pw_gecos /* Define AMPERSAND_FULL_NAME if you use the convention that & in the full name stands for the login id. */ #undef AMPERSAND_FULL_NAME /* Some things figured out by the configure script, grouped as they are in configure.in. */ #undef HAVE_MCHECK_H #undef HAVE_A_OUT_H #undef HAVE_ELF_H #undef HAVE_CYGWIN_VERSION_H #undef HAVE_FCNTL_H #undef HAVE_INTTYPES_H #undef HAVE_LIBGEN_H #undef HAVE_LOCALE_H #undef HAVE_MACH_MACH_H #undef HAVE_SYS_PARAM_H #undef HAVE_SYS_PSTAT_H #undef HAVE_SYS_TIME_H #undef HAVE_SYS_TIMEB_H #undef HAVE_SYS_UN_H #undef HAVE_ULIMIT_H #undef HAVE_UNISTD_H #undef HAVE_SYS_WAIT_H #undef HAVE_LIBINTL_H #undef HAVE_X11_XLOCALE_H #undef STDC_HEADERS #undef TIME_WITH_SYS_TIME #undef WORDS_BIGENDIAN #undef HAVE_VFORK_H #undef vfork #undef HAVE_LONG_FILE_NAMES /* Use lock files to detect multiple edits of the same file? */ #undef CLASH_DETECTION /* Have shared library support */ #undef HAVE_DLOPEN #undef HAVE_DLERROR #undef HAVE__DLERROR #undef HAVE_SHL_LOAD #undef HAVE_DLD_INIT #undef HAVE_SHLIB #undef HAVE_LIBINTL #undef HAVE_LIBDNET #undef HAVE_LIBRESOLV /* Is `sys_siglist' declared by <signal.h>? */ #undef SYS_SIGLIST_DECLARED /* Is `struct timeval' declared by <sys/time.h>? */ #undef HAVE_TIMEVAL #undef TM_IN_SYS_TIME #undef HAVE_TM_ZONE #undef HAVE_TZNAME /* For `getloadavg' provided by system */ #undef HAVE_GETLOADAVG #undef HAVE_SYS_LOADAVG_H /* For implementing `getloadavg' ourselves */ #undef HAVE_LIBKSTAT #undef HAVE_KSTAT_H /* Is `h_errno' declared by <netdb.h>? */ #undef HAVE_H_ERRNO /* Does `localtime' cache TZ? */ #undef LOCALTIME_CACHE /* Can `gettimeofday' accept two arguments? */ #undef GETTIMEOFDAY_ONE_ARGUMENT #undef HAVE_MMAP #undef HAVE_STRCOLL #undef HAVE_GETPGRP #undef GETPGRP_VOID #undef HAVE_INVERSE_HYPERBOLIC #undef HAVE_CBRT #undef HAVE_CLOSEDIR #undef HAVE_DUP2 #undef HAVE_EACCESS #undef HAVE_FMOD #undef HAVE_FPATHCONF #undef HAVE_FREXP #undef HAVE_FTIME #undef HAVE_GETADDRINFO #undef HAVE_GETHOSTNAME #undef HAVE_GETNAMEINFO #undef HAVE_GETPAGESIZE #undef HAVE_GETTIMEOFDAY #undef HAVE_GETWD #undef HAVE_GETCWD #undef HAVE_LOGB #undef HAVE_LRAND48 #undef HAVE_MATHERR #undef HAVE_MKDIR #undef HAVE_MKTIME #undef HAVE_PERROR #undef HAVE_POLL #undef HAVE_RANDOM #undef HAVE_REALPATH #undef HAVE_RENAME #undef HAVE_RES_INIT #undef HAVE_RINT #undef HAVE_RMDIR #undef HAVE_SELECT #undef HAVE_SETITIMER #undef HAVE_SETPGID #undef HAVE_SETSID #undef HAVE_SIGBLOCK #undef HAVE_SIGHOLD #undef HAVE_SIGPROCMASK #undef HAVE_SIGSETJMP #undef HAVE_SNPRINTF #undef HAVE_STPCPY #undef HAVE_STRERROR #undef HAVE_TZSET #undef HAVE_ULIMIT #undef HAVE_USLEEP #undef HAVE_UTIME #undef HAVE_UTIMES #undef HAVE_WAITPID #undef HAVE_VSNPRINTF /* Many flavors of PTY support */ #undef HAVE_GETPT /* glibc's easy pty allocation function */ #undef HAVE__GETPTY /* SGI's easy pty allocation function */ #undef HAVE_OPENPTY /* BSD's easy pty allocation function */ #undef HAVE_GRANTPT /* Unix98 */ #undef HAVE_UNLOCKPT /* Unix98 */ #undef HAVE_PTSNAME /* Unix98 */ #undef HAVE_KILLPG /* BSD */ #undef HAVE_TCGETPGRP /* Posix 1 */ #undef HAVE_ISASTREAM /* SysV streams */ #undef HAVE_SYS_PTY_H /* AIX */ #undef HAVE_SYS_PTYIO_H /* HP-UX */ #undef HAVE_PTY_H /* Linux, Tru64 */ #undef HAVE_LIBUTIL_H /* BSD openpty */ #undef HAVE_UTIL_H /* NetBSD openpty */ #undef HAVE_STROPTS_H /* SysV streams */ #undef HAVE_STRTIO_H /* SysV streams TIOCSIGNAL */ #undef HAVE_SOCKETS #undef HAVE_SOCKADDR_SUN_LEN #undef HAVE_MULTICAST #undef HAVE_SYSVIPC #undef HAVE_LOCKF #undef HAVE_FLOCK #undef HAVE_FSYNC #undef HAVE_FTRUNCATE #undef HAVE_UMASK #undef SYSV_SYSTEM_DIR #undef NONSYSTEM_DIR_LIBRARY #undef HAVE_TERMIOS #undef HAVE_TERMIO #undef NO_TERMIO #undef SIGNALS_VIA_CHARACTERS #undef NLIST_STRUCT /* Compile in support for SOCKS? */ #undef HAVE_SOCKS /* Compile in support for X pixmaps via the `xpm' library? */ #undef HAVE_XPM #undef FOR_MSW /* Compile in support for "X faces" via the `compface' library? This enables graphical display of X-face headers in mail/news messages */ #undef HAVE_XFACE /* Compile in support for JPEG images */ #undef HAVE_JPEG /* Compile in support for TIFF images */ #undef HAVE_TIFF /* Compile in support for GIF images */ #undef HAVE_GIF /* Compile in support for PNG images */ #undef HAVE_PNG /* Do you have the Xmu library? This should always be the case except on losing HP-UX systems. */ #undef HAVE_XMU /* Compile in support for DBM databases? May require libgdbm or libdbm. */ #undef HAVE_DBM /* Compile in support for Berkeley DB style databases? May require libdb. */ #undef HAVE_BERKELEY_DB /* Full #include file path for Berkeley DB's db.h */ #undef DB_H_FILE /* Do we have either DBM or Berkeley DB database support? */ #undef HAVE_DATABASE /* Do we have LDAP support? */ #undef HAVE_LDAP /* Does the library define ldap_set_option () ? */ #undef HAVE_LDAP_SET_OPTION /* Does the library define ldap_get_lderrno () ? */ #undef HAVE_LDAP_GET_LDERRNO /* Does the library define ldap_result2error () ? */ #undef HAVE_LDAP_RESULT2ERROR /* Does the library define ldap_parse_result () ? */ #undef HAVE_LDAP_PARSE_RESULT /* Do we have PostgreSQL RDBMS support? */ #undef HAVE_POSTGRESQL #undef HAVE_POSTGRESQLV7 #undef LIBPQ_FE_H_FILE /* main PostgreSQL header file */ /* Do you have the Xauth library present? This will add some extra functionality to gnuserv. */ #undef HAVE_XAUTH /* Compile in support for gpm (General Purpose Mouse)? */ #undef HAVE_GPM /* Compile in support for ncurses? */ #undef HAVE_NCURSES /* Full #include file paths for ncurses' curses.h and term.h. */ #undef CURSES_H_FILE #undef TERM_H_FILE /* Define USE_ASSERTIONS if you want the abort() to be changed to assert(). If the assertion fails, assert_failed() will be called. This is recommended for general use because it gives more info about the crash than just the abort() message. Too many people "Can't find the corefile" or have limit-ed core dumps out of existence. */ #undef USE_ASSERTIONS /* Define one or more of the following if you want lots of extra checks (e.g. structure validation) compiled in. These should be turned on during the beta-test cycle. */ /* Check the entire extent structure of a buffer each time an extent change is done, and do other extent-related checks. */ #undef ERROR_CHECK_EXTENTS /* Make sure that all X... macros are dereferencing the correct type, and that all XSET... macros (as much as possible) are setting the correct type of structure. Highly recommended for all development work. */ #undef ERROR_CHECK_TYPECHECK #ifdef ERROR_CHECK_TYPECHECK #define type_checking_assert(assertion) assert (assertion) #else #define type_checking_assert(assertion) #endif /* Make sure valid buffer positions are passed to BUF_* macros. */ #undef ERROR_CHECK_CHARBPOS #ifdef ERROR_CHECK_CHARBPOS #define charbpos_checking_assert(assertion) assert (assertion) #else #define charbpos_checking_assert(assertion) #endif /* Attempt to catch bugs related to garbage collection (e.g. not GCPRO'ing). */ #undef ERROR_CHECK_GC #ifdef ERROR_CHECK_GC #define gc_checking_assert(assertion) assert (assertion) #else #define gc_checking_assert(assertion) #endif /* Attempt to catch freeing of a non-malloc()ed block, heap corruption, etc. */ #undef ERROR_CHECK_MALLOC /* Minor sanity checking of the bytecode interpreter. Useful for debugging the byte compiler. */ #undef ERROR_CHECK_BYTE_CODE /* Minor sanity checking of glyphs, especially subwindows and widgets. */ #undef ERROR_CHECK_GLYPHS /* Define DEBUG_XEMACS if you want extra debugging code compiled in. This is mainly intended for use by developers. */ #undef DEBUG_XEMACS /* Define MEMORY_USAGE_STATS if you want extra code compiled in to determine where XEmacs' memory is going. */ #undef MEMORY_USAGE_STATS /* Define QUANTIFY if using Quantify from Rational Software. This adds some additional calls to control data collection. It is only intended for use by the developers. */ #undef QUANTIFY /* Define PURIFY if using Purify from Rational Software. It is only intended for use by the developers. */ #undef PURIFY #if (defined (QUANTIFY) || defined (PURIFY)) && !defined (XLIB_ILLEGAL_ACCESS) #define XLIB_ILLEGAL_ACCESS 1 #endif /* Define EXTERNAL_WIDGET to compile support for using the editor as a widget within another program. */ #undef EXTERNAL_WIDGET /* There are some special-case defines for gcc and lcc. */ #undef USE_GCC #undef USE_LCC /* Define this if you want level 2 internationalization compliance (localized collation and formatting). Generally this should be defined, unless your system doesn't have the strcoll() and setlocale() library routines. This really should be (NOT! -mrb) defined in the appropriate s/ or m/ file. */ #undef I18N2 /* Define this if you want level 3 internationalization compliance (localized messaging). This will cause a small runtime performance penalty, as the strings are read from the message catalog(s). For this you need the gettext() and dgetext() library routines. WARNING, this code is under construction. */ #undef I18N3 /* Compile in support for CDE (Common Desktop Environment) drag and drop? Requires libDtSvc, which typically must be present at runtime. */ #undef HAVE_CDE /* Compile in support for OffiX Drag and Drop? */ #undef HAVE_OFFIX_DND /* Compile in generic Drag'n'Drop API */ #undef HAVE_DRAGNDROP /* Compile in support for proper handling of WM_COMMAND. */ #undef HAVE_WMCOMMAND /* Define this if you want Mule support (multi-byte character support). There may be some performance penalty, although it should be small if you're working with ASCII files. */ #undef MULE /* Define this if you want file coding support */ #undef FILE_CODING /* Do we want to use X window input methods for use with Mule? (requires X11R5) If so, use raw Xlib or higher level Motif interface? */ #undef HAVE_XIM #undef XIM_XLIB #undef XIM_MOTIF #undef USE_XFONTSET /* Non-XIM input methods for use with Mule. */ #undef HAVE_CANNA #undef HAVE_WNN #undef WNN6 /* Enable special GNU Make features in the Makefiles. */ #undef USE_GNU_MAKE /* Debugging development option: Remove inessential but time consuming actions from happening during build. This saves a lot of time when you're repeatedly compiling-running-crashing. This (1) doesn't garbage-collect after loading each file during dumping, and (2) doesn't automatically rebuild the DOC file. (Remove it by hand to get it rebuilt.) */ #undef QUICK_BUILD /* Defined by AC_C_CONST in configure.in */ #undef const /* Allow the source to use standard types. Include these before the s&m files so that they can use them. */ #undef ssize_t #undef size_t #undef pid_t #undef mode_t #undef off_t #undef uid_t #undef gid_t #undef socklen_t /* If defined, use unions instead of ints. A few systems (DEC Alpha) seem to require this, probably because something with the int definitions isn't right with 64-bit systems. */ #undef USE_UNION_TYPE /* alloca twiddling. Because we might be #including alloca.h here, feature test macros such as _XOPEN_SOURCE must be defined above. */ #undef HAVE_ALLOCA_H #ifndef NOT_C_CODE #ifdef __GNUC__ #define alloca __builtin_alloca #elif defined __DECC #include <alloca.h> #pragma intrinsic(alloca) #elif defined HAVE_ALLOCA_H #include <alloca.h> #elif defined(_AIX) /* AIX requires this before any "real" code in the translation unit. */ #pragma alloca #elif ! defined (alloca) void *alloca (); #endif #endif /* C code */ /* The configuration script may define `opsysfile' to be the name of the s/...h file that describes your operating system. The file name is chosen based on the configuration name. */ #if defined (__cplusplus) && !defined (NOT_C_CODE) extern "C" { #endif #undef config_opsysfile #ifdef config_opsysfile #include config_opsysfile #endif /* The configuration script may define `machfile' to be the name of the m/...h file that describes the machine you are using. The file name is chosen based on the configuration name. */ #undef config_machfile #ifdef config_machfile #include config_machfile #endif #if defined (__cplusplus) && !defined (NOT_C_CODE) } #endif /* s&m files shouldn't be required to define anything, or even to exist. If the s&m files don't define SYSTEM_TYPE, configure will select an appropriate default value. */ #ifndef SYSTEM_TYPE #undef SYSTEM_TYPE #endif #if defined (USE_SYSTEM_MALLOC) && !defined (SYSTEM_MALLOC) #define SYSTEM_MALLOC #endif /* Use the relocating allocator for buffer space? */ #undef REL_ALLOC /* Define the return type of signal handlers if the s/xxx.h file did not already do so. */ #define RETSIGTYPE void /* SIGTYPE is the macro we actually use. */ #ifndef SIGTYPE #define SIGTYPE RETSIGTYPE #define SIGRETURN return #endif /* Define DYNODUMP if it is necessary to properly dump on this system. Currently this is only Solaris 2.x, for x < 6. */ #undef DYNODUMP /* Compile in support for Sun Sparcworks/WorkShop? */ #undef SUNPRO /* Sun SparcStations, SGI machines, and HP9000s700s have built-in support for playing sound files. (On Suns, the sound support is usually found in /usr/demo/SOUND - you may need to install the "SUNWaudmo" package.) */ #undef HAVE_NATIVE_SOUND /* Native sound may be provided via soundcard.h, in various directories */ #undef SOUNDCARD_H_FILE /* Compile in support for NAS (Network Audio System)? NAS_NO_ERROR_JUMP means that the NAS libraries don't include some error handling changes. */ #undef HAVE_NAS_SOUND #undef NAS_NO_ERROR_JUMP /* Compile in support for ESD (Enlightened Sound Daemon)? */ #undef HAVE_ESD_SOUND /* Compile in support for SunPro usage-tracking code? */ #undef USAGE_TRACKING /* Compile in support for Tooltalk? */ #undef TOOLTALK /* tt_c.h might be in "Tt" or "desktop" subdirectories */ #undef TT_C_H_FILE /* Toolkits used by lwlib for various widgets... */ #undef LWLIB_USES_MOTIF #undef LWLIB_USES_ATHENA #undef LWLIB_MENUBARS_LUCID #undef LWLIB_MENUBARS_MOTIF #undef LWLIB_SCROLLBARS_LUCID #undef LWLIB_SCROLLBARS_MOTIF #undef LWLIB_SCROLLBARS_ATHENA #undef LWLIB_SCROLLBARS_ATHENA3D #undef LWLIB_DIALOGS_MOTIF #undef LWLIB_DIALOGS_ATHENA #undef LWLIB_DIALOGS_ATHENA3D #undef LWLIB_TABS_LUCID #undef LWLIB_WIDGETS_MOTIF #undef LWLIB_WIDGETS_ATHENA #undef HAVE_ATHENA_3D /* Other things that can be disabled by configure. */ #undef HAVE_MENUBARS #undef HAVE_SCROLLBARS #undef HAVE_DIALOGS #undef HAVE_TOOLBARS #undef HAVE_WIDGETS #if defined (HAVE_MENUBARS) || defined (HAVE_DIALOGS) #define HAVE_POPUPS #endif /* If you are using SunOS 4.1.1 and X11r5, then you need this patch. There is a stupid bug in the SunOS libc.a: two functions which X11r5 uses, mbstowcs() and wcstombs(), are unusable when programs are statically linked (as XEmacs must be) because the static version of libc.a contains the *dynamic* versions of these functions. These functions don't seem to be called when XEmacs is running, so it's enough to define stubs for them. This appears to be fixed in SunOS 4.1.2. Also, SunOS 4.1.1 contains buggy versions of strcmp and strcpy that sometimes reference memory past the end of the string, which can segv. I don't know whether this has been fixed as of 4.1.2 or 4.1.3. */ #if defined (sparc) && !defined (USG) #define OBJECTS_SYSTEM sunOS-fix.o strcmp.o strcpy.o #endif /* If you turn this flag on, it forces encapsulation in all circumstances; this can be used to make sure things compile OK on various systems. */ #undef DEBUG_ENCAPSULATION /* basic system calls */ #if defined (INTERRUPTIBLE_IO) || defined (DEBUG_ENCAPSULATION) # define ENCAPSULATE_READ # define ENCAPSULATE_WRITE #endif #if defined (INTERRUPTIBLE_OPEN) || defined (MULE) || defined (DEBUG_ENCAPSULATION) # define ENCAPSULATE_OPEN #endif #if defined (INTERRUPTIBLE_CLOSE) || defined (DEBUG_ENCAPSULATION) # define ENCAPSULATE_CLOSE #endif /* stdio calls */ #if defined (INTERRUPTIBLE_IO) || defined (DEBUG_ENCAPSULATION) # define ENCAPSULATE_FREAD # define ENCAPSULATE_FWRITE #endif #if defined (INTERRUPTIBLE_OPEN) || defined (MULE) || defined (DEBUG_ENCAPSULATION) # define ENCAPSULATE_FOPEN #endif #if defined (INTERRUPTIBLE_CLOSE) || defined (DEBUG_ENCAPSULATION) # define ENCAPSULATE_FCLOSE #endif /* directory calls */ #if defined (MULE) || defined (DEBUG_ENCAPSULATION) # define ENCAPSULATE_CHDIR # define ENCAPSULATE_MKDIR # define ENCAPSULATE_OPENDIR # define ENCAPSULATE_CLOSEDIR # define ENCAPSULATE_READDIR # define ENCAPSULATE_RMDIR /* file-information calls */ #ifdef HAVE_EACCESS # define ENCAPSULATE_EACCESS #endif # define ENCAPSULATE_ACCESS # define ENCAPSULATE_LSTAT # define ENCAPSULATE_READLINK # define ENCAPSULATE_STAT /* file-manipulation calls */ # define ENCAPSULATE_CHMOD # define ENCAPSULATE_CREAT # define ENCAPSULATE_LINK # define ENCAPSULATE_RENAME # define ENCAPSULATE_SYMLINK # define ENCAPSULATE_UNLINK # define ENCAPSULATE_EXECVP #endif /* defined (MULE) || defined (DEBUG_ENCAPSULATION) */ #ifdef HAVE_CANNA # define CANNA2 # define CANNA_MULE # define CANNA_PURESIZE 0 #else /* not CANNA */ # define CANNA_PURESIZE 0 #endif /* not CANNA */ #if defined (HAVE_SOCKS) && !defined (DO_NOT_SOCKSIFY) #define accept Raccept #define bind Rbind #define connect Rconnect #define getsockname Rgetsockname #define listen Rlisten #endif /* HAVE_SOCKS && !DO_NOT_SOCKSIFY */ #undef SIZEOF_SHORT #undef SIZEOF_INT #undef SIZEOF_LONG #undef SIZEOF_LONG_LONG #undef SIZEOF_VOID_P #ifndef BITS_PER_CHAR #define BITS_PER_CHAR 8 #endif #define SHORTBITS (SIZEOF_SHORT * BITS_PER_CHAR) #define INTBITS (SIZEOF_INT * BITS_PER_CHAR) #define LONGBITS (SIZEOF_LONG * BITS_PER_CHAR) #define LONG_LONG_BITS (SIZEOF_LONG_LONG * BITS_PER_CHAR) #define VOID_P_BITS (SIZEOF_VOID_P * BITS_PER_CHAR) /* Use `INLINE_HEADER' to define inline functions in .h files. Use `inline static' to define inline functions in .c files. See the Internals manual for examples and more information. */ /* Does the keyword `inline' exist? */ #undef inline #if defined (__cplusplus) || ! defined (__GNUC__) # define INLINE_HEADER inline static #elif defined (DONT_EXTERN_INLINE_HEADER_FUNCTIONS) # define INLINE_HEADER inline #else # define INLINE_HEADER inline extern #endif #ifndef NOT_C_CODE /* Actually means C or C++ */ # if defined (__cplusplus) /* Avoid C++ keywords used as ordinary C identifiers */ # define class c_class # define new c_new # define this c_this # define catch c_catch # define EXTERN_C extern "C" # else /* C code */ # define EXTERN_C extern # endif #endif /* C or C++ */ /* Strictly speaking, only int or unsigned int are valid types in a bitfield. In practice, we would like to use enums as bitfields. The following should just result in warning avoidance: warning: nonportable bit-field type */ #ifdef __GNUC__ #define enum_field(enumeration_type) enum enumeration_type #else #define enum_field(enumeration_type) unsigned int #endif /* We want to avoid saving the signal mask if possible, because that necessitates a system call. */ #ifdef HAVE_SIGSETJMP # define SETJMP(x) sigsetjmp (x, 0) # define LONGJMP(x, y) siglongjmp (x, y) # define JMP_BUF sigjmp_buf #else # define SETJMP(x) setjmp (x) # define LONGJMP(x, y) longjmp (x, y) # define JMP_BUF jmp_buf #endif /* movemail options */ /* Should movemail use POP3 for mail access? */ #undef MAIL_USE_POP /* Should movemail use kerberos for POP authentication? */ #undef KERBEROS /* Should movemail use hesiod for getting POP server host? */ #undef HESIOD /* Determine type of mail locking. */ #undef MAIL_LOCK_LOCKF #undef MAIL_LOCK_FLOCK #undef MAIL_LOCK_DOT #undef MAIL_LOCK_LOCKING #undef MAIL_LOCK_MMDF #undef HAVE_MKSTEMP #undef PREFIX_USER_DEFINED #undef EXEC_PREFIX_USER_DEFINED #undef MODULEDIR_USER_DEFINED #undef SITEMODULEDIR_USER_DEFINED #undef DOCDIR_USER_DEFINED #undef LISPDIR_USER_DEFINED #undef PACKAGE_PATH_USER_DEFINED #undef SITELISPDIR_USER_DEFINED #undef ARCHLIBDIR_USER_DEFINED #undef ETCDIR_USER_DEFINED #undef INFODIR_USER_DEFINED #undef INFOPATH_USER_DEFINED #undef PDUMP #endif /* _SRC_CONFIG_H_ */