Mercurial > emacs
changeset 112369:47cb827a3b2a
Merge from mainline.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Wed, 19 Jan 2011 13:54:19 -0800 |
parents | 2108d829c749 (current diff) 4cddf15c8d9a (diff) |
children | b7555c0e51fe |
files | lib-src/getopt.c lib-src/getopt1.c lib-src/getopt_.h lib-src/getopt_int.h lib-src/gettext.h src/mktime.c |
diffstat | 198 files changed, 19949 insertions(+), 6644 deletions(-) [+] |
line wrap: on
line diff
--- a/.bzrignore Sun Jan 16 23:45:28 2011 -0800 +++ b/.bzrignore Wed Jan 19 13:54:19 2011 -0800 @@ -20,9 +20,11 @@ core DOC DOC-* +emacs-*/ makefile Makefile Makefile.c +stamp-h1 stamp_BLD subdirs.el TAGS @@ -33,6 +35,13 @@ leim/quail/*.el leim/changed.misc leim/changed.tit +lib/.deps/ +lib/arg-nonnull.h +lib/c++defs.h +lib/getopt.h +lib/time.h +lib/unistd.h +lib/warn-on-use.h lib-src/stamp-* lib-src/b2m lib-src/ctags
--- a/ChangeLog Sun Jan 16 23:45:28 2011 -0800 +++ b/ChangeLog Wed Jan 19 13:54:19 2011 -0800 @@ -1,3 +1,129 @@ +2011-01-18 Paul Eggert <eggert@cs.ucla.edu> + + Minor cleanups for 'bzr status' + * .bzrignore: Add emacs-*/, the output of make-dist, and stamp-h1, + the output of config.guess. + * Makefile.in (top_distclean): Remove stamp-h1 too. + + * configure.in (HAVE_ATTRIBUTE_ALIGNED): Arrange for this to be + defined if the compiler supports GCC-style __attribute__ + ((__aligned__ ...)). IBM AIX and Oracle Solaris Studio support + this syntax. + +2011-01-17 Paul Eggert <eggert@cs.ucla.edu> + + Makefile.in: tidy up the building of lib + * Makefile.in (am--refresh): Mark as .PHONY. + (top_maintainer_clean): Don't remove lib/gnulib.mk m4/gnulib-cache.m4, + as they're not rebuilt unless you do a "make sync-from-gnulib" + and the former is needed for "configure". + (maintainer-clean): Don't recurse into lib, as "make bootstrap-clean" + has already removed lib/Makefile. + + * Makefile.in (GNULIB_MODULES): Change ftoastr to dtoastr. + This avoids building ftoastr and ldtoastr, which aren't needed. See + <http://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00199.html>. + + * .bzrignore: Add .h files that are host-dependent. + Add lib/.deps/, lib/arg-nonnull.h, lib/c++defs.h, lib/getopt.h, + lib/time.h, lib/unistd.h, lib/warn-on-use.h. These are + host-dependent and are built as part of an ordinary 'make', and + should not be checked in. + + * lib/Makefile.in: Regenerate. + * lib/COPYING: New file, a copy of COPYING. + + * configure: Regenerate. + * configure.in (AC_USE_SYSTEM_EXTENSIONS): Remove: gnulib does this. + + Regenerate. + * lib/getopt.c, lib/getopt.in.h, lib/getopt1.c, lib/getopt_int.h: + * lib/gettext.h, lib/unistd.in.h, m4/unistd_h.m4: + New files, copied from gnulib by gnulib-tool. + * aclocal.m4, configure, lib/Makefile.in, m4/getopt.m4: + * m4/gnulib-cache.m4, m4/gnulib-comp.m4, src/config.in: + Regenerate. + + Use gnulib's getopt-gnu module. + * Makefile.in (GNULIB_MODULES): Add getopt-gnu. + (AUTOCONF_INPUTS): Remove getopt.m4; aclocal.m4 is a good-enough + representative of the dependencies. + * configure.in: Do not configure getopt, as gnulib does that now. + * make-dist: Do not worry about lib-src/getopt.h, as gnulib handles + getopt now, in lib. + + Regenerate. + * arg-nonnull.h, c++defs.h, lib/mktime-internal.h, lib/mktime.c: + * lib/stddef.in.h, lib/time.h, lib/time.in.h, lib/time_r.c: + * m4/extensions.m4, m4/include_next.m4, m4/mktime.m4: + * m4/multiarch.m4, m4/stddef_h.m4, m4/time_h.m4, m4/time_r.m4: + * m4/extensions.m4, m4/include_next.m4, m4/mktime.m4, m4/multiarch.m4: + * m4/stddef_h.m4, m4/time_h.m4, m4/time_r.m4, m4/warn-on-use.m4: + * m4/wchar_t.m4, warn-on-use.h: + New files, copied from gnulib by gnulib-tool. + * aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk: + * m4/gnulib-cache.m4, m4/gnulib-comp.m4, src/config.in: + Regenerate. + + Use gnulib's mktime module. + * Makefile.in (GNULIB_MODULES): Add mktime. + * configure.in: Remove code no longer needed, as gnulib now does it. + (AC_CHECK_FUNCS): Remove mktime. + (AC_FUNC_MKTIME, BROKEN_MKTIME): Remove. + (__restrict): Remove, as this now gets in the way of the C99 + support for 'restrict' pulled in by the gnulib mktime module. + Code should now use 'restrict' and not '__restrict". + (mktime): Remove. + * make-dist: Put gnulib-generated files arg-nonnull.h, c++defs.h, + and warn-on-use.h into the distribution. + + Regenerate. + * lib/dtoastr.c, lib/ftoastr.c, lib/ftoastr.h, lib/intprops.h: + * lib/ldtoastr.c, m4/c-strtod.m4: + New files, copied from gnulib by gnulib-tool. + * lib/dummy.c: Remove. + * aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk: + * m4/gnulib-cache.m4, m4/gnulib-comp.m4, src/config.in: + Regenerate. + + Use gnulib's ftoastr module. + * Makefile.in (GNULIB_MODULES): Add ftoastr. Remove dummy. + + Regenerate. + * aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c: + * lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4: + * m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing: + New files, generated automatically, with 'make sync-from-gnulib' + followed by 'make'. + * configure, lisp/dired.el, src/config.in: Regenerate. + + Automate syncing from gnulib. + * INSTALL, README: Document new subdirectory 'lib'. + * Makefile.in (SUBDIR): Add lib. + (SUBDIR_MAKEFILES): Add lib/Makefile. + (lib-src, src, TAGS, tags): Depend on lib. + (gnulib_srcdir, GNULIB_MODULES, GNULIB_TOOL_FLAGS): New macros. + ($(gnulib_srcdir)): New rule. + (sync-from-gnulib): New rule, which is .PHONY. + (lib): New rule, which is like lib-src. + (Makefile): Depend on lib/Makefile.in. + (AUTOCONF_INPUTS): Depend on aclocal.m4. + (ACLOCAL_INPUTS, AUTOMAKE_INPUTS): New macros. + ($(srcdir)/aclocal.m4, $(srcdir)/lib/Makefile.in): New rules. + (am--refresh): New rule, to pacify Automake. + (mostlyclean, clean, distclean, bootstrap-clean, maintainer-clean): + Clean lib, too. + (top_maintainer_clean): New macro, to remove gnulib-tool and Automake + droppings. + (maintainer-clean, extraclean): Use it. + * configure.in: Initialize for automake and gnulib, by invoking + AM_INIT_AUTOMAKE, AM_PROG_CC_C_O, gl_EARLY, and gl_INIT. Output + lib/Makefile, too. Use automake to build gnulib, as gnulib works + more conveniently with automake. + * lib/Makefile.am: New file. + * make-dist: Also put into the distribution aclocal.m4, + compile, depcomp, missing, and the files under lib/. + 2011-01-15 Glenn Morris <rgm@gnu.org> * Makefile.in (epaths-force): No more arch-tag to edit.
--- a/INSTALL Sun Jan 16 23:45:28 2011 -0800 +++ b/INSTALL Wed Jan 19 13:54:19 2011 -0800 @@ -675,12 +675,15 @@ `./src/epaths.h' from the template file `./src/epaths.in', changing the paths to the values specified in `./Makefile'. -2) Go to directory `./lib-src' and run `make'. This creates +2) Go to directory `./lib' and run `make'. This creates include files +and libraries used in later steps. + +3) Go to directory `./lib-src' and run `make'. This creates executables named `etags', `make-docfile', and others. -3) Go to directory `./src' and run `make'. This refers to files in -the `./lisp' and `./lib-src' subdirectories using names `../lisp' and -`../lib-src'. +4) Go to directory `./src' and run `make'. This refers to files in +the `./lisp', `./lib', and `./lib-src' subdirectories using names +`../lisp', `../lib', and `../lib-src'. This creates a file `./src/emacs' which is the runnable Emacs, which has another name that contains a version number.
--- a/Makefile.in Sun Jan 16 23:45:28 2011 -0800 +++ b/Makefile.in Wed Jan 19 13:54:19 2011 -0800 @@ -264,10 +264,10 @@ # Actually, we now include `lisp' as well, since the compiled files # are not included any more in case of bootstrap or in case Emacs was # checked out from a VCS. -SUBDIR = lib-src src lisp +SUBDIR = lib lib-src src lisp # The subdir makefiles created by config.status. -SUBDIR_MAKEFILES = lib-src/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispref/Makefile doc/lispintro/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile leim/Makefile lisp/Makefile test/automated/Makefile +SUBDIR_MAKEFILES = lib/Makefile lib-src/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispref/Makefile doc/lispintro/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile leim/Makefile lisp/Makefile test/automated/Makefile # Subdirectories to install, and where they'll go. # lib-src's makefile knows how to install it, so we don't do that here. @@ -312,6 +312,8 @@ CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ LDFLAGS='${LDFLAGS}' MAKE='${MAKE}') +lib-src src: lib + src: lib-src FRC .RECURSIVE: ${SUBDIR} leim @@ -319,8 +321,32 @@ # We need to build `emacs' in `src' to compile the *.elc files in `lisp'. lisp: src +# Maintainers can put a copy of gnulib into $(gnulib_srcdir). +gnulib_srcdir = ../gnulib +$(gnulib_srcdir): + git clone git://git.savannah.gnu.org/gnulib.git $@ + +# Update modules from gnulib, for maintainers, who should have it in +# $(gnulib_srcdir) (relative to $(srcdir) and should have build tools +# as per $(gnulib_srcdir)/DEPENDENCIES. +GNULIB_MODULES = dtoastr getopt-gnu mktime +GNULIB_TOOL_FLAGS = \ + --import --no-changelog --no-vc-files --makefile-name=gnulib.mk +sync-from-gnulib: $(gnulib_srcdir) + cd $(srcdir) && \ + $(gnulib_srcdir)/gnulib-tool $(GNULIB_TOOL_FLAGS) $(GNULIB_MODULES) + cp $(gnulib_srcdir)/build-aux/texinfo.tex $(srcdir)/doc/misc + cp \ + $(gnulib_srcdir)/build-aux/config.sub \ + $(gnulib_srcdir)/build-aux/config.guess \ + $(gnulib_srcdir)/build-aux/install-sh \ + $(gnulib_srcdir)/build-aux/mkinstalldirs \ + $(gnulib_srcdir)/build-aux/move-if-change \ + $(srcdir) +.PHONY: sync-from-gnulib + # These targets should be "${SUBDIR} without `src'". -lib-src lisp: Makefile FRC +lib lib-src lisp: Makefile FRC cd $@; $(MAKE) all $(MFLAGS) \ CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' @@ -359,6 +385,7 @@ Makefile: config.status $(srcdir)/src/config.in \ $(srcdir)/Makefile.in \ $(srcdir)/src/Makefile.in \ + $(srcdir)/lib/Makefile.in \ $(srcdir)/lib-src/Makefile.in \ $(srcdir)/doc/emacs/Makefile.in \ $(srcdir)/doc/misc/Makefile.in \ @@ -374,11 +401,21 @@ config.status: ${srcdir}/configure ${srcdir}/lisp/version.el ./config.status --recheck -AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/m4/getopt.m4 +AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/aclocal.m4 $(srcdir)/configure: $(AUTOCONF_INPUTS) cd ${srcdir} && autoconf +ACLOCAL_INPUTS = @MAINT@ $(srcdir)/m4/gnulib-comp.m4 +$(srcdir)/aclocal.m4: $(ACLOCAL_INPUTS) + cd $(srcdir) && aclocal -I m4 + +AUTOMAKE_INPUTS = @MAINT@ $(srcdir)/aclocal.m4 $(srcdir)/lib/Makefile.am +$(srcdir)/lib/Makefile.in: $(AUTOMAKE_INPUTS) + cd $(srcdir) && automake --gnu -a -c lib/Makefile +am--refresh: +.PHONY: am--refresh + $(srcdir)/src/config.in: $(srcdir)/src/stamp-h.in @ # Usually, there's no need to rebuild src/config.in just @ # because stamp-h.in has changed (since building stamp-h.in @@ -710,6 +747,7 @@ (cd src; $(MAKE) $(MFLAGS) mostlyclean) (cd oldXMenu; $(MAKE) $(MFLAGS) mostlyclean) (cd lwlib; $(MAKE) $(MFLAGS) mostlyclean) + (cd lib; $(MAKE) $(MFLAGS) mostlyclean) (cd lib-src; $(MAKE) $(MFLAGS) mostlyclean) -(cd doc/emacs && $(MAKE) $(MFLAGS) mostlyclean) -(cd doc/misc && $(MAKE) $(MFLAGS) mostlyclean) @@ -729,6 +767,7 @@ (cd src; $(MAKE) $(MFLAGS) clean) (cd oldXMenu; $(MAKE) $(MFLAGS) clean) (cd lwlib; $(MAKE) $(MFLAGS) clean) + (cd lib; $(MAKE) $(MFLAGS) clean) (cd lib-src; $(MAKE) $(MFLAGS) clean) -(cd doc/emacs && $(MAKE) $(MFLAGS) clean) -(cd doc/misc && $(MAKE) $(MFLAGS) clean) @@ -748,11 +787,12 @@ ### distribution. top_distclean=\ ${top_bootclean}; \ - rm -f config.status Makefile ${SUBDIR_MAKEFILES} + rm -f config.status Makefile stamp-h1 ${SUBDIR_MAKEFILES} distclean: FRC (cd src; $(MAKE) $(MFLAGS) distclean) (cd oldXMenu; $(MAKE) $(MFLAGS) distclean) (cd lwlib; $(MAKE) $(MFLAGS) distclean) + (cd lib; $(MAKE) $(MFLAGS) distclean) (cd lib-src; $(MAKE) $(MFLAGS) distclean) (cd doc/emacs && $(MAKE) $(MFLAGS) distclean) (cd doc/misc && $(MAKE) $(MFLAGS) distclean) @@ -769,6 +809,7 @@ (cd src; $(MAKE) $(MFLAGS) bootstrap-clean) (cd oldXMenu; $(MAKE) $(MFLAGS) maintainer-clean) (cd lwlib; $(MAKE) $(MFLAGS) maintainer-clean) + (cd lib; $(MAKE) $(MFLAGS) maintainer-clean) (cd lib-src; $(MAKE) $(MFLAGS) maintainer-clean) -(cd doc/emacs && $(MAKE) $(MFLAGS) maintainer-clean) -(cd doc/misc && $(MAKE) $(MFLAGS) maintainer-clean) @@ -789,10 +830,14 @@ ### Makefile. More generally, `make maintainer-clean' should not delete ### anything that needs to exist in order to run `configure' and then ### begin to build the program. +top_maintainer_clean=\ + ${top_distclean}; \ + rm -fr autom4te.cache; \ + rm -f aclocal.m4 maintainer-clean: bootstrap-clean FRC (cd src; $(MAKE) $(MFLAGS) maintainer-clean) (cd lisp; $(MAKE) $(MFLAGS) maintainer-clean) - ${top_distclean} + ${top_maintainer_clean} ### This doesn't actually appear in the coding standards, but Karl ### says GCC supports it, and that's where the configuration part of @@ -800,13 +845,13 @@ ### it deletes backup and autosave files too. extraclean: for i in ${SUBDIR} leim; do (cd $$i; $(MAKE) $(MFLAGS) extraclean); done - ${top_distclean} + ${top_maintainer_clean} -rm -f config-tmp-* -rm -f *~ \#* # The src subdir knows how to do the right thing # even when the build directory and source dir are different. -TAGS tags: lib-src src +TAGS tags: lib lib-src src cd src; $(MAKE) tags check:
--- a/README Sun Jan 16 23:45:28 2011 -0800 +++ b/README Wed Jan 19 13:54:19 2011 -0800 @@ -63,6 +63,7 @@ `leim' holds the library of Emacs input methods, Lisp code and auxiliary data files required to type international characters which can't be directly produced by your keyboard. +`lib' holds source code for libraries used by Emacs and its utilities `lib-src' holds the source code for some utility programs for use by or with Emacs, like movemail and etags. `etc' holds miscellaneous architecture-independent data files Emacs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aclocal.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,1001 @@ +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 10 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_PROG_CC_C_O +# -------------- +# Like AC_PROG_CC_C_O, but changed for automake. +AC_DEFUN([AM_PROG_CC_C_O], +[AC_REQUIRE([AC_PROG_CC_C_O])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` +eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o +if test "$am_t" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +dnl Make sure AC_PROG_CC is never called again, or it will override our +dnl setting of CC. +m4_define([AC_PROG_CC], + [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar <conftest.tar]) + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/00gnulib.m4]) +m4_include([m4/c-strtod.m4]) +m4_include([m4/extensions.m4]) +m4_include([m4/getopt.m4]) +m4_include([m4/gnulib-common.m4]) +m4_include([m4/gnulib-comp.m4]) +m4_include([m4/include_next.m4]) +m4_include([m4/mktime.m4]) +m4_include([m4/multiarch.m4]) +m4_include([m4/stddef_h.m4]) +m4_include([m4/time_h.m4]) +m4_include([m4/time_r.m4]) +m4_include([m4/unistd_h.m4]) +m4_include([m4/warn-on-use.m4]) +m4_include([m4/wchar_t.m4])
--- a/admin/ChangeLog Sun Jan 16 23:45:28 2011 -0800 +++ b/admin/ChangeLog Wed Jan 19 13:54:19 2011 -0800 @@ -1,3 +1,24 @@ +2011-01-17 Paul Eggert <eggert@cs.ucla.edu> + + * notes/bzr (Installing changes from gnulib): New section. + Need for this suggested by Stefan Monnier. + +2011-01-17 Stefan Monnier <monnier@iro.umontreal.ca> + + * bzrmerge.el (bzrmerge-apply): Warn the user when the tree might be in + an inconsistent state. + +2011-01-17 Paul Eggert <eggert@cs.ucla.edu> + + Update copyright notes to match recent gnulib-related changes. + * notes/copyright: Add aclocal.m4, m4/*.m4, lib/Makefile.in, + arg-nonnull.h, c++defs.h, compile, depcomp, missing, + warn-on-use.h, lib/*.[ch], lib/gnulib.mk. Remove src/mktime.c, + lib-src/getopt1.c, lib-src/getopt_int.h (files are now in lib and + are subsumed by the lib/*.[ch] rule). Remove m4/getopt.m4 (now + subsumed by m4/*.m4 rule). config.guess, config.sub, and + doc/man/texinfo.tex are now copied in from gnulib. + 2011-01-15 Glenn Morris <rgm@gnu.org> * charsets/cp51932.awk, charsets/eucjp-ms.awk: No longer print arch-tag.
--- a/admin/bzrmerge.el Sun Jan 16 23:45:28 2011 -0800 +++ b/admin/bzrmerge.el Wed Jan 19 13:54:19 2011 -0800 @@ -218,6 +218,7 @@ (setq bzrmerge-already-done nil) (let ((merge (car missing)) (skip (cdr missing)) + (unsafe nil) beg end) (when (or merge skip) (cond @@ -249,6 +250,7 @@ "--force" "-r" (format "%s..%s" beg end) from) ;; The merge did not update the metadata, so force the next time ;; around to update it (as a "skip"). + (setq unsafe t) (push end skip)) (pop-to-buffer (current-buffer)) (sit-for 1) @@ -271,6 +273,15 @@ (when conflicted (setq bzrmerge-already-done (list (cons merge skip) from missing)) + (if unsafe + ;; FIXME: Obviously, we'd rather make it right rather + ;; than output such a warning. But I don't know how to add + ;; the metadata to bzr's since the technique used in + ;; bzrmerge-add-metadata does not work when there + ;; are conflicts. + (display-warning 'bzrmerge "Resolve conflicts manually. +¡BEWARE! Important metadata is kept in this Emacs session! +Do not commit without re-running `M-x bzrmerge' first!")) (error "Resolve conflicts manually"))))) (cons merge skip)))))
--- a/admin/notes/bzr Sun Jan 16 23:45:28 2011 -0800 +++ b/admin/notes/bzr Wed Jan 19 13:54:19 2011 -0800 @@ -39,6 +39,27 @@ http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00086.html +* Installing changes from gnulib +Some of the files in Emacs are copied from gnulib. To synchronize +these files from the version of gnulib that you have checked out into +a sibling directory of your branch, type "make sync-from-gnulib"; this +will check out the latest version of gnulib if there is no sibling +directory already. It is a good idea to run "bzr status" afterwards, +so that if a gnulib module added a file, you can record the new file +using "bzr add". After synchronizing from gnulib, do a "make" in the +usual way. + +To change the set of gnulib modules, change the GNULIB_MODULES +variable in the top-level Makefile.in, and then run: + + ./config.status + make sync-from-gnulib + bzr status + +The last command will mention files that may need to be added using +"bzr add". If you remove a gnulib module, or if a gnulib module +removes a file, then remove the corresponding files by hand. + * How to merge changes from emacs-23 to trunk The following description uses bound branches, presumably it works in @@ -57,18 +78,39 @@ regexp in bzrmerge-missing. If there are more revisions that you know need skipping, you'll have to do that by hand. -5) It will stop if there are any conflicts. Resolve them. +5) It will stop if there are any conflicts. Resolve them. Using smerge-mode, there are menu items to skip to the next conflict, and to take either the trunk, branch, or both copies. -6) After resolving all conflicts, you might need to run the command -again if there are more revisions still to merge. -You can commit either before you do this (eg if you had a lot of -conflicts to resolve and don't want to get confused), or refrain from -committing until bzrmerge has merged all revisions. +6) After resolving all conflicts, you might need to run the bzmerge +command again if there are more revisions still to merge. + +Do not commit (or exit Emacs) until you have run bzrmerge to completion. Before committing, check bzr status and bzr diff output. +If you have run bzrmerge enough times, the "pending merge tip" in bzr +status should be the last revision from the emacs-23 branch, and +bzr status -v should show all the revisions you expect to merge. Note that ChangeLog entries are automatically merged to the top with today's date, but you still might want to check them to see that too -much is not being included. +much is not being included, or whitespace between entries is not missing. + +Notes: + +1) A lot that was in tramp.el in emacs-23 has moved to tramp-sh.el in +the trunk. If you end up with a conflict in tramp.el, the changes may +need to go to tramp-sh.el instead. Remember to update the file name in +the ChangeLog. + +2) If a file is modified in emacs-23, and deleted in the trunk, you +get a "contents conflict". Assuming the changes don't need to be in +the trunk at all, use `bzr resolve path/to/file --take-this' to keep the +trunk version. Prior to bzr 2.2.3, this may fail. You can just +delete the .OTHER etc files by hand and use bzr resolve path/to/file. + +3) Conflicts in autoload md5sums in comments. Strictly speaking, the +right thing to do is merge everything else, resolve the conflict by +choosing either the trunk or branch version, then run `make -C lisp +autoloads' to update the md5sums to the correct trunk value before +committing.
--- a/admin/notes/copyright Sun Jan 16 23:45:28 2011 -0800 +++ b/admin/notes/copyright Wed Jan 19 13:54:19 2011 -0800 @@ -132,10 +132,12 @@ GNUstep/Emacs.base/Resources/Info-gnustep.plist `set-copyright' in admin.el will do all the above. +aclocal.m4 configure +m4/*.m4 - copyright FSF, with unlimited permission to copy, distribute and modify -m4/getopt.m4 +lib/Makefile.in - copyright FSF, with MIT-like license install-sh @@ -224,9 +226,6 @@ --version output just says "Copyright <year> FSF" is apparently OK from a legal point of view. -lib-src/getopt1.c, getopt_int.h - - these are from the GNU C library. Leave the copyrights alone. - lisp/cedet/semantic/imenu.el - See http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00410.html in which Eric Ludlam established that the remaining contributions @@ -620,21 +619,26 @@ alone (may import them from Gnulib again). These are: Gnulib: + arg-nonnull.h + c++defs.h + compile + config.guess + config.sub + depcomp + doc/man/texinfo.tex + missing move-if-change + warn-on-use.h + lib/*.[ch] + lib/gnulib.mk src/getloadavg.c src/gmalloc.c src/md5.c src/md5.h - src/mktime.c src/strftime.c src/termcap.c src/tparam.c - Others: - config.guess - config.sub - doc/man/texinfo.tex - Note _not_ included in the above are src/regex.{c,h} (rms: "That forked version is only in Emacs, so definitely relicense that."), and oldXMenu/insque.c (rms: "We wrote that specifically for Emacs, so
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/arg-nonnull.h Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,26 @@ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2011 Free Software Foundation, Inc. + + 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 3 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/c++defs.h Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,271 @@ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2011 Free Software Foundation, Inc. + + 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 3 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + rettype (*const func) parameters = ::rpl_func; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + rettype (*const func) parameters = \ + reinterpret_cast<rettype(*)parameters>(::rpl_func); \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* If we were to write + rettype (*const func) parameters = ::func; + like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls + better (remove an indirection through a 'static' pointer variable), + but then the _GL_CXXALIASWARN macro below would cause a warning not only + for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */ +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static rettype (*func) parameters = ::func; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static rettype (*func) parameters = \ + reinterpret_cast<rettype(*)parameters>(::func); \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static rettype (*func) parameters = \ + reinterpret_cast<rettype(*)parameters>( \ + (rettype2(*)parameters2)(::func)); \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, + we enable the warning only when not optimizing. */ +# if !__OPTIMIZE__ +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, + we enable the warning only when not optimizing. */ +# if !__OPTIMIZE__ +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,143 @@ +#! /bin/sh +# Wrapper for compilers which do not understand `-c -o'. + +scriptversion=2009-10-06.20; # UTC + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software +# Foundation, Inc. +# Written by Tom Tromey <tromey@cygnus.com>. +# +# 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 this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand `-c -o'. +Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file `INSTALL'. + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; +esac + +ofile= +cfile= +eat= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as `compile cc -o foo foo.c'. + # So we strip `-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no `-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # `.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use `[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End:
--- a/configure Sun Jan 16 23:45:28 2011 -0800 +++ b/configure Wed Jan 19 13:54:19 2011 -0800 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for emacs 24.0.50. +# Generated by GNU Autoconf 2.68 for emacs 24.0.50. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -89,6 +89,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -214,11 +215,18 @@ # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -593,8 +601,16 @@ ac_config_libobj_dir=src ac_header_list= +gl_getopt_required=POSIX +gl_getopt_required=POSIX ac_func_list= -ac_subst_vars='LTLIBOBJS +ac_subst_vars='gltests_LTLIBOBJS +gltests_LIBOBJS +gl_LTLIBOBJS +gl_LIBOBJS +am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS WINDOW_SUPPORT TOOLTIP_SUPPORT MOUSE_SUPPORT @@ -650,8 +666,153 @@ LIBHESIOD TERMCAP_OBJ LIBS_TERMCAP -GETOPTOBJS +LIBGNU_LTLIBDEPS +LIBGNU_LIBDEPS +gltests_WITNESS +HAVE_UNISTD_H +NEXT_AS_FIRST_DIRECTIVE_UNISTD_H +NEXT_UNISTD_H +PTHREAD_H_DEFINES_STRUCT_TIMESPEC +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC +TIME_H_DEFINES_STRUCT_TIMESPEC +NEXT_AS_FIRST_DIRECTIVE_TIME_H +NEXT_TIME_H +NEXT_AS_FIRST_DIRECTIVE_STDDEF_H +NEXT_STDDEF_H +STDDEF_H +HAVE_WCHAR_T +REPLACE_NULL +APPLE_UNIVERSAL_BUILD +REPLACE_TIMEGM +REPLACE_NANOSLEEP +REPLACE_MKTIME +REPLACE_LOCALTIME_R +HAVE_TIMEGM +HAVE_STRPTIME +HAVE_NANOSLEEP +HAVE_DECL_LOCALTIME_R +GNULIB_TIME_R +GNULIB_TIMEGM +GNULIB_STRPTIME +GNULIB_NANOSLEEP +GNULIB_MKTIME +LTLIBINTL +LIBINTL GETOPT_H +HAVE_GETOPT_H +NEXT_AS_FIRST_DIRECTIVE_GETOPT_H +NEXT_GETOPT_H +PRAGMA_COLUMNS +PRAGMA_SYSTEM_HEADER +INCLUDE_NEXT_AS_FIRST_DIRECTIVE +INCLUDE_NEXT +UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS +UNISTD_H_HAVE_WINSOCK2_H +REPLACE_WRITE +REPLACE_USLEEP +REPLACE_UNLINKAT +REPLACE_UNLINK +REPLACE_TTYNAME_R +REPLACE_SYMLINK +REPLACE_SLEEP +REPLACE_RMDIR +REPLACE_READLINK +REPLACE_PWRITE +REPLACE_PREAD +REPLACE_LSEEK +REPLACE_LINKAT +REPLACE_LINK +REPLACE_LCHOWN +REPLACE_GETPAGESIZE +REPLACE_GETGROUPS +REPLACE_GETLOGIN_R +REPLACE_GETDOMAINNAME +REPLACE_GETCWD +REPLACE_FCHOWNAT +REPLACE_DUP2 +REPLACE_DUP +REPLACE_CLOSE +REPLACE_CHOWN +HAVE_SYS_PARAM_H +HAVE_OS_H +HAVE_DECL_TTYNAME_R +HAVE_DECL_GETUSERSHELL +HAVE_DECL_GETPAGESIZE +HAVE_DECL_GETLOGIN_R +HAVE_DECL_GETDOMAINNAME +HAVE_DECL_FCHDIR +HAVE_DECL_ENVIRON +HAVE_USLEEP +HAVE_UNLINKAT +HAVE_SYMLINKAT +HAVE_SYMLINK +HAVE_SLEEP +HAVE_READLINKAT +HAVE_READLINK +HAVE_PWRITE +HAVE_PREAD +HAVE_PIPE2 +HAVE_PIPE +HAVE_LINKAT +HAVE_LINK +HAVE_LCHOWN +HAVE_GETPAGESIZE +HAVE_GETLOGIN +HAVE_GETHOSTNAME +HAVE_GETGROUPS +HAVE_GETDTABLESIZE +HAVE_FTRUNCATE +HAVE_FSYNC +HAVE_FCHOWNAT +HAVE_FCHDIR +HAVE_FACCESSAT +HAVE_EUIDACCESS +HAVE_DUP3 +HAVE_DUP2 +HAVE_CHOWN +GNULIB_WRITE +GNULIB_USLEEP +GNULIB_UNLINKAT +GNULIB_UNLINK +GNULIB_UNISTD_H_SIGPIPE +GNULIB_UNISTD_H_GETOPT +GNULIB_TTYNAME_R +GNULIB_SYMLINKAT +GNULIB_SYMLINK +GNULIB_SLEEP +GNULIB_RMDIR +GNULIB_READLINKAT +GNULIB_READLINK +GNULIB_PWRITE +GNULIB_PREAD +GNULIB_PIPE2 +GNULIB_PIPE +GNULIB_LSEEK +GNULIB_LINKAT +GNULIB_LINK +GNULIB_LCHOWN +GNULIB_GETUSERSHELL +GNULIB_GETPAGESIZE +GNULIB_GETLOGIN_R +GNULIB_GETLOGIN +GNULIB_GETHOSTNAME +GNULIB_GETGROUPS +GNULIB_GETDTABLESIZE +GNULIB_GETDOMAINNAME +GNULIB_GETCWD +GNULIB_FTRUNCATE +GNULIB_FSYNC +GNULIB_FCHOWNAT +GNULIB_FCHDIR +GNULIB_FACCESSAT +GNULIB_EUIDACCESS +GNULIB_ENVIRON +GNULIB_DUP3 +GNULIB_DUP2 +GNULIB_CLOSE +GNULIB_CHOWN +GL_COND_LIBTOOL_FALSE +GL_COND_LIBTOOL_TRUE GETLOADAVG_LIBS KMEM_GROUP NEED_SETGID @@ -708,7 +869,6 @@ XMKMF DEPFLAGS MKDEPDIR -SET_MAKE CFLAGS_SOUND ALSA_LIBS ALSA_CFLAGS @@ -724,17 +884,22 @@ LD_SWITCH_SYSTEM CANNOT_DUMP HAVE_MAKEINFO -MAKEINFO GZIP_PROG INSTALL_INFO -RANLIB -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM C_WARNINGS_SWITCH EGREP GREP CPP +RANLIB +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR OBJEXT EXEEXT ac_ct_CC @@ -753,6 +918,29 @@ PROFILING_CFLAGS MAINT GZIP_INFO +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM target_alias host_alias build_alias @@ -839,6 +1027,7 @@ enable_use_lisp_union_type enable_profiling enable_autodepend +enable_dependency_tracking enable_largefile with_x ' @@ -851,6 +1040,9 @@ LIBS CPPFLAGS CPP +CPPFLAGS +CPP +CPPFLAGS XMKMF' @@ -1256,7 +1448,7 @@ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1499,6 +1691,8 @@ --enable-autodepend automatically generate dependencies to .h-files. Requires GNU Make and Gcc. Enabled if GNU Make and Gcc is found + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors --disable-largefile omit support for large files Optional Packages: @@ -1628,7 +1822,7 @@ if $ac_init_version; then cat <<\_ACEOF emacs configure 24.0.50 -generated by GNU Autoconf 2.67 +generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -1674,57 +1868,11 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. @@ -1757,7 +1905,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1770,10 +1918,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1836,7 +1984,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1845,7 +1993,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -1886,7 +2034,7 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1900,7 +2048,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1918,10 +2066,56 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR @@ -1933,7 +2127,7 @@ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1964,7 +2158,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl @@ -1976,7 +2170,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1993,7 +2187,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_preproc @@ -2006,7 +2200,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if eval "test \"\${$4+set}\"" = set; then : +if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2050,7 +2244,7 @@ eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -2062,7 +2256,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2117,7 +2311,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2130,7 +2324,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2171,7 +2365,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF @@ -2179,7 +2373,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by emacs $as_me 24.0.50, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2461,8 +2655,13 @@ as_fn_append ac_header_list " stdlib.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" +gl_getopt_required=GNU +as_fn_append ac_header_list " getopt.h" +as_fn_append ac_func_list " alarm" +as_fn_append ac_header_list " stddef.h" +as_fn_append ac_header_list " time.h" as_fn_append ac_header_list " sys/time.h" -as_fn_append ac_func_list " alarm" +as_fn_append ac_func_list " localtime_r" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2534,7 +2733,182 @@ ac_config_headers="$ac_config_headers src/config.h:src/config.in" - +am__api_version='1.11' + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -2545,6 +2919,330 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='emacs' + VERSION='24.0.50' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + + lispdir='${datadir}/emacs/${version}/lisp' locallisppath='${datadir}/emacs/${version}/site-lisp:'\ @@ -3116,42 +3814,13 @@ ### Canonicalize the configuration name. -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias @@ -3185,7 +3854,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then @@ -3471,7 +4140,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3511,7 +4180,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3564,7 +4233,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3604,7 +4273,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3663,7 +4332,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3707,7 +4376,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3990,7 +4659,7 @@ ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4041,7 +4710,7 @@ ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4078,7 +4747,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -4156,7 +4825,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -4250,76 +4919,416 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi - -## If not using gcc, and on Solaris, and no CPP specified, see if -## using a Sun compiler, which needs -Xs to prevent whitespace. -if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ - test x"$CPP" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5 -$as_echo_n "checking whether we are using a Sun C compiler... " >&6; } - -if test "${emacs_cv_sunpro_c+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __SUNPRO_C -fail; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_sunpro_c=yes -else - emacs_cv_sunpro_c=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5 -$as_echo "$emacs_cv_sunpro_c" >&6; } - - if test x"$emacs_cv_sunpro_c" = xyes; then - NON_GNU_CPP="$CC -E -Xs" - fi -fi - -#### Some systems specify a CPP to use unless we are using GCC. -#### Now that we know whether we are using GCC, we can decide whether -#### to use that one. -if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +if test "x$CC" != xcc; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 +$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 +$as_echo_n "checking whether cc understands -c and -o together... " >&6; } +fi +set dummy $CC; ac_cc=`$as_echo "$2" | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' +rm -f conftest2.* +if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then - CPP="$NON_GNU_CPP" -fi - -#### Some systems specify a CC to use unless we are using GCC. -#### Now that we know whether we are using GCC, we can decide whether -#### to use that one. -if test "x$NON_GNU_CC" != x && test x$GCC != xyes && - test x$cc_specified != xyes -then - CC="$NON_GNU_CC" -fi - -if test x$GCC = xyes; then - test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" -else - test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" -fi + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.$ac_ext >&5' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' + rm -f conftest2.* + if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f core conftest* + +fi +if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h + +fi + +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o +if test "$am_t" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi + + + +# Initialize gnulib right after verifying that the C compiler works. +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -4333,7 +5342,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -4461,7 +5470,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -4524,7 +5533,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4591,7 +5600,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4719,8 +5728,10 @@ + + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = x""yes; then : +if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= @@ -4739,17 +5750,25 @@ fi + case "$host_os" in + hpux*) + +$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h + + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# define __EXTENSIONS__ 1 - $ac_includes_default +if ${ac_cv_safe_to_define___extensions__+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default int main () { @@ -4780,6 +5799,100 @@ + + + + + + + + # Code from module arg-nonnull: + # Code from module c++defs: + # Code from module dtoastr: + # Code from module extensions: + + # Code from module getopt-gnu: + # Code from module getopt-posix: + # Code from module gettext-h: + # Code from module include_next: + # Code from module intprops: + # Code from module mktime: + # Code from module multiarch: + # Code from module stddef: + # Code from module time: + # Code from module time_r: + # Code from module unistd: + # Code from module warn-on-use: + + +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi + +## If not using gcc, and on Solaris, and no CPP specified, see if +## using a Sun compiler, which needs -Xs to prevent whitespace. +if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ + test x"$CPP" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5 +$as_echo_n "checking whether we are using a Sun C compiler... " >&6; } + if ${emacs_cv_sunpro_c+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __SUNPRO_C +fail; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_sunpro_c=yes +else + emacs_cv_sunpro_c=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5 +$as_echo "$emacs_cv_sunpro_c" >&6; } + + if test x"$emacs_cv_sunpro_c" = xyes; then + NON_GNU_CPP="$CC -E -Xs" + fi +fi + +#### Some systems specify a CPP to use unless we are using GCC. +#### Now that we know whether we are using GCC, we can decide whether +#### to use that one. +if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x +then + CPP="$NON_GNU_CPP" +fi + +#### Some systems specify a CC to use unless we are using GCC. +#### Now that we know whether we are using GCC, we can decide whether +#### to use that one. +if test "x$NON_GNU_CC" != x && test x$GCC != xyes && + test x$cc_specified != xyes +then + CC="$NON_GNU_CC" +fi + +if test x$GCC = xyes; then + test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" +else + test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" +fi + ### Use -Wno-pointer-sign if the compiler supports it { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5 $as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; } @@ -4922,7 +6035,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -5047,98 +6160,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' if test "x$RANLIB" = x; then if test -n "$ac_tool_prefix"; then @@ -5146,7 +6167,7 @@ set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -5186,7 +6207,7 @@ set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -5241,7 +6262,7 @@ ## is running in i386 mode, we can help them out. if test "$machine" = "amdx86-64"; then ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default" -if test "x$ac_cv_have_decl_i386" = x""yes; then : +if test "x$ac_cv_have_decl_i386" = xyes; then : fi @@ -5256,7 +6277,7 @@ set dummy install-info; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : +if ${ac_cv_path_INSTALL_INFO+:} false; then : $as_echo_n "(cached) " >&6 else case $INSTALL_INFO in @@ -5296,7 +6317,7 @@ set dummy install-info; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : +if ${ac_cv_path_INSTALL_INFO+:} false; then : $as_echo_n "(cached) " >&6 else case $INSTALL_INFO in @@ -5336,7 +6357,7 @@ set dummy install-info; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : +if ${ac_cv_path_INSTALL_INFO+:} false; then : $as_echo_n "(cached) " >&6 else case $INSTALL_INFO in @@ -5377,7 +6398,7 @@ set dummy gzip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GZIP_PROG+set}" = set; then : +if ${ac_cv_path_GZIP_PROG+:} false; then : $as_echo_n "(cached) " >&6 else case $GZIP_PROG in @@ -5420,7 +6441,7 @@ set dummy makeinfo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MAKEINFO+set}" = set; then : +if ${ac_cv_path_MAKEINFO+:} false; then : $as_echo_n "(cached) " >&6 else case $MAKEINFO in @@ -5625,7 +6646,7 @@ C_SWITCH_MACHINE= if test "$machine" = "alpha"; then ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default" -if test "x$ac_cv_have_decl___ELF__" = x""yes; then : +if test "x$ac_cv_have_decl___ELF__" = xyes; then : fi @@ -5695,7 +6716,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : +if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no @@ -5746,7 +6767,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -5815,7 +6836,7 @@ if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -5983,7 +7004,7 @@ # Emulation library used on NetBSD. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } -if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then : +if ${ac_cv_lib_ossaudio__oss_ioctl+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -6017,7 +7038,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } -if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then : +if test "x$ac_cv_lib_ossaudio__oss_ioctl" = xyes; then : LIBSOUND=-lossaudio else LIBSOUND= @@ -6034,7 +7055,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -6238,7 +7259,7 @@ for ac_header in term.h do : ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" -if test "x$ac_cv_header_term_h" = x""yes; then : +if test "x$ac_cv_header_term_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TERM_H 1 _ACEOF @@ -6249,7 +7270,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6361,7 +7382,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : +if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6395,7 +7416,7 @@ fi ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" -if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : +if test "x$ac_cv_have_decl_sys_siglist" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -6408,7 +7429,7 @@ if test $ac_cv_have_decl_sys_siglist != yes; then # For Tru64, at least: ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default" -if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then : +if test "x$ac_cv_have_decl___sys_siglist" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -6426,7 +7447,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then : +if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6468,7 +7489,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5 $as_echo_n "checking for struct utimbuf... " >&6; } -if test "${emacs_cv_struct_utimbuf+set}" = set; then : +if ${emacs_cv_struct_utimbuf+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6511,7 +7532,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6545,7 +7566,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 $as_echo_n "checking for speed_t... " >&6; } -if test "${emacs_cv_speed_t+set}" = set; then : +if ${emacs_cv_speed_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6576,7 +7597,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 $as_echo_n "checking for struct timeval... " >&6; } -if test "${emacs_cv_struct_timeval+set}" = set; then : +if ${emacs_cv_struct_timeval+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6617,7 +7638,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5 $as_echo_n "checking for struct exception... " >&6; } -if test "${emacs_cv_struct_exception+set}" = set; then : +if ${emacs_cv_struct_exception+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6650,7 +7671,7 @@ for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_socket_h" = x""yes; then : +if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF @@ -6666,7 +7687,7 @@ #include <sys/socket.h> #endif " -if test "x$ac_cv_header_net_if_h" = x""yes; then : +if test "x$ac_cv_header_net_if_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NET_IF_H 1 _ACEOF @@ -6678,7 +7699,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then : +if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6715,7 +7736,7 @@ #include <$ac_cv_struct_tm> " -if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : +if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -6731,7 +7752,7 @@ else ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> " -if test "x$ac_cv_have_decl_tzname" = x""yes; then : +if test "x$ac_cv_have_decl_tzname" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -6743,7 +7764,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 $as_echo_n "checking for tzname... " >&6; } -if test "${ac_cv_var_tzname+set}" = set; then : +if ${ac_cv_var_tzname+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6780,7 +7801,7 @@ ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> " -if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : +if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h @@ -6794,7 +7815,7 @@ #include <net/if.h> #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_flags" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 @@ -6810,7 +7831,7 @@ #include <net/if.h> #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 @@ -6826,7 +7847,7 @@ #include <net/if.h> #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 @@ -6842,7 +7863,7 @@ #include <net/if.h> #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 @@ -6858,7 +7879,7 @@ #include <net/if.h> #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_addr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_ADDR 1 @@ -6887,7 +7908,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 $as_echo_n "checking for working volatile... " >&6; } -if test "${ac_cv_c_volatile+set}" = set; then : +if ${ac_cv_c_volatile+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6921,7 +7942,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7001,7 +8022,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5 $as_echo_n "checking for void * support... " >&6; } -if test "${emacs_cv_void_star+set}" = set; then : +if ${emacs_cv_void_star+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7034,7 +8055,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown @@ -7257,11 +8278,42 @@ esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5 +$as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; } +if ${emacs_cv_attribute_aligned+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +char __attribute__ ((__aligned__ (1 << 3))) c; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_cv_attribute_aligned=yes +else + emacs_cv_attribute_aligned=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5 +$as_echo "$emacs_cv_attribute_aligned" >&6; } +if test $emacs_cv_attribute_aligned = yes; then + +$as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -7349,7 +8401,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 $as_echo_n "checking for long file names... " >&6; } -if test "${ac_cv_sys_long_file_names+set}" = set; then : +if ${ac_cv_sys_long_file_names+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_long_file_names=yes @@ -7406,7 +8458,7 @@ else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : + *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. @@ -7689,7 +8741,7 @@ TEMACS_LDFLAGS2= fi ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" -if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : +if test "x$ac_cv_header_AppKit_AppKit_h" = xyes; then : HAVE_NS=yes else as_fn_error $? "\`--with-ns' was specified, but the include @@ -7771,7 +8823,7 @@ set dummy X; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then : +if ${ac_cv_prog_HAVE_XSERVER+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$HAVE_XSERVER"; then @@ -7830,14 +8882,14 @@ GNU_MALLOC=yes doug_lea_malloc=yes ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state" -if test "x$ac_cv_func_malloc_get_state" = x""yes; then : +if test "x$ac_cv_func_malloc_get_state" = xyes; then : else doug_lea_malloc=no fi ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state" -if test "x$ac_cv_func_malloc_set_state" = x""yes; then : +if test "x$ac_cv_func_malloc_set_state" = xyes; then : else doug_lea_malloc=no @@ -7845,7 +8897,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5 $as_echo_n "checking whether __after_morecore_hook exists... " >&6; } -if test "${emacs_cv_var___after_morecore_hook+set}" = set; then : +if ${emacs_cv_var___after_morecore_hook+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7950,7 +9002,7 @@ for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = x""yes; then : +if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF @@ -7960,7 +9012,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : +if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -8135,7 +9187,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : +if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -8169,7 +9221,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : +if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNET 1 _ACEOF @@ -8181,7 +9233,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 $as_echo_n "checking for main in -lXbsd... " >&6; } -if test "${ac_cv_lib_Xbsd_main+set}" = set; then : +if ${ac_cv_lib_Xbsd_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -8209,14 +9261,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 $as_echo "$ac_cv_lib_Xbsd_main" >&6; } -if test "x$ac_cv_lib_Xbsd_main" = x""yes; then : +if test "x$ac_cv_lib_Xbsd_main" = xyes; then : LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 $as_echo_n "checking for cma_open in -lpthreads... " >&6; } -if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then : +if ${ac_cv_lib_pthreads_cma_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -8250,7 +9302,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } -if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then : +if test "x$ac_cv_lib_pthreads_cma_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREADS 1 _ACEOF @@ -8277,7 +9329,7 @@ aix*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 $as_echo_n "checking for -bbigtoc option... " >&6; } -if test "${gdb_cv_bigtoc+set}" = set; then : +if ${gdb_cv_bigtoc+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8451,7 +9503,7 @@ if test "${window_system}" = "x11"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 $as_echo_n "checking X11 version 6... " >&6; } - if test "${emacs_cv_x11_version_6+set}" = set; then : + if ${emacs_cv_x11_version_6+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8516,7 +9568,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -8627,7 +9679,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -8726,7 +9778,7 @@ for ac_func in MagickExportImagePixels do : ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels" -if test "x$ac_cv_func_MagickExportImagePixels" = x""yes; then : +if test "x$ac_cv_func_MagickExportImagePixels" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MAGICKEXPORTIMAGEPIXELS 1 _ACEOF @@ -8752,7 +9804,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -8858,7 +9910,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -8963,7 +10015,7 @@ for ac_func in gtk_main do : ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" -if test "x$ac_cv_func_gtk_main" = x""yes; then : +if test "x$ac_cv_func_gtk_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GTK_MAIN 1 _ACEOF @@ -9011,7 +10063,7 @@ ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default #include <gtk/gtk.h> " -if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then : +if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = xyes; then : HAVE_GTK_FILE_SELECTION=yes else HAVE_GTK_FILE_SELECTION=no @@ -9021,7 +10073,7 @@ for ac_func in gtk_file_selection_new do : ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" -if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then : +if test "x$ac_cv_func_gtk_file_selection_new" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GTK_FILE_SELECTION_NEW 1 _ACEOF @@ -9035,7 +10087,7 @@ for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = x""yes; then : +if test "x$ac_cv_header_pthread_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF @@ -9047,7 +10099,7 @@ if test "$ac_cv_header_pthread_h"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 $as_echo_n "checking for pthread_self in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then : +if ${ac_cv_lib_pthread_pthread_self+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9081,7 +10133,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 $as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } -if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then : +if test "x$ac_cv_lib_pthread_pthread_self" = xyes; then : HAVE_GTK_AND_PTHREAD=yes fi @@ -9124,7 +10176,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -9219,7 +10271,7 @@ for ac_func in dbus_watch_get_unix_fd do : ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd" -if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then : +if test "x$ac_cv_func_dbus_watch_get_unix_fd" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DBUS_WATCH_GET_UNIX_FD 1 _ACEOF @@ -9241,7 +10293,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -9335,7 +10387,7 @@ for ac_func in g_type_init do : ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" -if test "x$ac_cv_func_g_type_init" = x""yes; then : +if test "x$ac_cv_func_g_type_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_G_TYPE_INIT 1 _ACEOF @@ -9351,7 +10403,7 @@ if test "${with_selinux}" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } -if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then : +if ${ac_cv_lib_selinux_lgetfilecon+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9385,7 +10437,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } -if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then : +if test "x$ac_cv_lib_selinux_lgetfilecon" = xyes; then : HAVE_LIBSELINUX=yes else HAVE_LIBSELINUX=no @@ -9409,7 +10461,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -9511,7 +10563,7 @@ if test "$with_xaw3d" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 $as_echo_n "checking for xaw3d... " >&6; } - if test "${emacs_cv_xaw3d+set}" = set; then : + if ${emacs_cv_xaw3d+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9553,7 +10605,7 @@ $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 $as_echo_n "checking for libXaw... " >&6; } - if test "${emacs_cv_xaw+set}" = set; then : + if ${emacs_cv_xaw+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9599,7 +10651,7 @@ if test "${USE_X_TOOLKIT}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 $as_echo_n "checking X11 toolkit version... " >&6; } - if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then : + if ${emacs_cv_x11_toolkit_version_6+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9650,7 +10702,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } -if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then : +if ${ac_cv_lib_Xmu_XmuConvertStandardSelection+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9684,7 +10736,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } -if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then : +if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXMU 1 _ACEOF @@ -9711,7 +10763,7 @@ if test "${USE_X_TOOLKIT}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } -if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then : +if ${ac_cv_lib_Xext_XShapeQueryExtension+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9745,7 +10797,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } -if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then : +if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXEXT 1 _ACEOF @@ -9761,7 +10813,7 @@ if test "${USE_X_TOOLKIT}" = "MOTIF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5 $as_echo_n "checking for Motif version 2.1... " >&6; } -if test "${emacs_cv_motif_version_2_1+set}" = set; then : +if ${emacs_cv_motif_version_2_1+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9791,7 +10843,7 @@ if test $emacs_cv_motif_version_2_1 = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 $as_echo_n "checking for XpCreateContext in -lXp... " >&6; } -if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then : +if ${ac_cv_lib_Xp_XpCreateContext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9825,14 +10877,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } -if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then : +if test "x$ac_cv_lib_Xp_XpCreateContext" = xyes; then : LIBXP=-lXp fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 $as_echo_n "checking for LessTif where some systems put it... " >&6; } -if test "${emacs_cv_lesstif+set}" = set; then : +if ${emacs_cv_lesstif+:} false; then : $as_echo_n "(cached) " >&6 else # We put this in CFLAGS temporarily to precede other -I options @@ -9991,7 +11043,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10093,7 +11145,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10185,7 +11237,7 @@ HAVE_XRENDER=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } -if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then : +if ${ac_cv_lib_Xrender_XRenderQueryExtension+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10219,7 +11271,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } -if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then : +if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = xyes; then : HAVE_XRENDER=yes fi @@ -10232,10 +11284,10 @@ XFT_LIBS="-lXrender $XFT_LIBS" LIBS="$XFT_LIBS $LIBS" ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then : +if test "x$ac_cv_header_X11_Xft_Xft_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 $as_echo_n "checking for XftFontOpen in -lXft... " >&6; } -if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then : +if ${ac_cv_lib_Xft_XftFontOpen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10269,7 +11321,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } -if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then : +if test "x$ac_cv_lib_Xft_XftFontOpen" = xyes; then : HAVE_XFT=yes fi @@ -10318,7 +11370,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10411,7 +11463,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } -if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then : +if ${ac_cv_lib_otf_OTF_get_variation_glyphs+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10445,7 +11497,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } -if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then : +if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = xyes; then : HAVE_OTF_GET_VARIATION_GLYPHS=yes else HAVE_OTF_GET_VARIATION_GLYPHS=no @@ -10470,7 +11522,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10588,10 +11640,10 @@ if test "${HAVE_X11}" = "yes"; then if test "${with_xpm}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : +if test "x$ac_cv_header_X11_xpm_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } -if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then : +if ${ac_cv_lib_Xpm_XpmReadFileToPixmap+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10625,7 +11677,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } -if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then : +if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = xyes; then : HAVE_XPM=yes fi @@ -10677,10 +11729,10 @@ if test "${HAVE_X11}" = "yes"; then if test "${with_jpeg}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" -if test "x$ac_cv_header_jerror_h" = x""yes; then : +if test "x$ac_cv_header_jerror_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } -if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then : +if ${ac_cv_lib_jpeg_jpeg_destroy_compress+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10714,7 +11766,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } -if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then : +if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = xyes; then : HAVE_JPEG=yes fi @@ -10773,7 +11825,7 @@ if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 $as_echo_n "checking for png_get_channels in -lpng... " >&6; } -if test "${ac_cv_lib_png_png_get_channels+set}" = set; then : +if ${ac_cv_lib_png_png_get_channels+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10807,7 +11859,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 $as_echo "$ac_cv_lib_png_png_get_channels" >&6; } -if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then : +if test "x$ac_cv_lib_png_png_get_channels" = xyes; then : HAVE_PNG=yes fi @@ -10829,13 +11881,13 @@ if test "${HAVE_X11}" = "yes"; then if test "${with_tiff}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" -if test "x$ac_cv_header_tiffio_h" = x""yes; then : +if test "x$ac_cv_header_tiffio_h" = xyes; then : tifflibs="-lz -lm" # At least one tiff package requires the jpeg library. if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } -if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then : +if ${ac_cv_lib_tiff_TIFFGetVersion+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10869,7 +11921,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } -if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then : +if test "x$ac_cv_lib_tiff_TIFFGetVersion" = xyes; then : HAVE_TIFF=yes fi @@ -10892,12 +11944,12 @@ LIBGIF= if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" -if test "x$ac_cv_header_gif_lib_h" = x""yes; then : +if test "x$ac_cv_header_gif_lib_h" = xyes; then : # EGifPutExtensionLast only exists from version libungif-4.1.0b1. # Earlier versions can crash Emacs. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } -if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then : +if ${ac_cv_lib_gif_EGifPutExtensionLast+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10931,7 +11983,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } -if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then : +if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = xyes; then : HAVE_GIF=yes else HAVE_GIF=maybe @@ -10947,7 +11999,7 @@ # If gif_lib.h but no libgif, try libungif. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } -if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then : +if ${ac_cv_lib_ungif_EGifPutExtensionLast+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10981,7 +12033,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } -if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then : +if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = xyes; then : HAVE_GIF=yes else HAVE_GIF=no @@ -11028,10 +12080,10 @@ MOUSE_SUPPORT= if test "${with_gpm}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" -if test "x$ac_cv_header_gpm_h" = x""yes; then : +if test "x$ac_cv_header_gpm_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } -if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then : +if ${ac_cv_lib_gpm_Gpm_Open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11065,7 +12117,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } -if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then : +if test "x$ac_cv_lib_gpm_Gpm_Open" = xyes; then : HAVE_GPM=yes fi @@ -11085,7 +12137,7 @@ ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then : +if test "x$ac_cv_header_malloc_malloc_h" = xyes; then : $as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h @@ -11130,10 +12182,10 @@ LIBXSM= if test "${HAVE_X11}" = "yes"; then ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then : +if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } -if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then : +if ${ac_cv_lib_SM_SmcOpenConnection+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11167,7 +12219,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } -if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then : +if test "x$ac_cv_lib_SM_SmcOpenConnection" = xyes; then : HAVE_X_SM=yes fi @@ -11198,7 +12250,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -11289,7 +12341,7 @@ LIBS="$LIBXML2_LIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5 $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; } -if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then : +if ${ac_cv_lib_xml2_htmlReadMemory+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11323,7 +12375,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } -if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then : +if test "x$ac_cv_lib_xml2_htmlReadMemory" = xyes; then : HAVE_LIBXML2=yes else HAVE_LIBXML2=no @@ -11345,7 +12397,7 @@ # If netdb.h doesn't declare h_errno, we must declare it by hand. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 $as_echo_n "checking whether netdb declares h_errno... " >&6; } -if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then : +if ${emacs_cv_netdb_declares_h_errno+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11375,11 +12427,22 @@ fi +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then : +if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11412,7 +12475,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : +if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11431,7 +12494,7 @@ #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); +void *alloca (size_t); # endif # endif # endif @@ -11475,7 +12538,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : +if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11516,7 +12579,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : +if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11573,7 +12636,7 @@ # On HPUX 9.01, -lm does not contain logb, so check for sqrt. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 $as_echo_n "checking for sqrt in -lm... " >&6; } -if test "${ac_cv_lib_m_sqrt+set}" = set; then : +if ${ac_cv_lib_m_sqrt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11607,7 +12670,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 $as_echo "$ac_cv_lib_m_sqrt" >&6; } -if test "x$ac_cv_lib_m_sqrt" = x""yes; then : +if test "x$ac_cv_lib_m_sqrt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -11621,7 +12684,7 @@ # have the same check as for liblockfile below. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 $as_echo_n "checking for maillock in -lmail... " >&6; } -if test "${ac_cv_lib_mail_maillock+set}" = set; then : +if ${ac_cv_lib_mail_maillock+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11655,7 +12718,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 $as_echo "$ac_cv_lib_mail_maillock" >&6; } -if test "x$ac_cv_lib_mail_maillock" = x""yes; then : +if test "x$ac_cv_lib_mail_maillock" = xyes; then : have_mail=yes else have_mail=no @@ -11672,7 +12735,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 $as_echo_n "checking for maillock in -llockfile... " >&6; } -if test "${ac_cv_lib_lockfile_maillock+set}" = set; then : +if ${ac_cv_lib_lockfile_maillock+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11706,7 +12769,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 $as_echo "$ac_cv_lib_lockfile_maillock" >&6; } -if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then : +if test "x$ac_cv_lib_lockfile_maillock" = xyes; then : have_lockfile=yes else have_lockfile=no @@ -11726,7 +12789,7 @@ set dummy liblockfile.so; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_liblockfile+set}" = set; then : +if ${ac_cv_prog_liblockfile+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$liblockfile"; then @@ -11770,7 +12833,7 @@ for ac_func in touchlock do : ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock" -if test "x$ac_cv_func_touchlock" = x""yes; then : +if test "x$ac_cv_func_touchlock" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TOUCHLOCK 1 _ACEOF @@ -11781,7 +12844,7 @@ for ac_header in maillock.h do : ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default" -if test "x$ac_cv_header_maillock_h" = x""yes; then : +if test "x$ac_cv_header_maillock_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MAILLOCK_H 1 _ACEOF @@ -11841,7 +12904,7 @@ for ac_func in gethostname getdomainname dup2 \ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ random lrand48 logb frexp fmod rint cbrt ftime setsid \ -strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ +strerror fpathconf select euidaccess getpagesize tzset setlocale \ utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ sendto recvfrom getsockopt setsockopt getsockname getpeername \ @@ -11862,7 +12925,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5 $as_echo_n "checking for __builtin_unwind_init... " >&6; } -if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then : +if ${emacs_cv_func___builtin_unwind_init+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11895,7 +12958,7 @@ for ac_header in sys/un.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_un_h" = x""yes; then : +if test "x$ac_cv_header_sys_un_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_UN_H 1 _ACEOF @@ -11905,256 +12968,6 @@ done - - - - - - for ac_func in $ac_func_list -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 -$as_echo_n "checking for working mktime... " >&6; } -if test "${ac_cv_func_working_mktime+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_working_mktime=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Test program from Paul Eggert and Tony Leneis. */ -#ifdef TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# ifdef HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -#endif - -#include <limits.h> -#include <stdlib.h> - -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif - -#ifndef HAVE_ALARM -# define alarm(X) /* empty */ -#endif - -/* Work around redefinition to rpl_putenv by other config tests. */ -#undef putenv - -static time_t time_t_max; -static time_t time_t_min; - -/* Values we'll use to set the TZ environment variable. */ -static const char *tz_strings[] = { - (const char *) 0, "TZ=GMT0", "TZ=JST-9", - "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" -}; -#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) - -/* Return 0 if mktime fails to convert a date in the spring-forward gap. - Based on a problem report from Andreas Jaeger. */ -static int -spring_forward_gap () -{ - /* glibc (up to about 1998-10-07) failed this test. */ - struct tm tm; - - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); - - tm.tm_year = 98; - tm.tm_mon = 3; - tm.tm_mday = 5; - tm.tm_hour = 2; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - return mktime (&tm) != (time_t) -1; -} - -static int -mktime_test1 (time_t now) -{ - struct tm *lt; - return ! (lt = localtime (&now)) || mktime (lt) == now; -} - -static int -mktime_test (time_t now) -{ - return (mktime_test1 (now) - && mktime_test1 ((time_t) (time_t_max - now)) - && mktime_test1 ((time_t) (time_t_min + now))); -} - -static int -irix_6_4_bug () -{ - /* Based on code from Ariel Faigon. */ - struct tm tm; - tm.tm_year = 96; - tm.tm_mon = 3; - tm.tm_mday = 0; - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - mktime (&tm); - return tm.tm_mon == 2 && tm.tm_mday == 31; -} - -static int -bigtime_test (int j) -{ - struct tm tm; - time_t now; - tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; - now = mktime (&tm); - if (now != (time_t) -1) - { - struct tm *lt = localtime (&now); - if (! (lt - && lt->tm_year == tm.tm_year - && lt->tm_mon == tm.tm_mon - && lt->tm_mday == tm.tm_mday - && lt->tm_hour == tm.tm_hour - && lt->tm_min == tm.tm_min - && lt->tm_sec == tm.tm_sec - && lt->tm_yday == tm.tm_yday - && lt->tm_wday == tm.tm_wday - && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) - == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) - return 0; - } - return 1; -} - -static int -year_2050_test () -{ - /* The correct answer for 2050-02-01 00:00:00 in Pacific time, - ignoring leap seconds. */ - unsigned long int answer = 2527315200UL; - - struct tm tm; - time_t t; - tm.tm_year = 2050 - 1900; - tm.tm_mon = 2 - 1; - tm.tm_mday = 1; - tm.tm_hour = tm.tm_min = tm.tm_sec = 0; - tm.tm_isdst = -1; - - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); - - t = mktime (&tm); - - /* Check that the result is either a failure, or close enough - to the correct answer that we can assume the discrepancy is - due to leap seconds. */ - return (t == (time_t) -1 - || (0 < t && answer - 120 <= t && t <= answer + 120)); -} - -int -main () -{ - time_t t, delta; - int i, j; - - /* This test makes some buggy mktime implementations loop. - Give up after 60 seconds; a mktime slower than that - isn't worth using anyway. */ - alarm (60); - - for (;;) - { - t = (time_t_max << 1) + 1; - if (t <= time_t_max) - break; - time_t_max = t; - } - time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; - - delta = time_t_max / 997; /* a suitable prime number */ - for (i = 0; i < N_STRINGS; i++) - { - if (tz_strings[i]) - putenv ((char*) tz_strings[i]); - - for (t = 0; t <= time_t_max - delta; t += delta) - if (! mktime_test (t)) - return 1; - if (! (mktime_test ((time_t) 1) - && mktime_test ((time_t) (60 * 60)) - && mktime_test ((time_t) (60 * 60 * 24)))) - return 1; - - for (j = 1; ; j <<= 1) - if (! bigtime_test (j)) - return 1; - else if (INT_MAX / 2 < j) - break; - if (! bigtime_test (INT_MAX)) - return 1; - } - return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_working_mktime=yes -else - ac_cv_func_working_mktime=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 -$as_echo "$ac_cv_func_working_mktime" >&6; } -if test $ac_cv_func_working_mktime = no; then - case " $LIBOBJS " in - *" mktime.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mktime.$ac_objext" - ;; -esac - -fi - -if test "$ac_cv_func_working_mktime" = no; then - -$as_echo "#define BROKEN_MKTIME 1" >>confdefs.h - -fi - ac_have_func=no # yes means we've found a way to get the load average. # Make sure getloadavg.c is where it belongs, at configure-time. @@ -12165,7 +12978,7 @@ # Check for getloadavg, but be sure not to touch the cache variable. (ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" -if test "x$ac_cv_func_getloadavg" = x""yes; then : +if test "x$ac_cv_func_getloadavg" = xyes; then : exit 0 else exit 1 @@ -12176,7 +12989,7 @@ for ac_func in pstat_getdynamic do : ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" -if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then : +if test "x$ac_cv_func_pstat_getdynamic" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PSTAT_GETDYNAMIC 1 _ACEOF @@ -12188,7 +13001,7 @@ # Solaris has libkstat which does not require root. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 $as_echo_n "checking for kstat_open in -lkstat... " >&6; } -if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then : +if ${ac_cv_lib_kstat_kstat_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12222,7 +13035,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } -if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then : +if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBKSTAT 1 _ACEOF @@ -12240,7 +13053,7 @@ if test $ac_have_func = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 $as_echo_n "checking for elf_begin in -lelf... " >&6; } -if test "${ac_cv_lib_elf_elf_begin+set}" = set; then : +if ${ac_cv_lib_elf_elf_begin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12274,7 +13087,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 $as_echo "$ac_cv_lib_elf_elf_begin" >&6; } -if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then : +if test "x$ac_cv_lib_elf_elf_begin" = xyes; then : LIBS="-lelf $LIBS" fi @@ -12282,7 +13095,7 @@ if test $ac_have_func = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 $as_echo_n "checking for kvm_open in -lkvm... " >&6; } -if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then : +if ${ac_cv_lib_kvm_kvm_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12316,14 +13129,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } -if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then : +if test "x$ac_cv_lib_kvm_kvm_open" = xyes; then : LIBS="-lkvm $LIBS" fi # Check for the 4.4BSD definition of getloadavg. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 $as_echo_n "checking for getloadavg in -lutil... " >&6; } -if test "${ac_cv_lib_util_getloadavg+set}" = set; then : +if ${ac_cv_lib_util_getloadavg+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12357,7 +13170,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 $as_echo "$ac_cv_lib_util_getloadavg" >&6; } -if test "x$ac_cv_lib_util_getloadavg" = x""yes; then : +if test "x$ac_cv_lib_util_getloadavg" = xyes; then : LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes fi @@ -12370,7 +13183,7 @@ LIBS="-L/usr/local/lib $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } -if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then : +if ${ac_cv_lib_getloadavg_getloadavg+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12404,7 +13217,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } -if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then : +if test "x$ac_cv_lib_getloadavg_getloadavg" = xyes; then : LIBS="-lgetloadavg $LIBS" else LIBS=$ac_getloadavg_LIBS @@ -12417,7 +13230,7 @@ for ac_func in getloadavg do : ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" -if test "x$ac_cv_func_getloadavg" = x""yes; then : +if test "x$ac_cv_func_getloadavg" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETLOADAVG 1 _ACEOF @@ -12435,14 +13248,14 @@ # Figure out what our getloadavg.c needs. ac_have_func=no ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then : +if test "x$ac_cv_header_sys_dg_sys_info_h" = xyes; then : ac_have_func=yes $as_echo "#define DGUX 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } -if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then : +if ${ac_cv_lib_dgc_dg_sys_info+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12476,7 +13289,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } -if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then : +if test "x$ac_cv_lib_dgc_dg_sys_info" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDGC 1 _ACEOF @@ -12490,7 +13303,7 @@ ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" -if test "x$ac_cv_header_locale_h" = x""yes; then : +if test "x$ac_cv_header_locale_h" = xyes; then : fi @@ -12498,7 +13311,7 @@ for ac_func in setlocale do : ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" -if test "x$ac_cv_func_setlocale" = x""yes; then : +if test "x$ac_cv_func_setlocale" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SETLOCALE 1 _ACEOF @@ -12510,7 +13323,8 @@ # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it # uses stabs), but it is still SVR4. We cannot check for <elf.h> because # Irix 4.0.5F has the header but not the library. -if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then +if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes \ + && test "$ac_cv_lib_kvm_kvm_open" = yes; then ac_have_func=yes $as_echo "#define SVR4 1" >>confdefs.h @@ -12519,7 +13333,7 @@ if test $ac_have_func = no; then ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" -if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then : +if test "x$ac_cv_header_inq_stats_cpustats_h" = xyes; then : ac_have_func=yes $as_echo "#define UMAX 1" >>confdefs.h @@ -12534,7 +13348,7 @@ if test $ac_have_func = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then : +if test "x$ac_cv_header_sys_cpustats_h" = xyes; then : ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h fi @@ -12546,7 +13360,7 @@ for ac_header in mach/mach.h do : ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" -if test "x$ac_cv_header_mach_mach_h" = x""yes; then : +if test "x$ac_cv_header_mach_mach_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MACH_MACH_H 1 _ACEOF @@ -12560,13 +13374,13 @@ for ac_header in nlist.h do : ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" -if test "x$ac_cv_header_nlist_h" = x""yes; then : +if test "x$ac_cv_header_nlist_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NLIST_H 1 _ACEOF ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h> " -if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then : +if test "x$ac_cv_member_struct_nlist_n_un_n_name" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 @@ -12589,7 +13403,7 @@ # Some definitions of getloadavg require that the program be installed setgid. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5 $as_echo_n "checking whether getloadavg requires setgid... " >&6; } -if test "${ac_cv_func_getloadavg_setgid+set}" = set; then : +if ${ac_cv_func_getloadavg_setgid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12622,7 +13436,7 @@ if test $ac_cv_func_getloadavg_setgid = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5 $as_echo_n "checking group of /dev/kmem... " >&6; } -if test "${ac_cv_group_kmem+set}" = set; then : +if ${ac_cv_group_kmem+:} false; then : $as_echo_n "(cached) " >&6 else # On Solaris, /dev/kmem is a symlink. Get info on the real file. @@ -12650,7 +13464,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_source+set}" = set; then : +if ${ac_cv_sys_largefile_source+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -12717,139 +13531,9 @@ fi -# Configure getopt. -# getopt.m4 serial 10 - -# The getopt module assume you want GNU getopt, with getopt_long etc, -# rather than vanilla POSIX getopt. This means your your code should -# always include <getopt.h> for the getopt prototypes. - - - - - - - - - - - -# Prerequisites of lib/getopt*. - - - - - GETOPT_H= - for ac_header in getopt.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" -if test "x$ac_cv_header_getopt_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETOPT_H 1 -_ACEOF - -else - GETOPT_H=getopt.h -fi - -done - - if test -z "$GETOPT_H"; then - for ac_func in getopt_long_only -do : - ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" -if test "x$ac_cv_func_getopt_long_only" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETOPT_LONG_ONLY 1 -_ACEOF - -else - GETOPT_H=getopt.h -fi -done - - fi - - if test -z "$GETOPT_H"; then - ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h> -" -if test "x$ac_cv_have_decl_optreset" = x""yes; then : - GETOPT_H=getopt.h -fi - - fi - - if test -z "$GETOPT_H"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 -$as_echo_n "checking for working GNU getopt function... " >&6; } -if test "${gl_cv_func_gnu_getopt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h> -" -if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then : - gl_cv_func_gnu_getopt=no -else - gl_cv_func_gnu_getopt=yes -fi - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <getopt.h> -int -main () -{ - - char *myargv[3]; - myargv[0] = "conftest"; - myargv[1] = "-+"; - myargv[2] = 0; - return getopt (2, myargv, "+a") != '?'; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_gnu_getopt=yes -else - gl_cv_func_gnu_getopt=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gnu_getopt" >&5 -$as_echo "$gl_cv_func_gnu_getopt" >&6; } - if test "$gl_cv_func_gnu_getopt" = "no"; then - GETOPT_H=getopt.h - fi - fi - - - - if test -n "$GETOPT_H"; then : - - - GETOPT_H=getopt.h - -$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - - - - : - GETOPTOBJS='getopt.o getopt1.o' - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } -if test "${ac_cv_func_getpgrp_void+set}" = set; then : +if ${ac_cv_func_getpgrp_void+:} false; then : $as_echo_n "(cached) " >&6 else # Use it with a single arg. @@ -12881,10 +13565,1781 @@ fi +# Configure gnulib. + + + + + LIBC_FATAL_STDERR_=1 + export LIBC_FATAL_STDERR_ + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5 +$as_echo_n "checking whether strtold conforms to C99... " >&6; } +if ${gl_cv_func_c99_strtold+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* On HP-UX before 11.23, strtold returns a struct instead of + long double. Reject implementations like that, by requiring + compatibility with the C99 prototype. */ + #include <stdlib.h> + static long double (*p) (char const *, char **) = strtold; + static long double + test (char const *nptr, char **endptr) + { + long double r; + r = strtold (nptr, endptr); + return r; + } +int +main () +{ +return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_c99_strtold=yes +else + gl_cv_func_c99_strtold=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5 +$as_echo "$gl_cv_func_c99_strtold" >&6; } + if test $gl_cv_func_c99_strtold = yes; then + +$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h + + fi + + + GNULIB_CHOWN=0; + GNULIB_CLOSE=0; + GNULIB_DUP2=0; + GNULIB_DUP3=0; + GNULIB_ENVIRON=0; + GNULIB_EUIDACCESS=0; + GNULIB_FACCESSAT=0; + GNULIB_FCHDIR=0; + GNULIB_FCHOWNAT=0; + GNULIB_FSYNC=0; + GNULIB_FTRUNCATE=0; + GNULIB_GETCWD=0; + GNULIB_GETDOMAINNAME=0; + GNULIB_GETDTABLESIZE=0; + GNULIB_GETGROUPS=0; + GNULIB_GETHOSTNAME=0; + GNULIB_GETLOGIN=0; + GNULIB_GETLOGIN_R=0; + GNULIB_GETPAGESIZE=0; + GNULIB_GETUSERSHELL=0; + GNULIB_LCHOWN=0; + GNULIB_LINK=0; + GNULIB_LINKAT=0; + GNULIB_LSEEK=0; + GNULIB_PIPE=0; + GNULIB_PIPE2=0; + GNULIB_PREAD=0; + GNULIB_PWRITE=0; + GNULIB_READLINK=0; + GNULIB_READLINKAT=0; + GNULIB_RMDIR=0; + GNULIB_SLEEP=0; + GNULIB_SYMLINK=0; + GNULIB_SYMLINKAT=0; + GNULIB_TTYNAME_R=0; + GNULIB_UNISTD_H_GETOPT=0; + GNULIB_UNISTD_H_SIGPIPE=0; + GNULIB_UNLINK=0; + GNULIB_UNLINKAT=0; + GNULIB_USLEEP=0; + GNULIB_WRITE=0; + HAVE_CHOWN=1; + HAVE_DUP2=1; + HAVE_DUP3=1; + HAVE_EUIDACCESS=1; + HAVE_FACCESSAT=1; + HAVE_FCHDIR=1; + HAVE_FCHOWNAT=1; + HAVE_FSYNC=1; + HAVE_FTRUNCATE=1; + HAVE_GETDTABLESIZE=1; + HAVE_GETGROUPS=1; + HAVE_GETHOSTNAME=1; + HAVE_GETLOGIN=1; + HAVE_GETPAGESIZE=1; + HAVE_LCHOWN=1; + HAVE_LINK=1; + HAVE_LINKAT=1; + HAVE_PIPE=1; + HAVE_PIPE2=1; + HAVE_PREAD=1; + HAVE_PWRITE=1; + HAVE_READLINK=1; + HAVE_READLINKAT=1; + HAVE_SLEEP=1; + HAVE_SYMLINK=1; + HAVE_SYMLINKAT=1; + HAVE_UNLINKAT=1; + HAVE_USLEEP=1; + HAVE_DECL_ENVIRON=1; + HAVE_DECL_FCHDIR=1; + HAVE_DECL_GETDOMAINNAME=1; + HAVE_DECL_GETLOGIN_R=1; + HAVE_DECL_GETPAGESIZE=1; + HAVE_DECL_GETUSERSHELL=1; + HAVE_DECL_TTYNAME_R=1; + HAVE_OS_H=0; + HAVE_SYS_PARAM_H=0; + REPLACE_CHOWN=0; + REPLACE_CLOSE=0; + REPLACE_DUP=0; + REPLACE_DUP2=0; + REPLACE_FCHOWNAT=0; + REPLACE_GETCWD=0; + REPLACE_GETDOMAINNAME=0; + REPLACE_GETLOGIN_R=0; + REPLACE_GETGROUPS=0; + REPLACE_GETPAGESIZE=0; + REPLACE_LCHOWN=0; + REPLACE_LINK=0; + REPLACE_LINKAT=0; + REPLACE_LSEEK=0; + REPLACE_PREAD=0; + REPLACE_PWRITE=0; + REPLACE_READLINK=0; + REPLACE_RMDIR=0; + REPLACE_SLEEP=0; + REPLACE_SYMLINK=0; + REPLACE_TTYNAME_R=0; + REPLACE_UNLINK=0; + REPLACE_UNLINKAT=0; + REPLACE_USLEEP=0; + REPLACE_WRITE=0; + UNISTD_H_HAVE_WINSOCK2_H=0; + UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 +$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } +if ${gl_cv_have_include_next+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -rf conftestd1a conftestd1b conftestd2 + mkdir conftestd1a conftestd1b conftestd2 + cat <<EOF > conftestd1a/conftest.h +#define DEFINED_IN_CONFTESTD1 +#include_next <conftest.h> +#ifdef DEFINED_IN_CONFTESTD2 +int foo; +#else +#error "include_next doesn't work" +#endif +EOF + cat <<EOF > conftestd1b/conftest.h +#define DEFINED_IN_CONFTESTD1 +#include <stdio.h> +#include_next <conftest.h> +#ifdef DEFINED_IN_CONFTESTD2 +int foo; +#else +#error "include_next doesn't work" +#endif +EOF + cat <<EOF > conftestd2/conftest.h +#ifndef DEFINED_IN_CONFTESTD1 +#error "include_next test doesn't work" +#endif +#define DEFINED_IN_CONFTESTD2 +EOF + gl_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <conftest.h> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_have_include_next=yes +else + CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <conftest.h> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_have_include_next=buggy +else + gl_cv_have_include_next=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CPPFLAGS="$gl_save_CPPFLAGS" + rm -rf conftestd1a conftestd1b conftestd2 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 +$as_echo "$gl_cv_have_include_next" >&6; } + PRAGMA_SYSTEM_HEADER= + if test $gl_cv_have_include_next = yes; then + INCLUDE_NEXT=include_next + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next + if test -n "$GCC"; then + PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' + fi + else + if test $gl_cv_have_include_next = buggy; then + INCLUDE_NEXT=include + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next + else + INCLUDE_NEXT=include + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include + fi + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 +$as_echo_n "checking whether system header files limit the line length... " >&6; } +if ${gl_cv_pragma_columns+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __TANDEM +choke me +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "choke me" >/dev/null 2>&1; then : + gl_cv_pragma_columns=yes +else + gl_cv_pragma_columns=no +fi +rm -f conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 +$as_echo "$gl_cv_pragma_columns" >&6; } + if test $gl_cv_pragma_columns = yes; then + PRAGMA_COLUMNS="#pragma COLUMNS 10000" + else + PRAGMA_COLUMNS= + fi + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_getopt_h='<'getopt.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5 +$as_echo_n "checking absolute name of <getopt.h>... " >&6; } +if ${gl_cv_next_getopt_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_getopt_h = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <getopt.h> + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/getopt.h#{ + s#.*"\(.*/getopt.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_getopt_h='<'getopt.h'>' + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 +$as_echo "$gl_cv_next_getopt_h" >&6; } + fi + NEXT_GETOPT_H=$gl_cv_next_getopt_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'getopt.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_getopt_h + fi + NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_getopt_h = yes; then + HAVE_GETOPT_H=1 + else + HAVE_GETOPT_H=0 + fi + + + gl_replace_getopt= + + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + for ac_header in getopt.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" +if test "x$ac_cv_header_getopt_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETOPT_H 1 +_ACEOF + +else + gl_replace_getopt=yes +fi + +done + + fi + + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + for ac_func in getopt_long_only +do : + ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" +if test "x$ac_cv_func_getopt_long_only" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETOPT_LONG_ONLY 1 +_ACEOF + +else + gl_replace_getopt=yes +fi +done + + fi + + if test -z "$gl_replace_getopt"; then + ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h> +" +if test "x$ac_cv_have_decl_optreset" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_OPTRESET $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h> +" +if test "x$ac_cv_have_decl_getopt_clip" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETOPT_CLIP $ac_have_decl +_ACEOF + + +fi + + fi + + if test -z "$gl_replace_getopt"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 +$as_echo_n "checking whether getopt is POSIX compatible... " >&6; } +if ${gl_cv_func_getopt_posix+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + case "$host_os" in + mingw*) gl_cv_func_getopt_posix="guessing no";; + darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; + *) gl_cv_func_getopt_posix="guessing yes";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <unistd.h> +#include <stdlib.h> +#include <string.h> + +#if !HAVE_DECL_OPTRESET && !HAVE_DECL_GETOPT_CLIP +# define OPTIND_MIN 0 +#else +# define OPTIND_MIN 1 +#endif + +int +main () +{ + { + int argc = 0; + char *argv[10]; + int c; + + argv[argc++] = "program"; + argv[argc++] = "-a"; + argv[argc++] = "foo"; + argv[argc++] = "bar"; + argv[argc] = NULL; + optind = OPTIND_MIN; + opterr = 0; + + c = getopt (argc, argv, "ab"); + if (!(c == 'a')) + return 1; + c = getopt (argc, argv, "ab"); + if (!(c == -1)) + return 2; + if (!(optind == 2)) + return 3; + } + /* Some internal state exists at this point. */ + { + int argc = 0; + char *argv[10]; + int c; + + argv[argc++] = "program"; + argv[argc++] = "donald"; + argv[argc++] = "-p"; + argv[argc++] = "billy"; + argv[argc++] = "duck"; + argv[argc++] = "-a"; + argv[argc++] = "bar"; + argv[argc] = NULL; + optind = OPTIND_MIN; + opterr = 0; + + c = getopt (argc, argv, "+abp:q:"); + if (!(c == -1)) + return 4; + if (!(strcmp (argv[0], "program") == 0)) + return 5; + if (!(strcmp (argv[1], "donald") == 0)) + return 6; + if (!(strcmp (argv[2], "-p") == 0)) + return 7; + if (!(strcmp (argv[3], "billy") == 0)) + return 8; + if (!(strcmp (argv[4], "duck") == 0)) + return 9; + if (!(strcmp (argv[5], "-a") == 0)) + return 10; + if (!(strcmp (argv[6], "bar") == 0)) + return 11; + if (!(optind == 1)) + return 12; + } + /* Detect MacOS 10.5, AIX 7.1 bug. */ + { + char *argv[3] = { "program", "-ab", NULL }; + optind = OPTIND_MIN; + opterr = 0; + if (getopt (2, argv, "ab:") != 'a') + return 13; + if (getopt (2, argv, "ab:") != '?') + return 14; + if (optopt != 'b') + return 15; + if (optind != 2) + return 16; + } + + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_posix=yes +else + gl_cv_func_getopt_posix=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 +$as_echo "$gl_cv_func_getopt_posix" >&6; } + case "$gl_cv_func_getopt_posix" in + *no) gl_replace_getopt=yes ;; + esac + fi + + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 +$as_echo_n "checking for working GNU getopt function... " >&6; } +if ${gl_cv_func_getopt_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the + # optstring is necessary for programs like m4 that have POSIX-mandated + # semantics for supporting options interspersed with files. + # Also, since getopt_long is a GNU extension, we require optind=0. + # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; + # so take care to revert to the correct (non-)export state. + gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' + case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in + xx) gl_had_POSIXLY_CORRECT=exported ;; + x) gl_had_POSIXLY_CORRECT=yes ;; + *) gl_had_POSIXLY_CORRECT= ;; + esac + POSIXLY_CORRECT=1 + export POSIXLY_CORRECT + if test "$cross_compiling" = yes; then : + case $host_os:$ac_cv_have_decl_optreset in + *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;; + *:yes) gl_cv_func_getopt_gnu=no;; + *) gl_cv_func_getopt_gnu=yes;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <getopt.h> + #include <stddef.h> + #include <string.h> + +int +main () +{ + + int result = 0; + /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, + and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, + OSF/1 5.1, Solaris 10. */ + { + char *myargv[3]; + myargv[0] = "conftest"; + myargv[1] = "-+"; + myargv[2] = 0; + opterr = 0; + if (getopt (2, myargv, "+a") != '?') + result |= 1; + } + /* This code succeeds on glibc 2.8, mingw, + and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, + IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ + { + char *argv[] = { "program", "-p", "foo", "bar", NULL }; + + optind = 1; + if (getopt (4, argv, "p::") != 'p') + result |= 2; + else if (optarg != NULL) + result |= 4; + else if (getopt (4, argv, "p::") != -1) + result |= 6; + else if (optind != 2) + result |= 8; + } + /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ + { + char *argv[] = { "program", "foo", "-p", NULL }; + optind = 0; + if (getopt (3, argv, "-p") != 1) + result |= 16; + else if (getopt (3, argv, "-p") != 'p') + result |= 32; + } + /* This code fails on glibc 2.11. */ + { + char *argv[] = { "program", "-b", "-a", NULL }; + optind = opterr = 0; + if (getopt (3, argv, "+:a:b") != 'b') + result |= 64; + else if (getopt (3, argv, "+:a:b") != ':') + result |= 64; + } + return result; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_gnu=yes +else + gl_cv_func_getopt_gnu=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + case $gl_had_POSIXLY_CORRECT in + exported) ;; + yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; + *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 +$as_echo "$gl_cv_func_getopt_gnu" >&6; } + if test "$gl_cv_func_getopt_gnu" = "no"; then + gl_replace_getopt=yes + fi + fi + +ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" +if test "x$ac_cv_have_decl_getenv" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETENV $ac_have_decl +_ACEOF + + + + + + + if test -n "$gl_replace_getopt"; then : + + + + GETOPT_H=getopt.h + +$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + + + + GNULIB_UNISTD_H_GETOPT=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" + + + + + + +fi + + + + GNULIB_MKTIME=0; + GNULIB_NANOSLEEP=0; + GNULIB_STRPTIME=0; + GNULIB_TIMEGM=0; + GNULIB_TIME_R=0; + HAVE_DECL_LOCALTIME_R=1; + HAVE_NANOSLEEP=1; + HAVE_STRPTIME=1; + HAVE_TIMEGM=1; + REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; + REPLACE_MKTIME=GNULIB_PORTCHECK; + REPLACE_NANOSLEEP=GNULIB_PORTCHECK; + REPLACE_TIMEGM=GNULIB_PORTCHECK; + + + + + for ac_func in $ac_func_list +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + gl_cv_c_multiarch=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + arch= + prev= + for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do + if test -n "$prev"; then + case $word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$arch" || test "$arch" = "$word"; then + arch="$word" + else + gl_cv_c_multiarch=yes + fi + ;; + esac + prev= + else + if test "x$word" = "x-arch"; then + prev=arch + fi + fi + done + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $gl_cv_c_multiarch = yes; then + +$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + APPLE_UNIVERSAL_BUILD=1 + else + APPLE_UNIVERSAL_BUILD=0 + fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + + + REPLACE_NULL=0; + HAVE_WCHAR_T=1; + STDDEF_H=''; + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 +$as_echo_n "checking for wchar_t... " >&6; } +if ${gt_cv_c_wchar_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stddef.h> + wchar_t foo = (wchar_t)'\0'; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_wchar_t=yes +else + gt_cv_c_wchar_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 +$as_echo "$gt_cv_c_wchar_t" >&6; } + if test $gt_cv_c_wchar_t = yes; then + +$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h + + fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +$as_echo_n "checking for C/C++ restrict keyword... " >&6; } +if ${ac_cv_c_restrict+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { + return ip[0]; + } +int +main () +{ +int s[1]; + int * $ac_kw t = s; + t[0] = 0; + return foo(t) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_restrict=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +$as_echo "$ac_cv_c_restrict" >&6; } + + case $ac_cv_c_restrict in + restrict) ;; + no) $as_echo "#define restrict /**/" >>confdefs.h + ;; + *) cat >>confdefs.h <<_ACEOF +#define restrict $ac_cv_c_restrict +_ACEOF + ;; + esac + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 +$as_echo_n "checking for struct timespec in <time.h>... " >&6; } +if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <time.h> + +int +main () +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timespec_in_time_h=yes +else + gl_cv_sys_struct_timespec_in_time_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 +$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } + + TIME_H_DEFINES_STRUCT_TIMESPEC=0 + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + if test $gl_cv_sys_struct_timespec_in_time_h = yes; then + TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 +$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; } +if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/time.h> + +int +main () +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timespec_in_sys_time_h=yes +else + gl_cv_sys_struct_timespec_in_sys_time_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 +$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } + if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 +$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; } +if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <pthread.h> + +int +main () +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timespec_in_pthread_h=yes +else + gl_cv_sys_struct_timespec_in_pthread_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 +$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } + if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + fi + fi + fi + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_time_h='<'time.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5 +$as_echo_n "checking absolute name of <time.h>... " >&6; } +if ${gl_cv_next_time_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_time_h = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <time.h> + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/time.h#{ + s#.*"\(.*/time.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_time_h='<'time.h'>' + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 +$as_echo "$gl_cv_next_time_h" >&6; } + fi + NEXT_TIME_H=$gl_cv_next_time_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'time.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_time_h + fi + NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive + + + + + +ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default" +if test "x$ac_cv_have_decl_localtime_r" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LOCALTIME_R $ac_have_decl +_ACEOF + + + + + if false; then + GL_COND_LIBTOOL_TRUE= + GL_COND_LIBTOOL_FALSE='#' +else + GL_COND_LIBTOOL_TRUE='#' + GL_COND_LIBTOOL_FALSE= +fi + + gl_cond_libtool=false + gl_libdeps= + gl_ltlibdeps= + gl_m4_base='m4' + + + + + + + + + + gl_source_base='lib' + # Code from module arg-nonnull: + # Code from module c++defs: + # Code from module dtoastr: + + # Code from module extensions: + # Code from module getopt-gnu: + + + + + + + +$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h + + + # Code from module getopt-posix: + + + + + + if test -n "$gl_replace_getopt"; then : + + + + GETOPT_H=getopt.h + +$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + + + + GNULIB_UNISTD_H_GETOPT=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" + + + + + + +fi + + + # Code from module gettext-h: + + + # Code from module include_next: + # Code from module intprops: + # Code from module mktime: + + + + + +if test $APPLE_UNIVERSAL_BUILD = 1; then + # A universal build on Apple MacOS X platforms. + # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. + # But we need a configuration result that is valid in both modes. + ac_cv_func_working_mktime=no +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 +$as_echo_n "checking for working mktime... " >&6; } +if ${ac_cv_func_working_mktime+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_working_mktime=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Test program from Paul Eggert and Tony Leneis. */ +#include <limits.h> +#include <stdlib.h> +#include <time.h> + +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif + +#ifndef HAVE_ALARM +# define alarm(X) /* empty */ +#endif + +/* Work around redefinition to rpl_putenv by other config tests. */ +#undef putenv + +static time_t time_t_max; +static time_t time_t_min; + +/* Values we'll use to set the TZ environment variable. */ +static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", + "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" +}; +#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) + +/* Return 0 if mktime fails to convert a date in the spring-forward gap. + Based on a problem report from Andreas Jaeger. */ +static int +spring_forward_gap () +{ + /* glibc (up to about 1998-10-07) failed this test. */ + struct tm tm; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + tm.tm_year = 98; + tm.tm_mon = 3; + tm.tm_mday = 5; + tm.tm_hour = 2; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + return mktime (&tm) != (time_t) -1; +} + +static int +mktime_test1 (time_t now) +{ + struct tm *lt; + return ! (lt = localtime (&now)) || mktime (lt) == now; +} + +static int +mktime_test (time_t now) +{ + return (mktime_test1 (now) + && mktime_test1 ((time_t) (time_t_max - now)) + && mktime_test1 ((time_t) (time_t_min + now))); +} + +static int +irix_6_4_bug () +{ + /* Based on code from Ariel Faigon. */ + struct tm tm; + tm.tm_year = 96; + tm.tm_mon = 3; + tm.tm_mday = 0; + tm.tm_hour = 0; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + mktime (&tm); + return tm.tm_mon == 2 && tm.tm_mday == 31; +} + +static int +bigtime_test (int j) +{ + struct tm tm; + time_t now; + tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; + now = mktime (&tm); + if (now != (time_t) -1) + { + struct tm *lt = localtime (&now); + if (! (lt + && lt->tm_year == tm.tm_year + && lt->tm_mon == tm.tm_mon + && lt->tm_mday == tm.tm_mday + && lt->tm_hour == tm.tm_hour + && lt->tm_min == tm.tm_min + && lt->tm_sec == tm.tm_sec + && lt->tm_yday == tm.tm_yday + && lt->tm_wday == tm.tm_wday + && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) + == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) + return 0; + } + return 1; +} + +static int +year_2050_test () +{ + /* The correct answer for 2050-02-01 00:00:00 in Pacific time, + ignoring leap seconds. */ + unsigned long int answer = 2527315200UL; + + struct tm tm; + time_t t; + tm.tm_year = 2050 - 1900; + tm.tm_mon = 2 - 1; + tm.tm_mday = 1; + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + tm.tm_isdst = -1; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + t = mktime (&tm); + + /* Check that the result is either a failure, or close enough + to the correct answer that we can assume the discrepancy is + due to leap seconds. */ + return (t == (time_t) -1 + || (0 < t && answer - 120 <= t && t <= answer + 120)); +} + +int +main () +{ + int result = 0; + time_t t, delta; + int i, j; + + /* This test makes some buggy mktime implementations loop. + Give up after 60 seconds; a mktime slower than that + isn't worth using anyway. */ + alarm (60); + + for (;;) + { + t = (time_t_max << 1) + 1; + if (t <= time_t_max) + break; + time_t_max = t; + } + time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; + + delta = time_t_max / 997; /* a suitable prime number */ + for (i = 0; i < N_STRINGS; i++) + { + if (tz_strings[i]) + putenv (tz_strings[i]); + + for (t = 0; t <= time_t_max - delta; t += delta) + if (! mktime_test (t)) + result |= 1; + if (! (mktime_test ((time_t) 1) + && mktime_test ((time_t) (60 * 60)) + && mktime_test ((time_t) (60 * 60 * 24)))) + result |= 2; + + for (j = 1; ; j <<= 1) + if (! bigtime_test (j)) + result |= 4; + else if (INT_MAX / 2 < j) + break; + if (! bigtime_test (INT_MAX)) + result |= 8; + } + if (! irix_6_4_bug ()) + result |= 16; + if (! spring_forward_gap ()) + result |= 32; + if (! year_2050_test ()) + result |= 64; + return result; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_working_mktime=yes +else + ac_cv_func_working_mktime=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 +$as_echo "$ac_cv_func_working_mktime" >&6; } +if test $ac_cv_func_working_mktime = no; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" + +fi + + if test $ac_cv_func_working_mktime = no; then + REPLACE_MKTIME=1 + + + + else + REPLACE_MKTIME=0 + fi + + + + + GNULIB_MKTIME=1 + + + +$as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h + + + + # Code from module multiarch: + + # Code from module stddef: + + + + if test $gt_cv_c_wchar_t = no; then + HAVE_WCHAR_T=0 + STDDEF_H=stddef.h + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 +$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } +if ${gl_cv_decl_null_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stddef.h> + int test[2 * (sizeof NULL == sizeof (void *)) -1]; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_decl_null_works=yes +else + gl_cv_decl_null_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 +$as_echo "$gl_cv_decl_null_works" >&6; } + if test $gl_cv_decl_null_works = no; then + REPLACE_NULL=1 + STDDEF_H=stddef.h + fi + if test -n "$STDDEF_H"; then + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stddef_h='<'stddef.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 +$as_echo_n "checking absolute name of <stddef.h>... " >&6; } +if ${gl_cv_next_stddef_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_stddef_h = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stddef.h> + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/stddef.h#{ + s#.*"\(.*/stddef.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_stddef_h='<'stddef.h'>' + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 +$as_echo "$gl_cv_next_stddef_h" >&6; } + fi + NEXT_STDDEF_H=$gl_cv_next_stddef_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stddef.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stddef_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive + + + + fi + + # Code from module time: + + + + # Code from module time_r: + + + + + + + + if test $ac_cv_have_decl_localtime_r = no; then + HAVE_DECL_LOCALTIME_R=0 + fi + + + if test $ac_cv_func_localtime_r = yes; then + HAVE_LOCALTIME_R=1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 +$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } +if ${gl_cv_time_r_posix+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <time.h> +int +main () +{ +/* We don't need to append 'restrict's to the argument types, + even though the POSIX signature has the 'restrict's, + since C99 says they can't affect type compatibility. */ + struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; + if (ptr) return 0; + /* Check the return type is a pointer. + On HP-UX 10 it is 'int'. */ + *localtime_r (0, 0); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_time_r_posix=yes +else + gl_cv_time_r_posix=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 +$as_echo "$gl_cv_time_r_posix" >&6; } + if test $gl_cv_time_r_posix = yes; then + REPLACE_LOCALTIME_R=0 + else + REPLACE_LOCALTIME_R=1 + fi + else + HAVE_LOCALTIME_R=0 + fi + if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" + + + : + + fi + + + + + GNULIB_TIME_R=1 + + + +$as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h + + + + # Code from module unistd: + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_unistd_h='<'unistd.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 +$as_echo_n "checking absolute name of <unistd.h>... " >&6; } +if ${gl_cv_next_unistd_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_unistd_h = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <unistd.h> + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/unistd.h#{ + s#.*"\(.*/unistd.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_unistd_h='<'unistd.h'>' + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 +$as_echo "$gl_cv_next_unistd_h" >&6; } + fi + NEXT_UNISTD_H=$gl_cv_next_unistd_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'unistd.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_unistd_h + fi + NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive + + + + + + if test $ac_cv_header_unistd_h = yes; then + HAVE_UNISTD_H=1 + else + HAVE_UNISTD_H=0 + fi + + + + for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <unistd.h> +/* Some systems declare various items in the wrong headers. */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include <fcntl.h> +# include <stdio.h> +# include <stdlib.h> +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# include <io.h> +# endif +#endif + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + + eval ac_cv_have_decl_$gl_func=yes +fi + done + + + # Code from module warn-on-use: + # End of code from modules + + + + + + + + + + gltests_libdeps= + gltests_ltlibdeps= + + + + + + + + + + gl_source_base='tests' + gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS + + gl_module_indicator_condition=$gltests_WITNESS + + + + + + + + + + LIBGNU_LIBDEPS="$gl_libdeps" + + LIBGNU_LTLIBDEPS="$gl_ltlibdeps" + + + for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" -if test "x$ac_cv_func_strftime" = x""yes; then : +if test "x$ac_cv_func_strftime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRFTIME 1 _ACEOF @@ -12893,7 +15348,7 @@ # strftime is in -lintl on SCO UNIX. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } -if test "${ac_cv_lib_intl_strftime+set}" = set; then : +if ${ac_cv_lib_intl_strftime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12927,7 +15382,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } -if test "x$ac_cv_lib_intl_strftime" = x""yes; then : +if test "x$ac_cv_lib_intl_strftime" = xyes; then : $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" @@ -12941,7 +15396,7 @@ for ac_func in grantpt do : ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" -if test "x$ac_cv_func_grantpt" = x""yes; then : +if test "x$ac_cv_func_grantpt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GRANTPT 1 _ACEOF @@ -12954,7 +15409,7 @@ for ac_func in getpt do : ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" -if test "x$ac_cv_func_getpt" = x""yes; then : +if test "x$ac_cv_func_getpt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPT 1 _ACEOF @@ -12971,7 +15426,7 @@ have_tputs_et_al=true { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 $as_echo_n "checking for library containing tputs... " >&6; } -if test "${ac_cv_search_tputs+set}" = set; then : +if ${ac_cv_search_tputs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -13005,11 +15460,11 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_tputs+set}" = set; then : + if ${ac_cv_search_tputs+:} false; then : break fi done -if test "${ac_cv_search_tputs+set}" = set; then : +if ${ac_cv_search_tputs+:} false; then : else ac_cv_search_tputs=no @@ -13068,7 +15523,7 @@ freebsd) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } - if test "${emacs_cv_freebsd_terminfo+set}" = set; then : + if ${emacs_cv_freebsd_terminfo+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13210,16 +15665,16 @@ if test "$with_hesiod" != no ; then # Don't set $LIBS here -- see comments above. FIXME which comments? ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" -if test "x$ac_cv_func_res_send" = x""yes; then : +if test "x$ac_cv_func_res_send" = xyes; then : else ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" -if test "x$ac_cv_func___res_send" = x""yes; then : +if test "x$ac_cv_func___res_send" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 $as_echo_n "checking for res_send in -lresolv... " >&6; } -if test "${ac_cv_lib_resolv_res_send+set}" = set; then : +if ${ac_cv_lib_resolv_res_send+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13253,12 +15708,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 $as_echo "$ac_cv_lib_resolv_res_send" >&6; } -if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : +if test "x$ac_cv_lib_resolv_res_send" = xyes; then : resolv=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 $as_echo_n "checking for __res_send in -lresolv... " >&6; } -if test "${ac_cv_lib_resolv___res_send+set}" = set; then : +if ${ac_cv_lib_resolv___res_send+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13292,7 +15747,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 $as_echo "$ac_cv_lib_resolv___res_send" >&6; } -if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : +if test "x$ac_cv_lib_resolv___res_send" = xyes; then : resolv=yes fi @@ -13308,12 +15763,12 @@ RESOLVLIB= fi ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" -if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : +if test "x$ac_cv_func_hes_getmailhost" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } -if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : +if ${ac_cv_lib_hesiod_hes_getmailhost+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13347,7 +15802,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } -if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : +if test "x$ac_cv_lib_hesiod_hes_getmailhost" = xyes; then : hesiod=yes else : @@ -13386,7 +15841,7 @@ if test "${with_kerberos}" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 $as_echo_n "checking for com_err in -lcom_err... " >&6; } -if test "${ac_cv_lib_com_err_com_err+set}" = set; then : +if ${ac_cv_lib_com_err_com_err+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13420,7 +15875,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 $as_echo "$ac_cv_lib_com_err_com_err" >&6; } -if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : +if test "x$ac_cv_lib_com_err_com_err" = xyes; then : have_com_err=yes else have_com_err=no @@ -13435,7 +15890,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } -if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : +if ${ac_cv_lib_crypto_mit_des_cbc_encrypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13469,7 +15924,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : +if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = xyes; then : have_crypto=yes else have_crypto=no @@ -13484,7 +15939,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } -if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : +if ${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13518,7 +15973,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : +if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = xyes; then : have_k5crypto=yes else have_k5crypto=no @@ -13533,7 +15988,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } -if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : +if ${ac_cv_lib_krb5_krb5_init_context+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13567,7 +16022,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } -if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : +if test "x$ac_cv_lib_krb5_krb5_init_context" = xyes; then : have_krb5=yes else have_krb5=no @@ -13583,7 +16038,7 @@ if test "${with_kerberos5}" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } -if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : +if ${ac_cv_lib_des425_des_cbc_encrypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13617,7 +16072,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : +if test "x$ac_cv_lib_des425_des_cbc_encrypt" = xyes; then : have_des425=yes else have_des425=no @@ -13632,7 +16087,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } -if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : +if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13666,7 +16121,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : +if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then : have_des=yes else have_des=no @@ -13682,7 +16137,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } -if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : +if ${ac_cv_lib_krb4_krb_get_cred+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13716,7 +16171,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } -if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : +if test "x$ac_cv_lib_krb4_krb_get_cred" = xyes; then : have_krb4=yes else have_krb4=no @@ -13731,7 +16186,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } -if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : +if ${ac_cv_lib_krb_krb_get_cred+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13765,7 +16220,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } -if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : +if test "x$ac_cv_lib_krb_krb_get_cred" = xyes; then : have_krb=yes else have_krb=no @@ -13785,13 +16240,13 @@ for ac_header in krb5.h do : ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" -if test "x$ac_cv_header_krb5_h" = x""yes; then : +if test "x$ac_cv_header_krb5_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB5_H 1 _ACEOF ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h> " -if test "x$ac_cv_member_krb5_error_text" = x""yes; then : +if test "x$ac_cv_member_krb5_error_text" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB5_ERROR_TEXT 1 @@ -13801,7 +16256,7 @@ fi ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h> " -if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : +if test "x$ac_cv_member_krb5_error_e_text" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB5_ERROR_E_TEXT 1 @@ -13818,7 +16273,7 @@ for ac_header in des.h do : ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" -if test "x$ac_cv_header_des_h" = x""yes; then : +if test "x$ac_cv_header_des_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DES_H 1 _ACEOF @@ -13827,7 +16282,7 @@ for ac_header in kerberosIV/des.h do : ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : +if test "x$ac_cv_header_kerberosIV_des_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KERBEROSIV_DES_H 1 _ACEOF @@ -13836,7 +16291,7 @@ for ac_header in kerberos/des.h do : ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : +if test "x$ac_cv_header_kerberos_des_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KERBEROS_DES_H 1 _ACEOF @@ -13856,7 +16311,7 @@ for ac_header in krb.h do : ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_krb_h" = x""yes; then : +if test "x$ac_cv_header_krb_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB_H 1 _ACEOF @@ -13865,7 +16320,7 @@ for ac_header in kerberosIV/krb.h do : ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : +if test "x$ac_cv_header_kerberosIV_krb_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KERBEROSIV_KRB_H 1 _ACEOF @@ -13874,7 +16329,7 @@ for ac_header in kerberos/krb.h do : ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : +if test "x$ac_cv_header_kerberos_krb_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KERBEROS_KRB_H 1 _ACEOF @@ -13895,7 +16350,7 @@ for ac_header in com_err.h do : ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" -if test "x$ac_cv_header_com_err_h" = x""yes; then : +if test "x$ac_cv_header_com_err_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_COM_ERR_H 1 _ACEOF @@ -13916,7 +16371,7 @@ # to return localized messages. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 $as_echo_n "checking for dgettext in -lintl... " >&6; } -if test "${ac_cv_lib_intl_dgettext+set}" = set; then : +if ${ac_cv_lib_intl_dgettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13950,7 +16405,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 $as_echo "$ac_cv_lib_intl_dgettext" >&6; } -if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : +if test "x$ac_cv_lib_intl_dgettext" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBINTL 1 _ACEOF @@ -13962,7 +16417,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 $as_echo_n "checking whether localtime caches TZ... " >&6; } -if test "${emacs_cv_localtime_cache+set}" = set; then : +if ${emacs_cv_localtime_cache+:} false; then : $as_echo_n "(cached) " >&6 else if test x$ac_cv_func_tzset = xyes; then @@ -14021,7 +16476,7 @@ for ac_func in gettimeofday do : ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = x""yes; then : +if test "x$ac_cv_func_gettimeofday" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETTIMEOFDAY 1 _ACEOF @@ -14032,7 +16487,7 @@ if test $ac_cv_func_gettimeofday = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5 $as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; } -if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then : +if ${emacs_cv_gettimeofday_two_arguments+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14076,7 +16531,7 @@ ok_so_far=yes ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" -if test "x$ac_cv_func_socket" = x""yes; then : +if test "x$ac_cv_func_socket" = xyes; then : else ok_so_far=no @@ -14084,7 +16539,7 @@ if test $ok_so_far = yes; then ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" -if test "x$ac_cv_header_netinet_in_h" = x""yes; then : +if test "x$ac_cv_header_netinet_in_h" = xyes; then : else ok_so_far=no @@ -14094,7 +16549,7 @@ fi if test $ok_so_far = yes; then ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" -if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : +if test "x$ac_cv_header_arpa_inet_h" = xyes; then : else ok_so_far=no @@ -14128,7 +16583,7 @@ fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : +if test "x$ac_cv_type_pid_t" = xyes; then : else @@ -14141,7 +16596,7 @@ for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" -if test "x$ac_cv_header_vfork_h" = x""yes; then : +if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF @@ -14165,7 +16620,7 @@ if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } -if test "${ac_cv_func_fork_works+set}" = set; then : +if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -14218,7 +16673,7 @@ if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } -if test "${ac_cv_func_vfork_works+set}" = set; then : +if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -14354,7 +16809,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } -if test "${emacs_cv_langinfo_codeset+set}" = set; then : +if ${emacs_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14386,7 +16841,7 @@ fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : +if test "x$ac_cv_type_size_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SIZE_T 1 @@ -14398,7 +16853,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 $as_echo_n "checking for mbstate_t... " >&6; } -if test "${ac_cv_type_mbstate_t+set}" = set; then : +if ${ac_cv_type_mbstate_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14432,63 +16887,9 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restrict keyword" >&5 -$as_echo_n "checking for C restrict keyword... " >&6; } -if test "${emacs_cv_c_restrict+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void fred (int *restrict x); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_c_restrict=yes -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void fred (int *__restrict x); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_c_restrict=__restrict -else - emacs_cv_c_restrict=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict" >&5 -$as_echo "$emacs_cv_c_restrict" >&6; } -case "$emacs_cv_c_restrict" in - yes) emacs_restrict=restrict;; - no) emacs_restrict="";; - *) emacs_restrict="$emacs_cv_c_restrict";; -esac -if test "$emacs_restrict" != __restrict; then - -cat >>confdefs.h <<_ACEOF -#define __restrict $emacs_restrict -_ACEOF - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 $as_echo_n "checking for C restricted array declarations... " >&6; } -if test "${emacs_cv_c_restrict_arr+set}" = set; then : +if ${emacs_cv_c_restrict_arr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15019,7 +17420,7 @@ test "${exec_prefix}" != NONE && exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` -ac_config_files="$ac_config_files Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile test/automated/Makefile" +ac_config_files="$ac_config_files Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile test/automated/Makefile" ac_config_commands="$ac_config_commands default" @@ -15087,10 +17488,21 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -15121,9 +17533,61 @@ LTLIBOBJS=$ac_ltlibobjs - - -: ${CONFIG_STATUS=./config.status} + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then + as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + + gl_libobjs= + gl_ltlibobjs= + if test -n "$gl_LIBOBJS"; then + # Remove the extension. + sed_drop_objext='s/\.o$//;s/\.obj$//' + for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do + gl_libobjs="$gl_libobjs $i.$ac_objext" + gl_ltlibobjs="$gl_ltlibobjs $i.lo" + done + fi + gl_LIBOBJS=$gl_libobjs + + gl_LTLIBOBJS=$gl_ltlibobjs + + + + gltests_libobjs= + gltests_ltlibobjs= + if test -n "$gltests_LIBOBJS"; then + # Remove the extension. + sed_drop_objext='s/\.o$//;s/\.obj$//' + for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do + gltests_libobjs="$gltests_libobjs $i.$ac_objext" + gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" + done + fi + gltests_LIBOBJS=$gltests_libobjs + + gltests_LTLIBOBJS=$gltests_ltlibobjs + + + +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -15224,6 +17688,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -15531,7 +17996,7 @@ # values after options handling. ac_log=" This file was extended by emacs $as_me 24.0.50, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -15597,7 +18062,7 @@ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ emacs config.status 24.0.50 -configured by $0, generated by GNU Autoconf 2.67, +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. @@ -15607,6 +18072,8 @@ ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF @@ -15713,6 +18180,7 @@ # # INIT-COMMANDS # +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS" _ACEOF @@ -15724,7 +18192,9 @@ do case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;; "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;; "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;; @@ -15761,9 +18231,10 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -15771,12 +18242,13 @@ { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -15815,13 +18287,13 @@ ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF # Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && - echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && + echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && echo "_ACAWK" && echo "_ACEOF" @@ -15854,7 +18326,7 @@ rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -15902,7 +18374,7 @@ rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" \$ac_cs_awk_pipe_init @@ -15940,7 +18412,7 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -15974,7 +18446,7 @@ # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -15986,8 +18458,8 @@ # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 @@ -16107,7 +18579,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -16142,7 +18614,7 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ + *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; @@ -16217,6 +18689,11 @@ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 @@ -16271,28 +18748,30 @@ s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | if $ac_cs_awk_getline; then - $AWK -f "$tmp/subs.awk" -else - $AWK -f "$tmp/subs.awk" | $SHELL -fi >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + $AWK -f "$ac_tmp/subs.awk" +else + $AWK -f "$ac_tmp/subs.awk" | $SHELL +fi \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -16303,22 +18782,56 @@ if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ + mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 @@ -16328,6 +18841,101 @@ case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; "default":C) ### Make the necessary directories, if they don't exist. @@ -16382,4 +18990,3 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi -
--- a/configure.in Sun Jan 16 23:45:28 2011 -0800 +++ b/configure.in Wed Jan 19 13:54:19 2011 -0800 @@ -27,6 +27,7 @@ AC_INIT(emacs, 24.0.50) AC_CONFIG_HEADER(src/config.h:src/config.in) AC_CONFIG_SRCDIR(src/lisp.h) +AM_INIT_AUTOMAKE dnl Support for --program-prefix, --program-suffix and dnl --program-transform-name options @@ -638,6 +639,10 @@ dnl Sets GCC=yes if using gcc. AC_PROG_CC +AM_PROG_CC_C_O + +# Initialize gnulib right after verifying that the C compiler works. +gl_EARLY # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then @@ -685,9 +690,6 @@ test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" fi -dnl checks for Unix variants -AC_USE_SYSTEM_EXTENSIONS - ### Use -Wno-pointer-sign if the compiler supports it AC_MSG_CHECKING([whether gcc understands -Wno-pointer-sign]) SAVE_CFLAGS="$CFLAGS" @@ -1321,6 +1323,19 @@ dnl Check for endianess AC_C_BIGENDIAN +AC_CACHE_CHECK([for __attribute__ ((__aligned__ (expr)))], + [emacs_cv_attribute_aligned], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[char __attribute__ ((__aligned__ (1 << 3))) c;]], + [[]])], + [emacs_cv_attribute_aligned=yes], + [emacs_cv_attribute_aligned=no])]) +if test $emacs_cv_attribute_aligned = yes; then + AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1, + [Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works.]) +fi + dnl check for Make feature AC_PROG_MAKE_SET @@ -2627,7 +2642,7 @@ AC_CHECK_FUNCS(gethostname getdomainname dup2 \ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ random lrand48 logb frexp fmod rint cbrt ftime setsid \ -strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ +strerror fpathconf select euidaccess getpagesize tzset setlocale \ utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ sendto recvfrom getsockopt setsockopt getsockname getpeername \ @@ -2648,26 +2663,15 @@ AC_CHECK_HEADERS(sys/un.h) -AC_FUNC_MKTIME -if test "$ac_cv_func_working_mktime" = no; then - AC_DEFINE(BROKEN_MKTIME, 1, [Define to 1 if the mktime function is broken.]) -fi - AC_FUNC_GETLOADAVG AC_FUNC_FSEEKO -# Configure getopt. -m4_include([m4/getopt.m4]) -gl_GETOPT_IFELSE([ - gl_GETOPT_SUBSTITUTE_HEADER - gl_PREREQ_GETOPT - GETOPTOBJS='getopt.o getopt1.o' -]) -AC_SUBST(GETOPTOBJS) - AC_FUNC_GETPGRP +# Configure gnulib. +gl_INIT + AC_FUNC_STRFTIME # UNIX98 PTYs. @@ -3031,24 +3035,6 @@ AC_TYPE_MBSTATE_T -dnl Restrict could probably be used effectively other than in regex.c. -AC_CACHE_CHECK([for C restrict keyword], emacs_cv_c_restrict, - [AC_TRY_COMPILE([void fred (int *restrict x);], [], - emacs_cv_c_restrict=yes, - [AC_TRY_COMPILE([void fred (int *__restrict x);], [], - emacs_cv_c_restrict=__restrict, - emacs_cv_c_restrict=no)])]) -case "$emacs_cv_c_restrict" in - yes) emacs_restrict=restrict;; - no) emacs_restrict="";; - *) emacs_restrict="$emacs_cv_c_restrict";; -esac -if test "$emacs_restrict" != __restrict; then - AC_DEFINE_UNQUOTED(__restrict, $emacs_restrict, - [Define to compiler's equivalent of C99 restrict keyword. - Don't define if equivalent is `__restrict'.]) -fi - AC_CACHE_CHECK([for C restricted array declarations], emacs_cv_c_restrict_arr, [AC_TRY_COMPILE([void fred (int x[__restrict]);], [], emacs_cv_c_restrict_arr=yes, emacs_cv_c_restrict_arr=no)]) @@ -3538,11 +3524,6 @@ #endif #endif -/* Avoid link-time collision with system mktime if we will use our own. */ -#if ! HAVE_MKTIME || BROKEN_MKTIME -#define mktime emacs_mktime -#endif - #define my_strftime nstrftime /* for strftime.c */ /* These default definitions are good for almost all machines. @@ -3747,7 +3728,7 @@ dnl to run `make prefix=/some/where/else' and override the values set dnl by configure. This also explains the `move-if-change' test and dnl the use of force in the `epaths-force' rule in Makefile.in. -AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile \ +AC_OUTPUT(Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \ doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \ doc/lispref/Makefile src/Makefile \ lwlib/Makefile lisp/Makefile leim/Makefile test/automated/Makefile, [ @@ -3766,4 +3747,3 @@ fi ], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"]) -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/depcomp Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,630 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free +# Software Foundation, Inc. + +# 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 this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u="sed s,\\\\\\\\,/,g" + depmode=msvisualcpp +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> "$depfile" + echo >> "$depfile" + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End:
--- a/doc/emacs/ChangeLog Sun Jan 16 23:45:28 2011 -0800 +++ b/doc/emacs/ChangeLog Wed Jan 19 13:54:19 2011 -0800 @@ -1,3 +1,9 @@ +2011-01-18 Glenn Morris <rgm@gnu.org> + + * ack.texi, emacs.texi (Acknowledgments): Update for ERT addition. + + * ack.texi (Acknowledgments): Remove mention of replaced prolog.el. + 2011-01-15 Chong Yidong <cyd@stupidchicken.com> * building.texi (Compilation): Improve instructions for running two
--- a/doc/emacs/ack.texi Sun Jan 16 23:45:28 2011 -0800 +++ b/doc/emacs/ack.texi Wed Jan 19 13:54:19 2011 -0800 @@ -870,6 +870,10 @@ Kentaro Ohkouchi created the Emacs icons used beginning with Emacs 23. @item +Christian Ohler wrote @file{ert.el}, a library for automated regression +testing. + +@item Alexandre Oliva wrote @file{gnus-mlspl.el}, a group params-based mail splitting mechanism. @@ -1239,12 +1243,12 @@ @item Masanobu Umeda wrote GNUS, a feature-rich reader for Usenet news that was the ancestor of the current Gnus package. He also wrote -@file{prolog.el}, a mode for editing Prolog code; @file{rmailsort.el}, a -package for sorting messages in RMAIL folders; @file{metamail.el}, an -interface to the Metamail program; @file{gnus-kill.el}, the Kill File -mode for Gnus; @file{gnus-mh.el}, an mh-e interface for Gnus; -@file{gnus-msg.el}, a mail and post interface for Gnus; and -@file{timezone.el}, providing functions for dealing with time zones. +@file{rmailsort.el}, a package for sorting messages in RMAIL folders; +@file{metamail.el}, an interface to the Metamail program; +@file{gnus-kill.el}, the Kill File mode for Gnus; @file{gnus-mh.el}, an +mh-e interface for Gnus; @file{gnus-msg.el}, a mail and post interface +for Gnus; and @file{timezone.el}, providing functions for dealing with +time zones. @item Neil W.@: Van Dyke wrote @file{webjump.el}, a ``hot links'' package.
--- a/doc/emacs/emacs.texi Sun Jan 16 23:45:28 2011 -0800 +++ b/doc/emacs/emacs.texi Wed Jan 19 13:54:19 2011 -0800 @@ -1395,15 +1395,15 @@ Monnier, Morioka Tomohiko, Keith Moore, Jan Moringen, Glenn Morris, Diane Murray, Sen Nagata, Erik Naggum, Thomas Neumann, Thien-Thi Nguyen, Mike Newton, Jurgen Nickelsen, Dan Nicolaescu, Hrvoje Niksic, Jeff -Norden, Andrew Norman, Alexandre Oliva, Bob Olson, Michael Olson, -Takaaki Ota, Pieter E.@: J.@: Pareit, Ross Patterson, David Pearson, -Jeff Peck, Damon Anton Permezel, Tom Perrine, William M.@: Perry, Per -Persson, Jens Petersen, Daniel Pfeiffer, Richard L.@: Pieri, Fred -Pierresteguy, Christian Plaunt, David Ponce, Francesco A.@: Potorti, -Michael D. Prange, Mukesh Prasad, Ken Raeburn, Marko Rahamaa, Ashwin -Ram, Eric S. Raymond, Paul Reilly, Edward M. Reingold, Alex Rezinsky, -Rob Riepel, David Reitter, Adrian Robert, Nick Roberts, Roland B.@: -Roberts, John Robinson, Danny Roozendaal, Sebastian Rose, William +Norden, Andrew Norman, Christian Ohler, Alexandre Oliva, Bob Olson, +Michael Olson, Takaaki Ota, Pieter E.@: J.@: Pareit, Ross Patterson, +David Pearson, Jeff Peck, Damon Anton Permezel, Tom Perrine, William +M.@: Perry, Per Persson, Jens Petersen, Daniel Pfeiffer, Richard L.@: +Pieri, Fred Pierresteguy, Christian Plaunt, David Ponce, Francesco A.@: +Potorti, Michael D. Prange, Mukesh Prasad, Ken Raeburn, Marko Rahamaa, +Ashwin Ram, Eric S. Raymond, Paul Reilly, Edward M. Reingold, Alex +Rezinsky, Rob Riepel, David Reitter, Adrian Robert, Nick Roberts, Roland +B.@: Roberts, John Robinson, Danny Roozendaal, Sebastian Rose, William Rosenblatt, Guillermo J.@: Rozas, Martin Rudalics, Ivar Rummelhoff, Jason Rumney, Wolfgang Rupprecht, Kevin Ryde, James B. Salem, Masahiko Sato, Jorgen Schaefer, Holger Schauer, William Schelter, Ralph
--- a/doc/misc/ChangeLog Sun Jan 16 23:45:28 2011 -0800 +++ b/doc/misc/ChangeLog Wed Jan 19 13:54:19 2011 -0800 @@ -1,3 +1,7 @@ +2011-01-18 Glenn Morris <rgm@gnu.org> + + * ert.texi: Relicense under GFDL 1.3+, and standardize license notice. + 2011-01-14 Eduard Wiebe <usenet@pusto.de> * nxml-mode.texi (Introduction): Fix file name typos.
--- a/doc/misc/ert.texi Sun Jan 16 23:45:28 2011 -0800 +++ b/doc/misc/ert.texi Wed Jan 19 13:54:19 2011 -0800 @@ -14,10 +14,21 @@ @quotation Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.2 or +under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no -Invariant Sections, with no Front-Cover Texts, and with no Back-Cover -Texts. +Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' +and with the Back-Cover Texts as in (a) below. A copy of the license +is included in the section entitled ``GNU Free Documentation License'' +in the Emacs manual. + +(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and +modify this GNU manual. Buying copies from the FSF supports it in +developing GNU and promoting software freedom.'' + +This document is part of a collection distributed under the GNU Free +Documentation License. If you want to distribute this document +separately from the collection, you can do so by adding a copy of the +license to the document, as described in section 6 of the license. @end quotation @end copying
--- a/doc/misc/texinfo.tex Sun Jan 16 23:45:28 2011 -0800 +++ b/doc/misc/texinfo.tex Wed Jan 19 13:54:19 2011 -0800 @@ -3,11 +3,11 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2010-12-23.17} +\def\texinfoversion{2011-01-15.17} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -% 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +% 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -849,6 +849,7 @@ \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @include of #1^^J}% \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes @@ -2070,7 +2071,7 @@ % \parseargdef\fonttextsize{% \def\textsizearg{#1}% - \wlog{doing @fonttextsize \textsizearg}% + %\wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. @@ -6505,6 +6506,7 @@ \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% \input #1 \afterenvbreak }% @@ -8547,7 +8549,7 @@ \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax - \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% + %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% @@ -9401,3 +9403,7 @@ @c End: @c vim:sw=2: + +@ignore + arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 +@end ignore
--- a/etc/ChangeLog Sun Jan 16 23:45:28 2011 -0800 +++ b/etc/ChangeLog Wed Jan 19 13:54:19 2011 -0800 @@ -1,3 +1,7 @@ +2011-01-18 Glenn Morris <rgm@gnu.org> + + * PROBLEMS: Add note about svn+ssh. (Bug#7791) + 2011-01-14 Glenn Morris <rgm@gnu.org> * refcards/calccard.tex, refcards/cs-dired-ref.tex:
--- a/etc/PROBLEMS Sun Jan 16 23:45:28 2011 -0800 +++ b/etc/PROBLEMS Wed Jan 19 13:54:19 2011 -0800 @@ -1660,6 +1660,19 @@ exec 2> >(exec cat >&2 2>/dev/null) exec ssh "$@" +*** GNU/Linux: Truncated svn annotate output with SSH. +http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7791 + +The symptoms are: you are accessing a svn repository over SSH. +You use vc-annotate on a large (several thousand line) file, and the +result is truncated around the 1000 line mark. It works fine with +other access methods (eg http), or from outside Emacs. + +This may be a similar libc/SSH issue to the one mentioned above for CVS. +A similar workaround seems to be effective: create a script with the +same contents as the one used above for CVS_RSH, and set the SVN_SSH +environment variable to point to it. + *** GNU/Linux: On Linux-based GNU systems using libc versions 5.4.19 through 5.4.22, Emacs crashes at startup with a segmentation fault.
--- a/lib-src/ChangeLog Sun Jan 16 23:45:28 2011 -0800 +++ b/lib-src/ChangeLog Wed Jan 19 13:54:19 2011 -0800 @@ -1,3 +1,34 @@ +2011-01-17 Paul Eggert <eggert@cs.ucla.edu> + + Include <unistd.h> unilaterally. + * emacsclient.c, etags.c, fakemail.c, make-docfile.c, movemail.c: + * pop.c, test-distrib.c, update-game-score.c: + Include <unistd.h> without worrying about HAVE_UNISTD_H, since + unistd.h is always present now, possibly supplied by gnulib. + + Include <getopt.h> not "getopt.h". + * ebrowse.c, emacsclient.c: Include <getopt.h>, not "getopt.h". + Since getopt.h is no longer in this directory, there's no point + using the form with double-quotes. + + Remove unused files. + * getopt.c, getopt1.c, getopt_.h, getopt_int.h: Remove. + These files are now in ../lib, copied from gnulib. + + Use gnulib's getopt-gnu module. + * Makefile.in (mostlyclean): Do not clean getopt.h or getopt.h-t, + as these are now done by gnulib. + (GETOPT_H, getopt.h, GETOPTOBJS, GETOPTDEPS, getopt.o, getopt1.o): + Remove; now done by gnulib. All uses removed. + + Automate syncing from gnulib. + * Makefile.in (EXE_FILES): New macro. + (BASE_CFLAGS): Add -I../lib and -I${srcdir}/../lib, + for gnulib's .h files. + (LOADLIBES): Add ../lib/libgnu.a. + ($(EXE_FILES)): Depend on ../lib/libgnu.a. + (../lib/libgnu.a): New rule. + 2011-01-08 Paul Eggert <eggert@cs.ucla.edu> * Makefile.in (EXECUTABLES): Remove; macro unused since 1993.
--- a/lib-src/Makefile.in Sun Jan 16 23:45:28 2011 -0800 +++ b/lib-src/Makefile.in Wed Jan 19 13:54:19 2011 -0800 @@ -128,6 +128,9 @@ SCRIPTS= rcs2log vcdiff STAMP_SCRIPTS= stamp-rcs2log stamp-vcdiff +# All files that are created by the linker, i.e., whose names end in ${EXEEXT}. +EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL} + # Specify additional -D flags for movemail. Options: # -DMAIL_USE_FLOCK or -DMAIL_USE_LOCKF (use flock or lockf for file locking). # See the comments about locking in movemail.c. Normally the values @@ -166,13 +169,15 @@ # defined before they know they can take advantage of the information # in ../src/config.h. BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) ${C_WARNINGS_SWITCH} \ - -DHAVE_CONFIG_H -I. -I../src -I${srcdir} -I${srcdir}/../src + -DHAVE_CONFIG_H -I. -I../src -I../lib \ + -I${srcdir} -I${srcdir}/../src -I${srcdir}/../lib ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS} CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS} -LOADLIBES=$(LIBS_SYSTEM) +LOADLIBES = ../lib/libgnu.a $(LIBS_SYSTEM) +$(EXE_FILES): ../lib/libgnu.a ## This is the default compilation command. ## But we should never rely on it, because some make version failed to @@ -274,7 +279,7 @@ fi mostlyclean: - -rm -f core *.o getopt.h getopt.h-t + -rm -f core *.o clean: mostlyclean -rm -f ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL} @@ -306,19 +311,8 @@ $(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c ./test-distrib ${srcdir}/testfile -## We need the following in order to create a <getopt.h> when the system -## does not have one that works with the given compiler. -GETOPT_H = @GETOPT_H@ -getopt.h: getopt_.h - cp $(srcdir)/getopt_.h $@-t - mv $@-t $@ - -GETOPTOBJS = @GETOPTOBJS@ -GETOPTDEPS = $(GETOPTOBJS) $(GETOPT_H) -getopt.o: ${srcdir}/getopt.c $(GETOPT_H) ${srcdir}/gettext.h - ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt.c -getopt1.o: ${srcdir}/getopt1.c $(GETOPT_H) - ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c +../lib/libgnu.a: ../src/config.h + cd ../lib && $(MAKE) libgnu.a REGEXPOBJ = regex.o REGEXPDEPS = $(REGEXPOBJ) $(srcdir)/../src/regex.h @@ -327,20 +321,20 @@ ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \ ${srcdir}/../src/regex.c -etags${EXEEXT}: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h +etags${EXEEXT}: ${srcdir}/etags.c $(REGEXPDEPS) ../src/config.h $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \ - -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) \ + -DVERSION="\"${version}\"" ${srcdir}/etags.c \ $(REGEXPOBJ) $(LOADLIBES) -o etags -ebrowse${EXEEXT}: ${srcdir}/ebrowse.c $(GETOPTDEPS) ../src/config.h +ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ../src/config.h $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ - ${srcdir}/ebrowse.c $(GETOPTOBJS) $(LOADLIBES) -o ebrowse + ${srcdir}/ebrowse.c $(LOADLIBES) -o ebrowse ## We depend on etags to assure that parallel makes do not write two ## etags.o files on top of each other. ctags${EXEEXT}: etags${EXEEXT} $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \ - -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) \ + -DVERSION="\"${version}\"" ${srcdir}/etags.c \ $(REGEXPOBJ) $(LOADLIBES) -o ctags profile${EXEEXT}: ${srcdir}/profile.c ../src/config.h @@ -350,11 +344,11 @@ $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \ -o make-docfile -movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS) +movemail${EXEEXT}: movemail.o pop.o $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o \ - $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MOVE) -o movemail + $(LOADLIBES) $(LIBS_MOVE) -o movemail -movemail.o: ${srcdir}/movemail.c ../src/config.h $(GETOPT_H) +movemail.o: ${srcdir}/movemail.c ../src/config.h $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c pop.o: ${srcdir}/pop.c ../src/config.h @@ -363,19 +357,19 @@ fakemail${EXEEXT}: ${srcdir}/fakemail.c ../src/config.h $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail -emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h $(GETOPTDEPS) - $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(GETOPTOBJS) \ +emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h + $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ -DVERSION="\"${version}\"" \ $(LOADLIBES) -o emacsclient hexl${EXEEXT}: ${srcdir}/hexl.c ../src/config.h $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl -update-game-score${EXEEXT}: update-game-score.o $(GETOPTDEPS) - $(CC) ${LINK_CFLAGS} update-game-score.o $(GETOPTOBJS) \ +update-game-score${EXEEXT}: update-game-score.o + $(CC) ${LINK_CFLAGS} update-game-score.o \ $(LOADLIBES) -o update-game-score -update-game-score.o: ${srcdir}/update-game-score.c ../src/config.h $(GETOPT_H) +update-game-score.o: ${srcdir}/update-game-score.c ../src/config.h $(CC) -c ${CPP_CFLAGS} ${srcdir}/update-game-score.c \ -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\""
--- a/lib-src/ebrowse.c Sun Jan 16 23:45:28 2011 -0800 +++ b/lib-src/ebrowse.c Wed Jan 19 13:54:19 2011 -0800 @@ -30,7 +30,7 @@ #include <string.h> #include <ctype.h> #include <assert.h> -#include "getopt.h" +#include <getopt.h> /* The SunOS compiler doesn't have SEEK_END. */ #ifndef SEEK_END
--- a/lib-src/emacsclient.c Sun Jan 16 23:45:28 2011 -0800 +++ b/lib-src/emacsclient.c Wed Jan 19 13:54:19 2011 -0800 @@ -74,10 +74,8 @@ #include <stdarg.h> #include <ctype.h> #include <stdio.h> -#include "getopt.h" -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif +#include <getopt.h> +#include <unistd.h> #include <pwd.h> #include <sys/stat.h>
--- a/lib-src/etags.c Sun Jan 16 23:45:28 2011 -0800 +++ b/lib-src/etags.c Wed Jan 19 13:54:19 2011 -0800 @@ -172,9 +172,8 @@ # endif #endif /* !WINDOWSNT */ -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#else +#include <unistd.h> +#ifndef HAVE_UNISTD_H # if defined (HAVE_GETCWD) && !defined (WINDOWSNT) extern char *getcwd (char *buf, size_t size); # endif
--- a/lib-src/fakemail.c Sun Jan 16 23:45:28 2011 -0800 +++ b/lib-src/fakemail.c Wed Jan 19 13:54:19 2011 -0800 @@ -62,9 +62,7 @@ #include <stdlib.h> /* This is to declare cuserid. */ -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif /* Type definitions */
--- a/lib-src/getopt.c Sun Jan 16 23:45:28 2011 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1243 +0,0 @@ -/* Getopt for GNU. - NOTE: getopt is now part of the C library, so if you don't know what - "Keep this file name-space clean" means, talk to drepper@gnu.org - before changing it! - Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, - 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>. - Ditto for AIX 3.2 and <stdlib.h>. */ -#ifndef _NO_PROTO -# define _NO_PROTO -#endif - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <stdio.h> - -/* This needs to come after some library #include - to get __GNU_LIBRARY__ defined. */ -#ifdef __GNU_LIBRARY__ -/* Don't include stdlib.h for non-GNU C libraries because some of them - contain conflicting prototypes for getopt. */ -# include <stdlib.h> -# include <unistd.h> -#endif /* GNU C library. */ - -#include <string.h> - -#ifdef VMS -# include <unixlib.h> -#endif - -#ifdef _LIBC -# include <libintl.h> -#else -# include "gettext.h" -# define _(msgid) gettext (msgid) -#endif - -#if defined _LIBC && defined USE_IN_LIBIO -# include <wchar.h> -#endif - -#ifndef attribute_hidden -# define attribute_hidden -#endif - -/* Unlike standard Unix `getopt', functions like `getopt_long' - let the user intersperse the options with the other arguments. - - As `getopt_long' works, it permutes the elements of ARGV so that, - when it is done, all the options precede everything else. Thus - all application programs are extended to handle flexible argument order. - - Using `getopt' or setting the environment variable POSIXLY_CORRECT - disables permutation. - Then the application's behavior is completely standard. - - GNU application programs can use a third alternative mode in which - they can distinguish the relative order of options and other arguments. */ - -#include "getopt.h" -#include "getopt_int.h" - -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -/* 1003.2 says this must be 1 before any call. */ -int optind = 1; - -/* Callers store zero here to inhibit the error message - for unrecognized options. */ - -int opterr = 1; - -/* Set to an option character which was unrecognized. - This must be initialized on some systems to avoid linking in the - system's own getopt implementation. */ - -int optopt = '?'; - -/* Keep a global copy of all internal members of getopt_data. */ - -static struct _getopt_data getopt_data; - - -#ifndef __GNU_LIBRARY__ - -/* Avoid depending on library functions or files - whose names are inconsistent. */ - -#ifndef getenv -extern char *getenv (); -#endif - -#endif /* not __GNU_LIBRARY__ */ - -#ifdef _LIBC -/* Stored original parameters. - XXX This is no good solution. We should rather copy the args so - that we can compare them later. But we must not use malloc(3). */ -extern int __libc_argc; -extern char **__libc_argv; - -/* Bash 2.0 gives us an environment variable containing flags - indicating ARGV elements that should not be considered arguments. */ - -# ifdef USE_NONOPTION_FLAGS -/* Defined in getopt_init.c */ -extern char *__getopt_nonoption_flags; -# endif - -# ifdef USE_NONOPTION_FLAGS -# define SWAP_FLAGS(ch1, ch2) \ - if (d->__nonoption_flags_len > 0) \ - { \ - char __tmp = __getopt_nonoption_flags[ch1]; \ - __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ - __getopt_nonoption_flags[ch2] = __tmp; \ - } -# else -# define SWAP_FLAGS(ch1, ch2) -# endif -#else /* !_LIBC */ -# define SWAP_FLAGS(ch1, ch2) -#endif /* _LIBC */ - -/* Exchange two adjacent subsequences of ARGV. - One subsequence is elements [first_nonopt,last_nonopt) - which contains all the non-options that have been skipped so far. - The other is elements [last_nonopt,optind), which contains all - the options processed since those non-options were skipped. - - `first_nonopt' and `last_nonopt' are relocated so that they describe - the new indices of the non-options in ARGV after they are moved. */ - -static void -exchange (char **argv, struct _getopt_data *d) -{ - int bottom = d->__first_nonopt; - int middle = d->__last_nonopt; - int top = d->optind; - char *tem; - - /* Exchange the shorter segment with the far end of the longer segment. - That puts the shorter segment into the right place. - It leaves the longer segment in the right place overall, - but it consists of two parts that need to be swapped next. */ - -#if defined _LIBC && defined USE_NONOPTION_FLAGS - /* First make sure the handling of the `__getopt_nonoption_flags' - string can work normally. Our top argument must be in the range - of the string. */ - if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) - { - /* We must extend the array. The user plays games with us and - presents new arguments. */ - char *new_str = malloc (top + 1); - if (new_str == NULL) - d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; - else - { - memset (__mempcpy (new_str, __getopt_nonoption_flags, - d->__nonoption_flags_max_len), - '\0', top + 1 - d->__nonoption_flags_max_len); - d->__nonoption_flags_max_len = top + 1; - __getopt_nonoption_flags = new_str; - } - } -#endif - - while (top > middle && middle > bottom) - { - if (top - middle > middle - bottom) - { - /* Bottom segment is the short one. */ - int len = middle - bottom; - register int i; - - /* Swap it with the top part of the top segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[top - (middle - bottom) + i]; - argv[top - (middle - bottom) + i] = tem; - SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); - } - /* Exclude the moved bottom segment from further swapping. */ - top -= len; - } - else - { - /* Top segment is the short one. */ - int len = top - middle; - register int i; - - /* Swap it with the bottom part of the bottom segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[middle + i]; - argv[middle + i] = tem; - SWAP_FLAGS (bottom + i, middle + i); - } - /* Exclude the moved top segment from further swapping. */ - bottom += len; - } - } - - /* Update records for the slots the non-options now occupy. */ - - d->__first_nonopt += (d->optind - d->__last_nonopt); - d->__last_nonopt = d->optind; -} - -/* Initialize the internal data when the first call is made. */ - -static const char * -_getopt_initialize (int argc, char **argv, const char *optstring, - int posixly_correct, struct _getopt_data *d) -{ - /* Start processing options with ARGV-element 1 (since ARGV-element 0 - is the program name); the sequence of previously skipped - non-option ARGV-elements is empty. */ - - d->__first_nonopt = d->__last_nonopt = d->optind; - - d->__nextchar = NULL; - - d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); - - /* Determine how to handle the ordering of options and nonoptions. */ - - if (optstring[0] == '-') - { - d->__ordering = RETURN_IN_ORDER; - ++optstring; - } - else if (optstring[0] == '+') - { - d->__ordering = REQUIRE_ORDER; - ++optstring; - } - else if (d->__posixly_correct) - d->__ordering = REQUIRE_ORDER; - else - d->__ordering = PERMUTE; - -#if defined _LIBC && defined USE_NONOPTION_FLAGS - if (!d->__posixly_correct - && argc == __libc_argc && argv == __libc_argv) - { - if (d->__nonoption_flags_max_len == 0) - { - if (__getopt_nonoption_flags == NULL - || __getopt_nonoption_flags[0] == '\0') - d->__nonoption_flags_max_len = -1; - else - { - const char *orig_str = __getopt_nonoption_flags; - int len = d->__nonoption_flags_max_len = strlen (orig_str); - if (d->__nonoption_flags_max_len < argc) - d->__nonoption_flags_max_len = argc; - __getopt_nonoption_flags = - (char *) malloc (d->__nonoption_flags_max_len); - if (__getopt_nonoption_flags == NULL) - d->__nonoption_flags_max_len = -1; - else - memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), - '\0', d->__nonoption_flags_max_len - len); - } - } - d->__nonoption_flags_len = d->__nonoption_flags_max_len; - } - else - d->__nonoption_flags_len = 0; -#endif - - return optstring; -} - -/* Scan elements of ARGV (whose length is ARGC) for option characters - given in OPTSTRING. - - If an element of ARGV starts with '-', and is not exactly "-" or "--", - then it is an option element. The characters of this element - (aside from the initial '-') are option characters. If `getopt' - is called repeatedly, it returns successively each of the option characters - from each of the option elements. - - If `getopt' finds another option character, it returns that character, - updating `optind' and `nextchar' so that the next call to `getopt' can - resume the scan with the following option character or ARGV-element. - - If there are no more option characters, `getopt' returns -1. - Then `optind' is the index in ARGV of the first ARGV-element - that is not an option. (The ARGV-elements have been permuted - so that those that are not options now come last.) - - OPTSTRING is a string containing the legitimate option characters. - If an option character is seen that is not listed in OPTSTRING, - return '?' after printing an error message. If you set `opterr' to - zero, the error message is suppressed but we still return '?'. - - If a char in OPTSTRING is followed by a colon, that means it wants an arg, - so the following text in the same ARGV-element, or the text of the following - ARGV-element, is returned in `optarg'. Two colons mean an option that - wants an optional arg; if there is text in the current ARGV-element, - it is returned in `optarg', otherwise `optarg' is set to zero. - - If OPTSTRING starts with `-' or `+', it requests different methods of - handling the non-option ARGV-elements. - See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. - - Long-named options begin with `--' instead of `-'. - Their names may be abbreviated as long as the abbreviation is unique - or is an exact match for some defined option. If they have an - argument, it follows the option name in the same ARGV-element, separated - from the option name by a `=', or else the in next ARGV-element. - When `getopt' finds a long-named option, it returns 0 if that option's - `flag' field is nonzero, the value of the option's `val' field - if the `flag' field is zero. - - LONGOPTS is a vector of `struct option' terminated by an - element containing a name which is zero. - - LONGIND returns the index in LONGOPT of the long-named option found. - It is only valid when a long-named option has been found by the most - recent call. - - If LONG_ONLY is nonzero, '-' as well as '--' can introduce - long-named options. - - If POSIXLY_CORRECT is nonzero, behave as if the POSIXLY_CORRECT - environment variable were set. */ - -int -_getopt_internal_r (int argc, char **argv, const char *optstring, - const struct option *longopts, int *longind, - int long_only, int posixly_correct, struct _getopt_data *d) -{ - int print_errors = d->opterr; - if (optstring[0] == ':') - print_errors = 0; - - if (argc < 1) - return -1; - - d->optarg = NULL; - - if (d->optind == 0 || !d->__initialized) - { - if (d->optind == 0) - d->optind = 1; /* Don't scan ARGV[0], the program name. */ - optstring = _getopt_initialize (argc, argv, optstring, - posixly_correct, d); - d->__initialized = 1; - } - - /* Test whether ARGV[optind] points to a non-option argument. - Either it does not have option syntax, or there is an environment flag - from the shell indicating it is not an option. The later information - is only used when the used in the GNU libc. */ -#if defined _LIBC && defined USE_NONOPTION_FLAGS -# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ - || (d->optind < d->__nonoption_flags_len \ - && __getopt_nonoption_flags[d->optind] == '1')) -#else -# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') -#endif - - if (d->__nextchar == NULL || *d->__nextchar == '\0') - { - /* Advance to the next ARGV-element. */ - - /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been - moved back by the user (who may also have changed the arguments). */ - if (d->__last_nonopt > d->optind) - d->__last_nonopt = d->optind; - if (d->__first_nonopt > d->optind) - d->__first_nonopt = d->optind; - - if (d->__ordering == PERMUTE) - { - /* If we have just processed some options following some non-options, - exchange them so that the options come first. */ - - if (d->__first_nonopt != d->__last_nonopt - && d->__last_nonopt != d->optind) - exchange ((char **) argv, d); - else if (d->__last_nonopt != d->optind) - d->__first_nonopt = d->optind; - - /* Skip any additional non-options - and extend the range of non-options previously skipped. */ - - while (d->optind < argc && NONOPTION_P) - d->optind++; - d->__last_nonopt = d->optind; - } - - /* The special ARGV-element `--' means premature end of options. - Skip it like a null option, - then exchange with previous non-options as if it were an option, - then skip everything else like a non-option. */ - - if (d->optind != argc && !strcmp (argv[d->optind], "--")) - { - d->optind++; - - if (d->__first_nonopt != d->__last_nonopt - && d->__last_nonopt != d->optind) - exchange ((char **) argv, d); - else if (d->__first_nonopt == d->__last_nonopt) - d->__first_nonopt = d->optind; - d->__last_nonopt = argc; - - d->optind = argc; - } - - /* If we have done all the ARGV-elements, stop the scan - and back over any non-options that we skipped and permuted. */ - - if (d->optind == argc) - { - /* Set the next-arg-index to point at the non-options - that we previously skipped, so the caller will digest them. */ - if (d->__first_nonopt != d->__last_nonopt) - d->optind = d->__first_nonopt; - return -1; - } - - /* If we have come to a non-option and did not permute it, - either stop the scan or describe it to the caller and pass it by. */ - - if (NONOPTION_P) - { - if (d->__ordering == REQUIRE_ORDER) - return -1; - d->optarg = argv[d->optind++]; - return 1; - } - - /* We have found another option-ARGV-element. - Skip the initial punctuation. */ - - d->__nextchar = (argv[d->optind] + 1 - + (longopts != NULL && argv[d->optind][1] == '-')); - } - - /* Decode the current option-ARGV-element. */ - - /* Check whether the ARGV-element is a long option. - - If long_only and the ARGV-element has the form "-f", where f is - a valid short option, don't consider it an abbreviated form of - a long option that starts with f. Otherwise there would be no - way to give the -f short option. - - On the other hand, if there's a long option "fubar" and - the ARGV-element is "-fu", do consider that an abbreviation of - the long option, just like "--fu", and not "-f" with arg "u". - - This distinction seems to be the most useful approach. */ - - if (longopts != NULL - && (argv[d->optind][1] == '-' - || (long_only && (argv[d->optind][2] - || !strchr (optstring, argv[d->optind][1]))))) - { - char *nameend; - const struct option *p; - const struct option *pfound = NULL; - int exact = 0; - int ambig = 0; - int indfound = -1; - int option_index; - - for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) - /* Do nothing. */ ; - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) - { - if ((unsigned int) (nameend - d->__nextchar) - == (unsigned int) strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else if (long_only - || pfound->has_arg != p->has_arg - || pfound->flag != p->flag - || pfound->val != p->val) - /* Second or later nonexact match found. */ - ambig = 1; - } - - if (ambig && !exact) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"), - argv[0], argv[d->optind]) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("%s: option `%s' is ambiguous\n"), - argv[0], argv[d->optind]); -#endif - } - d->__nextchar += strlen (d->__nextchar); - d->optind++; - d->optopt = 0; - return '?'; - } - - if (pfound != NULL) - { - option_index = indfound; - d->optind++; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - d->optarg = nameend + 1; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - - if (argv[d->optind - 1][1] == '-') - { - /* --option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("\ -%s: option `--%s' doesn't allow an argument\n"), - argv[0], pfound->name); -#else - fprintf (stderr, _("\ -%s: option `--%s' doesn't allow an argument\n"), - argv[0], pfound->name); -#endif - } - else - { - /* +option or -option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("\ -%s: option `%c%s' doesn't allow an argument\n"), - argv[0], argv[d->optind - 1][0], - pfound->name); -#else - fprintf (stderr, _("\ -%s: option `%c%s' doesn't allow an argument\n"), - argv[0], argv[d->optind - 1][0], - pfound->name); -#endif - } - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - - d->__nextchar += strlen (d->__nextchar); - - d->optopt = pfound->val; - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (d->optind < argc) - d->optarg = argv[d->optind++]; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option `%s' requires an argument\n"), - argv[0], argv[d->optind - 1]) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option `%s' requires an argument\n"), - argv[0], argv[d->optind - 1]); -#endif - } - d->__nextchar += strlen (d->__nextchar); - d->optopt = pfound->val; - return optstring[0] == ':' ? ':' : '?'; - } - } - d->__nextchar += strlen (d->__nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - - /* Can't find it as a long option. If this is not getopt_long_only, - or the option starts with '--' or is not a valid short - option, then it's an error. - Otherwise interpret it as a short option. */ - if (!long_only || argv[d->optind][1] == '-' - || strchr (optstring, *d->__nextchar) == NULL) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - - if (argv[d->optind][1] == '-') - { - /* --option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"), - argv[0], d->__nextchar); -#else - fprintf (stderr, _("%s: unrecognized option `--%s'\n"), - argv[0], d->__nextchar); -#endif - } - else - { - /* +option or -option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"), - argv[0], argv[d->optind][0], d->__nextchar); -#else - fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), - argv[0], argv[d->optind][0], d->__nextchar); -#endif - } - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - d->__nextchar = (char *) ""; - d->optind++; - d->optopt = 0; - return '?'; - } - } - - /* Look at and handle the next short option-character. */ - - { - char c = *d->__nextchar++; - char *temp = strchr (optstring, c); - - /* Increment `optind' when we start to process its last character. */ - if (*d->__nextchar == '\0') - ++d->optind; - - if (temp == NULL || c == ':') - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - - if (d->__posixly_correct) - { - /* 1003.2 specifies the format of this message. */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: illegal option -- %c\n"), - argv[0], c); -#else - fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); -#endif - } - else - { -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: invalid option -- %c\n"), - argv[0], c); -#else - fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); -#endif - } - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - d->optopt = c; - return '?'; - } - /* Convenience. Treat POSIX -W foo same as long option --foo */ - if (temp[0] == 'W' && temp[1] == ';') - { - char *nameend; - const struct option *p; - const struct option *pfound = NULL; - int exact = 0; - int ambig = 0; - int indfound = 0; - int option_index; - - /* This is an option that requires an argument. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - d->optind++; - } - else if (d->optind == argc) - { - if (print_errors) - { - /* 1003.2 specifies the format of this message. */ -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, - _("%s: option requires an argument -- %c\n"), - argv[0], c) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("%s: option requires an argument -- %c\n"), - argv[0], c); -#endif - } - d->optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - return c; - } - else - /* We already incremented `d->optind' once; - increment it again when taking next ARGV-elt as argument. */ - d->optarg = argv[d->optind++]; - - /* optarg is now the argument, see if it's in the - table of longopts. */ - - for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; - nameend++) - /* Do nothing. */ ; - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) - { - if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else - /* Second or later nonexact match found. */ - ambig = 1; - } - if (ambig && !exact) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"), - argv[0], argv[d->optind]) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), - argv[0], argv[d->optind]); -#endif - } - d->__nextchar += strlen (d->__nextchar); - d->optind++; - return '?'; - } - if (pfound != NULL) - { - option_index = indfound; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - d->optarg = nameend + 1; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option `-W %s' doesn't allow an argument\n"), - argv[0], pfound->name) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("\ -%s: option `-W %s' doesn't allow an argument\n"), - argv[0], pfound->name); -#endif - } - - d->__nextchar += strlen (d->__nextchar); - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (d->optind < argc) - d->optarg = argv[d->optind++]; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option `%s' requires an argument\n"), - argv[0], argv[d->optind - 1]) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option `%s' requires an argument\n"), - argv[0], argv[d->optind - 1]); -#endif - } - d->__nextchar += strlen (d->__nextchar); - return optstring[0] == ':' ? ':' : '?'; - } - } - d->__nextchar += strlen (d->__nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - d->__nextchar = NULL; - return 'W'; /* Let the application handle it. */ - } - if (temp[1] == ':') - { - if (temp[2] == ':') - { - /* This is an option that accepts an argument optionally. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - d->optind++; - } - else - d->optarg = NULL; - d->__nextchar = NULL; - } - else - { - /* This is an option that requires an argument. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - d->optind++; - } - else if (d->optind == argc) - { - if (print_errors) - { - /* 1003.2 specifies the format of this message. */ -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option requires an argument -- %c\n"), - argv[0], c) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option requires an argument -- %c\n"), - argv[0], c); -#endif - } - d->optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - } - else - /* We already incremented `optind' once; - increment it again when taking next ARGV-elt as argument. */ - d->optarg = argv[d->optind++]; - d->__nextchar = NULL; - } - } - return c; - } -} - -int -_getopt_internal (int argc, char **argv, const char *optstring, - const struct option *longopts, int *longind, - int long_only, int posixly_correct) -{ - int result; - - getopt_data.optind = optind; - getopt_data.opterr = opterr; - - result = _getopt_internal_r (argc, argv, optstring, longopts, longind, - long_only, posixly_correct, &getopt_data); - - optind = getopt_data.optind; - optarg = getopt_data.optarg; - optopt = getopt_data.optopt; - - return result; -} - -/* glibc gets a LSB-compliant getopt. - Standalone applications get a POSIX-compliant getopt. */ -#if _LIBC -enum { POSIXLY_CORRECT = 0 }; -#else -enum { POSIXLY_CORRECT = 1 }; -#endif - -int -getopt (int argc, char *const *argv, const char *optstring) -{ - return _getopt_internal (argc, (char **) argv, optstring, NULL, NULL, 0, - POSIXLY_CORRECT); -} - - -#ifdef TEST - -/* Compile with -DTEST to make an executable for use in testing - the above definition of `getopt'. */ - -int -main (int argc, char **argv) -{ - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - - c = getopt (argc, argv, "abc:d:0123456789"); - if (c == -1) - break; - - switch (c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value `%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); - } - - exit (0); -} - -#endif /* TEST */ -
--- a/lib-src/getopt1.c Sun Jan 16 23:45:28 2011 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,175 +0,0 @@ -/* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, - 1998, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#ifdef _LIBC -# include <getopt.h> -#else -# include "getopt.h" -#endif -#include "getopt_int.h" - -#include <stdio.h> - -/* This needs to come after some library #include - to get __GNU_LIBRARY__ defined. */ -#ifdef __GNU_LIBRARY__ -#include <stdlib.h> -#endif - -#ifndef NULL -#define NULL 0 -#endif - -int -getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, - const struct option *long_options, int *opt_index) -{ - return _getopt_internal (argc, (char **) argv, options, long_options, - opt_index, 0, 0); -} - -int -_getopt_long_r (int argc, char **argv, const char *options, - const struct option *long_options, int *opt_index, - struct _getopt_data *d) -{ - return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 0, 0, d); -} - -/* Like getopt_long, but '-' as well as '--' can indicate a long option. - If an option that starts with '-' (not '--') doesn't match a long option, - but does match a short option, it is parsed as a short option - instead. */ - -int -getopt_long_only (int argc, char *__getopt_argv_const *argv, - const char *options, - const struct option *long_options, int *opt_index) -{ - return _getopt_internal (argc, (char **) argv, options, long_options, - opt_index, 1, 0); -} - -int -_getopt_long_only_r (int argc, char **argv, const char *options, - const struct option *long_options, int *opt_index, - struct _getopt_data *d) -{ - return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 1, 0, d); -} - - -#ifdef TEST - -#include <stdio.h> - -int -main (int argc, char **argv) -{ - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - int option_index = 0; - static struct option long_options[] = - { - {"add", 1, 0, 0}, - {"append", 0, 0, 0}, - {"delete", 1, 0, 0}, - {"verbose", 0, 0, 0}, - {"create", 0, 0, 0}, - {"file", 1, 0, 0}, - {0, 0, 0, 0} - }; - - c = getopt_long (argc, argv, "abc:d:0123456789", - long_options, &option_index); - if (c == -1) - break; - - switch (c) - { - case 0: - printf ("option %s", long_options[option_index].name); - if (optarg) - printf (" with arg %s", optarg); - printf ("\n"); - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value `%s'\n", optarg); - break; - - case 'd': - printf ("option d with value `%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); - } - - exit (0); -} - -#endif /* TEST */ -
--- a/lib-src/getopt_.h Sun Jan 16 23:45:28 2011 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,228 +0,0 @@ -/* Declarations for getopt. - Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, - 2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _GETOPT_H - -#ifndef __need_getopt -# define _GETOPT_H 1 -#endif - -/* Standalone applications should #define __GETOPT_PREFIX to an - identifier that prefixes the external functions and variables - defined in this header. When this happens, include the - headers that might declare getopt so that they will not cause - confusion if included after this file. Then systematically rename - identifiers so that they do not collide with the system functions - and variables. Renaming avoids problems with some compilers and - linkers. */ -#if defined __GETOPT_PREFIX && !defined __need_getopt -# include <stdlib.h> -# include <stdio.h> -# if HAVE_UNISTD_H -# include <unistd.h> -# endif -# undef __need_getopt -# undef getopt -# undef getopt_long -# undef getopt_long_only -# undef optarg -# undef opterr -# undef optind -# undef optopt -# define __GETOPT_CONCAT(x, y) x ## y -# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) -# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) -# define getopt __GETOPT_ID (getopt) -# define getopt_long __GETOPT_ID (getopt_long) -# define getopt_long_only __GETOPT_ID (getopt_long_only) -# define optarg __GETOPT_ID (optarg) -# define opterr __GETOPT_ID (opterr) -# define optind __GETOPT_ID (optind) -# define optopt __GETOPT_ID (optopt) -#endif - -/* Standalone applications get correct prototypes for getopt_long and - getopt_long_only; they declare "char **argv". libc uses prototypes - with "char *const *argv" that are incorrect because getopt_long and - getopt_long_only can permute argv; this is required for backward - compatibility (e.g., for LSB 2.0.1). - - This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt', - but it caused redefinition warnings if both unistd.h and getopt.h were - included, since unistd.h includes getopt.h having previously defined - __need_getopt. - - The only place where __getopt_argv_const is used is in definitions - of getopt_long and getopt_long_only below, but these are visible - only if __need_getopt is not defined, so it is quite safe to rewrite - the conditional as follows: -*/ -#if !defined __need_getopt -# if defined __GETOPT_PREFIX -# define __getopt_argv_const /* empty */ -# else -# define __getopt_argv_const const -# endif -#endif - -/* If __GNU_LIBRARY__ is not already defined, either we are being used - standalone, or this is the first header included in the source file. - If we are being used with glibc, we need to include <features.h>, but - that does not exist if we are standalone. So: if __GNU_LIBRARY__ is - not defined, include <ctype.h>, which will pull in <features.h> for us - if it's from glibc. (Why ctype.h? It's guaranteed to exist and it - doesn't flood the namespace with stuff the way some other headers do.) */ -#if !defined __GNU_LIBRARY__ -# include <ctype.h> -#endif - -#ifndef __THROW -# ifndef __GNUC_PREREQ -# define __GNUC_PREREQ(maj, min) (0) -# endif -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () -# else -# define __THROW -# endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -extern char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -extern int optind; - -/* Callers store zero here to inhibit the error message `getopt' prints - for unrecognized options. */ - -extern int opterr; - -/* Set to an option character which was unrecognized. */ - -extern int optopt; - -#ifndef __need_getopt -/* Describe the long-named options requested by the application. - The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of `struct option' terminated by an element containing a name which is - zero. - - The field `has_arg' is: - no_argument (or 0) if the option does not take an argument, - required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. - - If the field `flag' is not NULL, it points to a variable that is set - to the value given in the field `val' when the option is found, but - left unchanged if the option is not found. - - To have a long-named option do something other than set an `int' to - a compiled-in constant, such as set a value from `optarg', set the - option's `flag' field to zero and its `val' field to a nonzero - value (the equivalent single-letter option character, if there is - one). For long options that have a zero `flag' field, `getopt' - returns the contents of the `val' field. */ - -struct option -{ - const char *name; - /* has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. */ - int has_arg; - int *flag; - int val; -}; - -/* Names for the values of the `has_arg' field of `struct option'. */ - -# define no_argument 0 -# define required_argument 1 -# define optional_argument 2 -#endif /* need getopt */ - - -/* Get definitions and prototypes for functions to process the - arguments in ARGV (ARGC of them, minus the program name) for - options given in OPTS. - - Return the option character from OPTS just read. Return -1 when - there are no more options. For unrecognized options, or options - missing arguments, `optopt' is set to the option letter, and '?' is - returned. - - The OPTS string is a list of characters which are recognized option - letters, optionally followed by colons, specifying that that letter - takes an argument, to be placed in `optarg'. - - If a letter in OPTS is followed by two colons, its argument is - optional. This behavior is specific to the GNU `getopt'. - - The argument `--' causes premature termination of argument - scanning, explicitly telling `getopt' that there are no more - options. - - If OPTS begins with `--', then non-option arguments are treated as - arguments to the option '\0'. This behavior is specific to the GNU - `getopt'. */ - -extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) - __THROW; - -#ifndef __need_getopt -extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW; -extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW; - -#endif - -#ifdef __cplusplus -} -#endif - -/* Make sure we later can get all the definitions and declarations. */ -#undef __need_getopt - -#endif /* getopt.h */ -
--- a/lib-src/getopt_int.h Sun Jan 16 23:45:28 2011 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -/* Internal declarations for getopt. - Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, - 2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _GETOPT_INT_H -#define _GETOPT_INT_H 1 - -extern int _getopt_internal (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - int __long_only, int __posixly_correct); - - -/* Reentrant versions which can handle parsing multiple argument - vectors at the same time. */ - -/* Data type for reentrant functions. */ -struct _getopt_data -{ - /* These have exactly the same meaning as the corresponding global - variables, except that they are used for the reentrant - versions of getopt. */ - int optind; - int opterr; - int optopt; - char *optarg; - - /* Internal members. */ - - /* True if the internal members have been initialized. */ - int __initialized; - - /* The next char to be scanned in the option-element - in which the last option character we returned was found. - This allows us to pick up the scan where we left off. - - If this is zero, or a null string, it means resume the scan - by advancing to the next ARGV-element. */ - char *__nextchar; - - /* Describe how to deal with options that follow non-option ARGV-elements. - - If the caller did not specify anything, - the default is REQUIRE_ORDER if the environment variable - POSIXLY_CORRECT is defined, PERMUTE otherwise. - - REQUIRE_ORDER means don't recognize them as options; - stop option processing when the first non-option is seen. - This is what Unix does. - This mode of operation is selected by either setting the environment - variable POSIXLY_CORRECT, or using `+' as the first character - of the list of option characters, or by calling getopt. - - PERMUTE is the default. We permute the contents of ARGV as we - scan, so that eventually all the non-options are at the end. - This allows options to be given in any order, even with programs - that were not written to expect this. - - RETURN_IN_ORDER is an option available to programs that were - written to expect options and other ARGV-elements in any order - and that care about the ordering of the two. We describe each - non-option ARGV-element as if it were the argument of an option - with character code 1. Using `-' as the first character of the - list of option characters selects this mode of operation. - - The special argument `--' forces an end of option-scanning regardless - of the value of `ordering'. In the case of RETURN_IN_ORDER, only - `--' can cause `getopt' to return -1 with `optind' != ARGC. */ - - enum - { - REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER - } __ordering; - - /* If the POSIXLY_CORRECT environment variable is set - or getopt was called. */ - int __posixly_correct; - - - /* Handle permutation of arguments. */ - - /* Describe the part of ARGV that contains non-options that have - been skipped. `first_nonopt' is the index in ARGV of the first - of them; `last_nonopt' is the index after the last of them. */ - - int __first_nonopt; - int __last_nonopt; - -#if defined _LIBC && defined USE_NONOPTION_FLAGS - int __nonoption_flags_max_len; - int __nonoption_flags_len; -# endif -}; - -/* The initializer is necessary to set OPTIND and OPTERR to their - default values and to clear the initialization flag. */ -#define _GETOPT_DATA_INITIALIZER { 1, 1 } - -extern int _getopt_internal_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - int __long_only, int __posixly_correct, - struct _getopt_data *__data); - -extern int _getopt_long_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - struct _getopt_data *__data); - -extern int _getopt_long_only_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, - int *__longind, - struct _getopt_data *__data); - -#endif /* getopt_int.h */ -
--- a/lib-src/gettext.h Sun Jan 16 23:45:28 2011 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* Convenience header for conditional use of GNU <libintl.h>. - Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2004, - 2005, 2006, 2007 Free Software Foundation, Inc. - - 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _LIBGETTEXT_H -#define _LIBGETTEXT_H 1 - -/* NLS can be disabled through the configure --disable-nls option. */ -#if ENABLE_NLS - -/* Get declarations of GNU message catalog functions. */ -# include <libintl.h> - -#else - -/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which - chokes if dcgettext is defined as a macro. So include it now, to make - later inclusions of <locale.h> a NOP. We don't include <libintl.h> - as well because people using "gettext.h" will not include <libintl.h>, - and also including <libintl.h> would fail on SunOS 4, whereas <locale.h> - is OK. */ -#if defined(__sun) -# include <locale.h> -#endif - -/* Many header files from the libstdc++ coming with g++ 3.3 or newer include - <libintl.h>, which chokes if dcgettext is defined as a macro. So include - it now, to make later inclusions of <libintl.h> a NOP. */ -#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) -# include <cstdlib> -# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H -# include <libintl.h> -# endif -#endif - -/* Disabled NLS. - The casts to 'const char *' serve the purpose of producing warnings - for invalid uses of the value returned from these functions. - On pre-ANSI systems without 'const', the config.h file is supposed to - contain "#define const". */ -# define gettext(Msgid) ((const char *) (Msgid)) -# define dgettext(Domainname, Msgid) ((const char *) (Msgid)) -# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) -# define ngettext(Msgid1, Msgid2, N) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) -# define dngettext(Domainname, Msgid1, Msgid2, N) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) -# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) -# define textdomain(Domainname) ((const char *) (Domainname)) -# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) -# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) - -#endif - -/* A pseudo function call that serves as a marker for the automated - extraction of messages, but does not call gettext(). The run-time - translation is done at a different place in the code. - The argument, String, should be a literal string. Concatenated strings - and other string expressions won't work. - The macro's expansion is not parenthesized, so that it is suitable as - initializer for static 'char[]' or 'const char[]' variables. */ -#define gettext_noop(String) String - -#endif /* _LIBGETTEXT_H */ -
--- a/lib-src/make-docfile.c Sun Jan 16 23:45:28 2011 -0800 +++ b/lib-src/make-docfile.c Wed Jan 19 13:54:19 2011 -0800 @@ -78,9 +78,7 @@ #undef chdir #endif -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif /* Stdio stream for output to the DOC file. */ FILE *outfile;
--- a/lib-src/movemail.c Sun Jan 16 23:45:28 2011 -0800 +++ b/lib-src/movemail.c Wed Jan 19 13:54:19 2011 -0800 @@ -63,9 +63,7 @@ #include <time.h> #include <getopt.h> -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif
--- a/lib-src/pop.c Sun Jan 16 23:45:28 2011 -0800 +++ b/lib-src/pop.c Wed Jan 19 13:54:19 2011 -0800 @@ -68,9 +68,7 @@ #include <string.h> #define index strchr #endif -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #ifdef KERBEROS # ifdef HAVE_KRB5_H
--- a/lib-src/test-distrib.c Sun Jan 16 23:45:28 2011 -0800 +++ b/lib-src/test-distrib.c Wed Jan 19 13:54:19 2011 -0800 @@ -22,10 +22,7 @@ #include <config.h> #include <stdio.h> #include <fcntl.h> - -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif /* Break string in two parts to avoid buggy C compilers that ignore characters after nulls in strings. */
--- a/lib-src/update-game-score.c Sun Jan 16 23:45:28 2011 -0800 +++ b/lib-src/update-game-score.c Wed Jan 19 13:54:19 2011 -0800 @@ -34,9 +34,7 @@ #include <config.h> -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #include <errno.h> #ifdef HAVE_STRING_H #include <string.h>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/COPYING Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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 3 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, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/Makefile.am Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,8 @@ +BUILT_SOURCES = +EXTRA_DIST = +MOSTLYCLEANFILES = +noinst_LIBRARIES = + +DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src + +include gnulib.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/Makefile.in Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,979 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# +# This file is free software, distributed under the terms of the GNU +# General Public License. As a special exception to the GNU General +# Public License, this file may be distributed as part of a program +# that contains a configuration script generated by Autoconf, under +# the same distribution terms as the rest of that program. +# +# Generated by gnulib-tool. +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files dtoastr getopt-gnu mktime + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/gnulib.mk COPYING +subdir = lib +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ + $(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/extensions.m4 \ + $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/gnulib-comp.m4 \ + $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/mktime.m4 \ + $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/stddef_h.m4 \ + $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ + $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/warn-on-use.m4 \ + $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AR = ar +ARFLAGS = cru +libgnu_a_AR = $(AR) $(ARFLAGS) +am__DEPENDENCIES_1 = +am_libgnu_a_OBJECTS = dtoastr.$(OBJEXT) +libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) +DIST_SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BLESSMAIL_TARGET = @BLESSMAIL_TARGET@ +CANNOT_DUMP = @CANNOT_DUMP@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CFLAGS_SOUND = @CFLAGS_SOUND@ +COM_ERRLIB = @COM_ERRLIB@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CRT_DIR = @CRT_DIR@ +CRYPTOLIB = @CRYPTOLIB@ +CYGPATH_W = @CYGPATH_W@ +CYGWIN_OBJ = @CYGWIN_OBJ@ +C_SWITCH_MACHINE = @C_SWITCH_MACHINE@ +C_SWITCH_SYSTEM = @C_SWITCH_SYSTEM@ +C_SWITCH_X_SITE = @C_SWITCH_X_SITE@ +C_SWITCH_X_SYSTEM = @C_SWITCH_X_SYSTEM@ +C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBUS_OBJ = @DBUS_OBJ@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEPFLAGS = @DEPFLAGS@ +DESLIB = @DESLIB@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FONT_OBJ = @FONT_OBJ@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +GCONF_CFLAGS = @GCONF_CFLAGS@ +GCONF_LIBS = @GCONF_LIBS@ +GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ +GETOPT_H = @GETOPT_H@ +GMALLOC_OBJ = @GMALLOC_OBJ@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_DUP3 = @GNULIB_DUP3@ +GNULIB_ENVIRON = @GNULIB_ENVIRON@ +GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ +GNULIB_FSYNC = @GNULIB_FSYNC@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ +GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ +GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ +GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ +GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LINK = @GNULIB_LINK@ +GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ +GNULIB_PIPE = @GNULIB_PIPE@ +GNULIB_PIPE2 = @GNULIB_PIPE2@ +GNULIB_PREAD = @GNULIB_PREAD@ +GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_READLINK = @GNULIB_READLINK@ +GNULIB_READLINKAT = @GNULIB_READLINKAT@ +GNULIB_RMDIR = @GNULIB_RMDIR@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STRPTIME = @GNULIB_STRPTIME@ +GNULIB_SYMLINK = @GNULIB_SYMLINK@ +GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ +GNULIB_TIMEGM = @GNULIB_TIMEGM@ +GNULIB_TIME_R = @GNULIB_TIME_R@ +GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ +GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ +GNULIB_UNLINK = @GNULIB_UNLINK@ +GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ +GNULIB_USLEEP = @GNULIB_USLEEP@ +GNULIB_WRITE = @GNULIB_WRITE@ +GNU_OBJC_CFLAGS = @GNU_OBJC_CFLAGS@ +GREP = @GREP@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +GTK_OBJ = @GTK_OBJ@ +GZIP_INFO = @GZIP_INFO@ +GZIP_PROG = @GZIP_PROG@ +HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ +HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ +HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ +HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ +HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_DUP3 = @HAVE_DUP3@ +HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_FACCESSAT = @HAVE_FACCESSAT@ +HAVE_FCHDIR = @HAVE_FCHDIR@ +HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ +HAVE_FSYNC = @HAVE_FSYNC@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ +HAVE_GETGROUPS = @HAVE_GETGROUPS@ +HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ +HAVE_GETLOGIN = @HAVE_GETLOGIN@ +HAVE_GETOPT_H = @HAVE_GETOPT_H@ +HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ +HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LINK = @HAVE_LINK@ +HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_MAKEINFO = @HAVE_MAKEINFO@ +HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_OS_H = @HAVE_OS_H@ +HAVE_PIPE = @HAVE_PIPE@ +HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_PREAD = @HAVE_PREAD@ +HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_READLINK = @HAVE_READLINK@ +HAVE_READLINKAT = @HAVE_READLINKAT@ +HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_STRPTIME = @HAVE_STRPTIME@ +HAVE_SYMLINK = @HAVE_SYMLINK@ +HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ +HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNLINKAT = @HAVE_UNLINKAT@ +HAVE_USLEEP = @HAVE_USLEEP@ +HAVE_WCHAR_T = @HAVE_WCHAR_T@ +HAVE_XSERVER = @HAVE_XSERVER@ +IMAGEMAGICK_CFLAGS = @IMAGEMAGICK_CFLAGS@ +IMAGEMAGICK_LIBS = @IMAGEMAGICK_LIBS@ +INCLUDE_NEXT = @INCLUDE_NEXT@ +INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_INFO = @INSTALL_INFO@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KMEM_GROUP = @KMEM_GROUP@ +KRB4LIB = @KRB4LIB@ +KRB5LIB = @KRB5LIB@ +LDFLAGS = @LDFLAGS@ +LD_FIRSTFLAG = @LD_FIRSTFLAG@ +LD_SWITCH_SYSTEM = @LD_SWITCH_SYSTEM@ +LD_SWITCH_SYSTEM_TEMACS = @LD_SWITCH_SYSTEM_TEMACS@ +LD_SWITCH_X_SITE = @LD_SWITCH_X_SITE@ +LD_SWITCH_X_SITE_AUX = @LD_SWITCH_X_SITE_AUX@ +LD_SWITCH_X_SITE_AUX_RPATH = @LD_SWITCH_X_SITE_AUX_RPATH@ +LIBGIF = @LIBGIF@ +LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ +LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ +LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ +LIBGPM = @LIBGPM@ +LIBHESIOD = @LIBHESIOD@ +LIBINTL = @LIBINTL@ +LIBJPEG = @LIBJPEG@ +LIBOBJS = @LIBOBJS@ +LIBOTF_CFLAGS = @LIBOTF_CFLAGS@ +LIBOTF_LIBS = @LIBOTF_LIBS@ +LIBPNG = @LIBPNG@ +LIBRESOLV = @LIBRESOLV@ +LIBS = @LIBS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBSOUND = @LIBSOUND@ +LIBS_MAIL = @LIBS_MAIL@ +LIBS_SYSTEM = @LIBS_SYSTEM@ +LIBS_TERMCAP = @LIBS_TERMCAP@ +LIBTIFF = @LIBTIFF@ +LIBXMENU = @LIBXMENU@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LIBXMU = @LIBXMU@ +LIBXPM = @LIBXPM@ +LIBXSM = @LIBXSM@ +LIBXTR6 = @LIBXTR6@ +LIBXT_OTHER = @LIBXT_OTHER@ +LIBX_OTHER = @LIBX_OTHER@ +LIB_GCC = @LIB_GCC@ +LIB_MATH = @LIB_MATH@ +LIB_STANDARD = @LIB_STANDARD@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@ +M17N_FLT_LIBS = @M17N_FLT_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDEPDIR = @MKDEPDIR@ +MKDIR_P = @MKDIR_P@ +MOUSE_SUPPORT = @MOUSE_SUPPORT@ +M_FILE = @M_FILE@ +NEED_SETGID = @NEED_SETGID@ +NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ +NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ +NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ +NEXT_GETOPT_H = @NEXT_GETOPT_H@ +NEXT_STDDEF_H = @NEXT_STDDEF_H@ +NEXT_TIME_H = @NEXT_TIME_H@ +NEXT_UNISTD_H = @NEXT_UNISTD_H@ +NS_OBJ = @NS_OBJ@ +NS_SUPPORT = @NS_SUPPORT@ +OBJEXT = @OBJEXT@ +OLDXMENU = @OLDXMENU@ +OLDXMENU_DEPS = @OLDXMENU_DEPS@ +OLDXMENU_TARGET = @OLDXMENU_TARGET@ +OTHER_FILES = @OTHER_FILES@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POST_ALLOC_OBJ = @POST_ALLOC_OBJ@ +PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ +PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ +PRE_ALLOC_OBJ = @PRE_ALLOC_OBJ@ +PROFILING_CFLAGS = @PROFILING_CFLAGS@ +PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ +RALLOC_OBJ = @RALLOC_OBJ@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_CLOSE = @REPLACE_CLOSE@ +REPLACE_DUP = @REPLACE_DUP@ +REPLACE_DUP2 = @REPLACE_DUP2@ +REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ +REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ +REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_LCHOWN = @REPLACE_LCHOWN@ +REPLACE_LINK = @REPLACE_LINK@ +REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NULL = @REPLACE_NULL@ +REPLACE_PREAD = @REPLACE_PREAD@ +REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_READLINK = @REPLACE_READLINK@ +REPLACE_RMDIR = @REPLACE_RMDIR@ +REPLACE_SLEEP = @REPLACE_SLEEP@ +REPLACE_SYMLINK = @REPLACE_SYMLINK@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ +REPLACE_UNLINK = @REPLACE_UNLINK@ +REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ +REPLACE_USLEEP = @REPLACE_USLEEP@ +REPLACE_WRITE = @REPLACE_WRITE@ +RSVG_CFLAGS = @RSVG_CFLAGS@ +RSVG_LIBS = @RSVG_LIBS@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +START_FILES = @START_FILES@ +STDDEF_H = @STDDEF_H@ +STRIP = @STRIP@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +S_FILE = @S_FILE@ +TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@ +TERMCAP_OBJ = @TERMCAP_OBJ@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +TOOLKIT_LIBW = @TOOLKIT_LIBW@ +TOOLTIP_SUPPORT = @TOOLTIP_SUPPORT@ +UNEXEC_OBJ = @UNEXEC_OBJ@ +UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ +UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ +VERSION = @VERSION@ +VMLIMIT_OBJ = @VMLIMIT_OBJ@ +WIDGET_OBJ = @WIDGET_OBJ@ +WINDOW_SUPPORT = @WINDOW_SUPPORT@ +XFT_CFLAGS = @XFT_CFLAGS@ +XFT_LIBS = @XFT_LIBS@ +XMENU_OBJ = @XMENU_OBJ@ +XMKMF = @XMKMF@ +XOBJ = @XOBJ@ +X_TOOLKIT_TYPE = @X_TOOLKIT_TYPE@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +archlibdir = @archlibdir@ +bindir = @bindir@ +bitmapdir = @bitmapdir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +canonical = @canonical@ +configuration = @configuration@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +etcdir = @etcdir@ +exec_prefix = @exec_prefix@ +gamedir = @gamedir@ +gameuser = @gameuser@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_LTLIBOBJS@ +gltests_LIBOBJS = @gltests_LIBOBJS@ +gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ +gltests_WITNESS = @gltests_WITNESS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +liblockfile = @liblockfile@ +lispdir = @lispdir@ +lisppath = @lisppath@ +localedir = @localedir@ +locallisppath = @locallisppath@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +ns_appbindir = @ns_appbindir@ +ns_appdir = @ns_appdir@ +ns_appresdir = @ns_appresdir@ +ns_appsrc = @ns_appsrc@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version = @version@ +x_default_search_path = @x_default_search_path@ + +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. + +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. +BUILT_SOURCES = arg-nonnull.h c++defs.h $(GETOPT_H) $(STDDEF_H) time.h \ + unistd.h warn-on-use.h +EXTRA_DIST = $(top_srcdir)/./arg-nonnull.h $(top_srcdir)/./c++defs.h \ + ftoastr.c ftoastr.h getopt.c getopt.in.h getopt1.c \ + getopt_int.h intprops.h mktime-internal.h mktime.c stddef.in.h \ + time.in.h time_r.c unistd.in.h $(top_srcdir)/./warn-on-use.h +MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ + c++defs.h c++defs.h-t getopt.h getopt.h-t stddef.h stddef.h-t \ + time.h time.h-t unistd.h unistd.h-t warn-on-use.h \ + warn-on-use.h-t +noinst_LIBRARIES = libgnu.a +DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src +libgnu_a_SOURCES = dtoastr.c gettext.h +libgnu_a_LIBADD = $(gl_LIBOBJS) +libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) +EXTRA_libgnu_a_SOURCES = ftoastr.c getopt.c getopt1.c mktime.c \ + time_r.c +ARG_NONNULL_H = arg-nonnull.h +CXXDEFS_H = c++defs.h +WARN_ON_USE_H = warn-on-use.h +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/gnulib.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu lib/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES) + -rm -f libgnu.a + $(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD) + $(RANLIB) libgnu.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtoastr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftoastr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-local + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-local pdf pdf-am ps ps-am tags \ + uninstall uninstall-am + +# The arg-nonnull.h that gets inserted into generated .h files is the same as +# build-aux/arg-nonnull.h, except that it has the copyright header cut off. +arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_ARG_NONNULL/,$$p' \ + < $(top_srcdir)/./arg-nonnull.h \ + > $@-t && \ + mv $@-t $@ +# The c++defs.h that gets inserted into generated .h files is the same as +# build-aux/c++defs.h, except that it has the copyright header cut off. +c++defs.h: $(top_srcdir)/./c++defs.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/_GL_CXXDEFS/,$$p' \ + < $(top_srcdir)/./c++defs.h \ + > $@-t && \ + mv $@-t $@ + +# We need the following in order to create <getopt.h> when the system +# doesn't have one that works with the given compiler. +getopt.h: getopt.in.h $(ARG_NONNULL_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + < $(srcdir)/getopt.in.h; \ + } > $@-t && \ + mv -f $@-t $@ + +# We need the following in order to create <stddef.h> when the system +# doesn't have one that works with the given compiler. +stddef.h: stddef.in.h + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ + -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ + -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ + < $(srcdir)/stddef.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create <time.h> when the system +# doesn't have one that works with the given compiler. +time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ + -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \ + -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \ + -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \ + -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \ + -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \ + -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ + -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ + -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ + -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ + -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ + -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ + -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ + -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ + -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ + -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ + -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/time.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create an empty placeholder for +# <unistd.h> when the system doesn't have one. +unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ + -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ + -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ + -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ + -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \ + -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \ + -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \ + -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \ + -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ + -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \ + -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \ + -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ + -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ + -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \ + -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ + -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \ + -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ + -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \ + -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ + -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ + -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ + -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ + -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ + -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ + -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ + -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \ + -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \ + -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \ + -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \ + -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ + -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \ + -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \ + -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ + -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \ + -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \ + -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \ + -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \ + -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ + -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \ + -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \ + -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \ + -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ + < $(srcdir)/unistd.in.h | \ + sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ + -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ + -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ + -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ + -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ + -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ + -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ + -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ + -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ + -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ + -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ + -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ + -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ + -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ + -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ + -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ + -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ + -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ + -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ + -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ + -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ + -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ + -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ + -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ + -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ + -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ + -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ + -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ + -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ + -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ + -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ + -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ + -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ + -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ + -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ + -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ + -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ + -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ + -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ + -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ + -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ + -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ + -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ + -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ + -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ + -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ + -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ + -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ + -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ + -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ + -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ + -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ + -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ + -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ + -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ + -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ + -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ + -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ + -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ + -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ + -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ + -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ + -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ + -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + } > $@-t && \ + mv $@-t $@ +# The warn-on-use.h that gets inserted into generated .h files is the same as +# build-aux/warn-on-use.h, except that it has the copyright header cut off. +warn-on-use.h: $(top_srcdir)/./warn-on-use.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/^.ifndef/,$$p' \ + < $(top_srcdir)/./warn-on-use.h \ + > $@-t && \ + mv $@-t $@ + +mostlyclean-local: mostlyclean-generic + @for dir in '' $(MOSTLYCLEANDIRS); do \ + if test -n "$$dir" && test -d $$dir; then \ + echo "rmdir $$dir"; rmdir $$dir; \ + fi; \ + done; \ + : + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/dtoastr.c Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,2 @@ +#define LENGTH 2 +#include "ftoastr.c"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/ftoastr.c Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,136 @@ +/* floating point to accurate string + + Copyright (C) 2010-2011 Free Software Foundation, Inc. + + 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 3 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, see <http://www.gnu.org/licenses/>. */ + +/* Written by Paul Eggert. */ + +/* This code can misbehave on some buggy or older platforms, when + operating on arguments on floating types other than 'double', or + when given unusual combinations of options. Gnulib's + snprintf-posix module works around many of these problems. + + This code relies on sprintf, strtod, etc. operating accurately; + otherwise, the resulting strings could be inaccurate or too long. */ + +#include <config.h> + +#include "ftoastr.h" + +#include "intprops.h" +#include <float.h> +#include <stdio.h> +#include <stdlib.h> + +#if LENGTH == 3 +# define FLOAT long double +# define FLOAT_DIG LDBL_DIG +# define FLOAT_MIN LDBL_MIN +# define FLOAT_PREC_BOUND _GL_LDBL_PREC_BOUND +# define FTOASTR ldtoastr +# define STRTOF strtold +#elif LENGTH == 2 +# define FLOAT double +# define FLOAT_DIG DBL_DIG +# define FLOAT_MIN DBL_MIN +# define FLOAT_PREC_BOUND _GL_DBL_PREC_BOUND +# define FTOASTR dtoastr +# define STRTOF strtod +#else +# define LENGTH 1 +# define FLOAT float +# define FLOAT_DIG FLT_DIG +# define FLOAT_MIN FLT_MIN +# define FLOAT_PREC_BOUND _GL_FLT_PREC_BOUND +# define FTOASTR ftoastr +# define STRTOF strtof +#endif + +/* On pre-C99 hosts, approximate strtof and strtold with strtod. This + may generate one or two extra digits, but that's better than not + working at all. Assume that strtof works if strtold does. */ +#if LENGTH != 2 && ! HAVE_C99_STRTOLD +# undef STRTOF +# define STRTOF strtod +#endif + +/* On hosts where it's not known that snprintf works, use sprintf to + implement the subset needed here. Typically BUFSIZE is big enough + and there's little or no performance hit. */ +#if ! GNULIB_SNPRINTF +# undef snprintf +# define snprintf ftoastr_snprintf +static int +ftoastr_snprintf (char *buf, size_t bufsize, char const *format, + int width, int prec, FLOAT x) +{ + char width_0_buffer[LENGTH == 1 ? FLT_BUFSIZE_BOUND + : LENGTH == 2 ? DBL_BUFSIZE_BOUND + : LDBL_BUFSIZE_BOUND]; + int n = width; + if (bufsize < sizeof width_0_buffer) + { + n = sprintf (width_0_buffer, format, 0, prec, x); + if (n < 0) + return n; + if (n < width) + n = width; + } + if (n < bufsize) + n = sprintf (buf, format, width, prec, x); + return n; +} +#endif + +int +FTOASTR (char *buf, size_t bufsize, int flags, int width, FLOAT x) +{ + /* The following method is simple but slow. + For ideas about speeding things up, please see: + + Florian Loitsch, Printing floating-point numbers quickly and accurately + with integers. ACM SIGPLAN notices 46, 6 (June 2010), 233-243 + <http://dx.doi.org/10.1145/1809028.1806623>; also see the + 2010-03-21 draft <http://florian.loitsch.com/tmp/article.pdf>. */ + + char format[sizeof "%-+ 0*.*Lg"]; + FLOAT abs_x = x < 0 ? -x : x; + int prec; + + char *p = format; + *p++ = '%'; + + /* Support flags that generate output parsable by strtof. */ + *p = '-'; p += (flags & FTOASTR_LEFT_JUSTIFY ) != 0; + *p = '+'; p += (flags & FTOASTR_ALWAYS_SIGNED ) != 0; + *p = ' '; p += (flags & FTOASTR_SPACE_POSITIVE) != 0; + *p = '0'; p += (flags & FTOASTR_ZERO_PAD ) != 0; + + *p++ = '*'; + *p++ = '.'; + *p++ = '*'; + *p = 'L'; p += 2 < LENGTH; + *p++ = flags & FTOASTR_UPPER_E ? 'G' : 'g'; + *p = '\0'; + + for (prec = abs_x < FLOAT_MIN ? 1 : FLOAT_DIG; ; prec++) + { + int n = snprintf (buf, bufsize, format, width, prec, x); + if (n < 0 + || FLOAT_PREC_BOUND <= prec + || (n < bufsize && STRTOF (buf, NULL) == x)) + return n; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/ftoastr.h Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,144 @@ +/* floating point to accurate string + + Copyright (C) 2010-2011 Free Software Foundation, Inc. + + 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 3 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, see <http://www.gnu.org/licenses/>. */ + +/* Written by Paul Eggert. */ + +#ifndef _GL_FTOASTR_H + +#include "intprops.h" +#include <float.h> +#include <stddef.h> + +/* Store into BUF (of size BUFSIZE) an accurate minimal-precision + string representation of a floating point number. FLAGS affect the + formatting of the number. Pad the output string with spaces as + necessary to width WIDTH bytes, in the style of printf. WIDTH must + be nonnegative. X is the floating-point number to be converted. + + Return the number of bytes stored into BUF, not counting the + terminating null. However, do not overrun BUF: if BUF is too + small, return a fairly tight (but not necessarily exact) upper + bound on the value that would have been returned if BUF had been + big enough. If SIZE is zero, BUF may be a null pointer. On error + (e.g., returned value would exceed INT_MAX), return -1 and set + errno. + + Example: + + char buf[DBL_BUFSIZE_BOUND]; + int r = dtoastr (buf, sizeof buf, 0, 0, 0.1); + + In the C locale, this sets R to 3 and stores "0.1" into BUF. */ + +int ftoastr (char *buf, size_t bufsize, int flags, int width, float x); +int dtoastr (char *buf, size_t bufsize, int flags, int width, double x); +int ldtoastr (char *buf, size_t bufsize, int flags, int width, long double x); + +/* Flag values for ftoastr etc. These can be ORed together. */ +enum + { + /* Left justify within the width; the default is right justification. */ + FTOASTR_LEFT_JUSTIFY = 1, + + /* Output "+" before positive numbers; the default outputs nothing. */ + FTOASTR_ALWAYS_SIGNED = 2, + + /* Output " " before positive numbers; ignored if + FTOASTER_ALWAYS_SIGNED is also given. */ + FTOASTR_SPACE_POSITIVE = 4, + + /* Pad with zeros instead of spaces; ignored if FTOASTR_LEFT_JUSTIFY + is also given. */ + FTOASTR_ZERO_PAD = 8, + + /* Use 'E' instead of 'e' before the exponent. */ + FTOASTR_UPPER_E = 16 + }; + + +/* _GL_FLT_PREC_BOUND is an upper bound on the precision needed to + represent a float value without losing information. Likewise for + _GL_DBL_PREC_BOUND and double, and _GL_LDBL_PREC_BOUND and long double. */ + +#if FLT_RADIX == 10 /* decimal floating point */ + enum { _GL_FLT_PREC_BOUND = FLT_MANT_DIG }; + enum { _GL_DBL_PREC_BOUND = DBL_MANT_DIG }; + enum { _GL_LDBL_PREC_BOUND = LDBL_MANT_DIG }; +#else + +/* An upper bound on the number of bits needed to represent a single + digit in a floating-point fraction. */ +# if FLT_RADIX == 2 /* IEEE 754 floating point, VAX floating point, etc. */ +# define _GL_FLOAT_DIG_BITS_BOUND 1 +# elif FLT_RADIX <= 16 /* IBM hex floating point has FLT_RADIX == 16. */ +# define _GL_FLOAT_DIG_BITS_BOUND 4 +# else /* no machine is this bad, but let's be complete */ +# define _GL_FLOAT_DIG_BITS_BOUND (CHAR_BIT * (int) sizeof (int) - 1) +# endif + +/* An upper bound on the number of decimal digits needed to represent + a floating point number accurately, assuming a fraction contains + DIG digits. For why the "+ 1" is needed, see "Binary to Decimal + Conversion" in David Goldberg's paper "What Every Computer + Scientist Should Know About Floating-Point Arithmetic" + <http://docs.sun.com/source/806-3568/ncg_goldberg.html>. */ +# define _GL_FLOAT_PREC_BOUND(dig) \ + (INT_BITS_STRLEN_BOUND ((dig) * _GL_FLOAT_DIG_BITS_BOUND) + 1) + + enum { _GL_FLT_PREC_BOUND = _GL_FLOAT_PREC_BOUND ( FLT_MANT_DIG) }; + enum { _GL_DBL_PREC_BOUND = _GL_FLOAT_PREC_BOUND ( DBL_MANT_DIG) }; + enum { _GL_LDBL_PREC_BOUND = _GL_FLOAT_PREC_BOUND (LDBL_MANT_DIG) }; +#endif + + +/* Bound on the number of bytes printed for an exponent in the range + MIN..MAX, where MIN < 0 < MAX; printf always prints a sign and at + least 2 digits. Although the maximum known exponent is 4932 for + IEEE 754 binary128, support tight bounds for exponents up to a + million, just in case. */ +#define _GL_FLOAT_EXPONENT_STRLEN_BOUND(min, max) \ + ( -100 < (min) && (max) < 100 ? 3 \ + : -1000 < (min) && (max) < 1000 ? 4 \ + : -10000 < (min) && (max) < 10000 ? 5 \ + : -100000 < (min) && (max) < 100000 ? 6 \ + : -1000000 < (min) && (max) < 1000000 ? 7 \ + : INT_STRLEN_BOUND (int) /* not a tight bound */) + +/* A reasonably tight bound on the length of a type-T floating value + formatted with ftoastr etc. Room is needed for sign, fraction + digits, decimal point, "e", and exponent. POINTLEN should be a + reasonably tight bound on the string length of the decimal + point. */ +#define _GL_FLOAT_STRLEN_BOUND_L(t, pointlen) \ + (1 + _GL_##t##_PREC_BOUND + pointlen + 1 \ + + _GL_FLOAT_EXPONENT_STRLEN_BOUND (t##_MIN_10_EXP, t##_MAX_10_EXP)) +#define FLT_STRLEN_BOUND_L(pointlen) _GL_FLOAT_STRLEN_BOUND_L ( FLT, pointlen) +#define DBL_STRLEN_BOUND_L(pointlen) _GL_FLOAT_STRLEN_BOUND_L ( DBL, pointlen) +#define LDBL_STRLEN_BOUND_L(pointlen) _GL_FLOAT_STRLEN_BOUND_L (LDBL, pointlen) + +/* Looser bounds that are locale-independent and are integral constant + expressions. */ +#define FLT_STRLEN_BOUND FLT_STRLEN_BOUND_L (MB_LEN_MAX) +#define DBL_STRLEN_BOUND DBL_STRLEN_BOUND_L (MB_LEN_MAX) +#define LDBL_STRLEN_BOUND LDBL_STRLEN_BOUND_L (MB_LEN_MAX) + +/* Looser, locale-independent bounds that include the trailing null byte. */ +#define FLT_BUFSIZE_BOUND ( FLT_STRLEN_BOUND + 1) +#define DBL_BUFSIZE_BOUND ( DBL_STRLEN_BOUND + 1) +#define LDBL_BUFSIZE_BOUND (LDBL_STRLEN_BOUND + 1) + +#endif /* _GL_FTOASTR_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/getopt.c Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,1192 @@ +/* Getopt for GNU. + NOTE: getopt is part of the C library, so if you don't know what + "Keep this file name-space clean" means, talk to drepper@gnu.org + before changing it! + Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2011 Free Software + Foundation, Inc. + This file is part of the GNU C Library. + + 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 3 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, see <http://www.gnu.org/licenses/>. */ + +#ifndef _LIBC +# include <config.h> +#endif + +#include "getopt.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +#ifdef _LIBC +# include <libintl.h> +#else +# include "gettext.h" +# define _(msgid) gettext (msgid) +#endif + +#if defined _LIBC && defined USE_IN_LIBIO +# include <wchar.h> +#endif + +/* This version of `getopt' appears to the caller like standard Unix `getopt' + but it behaves differently for the user, since it allows the user + to intersperse the options with the other arguments. + + As `getopt_long' works, it permutes the elements of ARGV so that, + when it is done, all the options precede everything else. Thus + all application programs are extended to handle flexible argument order. + + Using `getopt' or setting the environment variable POSIXLY_CORRECT + disables permutation. + Then the behavior is completely standard. + + GNU application programs can use a third alternative mode in which + they can distinguish the relative order of options and other arguments. */ + +#include "getopt_int.h" + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +/* 1003.2 says this must be 1 before any call. */ +int optind = 1; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int opterr = 1; + +/* Set to an option character which was unrecognized. + This must be initialized on some systems to avoid linking in the + system's own getopt implementation. */ + +int optopt = '?'; + +/* Keep a global copy of all internal members of getopt_data. */ + +static struct _getopt_data getopt_data; + + +#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV +extern char *getenv (); +#endif + +#ifdef _LIBC +/* Stored original parameters. + XXX This is no good solution. We should rather copy the args so + that we can compare them later. But we must not use malloc(3). */ +extern int __libc_argc; +extern char **__libc_argv; + +/* Bash 2.0 gives us an environment variable containing flags + indicating ARGV elements that should not be considered arguments. */ + +# ifdef USE_NONOPTION_FLAGS +/* Defined in getopt_init.c */ +extern char *__getopt_nonoption_flags; +# endif + +# ifdef USE_NONOPTION_FLAGS +# define SWAP_FLAGS(ch1, ch2) \ + if (d->__nonoption_flags_len > 0) \ + { \ + char __tmp = __getopt_nonoption_flags[ch1]; \ + __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ + __getopt_nonoption_flags[ch2] = __tmp; \ + } +# else +# define SWAP_FLAGS(ch1, ch2) +# endif +#else /* !_LIBC */ +# define SWAP_FLAGS(ch1, ch2) +#endif /* _LIBC */ + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + `first_nonopt' and `last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. */ + +static void +exchange (char **argv, struct _getopt_data *d) +{ + int bottom = d->__first_nonopt; + int middle = d->__last_nonopt; + int top = d->optind; + char *tem; + + /* Exchange the shorter segment with the far end of the longer segment. + That puts the shorter segment into the right place. + It leaves the longer segment in the right place overall, + but it consists of two parts that need to be swapped next. */ + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + /* First make sure the handling of the `__getopt_nonoption_flags' + string can work normally. Our top argument must be in the range + of the string. */ + if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) + { + /* We must extend the array. The user plays games with us and + presents new arguments. */ + char *new_str = malloc (top + 1); + if (new_str == NULL) + d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; + else + { + memset (__mempcpy (new_str, __getopt_nonoption_flags, + d->__nonoption_flags_max_len), + '\0', top + 1 - d->__nonoption_flags_max_len); + d->__nonoption_flags_max_len = top + 1; + __getopt_nonoption_flags = new_str; + } + } +#endif + + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + /* Bottom segment is the short one. */ + int len = middle - bottom; + register int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } + else + { + /* Top segment is the short one. */ + int len = top - middle; + register int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + SWAP_FLAGS (bottom + i, middle + i); + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } + } + + /* Update records for the slots the non-options now occupy. */ + + d->__first_nonopt += (d->optind - d->__last_nonopt); + d->__last_nonopt = d->optind; +} + +/* Initialize the internal data when the first call is made. */ + +static const char * +_getopt_initialize (int argc _GL_UNUSED, + char **argv _GL_UNUSED, const char *optstring, + struct _getopt_data *d, int posixly_correct) +{ + /* Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + d->__first_nonopt = d->__last_nonopt = d->optind; + + d->__nextchar = NULL; + + d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + d->__ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + d->__ordering = REQUIRE_ORDER; + ++optstring; + } + else if (d->__posixly_correct) + d->__ordering = REQUIRE_ORDER; + else + d->__ordering = PERMUTE; + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + if (!d->__posixly_correct + && argc == __libc_argc && argv == __libc_argv) + { + if (d->__nonoption_flags_max_len == 0) + { + if (__getopt_nonoption_flags == NULL + || __getopt_nonoption_flags[0] == '\0') + d->__nonoption_flags_max_len = -1; + else + { + const char *orig_str = __getopt_nonoption_flags; + int len = d->__nonoption_flags_max_len = strlen (orig_str); + if (d->__nonoption_flags_max_len < argc) + d->__nonoption_flags_max_len = argc; + __getopt_nonoption_flags = + (char *) malloc (d->__nonoption_flags_max_len); + if (__getopt_nonoption_flags == NULL) + d->__nonoption_flags_max_len = -1; + else + memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), + '\0', d->__nonoption_flags_max_len - len); + } + } + d->__nonoption_flags_len = d->__nonoption_flags_max_len; + } + else + d->__nonoption_flags_len = 0; +#endif + + return optstring; +} + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If `getopt' + is called repeatedly, it returns successively each of the option characters + from each of the option elements. + + If `getopt' finds another option character, it returns that character, + updating `optind' and `nextchar' so that the next call to `getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, `getopt' returns -1. + Then `optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message. If you set `opterr' to + zero, the error message is suppressed but we still return '?'. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in `optarg'. Two colons mean an option that + wants an optional arg; if there is text in the current ARGV-element, + it is returned in `optarg', otherwise `optarg' is set to zero. + + If OPTSTRING starts with `-' or `+', it requests different methods of + handling the non-option ARGV-elements. + See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. + + Long-named options begin with `--' instead of `-'. + Their names may be abbreviated as long as the abbreviation is unique + or is an exact match for some defined option. If they have an + argument, it follows the option name in the same ARGV-element, separated + from the option name by a `=', or else the in next ARGV-element. + When `getopt' finds a long-named option, it returns 0 if that option's + `flag' field is nonzero, the value of the option's `val' field + if the `flag' field is zero. + + The elements of ARGV aren't really const, because we permute them. + But we pretend they're const in the prototype to be compatible + with other systems. + + LONGOPTS is a vector of `struct option' terminated by an + element containing a name which is zero. + + LONGIND returns the index in LONGOPT of the long-named option found. + It is only valid when a long-named option has been found by the most + recent call. + + If LONG_ONLY is nonzero, '-' as well as '--' can introduce + long-named options. */ + +int +_getopt_internal_r (int argc, char **argv, const char *optstring, + const struct option *longopts, int *longind, + int long_only, struct _getopt_data *d, int posixly_correct) +{ + int print_errors = d->opterr; + + if (argc < 1) + return -1; + + d->optarg = NULL; + + if (d->optind == 0 || !d->__initialized) + { + if (d->optind == 0) + d->optind = 1; /* Don't scan ARGV[0], the program name. */ + optstring = _getopt_initialize (argc, argv, optstring, d, + posixly_correct); + d->__initialized = 1; + } + else if (optstring[0] == '-' || optstring[0] == '+') + optstring++; + if (optstring[0] == ':') + print_errors = 0; + + /* Test whether ARGV[optind] points to a non-option argument. + Either it does not have option syntax, or there is an environment flag + from the shell indicating it is not an option. The later information + is only used when the used in the GNU libc. */ +#if defined _LIBC && defined USE_NONOPTION_FLAGS +# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ + || (d->optind < d->__nonoption_flags_len \ + && __getopt_nonoption_flags[d->optind] == '1')) +#else +# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') +#endif + + if (d->__nextchar == NULL || *d->__nextchar == '\0') + { + /* Advance to the next ARGV-element. */ + + /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been + moved back by the user (who may also have changed the arguments). */ + if (d->__last_nonopt > d->optind) + d->__last_nonopt = d->optind; + if (d->__first_nonopt > d->optind) + d->__first_nonopt = d->optind; + + if (d->__ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (d->__first_nonopt != d->__last_nonopt + && d->__last_nonopt != d->optind) + exchange ((char **) argv, d); + else if (d->__last_nonopt != d->optind) + d->__first_nonopt = d->optind; + + /* Skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (d->optind < argc && NONOPTION_P) + d->optind++; + d->__last_nonopt = d->optind; + } + + /* The special ARGV-element `--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (d->optind != argc && !strcmp (argv[d->optind], "--")) + { + d->optind++; + + if (d->__first_nonopt != d->__last_nonopt + && d->__last_nonopt != d->optind) + exchange ((char **) argv, d); + else if (d->__first_nonopt == d->__last_nonopt) + d->__first_nonopt = d->optind; + d->__last_nonopt = argc; + + d->optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (d->optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (d->__first_nonopt != d->__last_nonopt) + d->optind = d->__first_nonopt; + return -1; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if (NONOPTION_P) + { + if (d->__ordering == REQUIRE_ORDER) + return -1; + d->optarg = argv[d->optind++]; + return 1; + } + + /* We have found another option-ARGV-element. + Skip the initial punctuation. */ + + d->__nextchar = (argv[d->optind] + 1 + + (longopts != NULL && argv[d->optind][1] == '-')); + } + + /* Decode the current option-ARGV-element. */ + + /* Check whether the ARGV-element is a long option. + + If long_only and the ARGV-element has the form "-f", where f is + a valid short option, don't consider it an abbreviated form of + a long option that starts with f. Otherwise there would be no + way to give the -f short option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an abbreviation of + the long option, just like "--fu", and not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + + if (longopts != NULL + && (argv[d->optind][1] == '-' + || (long_only && (argv[d->optind][2] + || !strchr (optstring, argv[d->optind][1]))))) + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = -1; + int option_index; + + for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) + { + if ((unsigned int) (nameend - d->__nextchar) + == (unsigned int) strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else if (long_only + || pfound->has_arg != p->has_arg + || pfound->flag != p->flag + || pfound->val != p->val) + /* Second or later nonexact match found. */ + ambig = 1; + } + + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"), + argv[0], argv[d->optind]) >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#else + fprintf (stderr, _("%s: option '%s' is ambiguous\n"), + argv[0], argv[d->optind]); +#endif + } + d->__nextchar += strlen (d->__nextchar); + d->optind++; + d->optopt = 0; + return '?'; + } + + if (pfound != NULL) + { + option_index = indfound; + d->optind++; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + d->optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif + + if (argv[d->optind - 1][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("\ +%s: option '--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#else + fprintf (stderr, _("\ +%s: option '--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("\ +%s: option '%c%s' doesn't allow an argument\n"), + argv[0], argv[d->optind - 1][0], + pfound->name); +#else + fprintf (stderr, _("\ +%s: option '%c%s' doesn't allow an argument\n"), + argv[0], argv[d->optind - 1][0], + pfound->name); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 + |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#endif + } + + d->__nextchar += strlen (d->__nextchar); + + d->optopt = pfound->val; + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (d->optind < argc) + d->optarg = argv[d->optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option '--%s' requires an argument\n"), + argv[0], pfound->name) >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 + |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#else + fprintf (stderr, + _("%s: option '--%s' requires an argument\n"), + argv[0], pfound->name); +#endif + } + d->__nextchar += strlen (d->__nextchar); + d->optopt = pfound->val; + return optstring[0] == ':' ? ':' : '?'; + } + } + d->__nextchar += strlen (d->__nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short + option, then it's an error. + Otherwise interpret it as a short option. */ + if (!long_only || argv[d->optind][1] == '-' + || strchr (optstring, *d->__nextchar) == NULL) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif + + if (argv[d->optind][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), + argv[0], d->__nextchar); +#else + fprintf (stderr, _("%s: unrecognized option '--%s'\n"), + argv[0], d->__nextchar); +#endif + } + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), + argv[0], argv[d->optind][0], d->__nextchar); +#else + fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), + argv[0], argv[d->optind][0], d->__nextchar); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#endif + } + d->__nextchar = (char *) ""; + d->optind++; + d->optopt = 0; + return '?'; + } + } + + /* Look at and handle the next short option-character. */ + + { + char c = *d->__nextchar++; + const char *temp = strchr (optstring, c); + + /* Increment `optind' when we start to process its last character. */ + if (*d->__nextchar == '\0') + ++d->optind; + + if (temp == NULL || c == ':' || c == ';') + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif + +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"), + argv[0], c); +#else + fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); +#endif + +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#endif + } + d->optopt = c; + return '?'; + } + /* Convenience. Treat POSIX -W foo same as long option --foo */ + if (temp[0] == 'W' && temp[1] == ';') + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + + /* This is an option that requires an argument. */ + if (*d->__nextchar != '\0') + { + d->optarg = d->__nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + d->optind++; + } + else if (d->optind == argc) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, + _("%s: option requires an argument -- '%c'\n"), + argv[0], c) >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#else + fprintf (stderr, + _("%s: option requires an argument -- '%c'\n"), + argv[0], c); +#endif + } + d->optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } + else + /* We already incremented `d->optind' once; + increment it again when taking next ARGV-elt as argument. */ + d->optarg = argv[d->optind++]; + + /* optarg is now the argument, see if it's in the + table of longopts. */ + + for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; + nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) + { + if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else if (long_only + || pfound->has_arg != p->has_arg + || pfound->flag != p->flag + || pfound->val != p->val) + /* Second or later nonexact match found. */ + ambig = 1; + } + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), + argv[0], d->optarg) >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#else + fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), + argv[0], d->optarg); +#endif + } + d->__nextchar += strlen (d->__nextchar); + d->optind++; + return '?'; + } + if (pfound != NULL) + { + option_index = indfound; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + d->optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option '-W %s' doesn't allow an argument\n"), + argv[0], pfound->name) >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 + |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#else + fprintf (stderr, _("\ +%s: option '-W %s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } + + d->__nextchar += strlen (d->__nextchar); + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (d->optind < argc) + d->optarg = argv[d->optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option '-W %s' requires an argument\n"), + argv[0], pfound->name) >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 + |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#else + fprintf (stderr, _("\ +%s: option '-W %s' requires an argument\n"), + argv[0], pfound->name); +#endif + } + d->__nextchar += strlen (d->__nextchar); + return optstring[0] == ':' ? ':' : '?'; + } + } + else + d->optarg = NULL; + d->__nextchar += strlen (d->__nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + d->__nextchar = NULL; + return 'W'; /* Let the application handle it. */ + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*d->__nextchar != '\0') + { + d->optarg = d->__nextchar; + d->optind++; + } + else + d->optarg = NULL; + d->__nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*d->__nextchar != '\0') + { + d->optarg = d->__nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + d->optind++; + } + else if (d->optind == argc) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option requires an argument -- '%c'\n"), + argv[0], c) >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#else + fprintf (stderr, + _("%s: option requires an argument -- '%c'\n"), + argv[0], c); +#endif + } + d->optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + d->optarg = argv[d->optind++]; + d->__nextchar = NULL; + } + } + return c; + } +} + +int +_getopt_internal (int argc, char **argv, const char *optstring, + const struct option *longopts, int *longind, int long_only, + int posixly_correct) +{ + int result; + + getopt_data.optind = optind; + getopt_data.opterr = opterr; + + result = _getopt_internal_r (argc, argv, optstring, longopts, + longind, long_only, &getopt_data, + posixly_correct); + + optind = getopt_data.optind; + optarg = getopt_data.optarg; + optopt = getopt_data.optopt; + + return result; +} + +/* glibc gets a LSB-compliant getopt. + Standalone applications get a POSIX-compliant getopt. */ +#if _LIBC +enum { POSIXLY_CORRECT = 0 }; +#else +enum { POSIXLY_CORRECT = 1 }; +#endif + +int +getopt (int argc, char *const *argv, const char *optstring) +{ + return _getopt_internal (argc, (char **) argv, optstring, + (const struct option *) 0, + (int *) 0, + 0, POSIXLY_CORRECT); +} + +#ifdef _LIBC +int +__posix_getopt (int argc, char *const *argv, const char *optstring) +{ + return _getopt_internal (argc, argv, optstring, + (const struct option *) 0, + (int *) 0, + 0, 1); +} +#endif + + +#ifdef TEST + +/* Compile with -DTEST to make an executable for use in testing + the above definition of `getopt'. */ + +int +main (int argc, char **argv) +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + + c = getopt (argc, argv, "abc:d:0123456789"); + if (c == -1) + break; + + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value '%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/getopt.in.h Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,250 @@ +/* Declarations for getopt. + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software + Foundation, Inc. + This file is part of the GNU C Library. + + 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 3 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, see <http://www.gnu.org/licenses/>. */ + +#ifndef _GL_GETOPT_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* The include_next requires a split double-inclusion guard. We must + also inform the replacement unistd.h to not recursively use + <getopt.h>; our definitions will be present soon enough. */ +#if @HAVE_GETOPT_H@ +# define _GL_SYSTEM_GETOPT +# @INCLUDE_NEXT@ @NEXT_GETOPT_H@ +# undef _GL_SYSTEM_GETOPT +#endif + +#ifndef _GL_GETOPT_H + +#ifndef __need_getopt +# define _GL_GETOPT_H 1 +#endif + +/* Standalone applications should #define __GETOPT_PREFIX to an + identifier that prefixes the external functions and variables + defined in this header. When this happens, include the + headers that might declare getopt so that they will not cause + confusion if included after this file (if the system had <getopt.h>, + we have already included it). Then systematically rename + identifiers so that they do not collide with the system functions + and variables. Renaming avoids problems with some compilers and + linkers. */ +#if defined __GETOPT_PREFIX && !defined __need_getopt +# if !@HAVE_GETOPT_H@ +# include <stdlib.h> +# include <stdio.h> +# include <unistd.h> +# endif +# undef __need_getopt +# undef getopt +# undef getopt_long +# undef getopt_long_only +# undef optarg +# undef opterr +# undef optind +# undef optopt +# undef option +# define __GETOPT_CONCAT(x, y) x ## y +# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) +# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) +# define getopt __GETOPT_ID (getopt) +# define getopt_long __GETOPT_ID (getopt_long) +# define getopt_long_only __GETOPT_ID (getopt_long_only) +# define optarg __GETOPT_ID (optarg) +# define opterr __GETOPT_ID (opterr) +# define optind __GETOPT_ID (optind) +# define optopt __GETOPT_ID (optopt) +# define option __GETOPT_ID (option) +# define _getopt_internal __GETOPT_ID (getopt_internal) +#endif + +/* Standalone applications get correct prototypes for getopt_long and + getopt_long_only; they declare "char **argv". libc uses prototypes + with "char *const *argv" that are incorrect because getopt_long and + getopt_long_only can permute argv; this is required for backward + compatibility (e.g., for LSB 2.0.1). + + This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt', + but it caused redefinition warnings if both unistd.h and getopt.h were + included, since unistd.h includes getopt.h having previously defined + __need_getopt. + + The only place where __getopt_argv_const is used is in definitions + of getopt_long and getopt_long_only below, but these are visible + only if __need_getopt is not defined, so it is quite safe to rewrite + the conditional as follows: +*/ +#if !defined __need_getopt +# if defined __GETOPT_PREFIX +# define __getopt_argv_const /* empty */ +# else +# define __getopt_argv_const const +# endif +#endif + +/* If __GNU_LIBRARY__ is not already defined, either we are being used + standalone, or this is the first header included in the source file. + If we are being used with glibc, we need to include <features.h>, but + that does not exist if we are standalone. So: if __GNU_LIBRARY__ is + not defined, include <ctype.h>, which will pull in <features.h> for us + if it's from glibc. (Why ctype.h? It's guaranteed to exist and it + doesn't flood the namespace with stuff the way some other headers do.) */ +#if !defined __GNU_LIBRARY__ +# include <ctype.h> +#endif + +#ifndef __THROW +# ifndef __GNUC_PREREQ +# define __GNUC_PREREQ(maj, min) (0) +# endif +# if defined __cplusplus && __GNUC_PREREQ (2,8) +# define __THROW throw () +# else +# define __THROW +# endif +#endif + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message `getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +#ifndef __need_getopt +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of `struct option' terminated by an element containing a name which is + zero. + + The field `has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field `flag' is not NULL, it points to a variable that is set + to the value given in the field `val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an `int' to + a compiled-in constant, such as set a value from `optarg', set the + option's `flag' field to zero and its `val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero `flag' field, `getopt' + returns the contents of the `val' field. */ + +struct option +{ + const char *name; + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; + +/* Names for the values of the `has_arg' field of `struct option'. */ + +# define no_argument 0 +# define required_argument 1 +# define optional_argument 2 +#endif /* need getopt */ + + +/* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for + options given in OPTS. + + Return the option character from OPTS just read. Return -1 when + there are no more options. For unrecognized options, or options + missing arguments, `optopt' is set to the option letter, and '?' is + returned. + + The OPTS string is a list of characters which are recognized option + letters, optionally followed by colons, specifying that that letter + takes an argument, to be placed in `optarg'. + + If a letter in OPTS is followed by two colons, its argument is + optional. This behavior is specific to the GNU `getopt'. + + The argument `--' causes premature termination of argument + scanning, explicitly telling `getopt' that there are no more + options. + + If OPTS begins with `-', then non-option arguments are treated as + arguments to the option '\1'. This behavior is specific to the GNU + `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in + the environment, then do not permute arguments. */ + +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + __THROW _GL_ARG_NONNULL ((2, 3)); + +#ifndef __need_getopt +extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); +extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); + +#endif + +#ifdef __cplusplus +} +#endif + +/* Make sure we later can get all the definitions and declarations. */ +#undef __need_getopt + +#endif /* getopt.h */ +#endif /* getopt.h */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/getopt1.c Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,170 @@ +/* getopt_long and getopt_long_only entry points for GNU getopt. + Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2011 Free Software + Foundation, Inc. + This file is part of the GNU C Library. + + 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 3 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, see <http://www.gnu.org/licenses/>. */ + +#ifdef _LIBC +# include <getopt.h> +#else +# include <config.h> +# include "getopt.h" +#endif +#include "getopt_int.h" + +#include <stdio.h> + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +#include <stdlib.h> +#endif + +#ifndef NULL +#define NULL 0 +#endif + +int +getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, + const struct option *long_options, int *opt_index) +{ + return _getopt_internal (argc, (char **) argv, options, long_options, + opt_index, 0, 0); +} + +int +_getopt_long_r (int argc, char **argv, const char *options, + const struct option *long_options, int *opt_index, + struct _getopt_data *d) +{ + return _getopt_internal_r (argc, argv, options, long_options, opt_index, + 0, d, 0); +} + +/* Like getopt_long, but '-' as well as '--' can indicate a long option. + If an option that starts with '-' (not '--') doesn't match a long option, + but does match a short option, it is parsed as a short option + instead. */ + +int +getopt_long_only (int argc, char *__getopt_argv_const *argv, + const char *options, + const struct option *long_options, int *opt_index) +{ + return _getopt_internal (argc, (char **) argv, options, long_options, + opt_index, 1, 0); +} + +int +_getopt_long_only_r (int argc, char **argv, const char *options, + const struct option *long_options, int *opt_index, + struct _getopt_data *d) +{ + return _getopt_internal_r (argc, argv, options, long_options, opt_index, + 1, d, 0); +} + + +#ifdef TEST + +#include <stdio.h> + +int +main (int argc, char **argv) +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + int option_index = 0; + static const struct option long_options[] = + { + {"add", 1, 0, 0}, + {"append", 0, 0, 0}, + {"delete", 1, 0, 0}, + {"verbose", 0, 0, 0}, + {"create", 0, 0, 0}, + {"file", 1, 0, 0}, + {0, 0, 0, 0} + }; + + c = getopt_long (argc, argv, "abc:d:0123456789", + long_options, &option_index); + if (c == -1) + break; + + switch (c) + { + case 0: + printf ("option %s", long_options[option_index].name); + if (optarg) + printf (" with arg %s", optarg); + printf ("\n"); + break; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case 'd': + printf ("option d with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/getopt_int.h Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,135 @@ +/* Internal declarations for getopt. + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2011 Free Software + Foundation, Inc. + This file is part of the GNU C Library. + + 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 3 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, see <http://www.gnu.org/licenses/>. */ + +#ifndef _GETOPT_INT_H +#define _GETOPT_INT_H 1 + +#include <getopt.h> + +extern int _getopt_internal (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only, int __posixly_correct); + + +/* Reentrant versions which can handle parsing multiple argument + vectors at the same time. */ + +/* Describe how to deal with options that follow non-option ARGV-elements. + + If the caller did not specify anything, + the default is REQUIRE_ORDER if the environment variable + POSIXLY_CORRECT is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options; + stop option processing when the first non-option is seen. + This is what Unix does. + This mode of operation is selected by either setting the environment + variable POSIXLY_CORRECT, or using `+' as the first character + of the list of option characters, or by calling getopt. + + PERMUTE is the default. We permute the contents of ARGV as we + scan, so that eventually all the non-options are at the end. + This allows options to be given in any order, even with programs + that were not written to expect this. + + RETURN_IN_ORDER is an option available to programs that were + written to expect options and other ARGV-elements in any order + and that care about the ordering of the two. We describe each + non-option ARGV-element as if it were the argument of an option + with character code 1. Using `-' as the first character of the + list of option characters selects this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return -1 with `optind' != ARGC. */ + +enum __ord + { + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER + }; + +/* Data type for reentrant functions. */ +struct _getopt_data +{ + /* These have exactly the same meaning as the corresponding global + variables, except that they are used for the reentrant + versions of getopt. */ + int optind; + int opterr; + int optopt; + char *optarg; + + /* Internal members. */ + + /* True if the internal members have been initialized. */ + int __initialized; + + /* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + char *__nextchar; + + /* See __ord above. */ + enum __ord __ordering; + + /* If the POSIXLY_CORRECT environment variable is set + or getopt was called. */ + int __posixly_correct; + + + /* Handle permutation of arguments. */ + + /* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first + of them; `last_nonopt' is the index after the last of them. */ + + int __first_nonopt; + int __last_nonopt; + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + int __nonoption_flags_max_len; + int __nonoption_flags_len; +# endif +}; + +/* The initializer is necessary to set OPTIND and OPTERR to their + default values and to clear the initialization flag. */ +#define _GETOPT_DATA_INITIALIZER { 1, 1 } + +extern int _getopt_internal_r (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only, struct _getopt_data *__data, + int __posixly_correct); + +extern int _getopt_long_r (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + struct _getopt_data *__data); + +extern int _getopt_long_only_r (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, + int *__longind, + struct _getopt_data *__data); + +#endif /* getopt_int.h */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/gettext.h Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,280 @@ +/* Convenience header for conditional use of GNU <libintl.h>. + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 Free Software + Foundation, Inc. + + 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _LIBGETTEXT_H +#define _LIBGETTEXT_H 1 + +/* NLS can be disabled through the configure --disable-nls option. */ +#if ENABLE_NLS + +/* Get declarations of GNU message catalog functions. */ +# include <libintl.h> + +/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by + the gettext() and ngettext() macros. This is an alternative to calling + textdomain(), and is useful for libraries. */ +# ifdef DEFAULT_TEXT_DOMAIN +# undef gettext +# define gettext(Msgid) \ + dgettext (DEFAULT_TEXT_DOMAIN, Msgid) +# undef ngettext +# define ngettext(Msgid1, Msgid2, N) \ + dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) +# endif + +#else + +/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which + chokes if dcgettext is defined as a macro. So include it now, to make + later inclusions of <locale.h> a NOP. We don't include <libintl.h> + as well because people using "gettext.h" will not include <libintl.h>, + and also including <libintl.h> would fail on SunOS 4, whereas <locale.h> + is OK. */ +#if defined(__sun) +# include <locale.h> +#endif + +/* Many header files from the libstdc++ coming with g++ 3.3 or newer include + <libintl.h>, which chokes if dcgettext is defined as a macro. So include + it now, to make later inclusions of <libintl.h> a NOP. */ +#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) +# include <cstdlib> +# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H +# include <libintl.h> +# endif +#endif + +/* Disabled NLS. + The casts to 'const char *' serve the purpose of producing warnings + for invalid uses of the value returned from these functions. + On pre-ANSI systems without 'const', the config.h file is supposed to + contain "#define const". */ +# undef gettext +# define gettext(Msgid) ((const char *) (Msgid)) +# undef dgettext +# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) +# undef dcgettext +# define dcgettext(Domainname, Msgid, Category) \ + ((void) (Category), dgettext (Domainname, Msgid)) +# undef ngettext +# define ngettext(Msgid1, Msgid2, N) \ + ((N) == 1 \ + ? ((void) (Msgid2), (const char *) (Msgid1)) \ + : ((void) (Msgid1), (const char *) (Msgid2))) +# undef dngettext +# define dngettext(Domainname, Msgid1, Msgid2, N) \ + ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) +# undef dcngettext +# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ + ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) +# undef textdomain +# define textdomain(Domainname) ((const char *) (Domainname)) +# undef bindtextdomain +# define bindtextdomain(Domainname, Dirname) \ + ((void) (Domainname), (const char *) (Dirname)) +# undef bind_textdomain_codeset +# define bind_textdomain_codeset(Domainname, Codeset) \ + ((void) (Domainname), (const char *) (Codeset)) + +#endif + +/* A pseudo function call that serves as a marker for the automated + extraction of messages, but does not call gettext(). The run-time + translation is done at a different place in the code. + The argument, String, should be a literal string. Concatenated strings + and other string expressions won't work. + The macro's expansion is not parenthesized, so that it is suitable as + initializer for static 'char[]' or 'const char[]' variables. */ +#define gettext_noop(String) String + +/* The separator between msgctxt and msgid in a .mo file. */ +#define GETTEXT_CONTEXT_GLUE "\004" + +/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a + MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be + short and rarely need to change. + The letter 'p' stands for 'particular' or 'special'. */ +#ifdef DEFAULT_TEXT_DOMAIN +# define pgettext(Msgctxt, Msgid) \ + pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#else +# define pgettext(Msgctxt, Msgid) \ + pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#endif +#define dpgettext(Domainname, Msgctxt, Msgid) \ + pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ + pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) +#ifdef DEFAULT_TEXT_DOMAIN +# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#else +# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#endif +#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ + npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +pgettext_aux (const char *domain, + const char *msg_ctxt_id, const char *msgid, + int category) +{ + const char *translation = dcgettext (domain, msg_ctxt_id, category); + if (translation == msg_ctxt_id) + return msgid; + else + return translation; +} + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +npgettext_aux (const char *domain, + const char *msg_ctxt_id, const char *msgid, + const char *msgid_plural, unsigned long int n, + int category) +{ + const char *translation = + dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); + if (translation == msg_ctxt_id || translation == msgid_plural) + return (n == 1 ? msgid : msgid_plural); + else + return translation; +} + +/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID + can be arbitrary expressions. But for string literals these macros are + less efficient than those above. */ + +#include <string.h> + +#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ + (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ + /* || __STDC_VERSION__ >= 199901L */ ) + +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS +#include <stdlib.h> +#endif + +#define pgettext_expr(Msgctxt, Msgid) \ + dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) +#define dpgettext_expr(Domainname, Msgctxt, Msgid) \ + dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +dcpgettext_expr (const char *domain, + const char *msgctxt, const char *msgid, + int category) +{ + size_t msgctxt_len = strlen (msgctxt) + 1; + size_t msgid_len = strlen (msgid) + 1; + const char *translation; +#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + char msg_ctxt_id[msgctxt_len + msgid_len]; +#else + char buf[1024]; + char *msg_ctxt_id = + (msgctxt_len + msgid_len <= sizeof (buf) + ? buf + : (char *) malloc (msgctxt_len + msgid_len)); + if (msg_ctxt_id != NULL) +#endif + { + memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); + msg_ctxt_id[msgctxt_len - 1] = '\004'; + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); + translation = dcgettext (domain, msg_ctxt_id, category); +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + if (msg_ctxt_id != buf) + free (msg_ctxt_id); +#endif + if (translation != msg_ctxt_id) + return translation; + } + return msgid; +} + +#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ + dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) +#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ + dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +dcnpgettext_expr (const char *domain, + const char *msgctxt, const char *msgid, + const char *msgid_plural, unsigned long int n, + int category) +{ + size_t msgctxt_len = strlen (msgctxt) + 1; + size_t msgid_len = strlen (msgid) + 1; + const char *translation; +#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + char msg_ctxt_id[msgctxt_len + msgid_len]; +#else + char buf[1024]; + char *msg_ctxt_id = + (msgctxt_len + msgid_len <= sizeof (buf) + ? buf + : (char *) malloc (msgctxt_len + msgid_len)); + if (msg_ctxt_id != NULL) +#endif + { + memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); + msg_ctxt_id[msgctxt_len - 1] = '\004'; + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); + translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + if (msg_ctxt_id != buf) + free (msg_ctxt_id); +#endif + if (!(translation == msg_ctxt_id || translation == msgid_plural)) + return translation; + } + return (n == 1 ? msgid : msgid_plural); +} + +#endif /* _LIBGETTEXT_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/gnulib.mk Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,361 @@ +## DO NOT EDIT! GENERATED AUTOMATICALLY! +## Process this file with automake to produce Makefile.in. +# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# +# This file is free software, distributed under the terms of the GNU +# General Public License. As a special exception to the GNU General +# Public License, this file may be distributed as part of a program +# that contains a configuration script generated by Autoconf, under +# the same distribution terms as the rest of that program. +# +# Generated by gnulib-tool. +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files dtoastr getopt-gnu mktime + + +MOSTLYCLEANFILES += core *.stackdump + +noinst_LIBRARIES += libgnu.a + +libgnu_a_SOURCES = +libgnu_a_LIBADD = $(gl_LIBOBJS) +libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) +EXTRA_libgnu_a_SOURCES = + +## begin gnulib module arg-nonnull + +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. + +BUILT_SOURCES += arg-nonnull.h +# The arg-nonnull.h that gets inserted into generated .h files is the same as +# build-aux/arg-nonnull.h, except that it has the copyright header cut off. +arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_ARG_NONNULL/,$$p' \ + < $(top_srcdir)/./arg-nonnull.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t + +ARG_NONNULL_H=arg-nonnull.h + +EXTRA_DIST += $(top_srcdir)/./arg-nonnull.h + +## end gnulib module arg-nonnull + +## begin gnulib module c++defs + +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. + +BUILT_SOURCES += c++defs.h +# The c++defs.h that gets inserted into generated .h files is the same as +# build-aux/c++defs.h, except that it has the copyright header cut off. +c++defs.h: $(top_srcdir)/./c++defs.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/_GL_CXXDEFS/,$$p' \ + < $(top_srcdir)/./c++defs.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += c++defs.h c++defs.h-t + +CXXDEFS_H=c++defs.h + +EXTRA_DIST += $(top_srcdir)/./c++defs.h + +## end gnulib module c++defs + +## begin gnulib module dtoastr + +libgnu_a_SOURCES += dtoastr.c + +EXTRA_DIST += ftoastr.c ftoastr.h + +EXTRA_libgnu_a_SOURCES += ftoastr.c + +## end gnulib module dtoastr + +## begin gnulib module getopt-posix + +BUILT_SOURCES += $(GETOPT_H) + +# We need the following in order to create <getopt.h> when the system +# doesn't have one that works with the given compiler. +getopt.h: getopt.in.h $(ARG_NONNULL_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + < $(srcdir)/getopt.in.h; \ + } > $@-t && \ + mv -f $@-t $@ +MOSTLYCLEANFILES += getopt.h getopt.h-t + +EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h + +EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c + +## end gnulib module getopt-posix + +## begin gnulib module gettext-h + +libgnu_a_SOURCES += gettext.h + +## end gnulib module gettext-h + +## begin gnulib module intprops + + +EXTRA_DIST += intprops.h + +## end gnulib module intprops + +## begin gnulib module mktime + + +EXTRA_DIST += mktime-internal.h mktime.c + +EXTRA_libgnu_a_SOURCES += mktime.c + +## end gnulib module mktime + +## begin gnulib module stddef + +BUILT_SOURCES += $(STDDEF_H) + +# We need the following in order to create <stddef.h> when the system +# doesn't have one that works with the given compiler. +stddef.h: stddef.in.h + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ + -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ + -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ + < $(srcdir)/stddef.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += stddef.h stddef.h-t + +EXTRA_DIST += stddef.in.h + +## end gnulib module stddef + +## begin gnulib module time + +BUILT_SOURCES += time.h + +# We need the following in order to create <time.h> when the system +# doesn't have one that works with the given compiler. +time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ + -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \ + -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \ + -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \ + -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \ + -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \ + -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ + -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ + -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ + -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ + -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ + -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ + -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ + -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ + -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ + -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ + -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/time.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += time.h time.h-t + +EXTRA_DIST += time.in.h + +## end gnulib module time + +## begin gnulib module time_r + + +EXTRA_DIST += time_r.c + +EXTRA_libgnu_a_SOURCES += time_r.c + +## end gnulib module time_r + +## begin gnulib module unistd + +BUILT_SOURCES += unistd.h + +# We need the following in order to create an empty placeholder for +# <unistd.h> when the system doesn't have one. +unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ + -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ + -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ + -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ + -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \ + -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \ + -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \ + -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \ + -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ + -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \ + -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \ + -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ + -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ + -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \ + -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ + -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \ + -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ + -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \ + -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ + -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ + -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ + -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ + -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ + -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ + -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ + -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \ + -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \ + -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \ + -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \ + -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ + -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \ + -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \ + -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ + -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \ + -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \ + -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \ + -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \ + -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ + -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \ + -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \ + -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \ + -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ + < $(srcdir)/unistd.in.h | \ + sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ + -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ + -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ + -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ + -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ + -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ + -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ + -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ + -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ + -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ + -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ + -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ + -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ + -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ + -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ + -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ + -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ + -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ + -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ + -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ + -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ + -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ + -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ + -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ + -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ + -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ + -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ + -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ + -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ + -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ + -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ + -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ + -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ + -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ + -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ + -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ + -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ + -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ + -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ + -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ + -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ + -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ + -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ + -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ + -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ + -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ + -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ + -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ + -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ + -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ + -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ + -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ + -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ + -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ + -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ + -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ + -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ + -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ + -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ + -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ + -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ + -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ + -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ + -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += unistd.h unistd.h-t + +EXTRA_DIST += unistd.in.h + +## end gnulib module unistd + +## begin gnulib module warn-on-use + +BUILT_SOURCES += warn-on-use.h +# The warn-on-use.h that gets inserted into generated .h files is the same as +# build-aux/warn-on-use.h, except that it has the copyright header cut off. +warn-on-use.h: $(top_srcdir)/./warn-on-use.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/^.ifndef/,$$p' \ + < $(top_srcdir)/./warn-on-use.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t + +WARN_ON_USE_H=warn-on-use.h + +EXTRA_DIST += $(top_srcdir)/./warn-on-use.h + +## end gnulib module warn-on-use + + +mostlyclean-local: mostlyclean-generic + @for dir in '' $(MOSTLYCLEANDIRS); do \ + if test -n "$$dir" && test -d $$dir; then \ + echo "rmdir $$dir"; rmdir $$dir; \ + fi; \ + done; \ + :
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/intprops.h Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,86 @@ +/* intprops.h -- properties of integer types + + Copyright (C) 2001-2005, 2009-2011 Free Software Foundation, Inc. + + 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 3 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, see <http://www.gnu.org/licenses/>. */ + +/* Written by Paul Eggert. */ + +#ifndef GL_INTPROPS_H +# define GL_INTPROPS_H + +# include <limits.h> + +/* The extra casts in the following macros work around compiler bugs, + e.g., in Cray C 5.0.3.0. */ + +/* True if the arithmetic type T is an integer type. bool counts as + an integer. */ +# define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) + +/* True if negative values of the signed integer type T use two's + complement, ones' complement, or signed magnitude representation, + respectively. Much GNU code assumes two's complement, but some + people like to be portable to all possible C hosts. */ +# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) +# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) +# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) + +/* True if the arithmetic type T is signed. */ +# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + +/* The maximum and minimum values for the integer type T. These + macros have undefined behavior if T is signed and has padding bits. + If this is a problem for you, please let us know how to fix it for + your host. */ +# define TYPE_MINIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) 0 \ + : TYPE_SIGNED_MAGNITUDE (t) \ + ? ~ (t) 0 \ + : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) +# define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ + : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) + +/* Return zero if T can be determined to be an unsigned type. + Otherwise, return 1. + When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a + tighter bound. Otherwise, it overestimates the true bound by one byte + when applied to unsigned types of size 2, 4, 16, ... bytes. + The symbol signed_type_or_expr__ is private to this header file. */ +# if __GNUC__ >= 2 +# define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t)) +# else +# define signed_type_or_expr__(t) 1 +# endif + +/* Bound on length of the string representing an unsigned integer + value representable in B bits. log10 (2.0) < 146/485. The + smallest value of B where this bound is not tight is 2621. */ +# define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485) + +/* Bound on length of the string representing an integer type or expression T. + Subtract 1 for the sign bit if T is signed, and then add 1 more for + a minus sign if needed. */ +# define INT_STRLEN_BOUND(t) \ + (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) \ + + signed_type_or_expr__ (t)) + +/* Bound on buffer size needed to represent an integer type or expression T, + including the terminating null. */ +# define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) + +#endif /* GL_INTPROPS_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/mktime-internal.h Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,4 @@ +#include <time.h> +time_t mktime_internal (struct tm *, + struct tm * (*) (time_t const *, struct tm *), + time_t *);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/mktime.c Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,669 @@ +/* Convert a `struct tm' to a time_t value. + Copyright (C) 1993-1999, 2002-2007, 2009-2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Paul Eggert <eggert@twinsun.com>. + + 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Define this to have a standalone program to test this implementation of + mktime. */ +/* #define DEBUG 1 */ + +#ifndef _LIBC +# include <config.h> +#endif + +/* Assume that leap seconds are possible, unless told otherwise. + If the host has a `zic' command with a `-L leapsecondfilename' option, + then it supports leap seconds; otherwise it probably doesn't. */ +#ifndef LEAP_SECONDS_POSSIBLE +# define LEAP_SECONDS_POSSIBLE 1 +#endif + +#include <time.h> + +#include <limits.h> + +#include <string.h> /* For the real memcpy prototype. */ + +#if DEBUG +# include <stdio.h> +# include <stdlib.h> +/* Make it work even if the system's libc has its own mktime routine. */ +# define mktime my_mktime +#endif /* DEBUG */ + +/* Shift A right by B bits portably, by dividing A by 2**B and + truncating towards minus infinity. A and B should be free of side + effects, and B should be in the range 0 <= B <= INT_BITS - 2, where + INT_BITS is the number of useful bits in an int. GNU code can + assume that INT_BITS is at least 32. + + ISO C99 says that A >> B is implementation-defined if A < 0. Some + implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift + right in the usual way when A < 0, so SHR falls back on division if + ordinary A >> B doesn't seem to be the usual signed shift. */ +#define SHR(a, b) \ + (-1 >> 1 == -1 \ + ? (a) >> (b) \ + : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) + +/* The extra casts in the following macros work around compiler bugs, + e.g., in Cray C 5.0.3.0. */ + +/* True if the arithmetic type T is an integer type. bool counts as + an integer. */ +#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) + +/* True if negative values of the signed integer type T use two's + complement, ones' complement, or signed magnitude representation, + respectively. Much GNU code assumes two's complement, but some + people like to be portable to all possible C hosts. */ +#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) +#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) +#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) + +/* True if the arithmetic type T is signed. */ +#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + +/* The maximum and minimum values for the integer type T. These + macros have undefined behavior if T is signed and has padding bits. + If this is a problem for you, please let us know how to fix it for + your host. */ +#define TYPE_MINIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) 0 \ + : TYPE_SIGNED_MAGNITUDE (t) \ + ? ~ (t) 0 \ + : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) +#define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ + : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) + +#ifndef TIME_T_MIN +# define TIME_T_MIN TYPE_MINIMUM (time_t) +#endif +#ifndef TIME_T_MAX +# define TIME_T_MAX TYPE_MAXIMUM (time_t) +#endif +#define TIME_T_MIDPOINT (SHR (TIME_T_MIN + TIME_T_MAX, 1) + 1) + +/* Verify a requirement at compile-time (unlike assert, which is runtime). */ +#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; } + +verify (time_t_is_integer, TYPE_IS_INTEGER (time_t)); +verify (twos_complement_arithmetic, TYPE_TWOS_COMPLEMENT (int)); +/* The code also assumes that signed integer overflow silently wraps + around, but this assumption can't be stated without causing a + diagnostic on some hosts. */ + +#define EPOCH_YEAR 1970 +#define TM_YEAR_BASE 1900 +verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0); + +/* Return 1 if YEAR + TM_YEAR_BASE is a leap year. */ +static inline int +leapyear (long int year) +{ + /* Don't add YEAR to TM_YEAR_BASE, as that might overflow. + Also, work even if YEAR is negative. */ + return + ((year & 3) == 0 + && (year % 100 != 0 + || ((year / 100) & 3) == (- (TM_YEAR_BASE / 100) & 3))); +} + +/* How many days come before each month (0-12). */ +#ifndef _LIBC +static +#endif +const unsigned short int __mon_yday[2][13] = + { + /* Normal years. */ + { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, + /* Leap years. */ + { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } + }; + + +#ifndef _LIBC +/* Portable standalone applications should supply a <time.h> that + declares a POSIX-compliant localtime_r, for the benefit of older + implementations that lack localtime_r or have a nonstandard one. + See the gnulib time_r module for one way to implement this. */ +# undef __localtime_r +# define __localtime_r localtime_r +# define __mktime_internal mktime_internal +# include "mktime-internal.h" +#endif + +/* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) - + (YEAR0-YDAY0 HOUR0:MIN0:SEC0) in seconds, assuming that the clocks + were not adjusted between the time stamps. + + The YEAR values uses the same numbering as TP->tm_year. Values + need not be in the usual range. However, YEAR1 must not be less + than 2 * INT_MIN or greater than 2 * INT_MAX. + + The result may overflow. It is the caller's responsibility to + detect overflow. */ + +static inline time_t +ydhms_diff (long int year1, long int yday1, int hour1, int min1, int sec1, + int year0, int yday0, int hour0, int min0, int sec0) +{ + verify (C99_integer_division, -1 / 2 == 0); +#if 0 /* This assertion fails on 32-bit systems with 64-bit time_t, such as + NetBSD 5 on i386. */ + verify (long_int_year_and_yday_are_wide_enough, + INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX); +#endif + + /* Compute intervening leap days correctly even if year is negative. + Take care to avoid integer overflow here. */ + int a4 = SHR (year1, 2) + SHR (TM_YEAR_BASE, 2) - ! (year1 & 3); + int b4 = SHR (year0, 2) + SHR (TM_YEAR_BASE, 2) - ! (year0 & 3); + int a100 = a4 / 25 - (a4 % 25 < 0); + int b100 = b4 / 25 - (b4 % 25 < 0); + int a400 = SHR (a100, 2); + int b400 = SHR (b100, 2); + int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); + + /* Compute the desired time in time_t precision. Overflow might + occur here. */ + time_t tyear1 = year1; + time_t years = tyear1 - year0; + time_t days = 365 * years + yday1 - yday0 + intervening_leap_days; + time_t hours = 24 * days + hour1 - hour0; + time_t minutes = 60 * hours + min1 - min0; + time_t seconds = 60 * minutes + sec1 - sec0; + return seconds; +} + + +/* Return a time_t value corresponding to (YEAR-YDAY HOUR:MIN:SEC), + assuming that *T corresponds to *TP and that no clock adjustments + occurred between *TP and the desired time. + If TP is null, return a value not equal to *T; this avoids false matches. + If overflow occurs, yield the minimal or maximal value, except do not + yield a value equal to *T. */ +static time_t +guess_time_tm (long int year, long int yday, int hour, int min, int sec, + const time_t *t, const struct tm *tp) +{ + if (tp) + { + time_t d = ydhms_diff (year, yday, hour, min, sec, + tp->tm_year, tp->tm_yday, + tp->tm_hour, tp->tm_min, tp->tm_sec); + time_t t1 = *t + d; + if ((t1 < *t) == (TYPE_SIGNED (time_t) ? d < 0 : TIME_T_MAX / 2 < d)) + return t1; + } + + /* Overflow occurred one way or another. Return the nearest result + that is actually in range, except don't report a zero difference + if the actual difference is nonzero, as that would cause a false + match; and don't oscillate between two values, as that would + confuse the spring-forward gap detector. */ + return (*t < TIME_T_MIDPOINT + ? (*t <= TIME_T_MIN + 1 ? *t + 1 : TIME_T_MIN) + : (TIME_T_MAX - 1 <= *t ? *t - 1 : TIME_T_MAX)); +} + +/* Use CONVERT to convert *T to a broken down time in *TP. + If *T is out of range for conversion, adjust it so that + it is the nearest in-range value and then convert that. */ +static struct tm * +ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), + time_t *t, struct tm *tp) +{ + struct tm *r = convert (t, tp); + + if (!r && *t) + { + time_t bad = *t; + time_t ok = 0; + + /* BAD is a known unconvertible time_t, and OK is a known good one. + Use binary search to narrow the range between BAD and OK until + they differ by 1. */ + while (bad != ok + (bad < 0 ? -1 : 1)) + { + time_t mid = *t = (bad < 0 + ? bad + ((ok - bad) >> 1) + : ok + ((bad - ok) >> 1)); + r = convert (t, tp); + if (r) + ok = mid; + else + bad = mid; + } + + if (!r && ok) + { + /* The last conversion attempt failed; + revert to the most recent successful attempt. */ + *t = ok; + r = convert (t, tp); + } + } + + return r; +} + + +/* Convert *TP to a time_t value, inverting + the monotonic and mostly-unit-linear conversion function CONVERT. + Use *OFFSET to keep track of a guess at the offset of the result, + compared to what the result would be for UTC without leap seconds. + If *OFFSET's guess is correct, only one CONVERT call is needed. + This function is external because it is used also by timegm.c. */ +time_t +__mktime_internal (struct tm *tp, + struct tm *(*convert) (const time_t *, struct tm *), + time_t *offset) +{ + time_t t, gt, t0, t1, t2; + struct tm tm; + + /* The maximum number of probes (calls to CONVERT) should be enough + to handle any combinations of time zone rule changes, solar time, + leap seconds, and oscillations around a spring-forward gap. + POSIX.1 prohibits leap seconds, but some hosts have them anyway. */ + int remaining_probes = 6; + + /* Time requested. Copy it in case CONVERT modifies *TP; this can + occur if TP is localtime's returned value and CONVERT is localtime. */ + int sec = tp->tm_sec; + int min = tp->tm_min; + int hour = tp->tm_hour; + int mday = tp->tm_mday; + int mon = tp->tm_mon; + int year_requested = tp->tm_year; + /* Normalize the value. */ + int isdst = ((tp->tm_isdst >> (8 * sizeof (tp->tm_isdst) - 1)) + | (tp->tm_isdst != 0)); + + /* 1 if the previous probe was DST. */ + int dst2; + + /* Ensure that mon is in range, and set year accordingly. */ + int mon_remainder = mon % 12; + int negative_mon_remainder = mon_remainder < 0; + int mon_years = mon / 12 - negative_mon_remainder; + long int lyear_requested = year_requested; + long int year = lyear_requested + mon_years; + + /* The other values need not be in range: + the remaining code handles minor overflows correctly, + assuming int and time_t arithmetic wraps around. + Major overflows are caught at the end. */ + + /* Calculate day of year from year, month, and day of month. + The result need not be in range. */ + int mon_yday = ((__mon_yday[leapyear (year)] + [mon_remainder + 12 * negative_mon_remainder]) + - 1); + long int lmday = mday; + long int yday = mon_yday + lmday; + + time_t guessed_offset = *offset; + + int sec_requested = sec; + + if (LEAP_SECONDS_POSSIBLE) + { + /* Handle out-of-range seconds specially, + since ydhms_tm_diff assumes every minute has 60 seconds. */ + if (sec < 0) + sec = 0; + if (59 < sec) + sec = 59; + } + + /* Invert CONVERT by probing. First assume the same offset as last + time. */ + + t0 = ydhms_diff (year, yday, hour, min, sec, + EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, - guessed_offset); + + if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3) + { + /* time_t isn't large enough to rule out overflows, so check + for major overflows. A gross check suffices, since if t0 + has overflowed, it is off by a multiple of TIME_T_MAX - + TIME_T_MIN + 1. So ignore any component of the difference + that is bounded by a small value. */ + + /* Approximate log base 2 of the number of time units per + biennium. A biennium is 2 years; use this unit instead of + years to avoid integer overflow. For example, 2 average + Gregorian years are 2 * 365.2425 * 24 * 60 * 60 seconds, + which is 63113904 seconds, and rint (log2 (63113904)) is + 26. */ + int ALOG2_SECONDS_PER_BIENNIUM = 26; + int ALOG2_MINUTES_PER_BIENNIUM = 20; + int ALOG2_HOURS_PER_BIENNIUM = 14; + int ALOG2_DAYS_PER_BIENNIUM = 10; + int LOG2_YEARS_PER_BIENNIUM = 1; + + int approx_requested_biennia = + (SHR (year_requested, LOG2_YEARS_PER_BIENNIUM) + - SHR (EPOCH_YEAR - TM_YEAR_BASE, LOG2_YEARS_PER_BIENNIUM) + + SHR (mday, ALOG2_DAYS_PER_BIENNIUM) + + SHR (hour, ALOG2_HOURS_PER_BIENNIUM) + + SHR (min, ALOG2_MINUTES_PER_BIENNIUM) + + (LEAP_SECONDS_POSSIBLE + ? 0 + : SHR (sec, ALOG2_SECONDS_PER_BIENNIUM))); + + int approx_biennia = SHR (t0, ALOG2_SECONDS_PER_BIENNIUM); + int diff = approx_biennia - approx_requested_biennia; + int abs_diff = diff < 0 ? - diff : diff; + + /* IRIX 4.0.5 cc miscaculates TIME_T_MIN / 3: it erroneously + gives a positive value of 715827882. Setting a variable + first then doing math on it seems to work. + (ghazi@caip.rutgers.edu) */ + time_t time_t_max = TIME_T_MAX; + time_t time_t_min = TIME_T_MIN; + time_t overflow_threshold = + (time_t_max / 3 - time_t_min / 3) >> ALOG2_SECONDS_PER_BIENNIUM; + + if (overflow_threshold < abs_diff) + { + /* Overflow occurred. Try repairing it; this might work if + the time zone offset is enough to undo the overflow. */ + time_t repaired_t0 = -1 - t0; + approx_biennia = SHR (repaired_t0, ALOG2_SECONDS_PER_BIENNIUM); + diff = approx_biennia - approx_requested_biennia; + abs_diff = diff < 0 ? - diff : diff; + if (overflow_threshold < abs_diff) + return -1; + guessed_offset += repaired_t0 - t0; + t0 = repaired_t0; + } + } + + /* Repeatedly use the error to improve the guess. */ + + for (t = t1 = t2 = t0, dst2 = 0; + (gt = guess_time_tm (year, yday, hour, min, sec, &t, + ranged_convert (convert, &t, &tm)), + t != gt); + t1 = t2, t2 = t, t = gt, dst2 = tm.tm_isdst != 0) + if (t == t1 && t != t2 + && (tm.tm_isdst < 0 + || (isdst < 0 + ? dst2 <= (tm.tm_isdst != 0) + : (isdst != 0) != (tm.tm_isdst != 0)))) + /* We can't possibly find a match, as we are oscillating + between two values. The requested time probably falls + within a spring-forward gap of size GT - T. Follow the common + practice in this case, which is to return a time that is GT - T + away from the requested time, preferring a time whose + tm_isdst differs from the requested value. (If no tm_isdst + was requested and only one of the two values has a nonzero + tm_isdst, prefer that value.) In practice, this is more + useful than returning -1. */ + goto offset_found; + else if (--remaining_probes == 0) + return -1; + + /* We have a match. Check whether tm.tm_isdst has the requested + value, if any. */ + if (isdst != tm.tm_isdst && 0 <= isdst && 0 <= tm.tm_isdst) + { + /* tm.tm_isdst has the wrong value. Look for a neighboring + time with the right value, and use its UTC offset. + + Heuristic: probe the adjacent timestamps in both directions, + looking for the desired isdst. This should work for all real + time zone histories in the tz database. */ + + /* Distance between probes when looking for a DST boundary. In + tzdata2003a, the shortest period of DST is 601200 seconds + (e.g., America/Recife starting 2000-10-08 01:00), and the + shortest period of non-DST surrounded by DST is 694800 + seconds (Africa/Tunis starting 1943-04-17 01:00). Use the + minimum of these two values, so we don't miss these short + periods when probing. */ + int stride = 601200; + + /* The longest period of DST in tzdata2003a is 536454000 seconds + (e.g., America/Jujuy starting 1946-10-01 01:00). The longest + period of non-DST is much longer, but it makes no real sense + to search for more than a year of non-DST, so use the DST + max. */ + int duration_max = 536454000; + + /* Search in both directions, so the maximum distance is half + the duration; add the stride to avoid off-by-1 problems. */ + int delta_bound = duration_max / 2 + stride; + + int delta, direction; + + for (delta = stride; delta < delta_bound; delta += stride) + for (direction = -1; direction <= 1; direction += 2) + { + time_t ot = t + delta * direction; + if ((ot < t) == (direction < 0)) + { + struct tm otm; + ranged_convert (convert, &ot, &otm); + if (otm.tm_isdst == isdst) + { + /* We found the desired tm_isdst. + Extrapolate back to the desired time. */ + t = guess_time_tm (year, yday, hour, min, sec, &ot, &otm); + ranged_convert (convert, &t, &tm); + goto offset_found; + } + } + } + } + + offset_found: + *offset = guessed_offset + t - t0; + + if (LEAP_SECONDS_POSSIBLE && sec_requested != tm.tm_sec) + { + /* Adjust time to reflect the tm_sec requested, not the normalized value. + Also, repair any damage from a false match due to a leap second. */ + int sec_adjustment = (sec == 0 && tm.tm_sec == 60) - sec; + t1 = t + sec_requested; + t2 = t1 + sec_adjustment; + if (((t1 < t) != (sec_requested < 0)) + | ((t2 < t1) != (sec_adjustment < 0)) + | ! convert (&t2, &tm)) + return -1; + t = t2; + } + + *tp = tm; + return t; +} + + +/* FIXME: This should use a signed type wide enough to hold any UTC + offset in seconds. 'int' should be good enough for GNU code. We + can't fix this unilaterally though, as other modules invoke + __mktime_internal. */ +static time_t localtime_offset; + +/* Convert *TP to a time_t value. */ +time_t +mktime (struct tm *tp) +{ +#ifdef _LIBC + /* POSIX.1 8.1.1 requires that whenever mktime() is called, the + time zone names contained in the external variable `tzname' shall + be set as if the tzset() function had been called. */ + __tzset (); +#endif + + return __mktime_internal (tp, __localtime_r, &localtime_offset); +} + +#ifdef weak_alias +weak_alias (mktime, timelocal) +#endif + +#ifdef _LIBC +libc_hidden_def (mktime) +libc_hidden_weak (timelocal) +#endif + +#if DEBUG + +static int +not_equal_tm (const struct tm *a, const struct tm *b) +{ + return ((a->tm_sec ^ b->tm_sec) + | (a->tm_min ^ b->tm_min) + | (a->tm_hour ^ b->tm_hour) + | (a->tm_mday ^ b->tm_mday) + | (a->tm_mon ^ b->tm_mon) + | (a->tm_year ^ b->tm_year) + | (a->tm_yday ^ b->tm_yday) + | (a->tm_isdst ^ b->tm_isdst)); +} + +static void +print_tm (const struct tm *tp) +{ + if (tp) + printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d", + tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday, + tp->tm_hour, tp->tm_min, tp->tm_sec, + tp->tm_yday, tp->tm_wday, tp->tm_isdst); + else + printf ("0"); +} + +static int +check_result (time_t tk, struct tm tmk, time_t tl, const struct tm *lt) +{ + if (tk != tl || !lt || not_equal_tm (&tmk, lt)) + { + printf ("mktime ("); + print_tm (lt); + printf (")\nyields ("); + print_tm (&tmk); + printf (") == %ld, should be %ld\n", (long int) tk, (long int) tl); + return 1; + } + + return 0; +} + +int +main (int argc, char **argv) +{ + int status = 0; + struct tm tm, tmk, tml; + struct tm *lt; + time_t tk, tl, tl1; + char trailer; + + if ((argc == 3 || argc == 4) + && (sscanf (argv[1], "%d-%d-%d%c", + &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer) + == 3) + && (sscanf (argv[2], "%d:%d:%d%c", + &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer) + == 3)) + { + tm.tm_year -= TM_YEAR_BASE; + tm.tm_mon--; + tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]); + tmk = tm; + tl = mktime (&tmk); + lt = localtime (&tl); + if (lt) + { + tml = *lt; + lt = &tml; + } + printf ("mktime returns %ld == ", (long int) tl); + print_tm (&tmk); + printf ("\n"); + status = check_result (tl, tmk, tl, lt); + } + else if (argc == 4 || (argc == 5 && strcmp (argv[4], "-") == 0)) + { + time_t from = atol (argv[1]); + time_t by = atol (argv[2]); + time_t to = atol (argv[3]); + + if (argc == 4) + for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1) + { + lt = localtime (&tl); + if (lt) + { + tmk = tml = *lt; + tk = mktime (&tmk); + status |= check_result (tk, tmk, tl, &tml); + } + else + { + printf ("localtime (%ld) yields 0\n", (long int) tl); + status = 1; + } + tl1 = tl + by; + if ((tl1 < tl) != (by < 0)) + break; + } + else + for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1) + { + /* Null benchmark. */ + lt = localtime (&tl); + if (lt) + { + tmk = tml = *lt; + tk = tl; + status |= check_result (tk, tmk, tl, &tml); + } + else + { + printf ("localtime (%ld) yields 0\n", (long int) tl); + status = 1; + } + tl1 = tl + by; + if ((tl1 < tl) != (by < 0)) + break; + } + } + else + printf ("Usage:\ +\t%s YYYY-MM-DD HH:MM:SS [ISDST] # Test given time.\n\ +\t%s FROM BY TO # Test values FROM, FROM+BY, ..., TO.\n\ +\t%s FROM BY TO - # Do not test those values (for benchmark).\n", + argv[0], argv[0], argv[0]); + + return status; +} + +#endif /* DEBUG */ + +/* +Local Variables: +compile-command: "gcc -DDEBUG -Wall -W -O -g mktime.c -o mktime" +End: +*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/stddef.in.h Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,87 @@ +/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues. + + Copyright (C) 2009-2011 Free Software Foundation, Inc. + + 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Eric Blake. */ + +/* + * POSIX 2008 <stddef.h> for platforms that have issues. + * <http://www.opengroup.org/susv3xbd/stddef.h.html> + */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if defined __need_wchar_t || defined __need_size_t \ + || defined __need_ptrdiff_t || defined __need_NULL \ + || defined __need_wint_t +/* Special invocation convention inside gcc header files. In + particular, gcc provides a version of <stddef.h> that blindly + redefines NULL even when __need_wint_t was defined, even though + wint_t is not normally provided by <stddef.h>. Hence, we must + remember if special invocation has ever been used to obtain wint_t, + in which case we need to clean up NULL yet again. */ + +# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T) +# ifdef __need_wint_t +# undef _GL_STDDEF_H +# define _GL_STDDEF_WINT_T +# endif +# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ +# endif + +#else +/* Normal invocation convention. */ + +# ifndef _GL_STDDEF_H + +/* The include_next requires a split double-inclusion guard. */ + +# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ + +# ifndef _GL_STDDEF_H +# define _GL_STDDEF_H + +/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ +#if @REPLACE_NULL@ +# undef NULL +# ifdef __cplusplus + /* ISO C++ says that the macro NULL must expand to an integer constant + expression, hence '((void *) 0)' is not allowed in C++. */ +# if __GNUG__ >= 3 + /* GNU C++ has a __null macro that behaves like an integer ('int' or + 'long') but has the same size as a pointer. Use that, to avoid + warnings. */ +# define NULL __null +# else +# define NULL 0L +# endif +# else +# define NULL ((void *) 0) +# endif +#endif + +/* Some platforms lack wchar_t. */ +#if !@HAVE_WCHAR_T@ +# define wchar_t int +#endif + +# endif /* _GL_STDDEF_H */ +# endif /* _GL_STDDEF_H */ +#endif /* __need_XXX */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/time.in.h Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,243 @@ +/* A more-standard <time.h>. + + Copyright (C) 2007-2011 Free Software Foundation, Inc. + + 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* Don't get in the way of glibc when it includes time.h merely to + declare a few standard symbols, rather than to declare all the + symbols. Also, Solaris 8 <time.h> eventually includes itself + recursively; if that is happening, just include the system <time.h> + without adding our own declarations. */ +#if (defined __need_time_t || defined __need_clock_t \ + || defined __need_timespec \ + || defined _GL_TIME_H) + +# @INCLUDE_NEXT@ @NEXT_TIME_H@ + +#else + +# define _GL_TIME_H + +# @INCLUDE_NEXT@ @NEXT_TIME_H@ + +/* NetBSD 5.0 mis-defines NULL. */ +# include <stddef.h> + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). + Or they define it with the wrong member names or define it in <sys/time.h> + (e.g., FreeBSD circa 1997). Stock Mingw does not define it, but the + pthreads-win32 library defines it in <pthread.h>. */ +# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ +# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +# include <sys/time.h> +# elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ +# include <pthread.h> +/* The pthreads-win32 <pthread.h> also defines a couple of broken macros. */ +# undef asctime_r +# undef ctime_r +# undef gmtime_r +# undef localtime_r +# undef rand_r +# undef strtok_r +# else + +# ifdef __cplusplus +extern "C" { +# endif + +# undef timespec +# define timespec rpl_timespec +struct timespec +{ + time_t tv_sec; + long int tv_nsec; +}; + +# ifdef __cplusplus +} +# endif + +# endif +# endif + +/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires + time_t to be an integer type, even though C99 permits floating + point. We don't know of any implementation that uses floating + point, and it is much easier to write code that doesn't have to + worry about that corner case, so we force the issue. */ +struct __time_t_must_be_integral { + unsigned int __floating_time_t_unsupported : (time_t) 1; +}; + +/* Sleep for at least RQTP seconds unless interrupted, If interrupted, + return -1 and store the remaining time into RMTP. See + <http://www.opengroup.org/susv3xsh/nanosleep.html>. */ +# if @GNULIB_NANOSLEEP@ +# if @REPLACE_NANOSLEEP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define nanosleep rpl_nanosleep +# endif +_GL_FUNCDECL_RPL (nanosleep, int, + (struct timespec const *__rqtp, struct timespec *__rmtp) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (nanosleep, int, + (struct timespec const *__rqtp, struct timespec *__rmtp)); +# else +# if ! @HAVE_NANOSLEEP@ +_GL_FUNCDECL_SYS (nanosleep, int, + (struct timespec const *__rqtp, struct timespec *__rmtp) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (nanosleep, int, + (struct timespec const *__rqtp, struct timespec *__rmtp)); +# endif +_GL_CXXALIASWARN (nanosleep); +# endif + +/* Return the 'time_t' representation of TP and normalize TP. */ +# if @GNULIB_MKTIME@ +# if @REPLACE_MKTIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mktime rpl_mktime +# endif +_GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp)); +# else +_GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); +# endif +_GL_CXXALIASWARN (mktime); +# endif + +/* Convert TIMER to RESULT, assuming local time and UTC respectively. See + <http://www.opengroup.org/susv3xsh/localtime_r.html> and + <http://www.opengroup.org/susv3xsh/gmtime_r.html>. */ +# if @GNULIB_TIME_R@ +# if @REPLACE_LOCALTIME_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef localtime_r +# define localtime_r rpl_localtime_r +# endif +_GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result)); +# else +# if ! @HAVE_DECL_LOCALTIME_R@ +_GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result)); +# endif +# if @HAVE_DECL_LOCALTIME_R@ +_GL_CXXALIASWARN (localtime_r); +# endif +# if @REPLACE_LOCALTIME_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gmtime_r +# define gmtime_r rpl_gmtime_r +# endif +_GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result)); +# else +# if ! @HAVE_DECL_LOCALTIME_R@ +_GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result)); +# endif +# if @HAVE_DECL_LOCALTIME_R@ +_GL_CXXALIASWARN (gmtime_r); +# endif +# endif + +/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store + the resulting broken-down time into TM. See + <http://www.opengroup.org/susv3xsh/strptime.html>. */ +# if @GNULIB_STRPTIME@ +# if ! @HAVE_STRPTIME@ +_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, + char const *restrict __format, + struct tm *restrict __tm) + _GL_ARG_NONNULL ((1, 2, 3))); +# endif +_GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, + char const *restrict __format, + struct tm *restrict __tm)); +_GL_CXXALIASWARN (strptime); +# endif + +/* Convert TM to a time_t value, assuming UTC. */ +# if @GNULIB_TIMEGM@ +# if @REPLACE_TIMEGM@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef timegm +# define timegm rpl_timegm +# endif +_GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm)); +# else +# if ! @HAVE_TIMEGM@ +_GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); +# endif +_GL_CXXALIASWARN (timegm); +# endif + +/* Encourage applications to avoid unsafe functions that can overrun + buffers when given outlandish struct tm values. Portable + applications should use strftime (or even sprintf) instead. */ +# if defined GNULIB_POSIXCHECK +# undef asctime +_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " + "better use strftime (or even sprintf) instead"); +# endif +# if defined GNULIB_POSIXCHECK +# undef asctime_r +_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " + "better use strftime (or even sprintf) instead"); +# endif +# if defined GNULIB_POSIXCHECK +# undef ctime +_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " + "better use strftime (or even sprintf) instead"); +# endif +# if defined GNULIB_POSIXCHECK +# undef ctime_r +_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " + "better use strftime (or even sprintf) instead"); +# endif + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/time_r.c Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,45 @@ +/* Reentrant time functions like localtime_r. + + Copyright (C) 2003, 2006-2007, 2010-2011 Free Software Foundation, Inc. + + 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Paul Eggert. */ + +#include <config.h> + +#include <time.h> + +static struct tm * +copy_tm_result (struct tm *dest, struct tm const *src) +{ + if (! src) + return 0; + *dest = *src; + return dest; +} + + +struct tm * +gmtime_r (time_t const * restrict t, struct tm * restrict tp) +{ + return copy_tm_result (tp, gmtime (t)); +} + +struct tm * +localtime_r (time_t const * restrict t, struct tm * restrict tp) +{ + return copy_tm_result (tp, localtime (t)); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/unistd.in.h Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,1378 @@ +/* Substitute for and wrapper around <unistd.h>. + Copyright (C) 2003-2011 Free Software Foundation, Inc. + + 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* Special invocation convention: + - On mingw, several headers, including <winsock2.h>, include <unistd.h>, + but we need to ensure that both the system <unistd.h> and <winsock2.h> + are completely included before we replace gethostname. */ +#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ + && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H +/* <unistd.h> is being indirectly included for the first time from + <winsock2.h>; avoid declaring any overrides. */ +# if @HAVE_UNISTD_H@ +# @INCLUDE_NEXT@ @NEXT_UNISTD_H@ +# else +# error unexpected; report this to bug-gnulib@gnu.org +# endif +# define _GL_WINSOCK2_H_WITNESS + +/* Normal invocation. */ +#elif !defined _GL_UNISTD_H + +/* The include_next requires a split double-inclusion guard. */ +#if @HAVE_UNISTD_H@ +# @INCLUDE_NEXT@ @NEXT_UNISTD_H@ +#endif + +/* Get all possible declarations of gethostname(). */ +#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ + && !defined _GL_INCLUDING_WINSOCK2_H +# define _GL_INCLUDING_WINSOCK2_H +# include <winsock2.h> +# undef _GL_INCLUDING_WINSOCK2_H +#endif + +#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H +#define _GL_UNISTD_H + +/* NetBSD 5.0 mis-defines NULL. Also get size_t. */ +#include <stddef.h> + +/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */ +/* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */ +/* But avoid namespace pollution on glibc systems. */ +#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ + || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ + && defined __CYGWIN__)) \ + && ! defined __GLIBC__ +# include <stdio.h> +#endif + +/* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */ +/* But avoid namespace pollution on glibc systems. */ +#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ + && ! defined __GLIBC__ +# include <fcntl.h> +#endif + +/* mingw fails to declare _exit in <unistd.h>. */ +/* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */ +/* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */ +/* But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include <stdlib.h> +#endif + +/* mingw declares getcwd in <io.h>, not in <unistd.h>. */ +#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \ + && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) +# include <io.h> +#endif + +/* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>. + NonStop Kernel declares gethostname in <netdb.h>, not in <unistd.h>. */ +/* But avoid namespace pollution on glibc systems. */ +#if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \ + || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \ + && !defined __GLIBC__ +# include <netdb.h> +#endif + +#if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ + || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK) +/* Get ssize_t. */ +# include <sys/types.h> +#endif + +/* Get getopt(), optarg, optind, opterr, optopt. + But avoid namespace pollution on glibc systems. */ +#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT +# include <getopt.h> +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + +#if @GNULIB_GETHOSTNAME@ +/* Get all possible declarations of gethostname(). */ +# if @UNISTD_H_HAVE_WINSOCK2_H@ +# if !defined _GL_SYS_SOCKET_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef socket +# define socket socket_used_without_including_sys_socket_h +# undef connect +# define connect connect_used_without_including_sys_socket_h +# undef accept +# define accept accept_used_without_including_sys_socket_h +# undef bind +# define bind bind_used_without_including_sys_socket_h +# undef getpeername +# define getpeername getpeername_used_without_including_sys_socket_h +# undef getsockname +# define getsockname getsockname_used_without_including_sys_socket_h +# undef getsockopt +# define getsockopt getsockopt_used_without_including_sys_socket_h +# undef listen +# define listen listen_used_without_including_sys_socket_h +# undef recv +# define recv recv_used_without_including_sys_socket_h +# undef send +# define send send_used_without_including_sys_socket_h +# undef recvfrom +# define recvfrom recvfrom_used_without_including_sys_socket_h +# undef sendto +# define sendto sendto_used_without_including_sys_socket_h +# undef setsockopt +# define setsockopt setsockopt_used_without_including_sys_socket_h +# undef shutdown +# define shutdown shutdown_used_without_including_sys_socket_h +# else + _GL_WARN_ON_USE (socket, + "socket() used without including <sys/socket.h>"); + _GL_WARN_ON_USE (connect, + "connect() used without including <sys/socket.h>"); + _GL_WARN_ON_USE (accept, + "accept() used without including <sys/socket.h>"); + _GL_WARN_ON_USE (bind, + "bind() used without including <sys/socket.h>"); + _GL_WARN_ON_USE (getpeername, + "getpeername() used without including <sys/socket.h>"); + _GL_WARN_ON_USE (getsockname, + "getsockname() used without including <sys/socket.h>"); + _GL_WARN_ON_USE (getsockopt, + "getsockopt() used without including <sys/socket.h>"); + _GL_WARN_ON_USE (listen, + "listen() used without including <sys/socket.h>"); + _GL_WARN_ON_USE (recv, + "recv() used without including <sys/socket.h>"); + _GL_WARN_ON_USE (send, + "send() used without including <sys/socket.h>"); + _GL_WARN_ON_USE (recvfrom, + "recvfrom() used without including <sys/socket.h>"); + _GL_WARN_ON_USE (sendto, + "sendto() used without including <sys/socket.h>"); + _GL_WARN_ON_USE (setsockopt, + "setsockopt() used without including <sys/socket.h>"); + _GL_WARN_ON_USE (shutdown, + "shutdown() used without including <sys/socket.h>"); +# endif +# endif +# if !defined _GL_SYS_SELECT_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef select +# define select select_used_without_including_sys_select_h +# else + _GL_WARN_ON_USE (select, + "select() used without including <sys/select.h>"); +# endif +# endif +# endif +#endif + + +/* OS/2 EMX lacks these macros. */ +#ifndef STDIN_FILENO +# define STDIN_FILENO 0 +#endif +#ifndef STDOUT_FILENO +# define STDOUT_FILENO 1 +#endif +#ifndef STDERR_FILENO +# define STDERR_FILENO 2 +#endif + +/* Ensure *_OK macros exist. */ +#ifndef F_OK +# define F_OK 0 +# define X_OK 1 +# define W_OK 2 +# define R_OK 4 +#endif + + +/* Declare overridden functions. */ + + +#if defined GNULIB_POSIXCHECK +/* The access() function is a security risk. */ +_GL_WARN_ON_USE (access, "the access function is a security risk - " + "use the gnulib module faccessat instead"); +#endif + + +#if @GNULIB_CHOWN@ +/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE + to GID (if GID is not -1). Follow symbolic links. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/chown.html>. */ +# if @REPLACE_CHOWN@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chown +# define chown rpl_chown +# endif +_GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)); +# else +# if !@HAVE_CHOWN@ +_GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)); +# endif +_GL_CXXALIASWARN (chown); +#elif defined GNULIB_POSIXCHECK +# undef chown +# if HAVE_RAW_DECL_CHOWN +_GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " + "doesn't treat a uid or gid of -1 on some systems - " + "use gnulib module chown for portability"); +# endif +#endif + + +#if @GNULIB_CLOSE@ +# if @REPLACE_CLOSE@ +/* Automatically included by modules that need a replacement for close. */ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close rpl_close +# endif +_GL_FUNCDECL_RPL (close, int, (int fd)); +_GL_CXXALIAS_RPL (close, int, (int fd)); +# else +_GL_CXXALIAS_SYS (close, int, (int fd)); +# endif +_GL_CXXALIASWARN (close); +#elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ +# undef close +# define close close_used_without_requesting_gnulib_module_close +#elif defined GNULIB_POSIXCHECK +# undef close +/* Assume close is always declared. */ +_GL_WARN_ON_USE (close, "close does not portably work on sockets - " + "use gnulib module close for portability"); +#endif + + +#if @REPLACE_DUP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define dup rpl_dup +# endif +_GL_FUNCDECL_RPL (dup, int, (int oldfd)); +_GL_CXXALIAS_RPL (dup, int, (int oldfd)); +#else +_GL_CXXALIAS_SYS (dup, int, (int oldfd)); +#endif +_GL_CXXALIASWARN (dup); + + +#if @GNULIB_DUP2@ +/* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if + NEWFD = OLDFD, otherwise close NEWFD first if it is open. + Return newfd if successful, otherwise -1 and errno set. + See the POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/dup2.html>. */ +# if @REPLACE_DUP2@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define dup2 rpl_dup2 +# endif +_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); +_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); +# else +# if !@HAVE_DUP2@ +_GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd)); +# endif +_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); +# endif +_GL_CXXALIASWARN (dup2); +#elif defined GNULIB_POSIXCHECK +# undef dup2 +# if HAVE_RAW_DECL_DUP2 +_GL_WARN_ON_USE (dup2, "dup2 is unportable - " + "use gnulib module dup2 for portability"); +# endif +#endif + + +#if @GNULIB_DUP3@ +/* Copy the file descriptor OLDFD into file descriptor NEWFD, with the + specified flags. + The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + Close NEWFD first if it is open. + Return newfd if successful, otherwise -1 and errno set. + See the Linux man page at + <http://www.kernel.org/doc/man-pages/online/pages/man2/dup3.2.html>. */ +# if @HAVE_DUP3@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define dup3 rpl_dup3 +# endif +_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); +_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); +# else +_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); +_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); +# endif +_GL_CXXALIASWARN (dup3); +#elif defined GNULIB_POSIXCHECK +# undef dup3 +# if HAVE_RAW_DECL_DUP3 +_GL_WARN_ON_USE (dup3, "dup3 is unportable - " + "use gnulib module dup3 for portability"); +# endif +#endif + + +#if @GNULIB_ENVIRON@ +# if !@HAVE_DECL_ENVIRON@ +/* Set of environment variables and values. An array of strings of the form + "VARIABLE=VALUE", terminated with a NULL. */ +# if defined __APPLE__ && defined __MACH__ +# include <crt_externs.h> +# define environ (*_NSGetEnviron ()) +# else +# ifdef __cplusplus +extern "C" { +# endif +extern char **environ; +# ifdef __cplusplus +} +# endif +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# if HAVE_RAW_DECL_ENVIRON +static inline char *** +rpl_environ (void) +{ + return &environ; +} +_GL_WARN_ON_USE (rpl_environ, "environ is unportable - " + "use gnulib module environ for portability"); +# undef environ +# define environ (*rpl_environ ()) +# endif +#endif + + +#if @GNULIB_EUIDACCESS@ +/* Like access(), except that it uses the effective user id and group id of + the current process. */ +# if !@HAVE_EUIDACCESS@ +_GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); +_GL_CXXALIASWARN (euidaccess); +# if defined GNULIB_POSIXCHECK +/* Like access(), this function is a security risk. */ +_GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " + "use the gnulib module faccessat instead"); +# endif +#elif defined GNULIB_POSIXCHECK +# undef euidaccess +# if HAVE_RAW_DECL_EUIDACCESS +_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " + "use gnulib module euidaccess for portability"); +# endif +#endif + + +#if @GNULIB_FACCESSAT@ +# if !@HAVE_FACCESSAT@ +_GL_FUNCDECL_SYS (faccessat, int, + (int fd, char const *file, int mode, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (faccessat, int, + (int fd, char const *file, int mode, int flag)); +_GL_CXXALIASWARN (faccessat); +#elif defined GNULIB_POSIXCHECK +# undef faccessat +# if HAVE_RAW_DECL_FACCESSAT +_GL_WARN_ON_USE (faccessat, "faccessat is not portable - " + "use gnulib module faccessat for portability"); +# endif +#endif + + +#if @GNULIB_FCHDIR@ +/* Change the process' current working directory to the directory on which + the given file descriptor is open. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/fchdir.html>. */ +# if ! @HAVE_FCHDIR@ +_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); + +/* Gnulib internal hooks needed to maintain the fchdir metadata. */ +_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) + _GL_ARG_NONNULL ((2)); +_GL_EXTERN_C void _gl_unregister_fd (int fd); +_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); +_GL_EXTERN_C const char *_gl_directory_name (int fd); + +# else +# if !@HAVE_DECL_FCHDIR@ +_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); +# endif +# endif +_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); +_GL_CXXALIASWARN (fchdir); +#elif defined GNULIB_POSIXCHECK +# undef fchdir +# if HAVE_RAW_DECL_FCHDIR +_GL_WARN_ON_USE (fchdir, "fchdir is unportable - " + "use gnulib module fchdir for portability"); +# endif +#endif + + +#if @GNULIB_FCHOWNAT@ +# if @REPLACE_FCHOWNAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fchownat +# define fchownat rpl_fchownat +# endif +_GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag)); +# else +# if !@HAVE_FCHOWNAT@ +_GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag)); +# endif +_GL_CXXALIASWARN (fchownat); +#elif defined GNULIB_POSIXCHECK +# undef fchownat +# if HAVE_RAW_DECL_FCHOWNAT +_GL_WARN_ON_USE (fchownat, "fchownat is not portable - " + "use gnulib module openat for portability"); +# endif +#endif + + +#if @GNULIB_FSYNC@ +/* Synchronize changes to a file. + Return 0 if successful, otherwise -1 and errno set. + See POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/fsync.html>. */ +# if !@HAVE_FSYNC@ +_GL_FUNCDECL_SYS (fsync, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (fsync, int, (int fd)); +_GL_CXXALIASWARN (fsync); +#elif defined GNULIB_POSIXCHECK +# undef fsync +# if HAVE_RAW_DECL_FSYNC +_GL_WARN_ON_USE (fsync, "fsync is unportable - " + "use gnulib module fsync for portability"); +# endif +#endif + + +#if @GNULIB_FTRUNCATE@ +/* Change the size of the file to which FD is opened to become equal to LENGTH. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/ftruncate.html>. */ +# if !@HAVE_FTRUNCATE@ +_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); +# endif +_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); +_GL_CXXALIASWARN (ftruncate); +#elif defined GNULIB_POSIXCHECK +# undef ftruncate +# if HAVE_RAW_DECL_FTRUNCATE +_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " + "use gnulib module ftruncate for portability"); +# endif +#endif + + +#if @GNULIB_GETCWD@ +/* Get the name of the current working directory, and put it in SIZE bytes + of BUF. + Return BUF if successful, or NULL if the directory couldn't be determined + or SIZE was too small. + See the POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/getcwd.html>. + Additionally, the gnulib module 'getcwd' guarantees the following GNU + extension: If BUF is NULL, an array is allocated with 'malloc'; the array + is SIZE bytes long, unless SIZE == 0, in which case it is as big as + necessary. */ +# if @REPLACE_GETCWD@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getcwd rpl_getcwd +# endif +_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); +_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); +# else +/* Need to cast, because on mingw, the second parameter is + int size. */ +_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); +# endif +_GL_CXXALIASWARN (getcwd); +#elif defined GNULIB_POSIXCHECK +# undef getcwd +# if HAVE_RAW_DECL_GETCWD +_GL_WARN_ON_USE (getcwd, "getcwd is unportable - " + "use gnulib module getcwd for portability"); +# endif +#endif + + +#if @GNULIB_GETDOMAINNAME@ +/* Return the NIS domain name of the machine. + WARNING! The NIS domain name is unrelated to the fully qualified host name + of the machine. It is also unrelated to email addresses. + WARNING! The NIS domain name is usually the empty string or "(none)" when + not using NIS. + + Put up to LEN bytes of the NIS domain name into NAME. + Null terminate it if the name is shorter than LEN. + If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. + Return 0 if successful, otherwise set errno and return -1. */ +# if @REPLACE_GETDOMAINNAME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getdomainname +# define getdomainname rpl_getdomainname +# endif +_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); +# else +# if !@HAVE_DECL_GETDOMAINNAME@ +_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); +# endif +_GL_CXXALIASWARN (getdomainname); +#elif defined GNULIB_POSIXCHECK +# undef getdomainname +# if HAVE_RAW_DECL_GETDOMAINNAME +_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " + "use gnulib module getdomainname for portability"); +# endif +#endif + + +#if @GNULIB_GETDTABLESIZE@ +/* Return the maximum number of file descriptors in the current process. + In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ +# if !@HAVE_GETDTABLESIZE@ +_GL_FUNCDECL_SYS (getdtablesize, int, (void)); +# endif +_GL_CXXALIAS_SYS (getdtablesize, int, (void)); +_GL_CXXALIASWARN (getdtablesize); +#elif defined GNULIB_POSIXCHECK +# undef getdtablesize +# if HAVE_RAW_DECL_GETDTABLESIZE +_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " + "use gnulib module getdtablesize for portability"); +# endif +#endif + + +#if @GNULIB_GETGROUPS@ +/* Return the supplemental groups that the current process belongs to. + It is unspecified whether the effective group id is in the list. + If N is 0, return the group count; otherwise, N describes how many + entries are available in GROUPS. Return -1 and set errno if N is + not 0 and not large enough. Fails with ENOSYS on some systems. */ +# if @REPLACE_GETGROUPS@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getgroups +# define getgroups rpl_getgroups +# endif +_GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); +_GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); +# else +# if !@HAVE_GETGROUPS@ +_GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); +# endif +_GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); +# endif +_GL_CXXALIASWARN (getgroups); +#elif defined GNULIB_POSIXCHECK +# undef getgroups +# if HAVE_RAW_DECL_GETGROUPS +_GL_WARN_ON_USE (getgroups, "getgroups is unportable - " + "use gnulib module getgroups for portability"); +# endif +#endif + + +#if @GNULIB_GETHOSTNAME@ +/* Return the standard host name of the machine. + WARNING! The host name may or may not be fully qualified. + + Put up to LEN bytes of the host name into NAME. + Null terminate it if the name is shorter than LEN. + If the host name is longer than LEN, set errno = EINVAL and return -1. + Return 0 if successful, otherwise set errno and return -1. */ +# if @UNISTD_H_HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gethostname +# define gethostname rpl_gethostname +# endif +_GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); +# else +# if !@HAVE_GETHOSTNAME@ +_GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second + parameter is + int len. */ +_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); +# endif +_GL_CXXALIASWARN (gethostname); +#elif @UNISTD_H_HAVE_WINSOCK2_H@ +# undef gethostname +# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname +#elif defined GNULIB_POSIXCHECK +# undef gethostname +# if HAVE_RAW_DECL_GETHOSTNAME +_GL_WARN_ON_USE (gethostname, "gethostname is unportable - " + "use gnulib module gethostname for portability"); +# endif +#endif + + +#if @GNULIB_GETLOGIN@ +/* Returns the user's login name, or NULL if it cannot be found. Upon error, + returns NULL with errno set. + + See <http://www.opengroup.org/susv3xsh/getlogin.html>. + + Most programs don't need to use this function, because the information is + available through environment variables: + ${LOGNAME-$USER} on Unix platforms, + $USERNAME on native Windows platforms. + */ +# if !@HAVE_GETLOGIN@ +_GL_FUNCDECL_SYS (getlogin, char *, (void)); +# endif +_GL_CXXALIAS_SYS (getlogin, char *, (void)); +_GL_CXXALIASWARN (getlogin); +#elif defined GNULIB_POSIXCHECK +# undef getlogin +# if HAVE_RAW_DECL_GETLOGIN +_GL_WARN_ON_USE (getlogin, "getlogin is unportable - " + "use gnulib module getlogin for portability"); +# endif +#endif + + +#if @GNULIB_GETLOGIN_R@ +/* Copies the user's login name to NAME. + The array pointed to by NAME has room for SIZE bytes. + + Returns 0 if successful. Upon error, an error number is returned, or -1 in + the case that the login name cannot be found but no specific error is + provided (this case is hopefully rare but is left open by the POSIX spec). + + See <http://www.opengroup.org/susv3xsh/getlogin.html>. + + Most programs don't need to use this function, because the information is + available through environment variables: + ${LOGNAME-$USER} on Unix platforms, + $USERNAME on native Windows platforms. + */ +# if @REPLACE_GETLOGIN_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getlogin_r rpl_getlogin_r +# endif +_GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); +# else +# if !@HAVE_DECL_GETLOGIN_R@ +_GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Solaris 10 systems, the second argument is + int size. */ +_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); +# endif +_GL_CXXALIASWARN (getlogin_r); +#elif defined GNULIB_POSIXCHECK +# undef getlogin_r +# if HAVE_RAW_DECL_GETLOGIN_R +_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " + "use gnulib module getlogin_r for portability"); +# endif +#endif + + +#if @GNULIB_GETPAGESIZE@ +# if @REPLACE_GETPAGESIZE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getpagesize rpl_getpagesize +# endif +_GL_FUNCDECL_RPL (getpagesize, int, (void)); +_GL_CXXALIAS_RPL (getpagesize, int, (void)); +# else +# if !@HAVE_GETPAGESIZE@ +# if !defined getpagesize +/* This is for POSIX systems. */ +# if !defined _gl_getpagesize && defined _SC_PAGESIZE +# if ! (defined __VMS && __VMS_VER < 70000000) +# define _gl_getpagesize() sysconf (_SC_PAGESIZE) +# endif +# endif +/* This is for older VMS. */ +# if !defined _gl_getpagesize && defined __VMS +# ifdef __ALPHA +# define _gl_getpagesize() 8192 +# else +# define _gl_getpagesize() 512 +# endif +# endif +/* This is for BeOS. */ +# if !defined _gl_getpagesize && @HAVE_OS_H@ +# include <OS.h> +# if defined B_PAGE_SIZE +# define _gl_getpagesize() B_PAGE_SIZE +# endif +# endif +/* This is for AmigaOS4.0. */ +# if !defined _gl_getpagesize && defined __amigaos4__ +# define _gl_getpagesize() 2048 +# endif +/* This is for older Unix systems. */ +# if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@ +# include <sys/param.h> +# ifdef EXEC_PAGESIZE +# define _gl_getpagesize() EXEC_PAGESIZE +# else +# ifdef NBPG +# ifndef CLSIZE +# define CLSIZE 1 +# endif +# define _gl_getpagesize() (NBPG * CLSIZE) +# else +# ifdef NBPC +# define _gl_getpagesize() NBPC +# endif +# endif +# endif +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getpagesize() _gl_getpagesize () +# else +static inline int +getpagesize () +{ + return _gl_getpagesize (); +} +# endif +# endif +# endif +/* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ +_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); +# endif +# if @HAVE_DECL_GETPAGESIZE@ +_GL_CXXALIASWARN (getpagesize); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getpagesize +# if HAVE_RAW_DECL_GETPAGESIZE +_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " + "use gnulib module getpagesize for portability"); +# endif +#endif + + +#if @GNULIB_GETUSERSHELL@ +/* Return the next valid login shell on the system, or NULL when the end of + the list has been reached. */ +# if !@HAVE_DECL_GETUSERSHELL@ +_GL_FUNCDECL_SYS (getusershell, char *, (void)); +# endif +_GL_CXXALIAS_SYS (getusershell, char *, (void)); +_GL_CXXALIASWARN (getusershell); +#elif defined GNULIB_POSIXCHECK +# undef getusershell +# if HAVE_RAW_DECL_GETUSERSHELL +_GL_WARN_ON_USE (getusershell, "getusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + +#if @GNULIB_GETUSERSHELL@ +/* Rewind to pointer that is advanced at each getusershell() call. */ +# if !@HAVE_DECL_GETUSERSHELL@ +_GL_FUNCDECL_SYS (setusershell, void, (void)); +# endif +_GL_CXXALIAS_SYS (setusershell, void, (void)); +_GL_CXXALIASWARN (setusershell); +#elif defined GNULIB_POSIXCHECK +# undef setusershell +# if HAVE_RAW_DECL_SETUSERSHELL +_GL_WARN_ON_USE (setusershell, "setusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + +#if @GNULIB_GETUSERSHELL@ +/* Free the pointer that is advanced at each getusershell() call and + associated resources. */ +# if !@HAVE_DECL_GETUSERSHELL@ +_GL_FUNCDECL_SYS (endusershell, void, (void)); +# endif +_GL_CXXALIAS_SYS (endusershell, void, (void)); +_GL_CXXALIASWARN (endusershell); +#elif defined GNULIB_POSIXCHECK +# undef endusershell +# if HAVE_RAW_DECL_ENDUSERSHELL +_GL_WARN_ON_USE (endusershell, "endusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + + +#if @GNULIB_LCHOWN@ +/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE + to GID (if GID is not -1). Do not follow symbolic links. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/lchown.html>. */ +# if @REPLACE_LCHOWN@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lchown +# define lchown rpl_lchown +# endif +_GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); +# else +# if !@HAVE_LCHOWN@ +_GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); +# endif +_GL_CXXALIASWARN (lchown); +#elif defined GNULIB_POSIXCHECK +# undef lchown +# if HAVE_RAW_DECL_LCHOWN +_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " + "use gnulib module lchown for portability"); +# endif +#endif + + +#if @GNULIB_LINK@ +/* Create a new hard link for an existing file. + Return 0 if successful, otherwise -1 and errno set. + See POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/link.html>. */ +# if @REPLACE_LINK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define link rpl_link +# endif +_GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); +# else +# if !@HAVE_LINK@ +_GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); +# endif +_GL_CXXALIASWARN (link); +#elif defined GNULIB_POSIXCHECK +# undef link +# if HAVE_RAW_DECL_LINK +_GL_WARN_ON_USE (link, "link is unportable - " + "use gnulib module link for portability"); +# endif +#endif + + +#if @GNULIB_LINKAT@ +/* Create a new hard link for an existing file, relative to two + directories. FLAG controls whether symlinks are followed. + Return 0 if successful, otherwise -1 and errno set. */ +# if @REPLACE_LINKAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef linkat +# define linkat rpl_linkat +# endif +_GL_FUNCDECL_RPL (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag) + _GL_ARG_NONNULL ((2, 4))); +_GL_CXXALIAS_RPL (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag)); +# else +# if !@HAVE_LINKAT@ +_GL_FUNCDECL_SYS (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag) + _GL_ARG_NONNULL ((2, 4))); +# endif +_GL_CXXALIAS_SYS (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag)); +# endif +_GL_CXXALIASWARN (linkat); +#elif defined GNULIB_POSIXCHECK +# undef linkat +# if HAVE_RAW_DECL_LINKAT +_GL_WARN_ON_USE (linkat, "linkat is unportable - " + "use gnulib module linkat for portability"); +# endif +#endif + + +#if @GNULIB_LSEEK@ +/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. + Return the new offset if successful, otherwise -1 and errno set. + See the POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/lseek.html>. */ +# if @REPLACE_LSEEK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define lseek rpl_lseek +# endif +_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); +_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); +# else +_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); +# endif +_GL_CXXALIASWARN (lseek); +#elif defined GNULIB_POSIXCHECK +# undef lseek +# if HAVE_RAW_DECL_LSEEK +_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " + "systems - use gnulib module lseek for portability"); +# endif +#endif + + +#if @GNULIB_PIPE@ +/* Create a pipe, defaulting to O_BINARY mode. + Store the read-end as fd[0] and the write-end as fd[1]. + Return 0 upon success, or -1 with errno set upon failure. */ +# if !@HAVE_PIPE@ +_GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (pipe, int, (int fd[2])); +_GL_CXXALIASWARN (pipe); +#elif defined GNULIB_POSIXCHECK +# undef pipe +# if HAVE_RAW_DECL_PIPE +_GL_WARN_ON_USE (pipe, "pipe is unportable - " + "use gnulib module pipe-posix for portability"); +# endif +#endif + + +#if @GNULIB_PIPE2@ +/* Create a pipe, applying the given flags when opening the read-end of the + pipe and the write-end of the pipe. + The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + Store the read-end as fd[0] and the write-end as fd[1]. + Return 0 upon success, or -1 with errno set upon failure. + See also the Linux man page at + <http://www.kernel.org/doc/man-pages/online/pages/man2/pipe2.2.html>. */ +# if @HAVE_PIPE2@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define pipe2 rpl_pipe2 +# endif +_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); +# else +_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); +# endif +_GL_CXXALIASWARN (pipe2); +#elif defined GNULIB_POSIXCHECK +# undef pipe2 +# if HAVE_RAW_DECL_PIPE2 +_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " + "use gnulib module pipe2 for portability"); +# endif +#endif + + +#if @GNULIB_PREAD@ +/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. + Return the number of bytes placed into BUF if successful, otherwise + set errno and return -1. 0 indicates EOF. See the POSIX:2001 + specification <http://www.opengroup.org/susv3xsh/pread.html>. */ +# if @REPLACE_PREAD@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define pread rpl_pread +# endif +_GL_FUNCDECL_RPL (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset)); +# else +# if !@HAVE_PREAD@ +_GL_FUNCDECL_SYS (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset)); +# endif +_GL_CXXALIASWARN (pread); +#elif defined GNULIB_POSIXCHECK +# undef pread +# if HAVE_RAW_DECL_PREAD +_GL_WARN_ON_USE (pread, "pread is unportable - " + "use gnulib module pread for portability"); +# endif +#endif + + +#if @GNULIB_PWRITE@ +/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. + Return the number of bytes written if successful, otherwise + set errno and return -1. 0 indicates nothing written. See the + POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/pwrite.html>. */ +# if @REPLACE_PWRITE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define pwrite rpl_pwrite +# endif +_GL_FUNCDECL_RPL (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset)); +# else +# if !@HAVE_PWRITE@ +_GL_FUNCDECL_SYS (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset)); +# endif +_GL_CXXALIASWARN (pwrite); +#elif defined GNULIB_POSIXCHECK +# undef pwrite +# if HAVE_RAW_DECL_PWRITE +_GL_WARN_ON_USE (pwrite, "pwrite is unportable - " + "use gnulib module pwrite for portability"); +# endif +#endif + + +#if @GNULIB_READLINK@ +/* Read the contents of the symbolic link FILE and place the first BUFSIZE + bytes of it into BUF. Return the number of bytes placed into BUF if + successful, otherwise -1 and errno set. + See the POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/readlink.html>. */ +# if @REPLACE_READLINK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define readlink rpl_readlink +# endif +_GL_FUNCDECL_RPL (readlink, ssize_t, + (const char *file, char *buf, size_t bufsize) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (readlink, ssize_t, + (const char *file, char *buf, size_t bufsize)); +# else +# if !@HAVE_READLINK@ +_GL_FUNCDECL_SYS (readlink, ssize_t, + (const char *file, char *buf, size_t bufsize) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (readlink, ssize_t, + (const char *file, char *buf, size_t bufsize)); +# endif +_GL_CXXALIASWARN (readlink); +#elif defined GNULIB_POSIXCHECK +# undef readlink +# if HAVE_RAW_DECL_READLINK +_GL_WARN_ON_USE (readlink, "readlink is unportable - " + "use gnulib module readlink for portability"); +# endif +#endif + + +#if @GNULIB_READLINKAT@ +# if !@HAVE_READLINKAT@ +_GL_FUNCDECL_SYS (readlinkat, ssize_t, + (int fd, char const *file, char *buf, size_t len) + _GL_ARG_NONNULL ((2, 3))); +# endif +_GL_CXXALIAS_SYS (readlinkat, ssize_t, + (int fd, char const *file, char *buf, size_t len)); +_GL_CXXALIASWARN (readlinkat); +#elif defined GNULIB_POSIXCHECK +# undef readlinkat +# if HAVE_RAW_DECL_READLINKAT +_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " + "use gnulib module readlinkat for portability"); +# endif +#endif + + +#if @GNULIB_RMDIR@ +/* Remove the directory DIR. */ +# if @REPLACE_RMDIR@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define rmdir rpl_rmdir +# endif +_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (rmdir, int, (char const *name)); +# else +_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); +# endif +_GL_CXXALIASWARN (rmdir); +#elif defined GNULIB_POSIXCHECK +# undef rmdir +# if HAVE_RAW_DECL_RMDIR +_GL_WARN_ON_USE (rmdir, "rmdir is unportable - " + "use gnulib module rmdir for portability"); +# endif +#endif + + +#if @GNULIB_SLEEP@ +/* Pause the execution of the current thread for N seconds. + Returns the number of seconds left to sleep. + See the POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/sleep.html>. */ +# if @REPLACE_SLEEP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sleep +# define sleep rpl_sleep +# endif +_GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); +_GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); +# else +# if !@HAVE_SLEEP@ +_GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); +# endif +_GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); +# endif +_GL_CXXALIASWARN (sleep); +#elif defined GNULIB_POSIXCHECK +# undef sleep +# if HAVE_RAW_DECL_SLEEP +_GL_WARN_ON_USE (sleep, "sleep is unportable - " + "use gnulib module sleep for portability"); +# endif +#endif + + +#if @GNULIB_SYMLINK@ +# if @REPLACE_SYMLINK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef symlink +# define symlink rpl_symlink +# endif +_GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); +# else +# if !@HAVE_SYMLINK@ +_GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); +# endif +_GL_CXXALIASWARN (symlink); +#elif defined GNULIB_POSIXCHECK +# undef symlink +# if HAVE_RAW_DECL_SYMLINK +_GL_WARN_ON_USE (symlink, "symlink is not portable - " + "use gnulib module symlink for portability"); +# endif +#endif + + +#if @GNULIB_SYMLINKAT@ +# if !@HAVE_SYMLINKAT@ +_GL_FUNCDECL_SYS (symlinkat, int, + (char const *contents, int fd, char const *file) + _GL_ARG_NONNULL ((1, 3))); +# endif +_GL_CXXALIAS_SYS (symlinkat, int, + (char const *contents, int fd, char const *file)); +_GL_CXXALIASWARN (symlinkat); +#elif defined GNULIB_POSIXCHECK +# undef symlinkat +# if HAVE_RAW_DECL_SYMLINKAT +_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " + "use gnulib module symlinkat for portability"); +# endif +#endif + + +#if @GNULIB_TTYNAME_R@ +/* Store at most BUFLEN characters of the pathname of the terminal FD is + open on in BUF. Return 0 on success, otherwise an error number. */ +# if @REPLACE_TTYNAME_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ttyname_r +# define ttyname_r rpl_ttyname_r +# endif +_GL_FUNCDECL_RPL (ttyname_r, int, + (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (ttyname_r, int, + (int fd, char *buf, size_t buflen)); +# else +# if !@HAVE_DECL_TTYNAME_R@ +_GL_FUNCDECL_SYS (ttyname_r, int, + (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (ttyname_r, int, + (int fd, char *buf, size_t buflen)); +# endif +_GL_CXXALIASWARN (ttyname_r); +#elif defined GNULIB_POSIXCHECK +# undef ttyname_r +# if HAVE_RAW_DECL_TTYNAME_R +_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " + "use gnulib module ttyname_r for portability"); +# endif +#endif + + +#if @GNULIB_UNLINK@ +# if @REPLACE_UNLINK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink rpl_unlink +# endif +_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (unlink, int, (char const *file)); +# else +_GL_CXXALIAS_SYS (unlink, int, (char const *file)); +# endif +_GL_CXXALIASWARN (unlink); +#elif defined GNULIB_POSIXCHECK +# undef unlink +# if HAVE_RAW_DECL_UNLINK +_GL_WARN_ON_USE (unlink, "unlink is not portable - " + "use gnulib module unlink for portability"); +# endif +#endif + + +#if @GNULIB_UNLINKAT@ +# if @REPLACE_UNLINKAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlinkat +# define unlinkat rpl_unlinkat +# endif +_GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); +# else +# if !@HAVE_UNLINKAT@ +_GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); +# endif +_GL_CXXALIASWARN (unlinkat); +#elif defined GNULIB_POSIXCHECK +# undef unlinkat +# if HAVE_RAW_DECL_UNLINKAT +_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " + "use gnulib module openat for portability"); +# endif +#endif + + +#if @GNULIB_USLEEP@ +/* Pause the execution of the current thread for N microseconds. + Returns 0 on completion, or -1 on range error. + See the POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/sleep.html>. */ +# if @REPLACE_USLEEP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef usleep +# define usleep rpl_usleep +# endif +_GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); +_GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); +# else +# if !@HAVE_USLEEP@ +_GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); +# endif +_GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); +# endif +_GL_CXXALIASWARN (usleep); +#elif defined GNULIB_POSIXCHECK +# undef usleep +# if HAVE_RAW_DECL_USLEEP +_GL_WARN_ON_USE (usleep, "usleep is unportable - " + "use gnulib module usleep for portability"); +# endif +#endif + + +#if @GNULIB_WRITE@ +/* Write up to COUNT bytes starting at BUF to file descriptor FD. + See the POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/write.html>. */ +# if @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write rpl_write +# endif +_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); +# else +/* Need to cast, because on mingw, the third parameter is + unsigned int count + and the return type is 'int'. */ +_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (write); +#endif + + +#endif /* _GL_UNISTD_H */ +#endif /* _GL_UNISTD_H */
--- a/lisp/ChangeLog Sun Jan 16 23:45:28 2011 -0800 +++ b/lisp/ChangeLog Wed Jan 19 13:54:19 2011 -0800 @@ -1,3 +1,25 @@ +2011-01-19 Glenn Morris <rgm@gnu.org> + + * vc/vc-svn.el (vc-svn-after-dir-status, vc-svn-parse-status): + Also check the property status. (Bug#7861) + +2011-01-18 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-debug-message): Extend function exclude + list. Use `regexp-opt'. + +2011-01-18 Stefan Monnier <monnier@iro.umontreal.ca> + + * textmodes/tex-mode.el (tex-font-lock-verb): Make sure \verb + highlighting doesn't spill over subsequent lines. + + * emacs-lisp/easy-mmode.el (define-minor-mode): Don't re-evaluate the + keymap expression. Improve docstring. + + * electric.el (electric-indent-post-self-insert-function): + Don't auto-indent for indent-to-left-margin, it's too often + counter-productive. + 2011-01-16 Tassilo Horn <tassilo@member.fsf.org> * strokes.el (strokes-read-stroke): Re-fill strokes buffer with @@ -54,12 +76,12 @@ 2011-01-15 Kenichi Handa <handa@m17n.org> - * mail/rmailmm.el (rmail-mime-insert-header): Set - rmail-mime-coding-system to a cons whose car is the last coding + * mail/rmailmm.el (rmail-mime-insert-header): + Set rmail-mime-coding-system to a cons whose car is the last coding system used to decode the header. (rmail-mime-find-header-encoding): New function. - (rmail-mime-insert-decoded-text): Override - rmail-mime-coding-system if it is a cons. + (rmail-mime-insert-decoded-text): + Override rmail-mime-coding-system if it is a cons. (rmail-show-mime): If only a header part was decoded, find the coding system while ignoring mm-charset-override-alist. @@ -72,8 +94,8 @@ * mail/rmailmm.el (rmail-mime-next-item) (rmail-mime-previous-item): Delete them. (rmail-mime-shown-mode): Recursively call for children. - (rmail-mime-hidden-mode): Delete the 2nd arg TOP. Callers - changed. + (rmail-mime-hidden-mode): Delete the 2nd arg TOP. + Callers changed. (rmail-mime-raw-mode): Recursively call for children. (rmail-mode-map): Change mapping of tab and backtab to forward-button and backward-button respectively. @@ -82,7 +104,7 @@ (rmail-mime-update-tagline): New function. (rmail-mime-insert-text): Call rmail-mime-update-tagline if the body display is changed. - (rmail-mime-toggle-button): Renamed from rmail-mime-image. + (rmail-mime-toggle-button): Rename from rmail-mime-image. (rmail-mime-image): Delete this button type. (rmail-mime-toggle): New button type. (rmail-mime-insert-bulk): Call rmail-mime-update-tagline if the @@ -329,8 +351,8 @@ menus. Add menu item for customize-themes. * cus-theme.el (customize-themes): - * emacs-lisp/package.el (package--list-packages): Use - switch-to-buffer. + * emacs-lisp/package.el (package--list-packages): + Use switch-to-buffer. 2011-01-11 Johan Bockgård <bojohan@gnu.org>
--- a/lisp/dired.el Sun Jan 16 23:45:28 2011 -0800 +++ b/lisp/dired.el Wed Jan 19 13:54:19 2011 -0800 @@ -3562,7 +3562,7 @@ ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "5fc17781c25dbe16b7e170aed0ad4d62") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "adcb55a439048f158f47c5c96b3dad09") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ @@ -4021,7 +4021,7 @@ ;;;*** ;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el" -;;;;;; "0f63715e54b0d001955bdc3680cadcd0") +;;;;;; "6d47e23fbd9236014786c50618e99f09") ;;; Generated autoloads from dired-x.el (autoload 'dired-jump "dired-x" "\
--- a/lisp/electric.el Sun Jan 16 23:45:28 2011 -0800 +++ b/lisp/electric.el Wed Jan 19 13:54:19 2011 -0800 @@ -221,7 +221,8 @@ (let ((before (copy-marker (1- pos) t))) (save-excursion (unless (memq indent-line-function - '(indent-relative indent-relative-maybe)) + '(indent-relative indent-to-left-margin + indent-relative-maybe)) ;; Don't reindent the previous line if the indentation function ;; is not a real one. (goto-char before) @@ -235,7 +236,8 @@ ;; Remove the trailing whitespace after indentation because ;; indentation may (re)introduce the whitespace. (delete-horizontal-space t)))) - (indent-according-to-mode)))) + (unless (memq indent-line-function '(indent-to-left-margin)) + (indent-according-to-mode))))) ;;;###autoload (define-minor-mode electric-indent-mode
--- a/lisp/emacs-lisp/cl-loaddefs.el Sun Jan 16 23:45:28 2011 -0800 +++ b/lisp/emacs-lisp/cl-loaddefs.el Wed Jan 19 13:54:19 2011 -0800 @@ -10,7 +10,7 @@ ;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p ;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively ;;;;;; notevery notany every some mapcon mapcan mapl maplist map -;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "0fa13e08069009fb44873beae11aab93") +;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "ff6f0444d029166d2ed5da298f39854e") ;;; Generated autoloads from cl-extra.el (autoload 'coerce "cl-extra" "\ @@ -754,7 +754,7 @@ ;;;;;; find nsubstitute-if-not nsubstitute-if nsubstitute substitute-if-not ;;;;;; substitute-if substitute delete-duplicates remove-duplicates ;;;;;; delete-if-not delete-if delete* remove-if-not remove-if remove* -;;;;;; replace fill reduce) "cl-seq" "cl-seq.el" "06b7f4180b3e40db2e6dae228c3265a8") +;;;;;; replace fill reduce) "cl-seq" "cl-seq.el" "c17ab899d56f8fa132d0471ce6896a10") ;;; Generated autoloads from cl-seq.el (autoload 'reduce "cl-seq" "\
--- a/lisp/emacs-lisp/easy-mmode.el Sun Jan 16 23:45:28 2011 -0800 +++ b/lisp/emacs-lisp/easy-mmode.el Wed Jan 19 13:54:19 2011 -0800 @@ -94,8 +94,9 @@ Optional LIGHTER is displayed in the modeline when the mode is on. Optional KEYMAP is the default keymap bound to the mode keymap. If non-nil, it should be a variable name (whose value is a keymap), - a keymap, or a list of arguments for `easy-mmode-define-keymap'. - If KEYMAP is a keymap or list, this also defines the variable MODE-map. + or an expression that returns either a keymap or a list of + arguments for `easy-mmode-define-keymap'. If KEYMAP is not a symbol, + this also defines the variable MODE-map. BODY contains code to execute each time the mode is enabled or disabled. It is executed after toggling the mode, and before running MODE-hook. @@ -274,7 +275,7 @@ (let ((m ,keymap)) (cond ((keymapp m) m) ((listp m) (easy-mmode-define-keymap m)) - (t (error "Invalid keymap %S" ,keymap)))) + (t (error "Invalid keymap %S" m)))) ,(format "Keymap for `%s'." mode-name))) ,(if (not (symbolp mode))
--- a/lisp/htmlfontify.el Sun Jan 16 23:45:28 2011 -0800 +++ b/lisp/htmlfontify.el Wed Jan 19 13:54:19 2011 -0800 @@ -2350,7 +2350,7 @@ ;;;### (autoloads (hfy-fallback-colour-values htmlfontify-load-rgb-file) -;;;;;; "hfy-cmap" "hfy-cmap.el" "5314c2706e20292f96206daa0eb96caa") +;;;;;; "hfy-cmap" "hfy-cmap.el" "f7f81749b08e0aec14aac431f8b5ac8b") ;;; Generated autoloads from hfy-cmap.el (autoload 'htmlfontify-load-rgb-file "hfy-cmap" "\
--- a/lisp/mail/rmail.el Sun Jan 16 23:45:28 2011 -0800 +++ b/lisp/mail/rmail.el Wed Jan 19 13:54:19 2011 -0800 @@ -4263,7 +4263,7 @@ ;;; Start of automatically extracted autoloads. ;;;### (autoloads (rmail-edit-current-message) "rmailedit" "rmailedit.el" -;;;;;; "bdbcacaef237aab5ca6c8653dc52a044") +;;;;;; "1602595714ff15197cf32727d6765c31") ;;; Generated autoloads from rmailedit.el (autoload 'rmail-edit-current-message "rmailedit" "\ @@ -4275,7 +4275,7 @@ ;;;### (autoloads (rmail-next-labeled-message rmail-previous-labeled-message ;;;;;; rmail-read-label rmail-kill-label rmail-add-label) "rmailkwd" -;;;;;; "rmailkwd.el" "46ac83afa76e3aa88eacf73237bd703e") +;;;;;; "rmailkwd.el" "061943b8a3dfd5695715b36736827950") ;;; Generated autoloads from rmailkwd.el (autoload 'rmail-add-label "rmailkwd" "\ @@ -4318,7 +4318,7 @@ ;;;*** -;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "724fa72db9b6c804f7f69ad1da83fd39") +;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "783deb7c855767051af119f1bfd8d84e") ;;; Generated autoloads from rmailmm.el (autoload 'rmail-mime "rmailmm" "\ @@ -4344,7 +4344,7 @@ ;;;*** ;;;### (autoloads (set-rmail-inbox-list) "rmailmsc" "rmailmsc.el" -;;;;;; "fd5e2a8dc4f74ea2275525d7a2766bea") +;;;;;; "f1d9be06745c78b90224da788f61c2d9") ;;; Generated autoloads from rmailmsc.el (autoload 'set-rmail-inbox-list "rmailmsc" "\ @@ -4360,7 +4360,7 @@ ;;;### (autoloads (rmail-sort-by-labels rmail-sort-by-lines rmail-sort-by-correspondent ;;;;;; rmail-sort-by-recipient rmail-sort-by-author rmail-sort-by-subject -;;;;;; rmail-sort-by-date) "rmailsort" "rmailsort.el" "446f2e852393e72030b85a1a9230c7ac") +;;;;;; rmail-sort-by-date) "rmailsort" "rmailsort.el" "8b20167ea495d683f83f980833e948e0") ;;; Generated autoloads from rmailsort.el (autoload 'rmail-sort-by-date "rmailsort" "\ @@ -4419,7 +4419,7 @@ ;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic ;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels -;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "267d6f740d6697a631dacbd86f583374") +;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "b1d2ca7470a7d8baffe9e90a15a5b5e0") ;;; Generated autoloads from rmailsum.el (autoload 'rmail-summary "rmailsum" "\ @@ -4467,7 +4467,7 @@ ;;;*** ;;;### (autoloads (unforward-rmail-message undigestify-rmail-message) -;;;;;; "undigest" "undigest.el" "2869c38a0051d0acab1a5968627fa57d") +;;;;;; "undigest" "undigest.el" "1b5181e02606e49ede71604472250cc3") ;;; Generated autoloads from undigest.el (autoload 'undigestify-rmail-message "undigest" "\
--- a/lisp/net/tramp-sh.el Sun Jan 16 23:45:28 2011 -0800 +++ b/lisp/net/tramp-sh.el Wed Jan 19 13:54:19 2011 -0800 @@ -1,7 +1,7 @@ ;;; tramp-sh.el --- Tramp access functions for (s)sh-like connections -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +;; 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. ;; (copyright statements below in code to be updated with the above notice) @@ -761,8 +761,8 @@ (defconst tramp-perl-encode "%s -e ' # This script contributed by Juanma Barranquero <lektu@terra.es>. -# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. use strict; my %%trans = do { @@ -803,8 +803,8 @@ (defconst tramp-perl-decode "%s -e ' # This script contributed by Juanma Barranquero <lektu@terra.es>. -# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 -# Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. use strict; my %%trans = do {
--- a/lisp/net/tramp.el Sun Jan 16 23:45:28 2011 -0800 +++ b/lisp/net/tramp.el Wed Jan 19 13:54:19 2011 -0800 @@ -1293,7 +1293,8 @@ (let ((now (current-time))) (insert (format-time-string "%T." now)) (insert (format "%06d " (nth 2 now)))) - ;; Calling function. + ;; Calling Tramp function. We suppress compat and trace + ;; functions from being displayed. (let ((btn 1) btf fn) (while (not fn) (setq btf (nth 1 (backtrace-frame btn))) @@ -1301,10 +1302,23 @@ (setq fn "") (when (symbolp btf) (setq fn (symbol-name btf)) - (unless (and (string-match "^tramp" fn) - (not (string-match - "^tramp\\(-debug\\)?\\(-message\\|-error\\|-compat\\(-funcall\\|-with-temp-message\\)\\)$" - fn))) + (unless + (and + (string-match "^tramp" fn) + (not + (string-match + (concat + "^" + (regexp-opt + '("tramp-compat-funcall" + "tramp-compat-with-temp-message" + "tramp-debug-message" + "tramp-error" + "tramp-error-with-buffer" + "tramp-message") + t) + "$") + fn))) (setq fn nil))) (setq btn (1+ btn)))) ;; The following code inserts filename and line number.
--- a/lisp/ps-print.el Sun Jan 16 23:45:28 2011 -0800 +++ b/lisp/ps-print.el Wed Jan 19 13:54:19 2011 -0800 @@ -6659,7 +6659,7 @@ ;; But autoload them here to make the separation invisible. ;;;### (autoloads (ps-mule-end-job ps-mule-begin-job ps-mule-initialize -;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "0bd9e024b9d49ac10c708171ec319d9a") +;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "84d550158bdd60da7af54df17b7a38f7") ;;; Generated autoloads from ps-mule.el (defvar ps-multibyte-buffer nil "\
--- a/lisp/textmodes/tex-mode.el Sun Jan 16 23:45:28 2011 -0800 +++ b/lisp/textmodes/tex-mode.el Wed Jan 19 13:54:19 2011 -0800 @@ -791,20 +791,23 @@ (defun tex-font-lock-verb (start delim) "Place syntax table properties on the \verb construct. START is the position of the \\ and DELIM is the delimiter char." - ;; Do nothing if the \verb construct is itself inside a comment or - ;; verbatim env. + ;; Do nothing if the \verb construct is itself inside a comment or + ;; verbatim env. (unless (nth 8 (save-excursion (syntax-ppss start))) - ;; Let's find the end and mark it. - ;; This may span more than a single line, but we don't bother - ;; placing a syntax-multiline property since such multiline verbs aren't - ;; valid anyway. - (skip-chars-forward (string ?^ delim)) - (unless (eobp) - (when (eq (char-syntax (preceding-char)) ?/) - (put-text-property (1- (point)) (point) - 'syntax-table (string-to-syntax "."))) - (put-text-property (point) (1+ (point)) - 'syntax-table (string-to-syntax "\""))))) + ;; Let's find the end and mark it. + (let ((afterdelim (point))) + (skip-chars-forward (string ?^ delim) (line-end-position)) + (if (eolp) + ;; "LaTeX Error: \verb ended by end of line." + ;; Remove the syntax-table property we've just put on the + ;; start-delimiter, so it doesn't spill over subsequent lines. + (put-text-property (1- afterdelim) afterdelim + 'syntax-table nil) + (when (eq (char-syntax (preceding-char)) ?/) + (put-text-property (1- (point)) (point) + 'syntax-table (string-to-syntax "."))) + (put-text-property (point) (1+ (point)) + 'syntax-table (string-to-syntax "\"")))))) ;; Use string syntax but math face for $...$. (defun tex-font-lock-syntactic-face-function (state)
--- a/lisp/vc/vc-svn.el Sun Jan 16 23:45:28 2011 -0800 +++ b/lisp/vc/vc-svn.el Wed Jan 19 13:54:19 2011 -0800 @@ -171,15 +171,18 @@ (?? . unregistered) ;; This is what vc-svn-parse-status does. (?~ . edited))) - (re (if remote "^\\(.\\)......? \\([ *]\\) +\\(?:[-0-9]+\\)? \\(.*\\)$" - ;; Subexp 2 is a dummy in this case, so the numbers match. - "^\\(.\\)....\\(.\\) \\(.*\\)$")) + (re (if remote "^\\(.\\)\\(.\\).....? \\([ *]\\) +\\(?:[-0-9]+\\)? \\(.*\\)$" + ;; Subexp 3 is a dummy in this case, so the numbers match. + "^\\(.\\)\\(.\\)...\\(.\\) \\(.*\\)$")) result) (goto-char (point-min)) (while (re-search-forward re nil t) (let ((state (cdr (assq (aref (match-string 1) 0) state-map))) - (filename (match-string 3))) - (and remote (string-equal (match-string 2) "*") + (propstat (cdr (assq (aref (match-string 2) 0) state-map))) + (filename (match-string 4))) + (if (memq propstat '(conflict edited)) + (setq state propstat)) + (and remote (string-equal (match-string 3) "*") ;; FIXME are there other possible combinations? (cond ((eq state 'edited) (setq state 'needs-merge)) ((not state) (setq state 'needs-update)))) @@ -643,7 +646,7 @@ "Parse output of \"svn status\" command in the current buffer. Set file properties accordingly. Unless FILENAME is non-nil, parse only information about FILENAME and return its status." - (let (file status) + (let (file status propstat) (goto-char (point-min)) (while (re-search-forward ;; Ignore the files with status X. @@ -653,7 +656,9 @@ (setq file (or filename (expand-file-name (buffer-substring (point) (line-end-position))))) - (setq status (char-after (line-beginning-position))) + (setq status (char-after (line-beginning-position)) + ;; Status of the item's properties ([ MC]). + propstat (char-after (1+ (line-beginning-position)))) (if (eq status ??) (vc-file-setprop file 'vc-state 'unregistered) ;; Use the last-modified revision, so that searching in vc-print-log @@ -664,7 +669,7 @@ (vc-file-setprop file 'vc-state (cond - ((eq status ?\ ) + ((and (eq status ?\ ) (eq propstat ?\ )) (if (eq (char-after (match-beginning 1)) ?*) 'needs-update (vc-file-setprop file 'vc-checkout-time @@ -675,9 +680,11 @@ (vc-file-setprop file 'vc-working-revision "0") (vc-file-setprop file 'vc-checkout-time 0) 'added) - ((eq status ?C) + ;; Conflict in contents or properties. + ((or (eq status ?C) (eq propstat ?C)) (vc-file-setprop file 'vc-state 'conflict)) - ((eq status '?M) + ;; Modified contents or properties. + ((or (eq status ?M) (eq propstat ?M)) (if (eq (char-after (match-beginning 1)) ?*) 'needs-merge 'edited))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/00gnulib.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,30 @@ +# 00gnulib.m4 serial 2 +dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This file must be named something that sorts before all other +dnl gnulib-provided .m4 files. It is needed until such time as we can +dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics. + +# AC_DEFUN_ONCE([NAME], VALUE) +# ---------------------------- +# Define NAME to expand to VALUE on the first use (whether by direct +# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. +# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This +# definition is slower than the version in Autoconf 2.64, because it +# can only use interfaces that existed since 2.59; but it achieves the +# same effect. Quoting is necessary to avoid confusing Automake. +m4_version_prereq([2.63.263], [], +[m4_define([AC][_DEFUN_ONCE], + [AC][_DEFUN([$1], + [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], + [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl +[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) + +# gl_00GNULIB +# ----------- +# Witness macro that this file has been included. Needed to force +# Automake to include this file prior to all other gnulib .m4 files. +AC_DEFUN([gl_00GNULIB])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/c-strtod.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,59 @@ +# c-strtod.m4 serial 12 + +# Copyright (C) 2004-2006, 2009-2011 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Written by Paul Eggert. + +AC_DEFUN([gl_C99_STRTOLD], +[ + AC_CACHE_CHECK([whether strtold conforms to C99], + [gl_cv_func_c99_strtold], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[/* On HP-UX before 11.23, strtold returns a struct instead of + long double. Reject implementations like that, by requiring + compatibility with the C99 prototype. */ + #include <stdlib.h> + static long double (*p) (char const *, char **) = strtold; + static long double + test (char const *nptr, char **endptr) + { + long double r; + r = strtold (nptr, endptr); + return r; + }]], + [[return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;]])], + [gl_cv_func_c99_strtold=yes], + [gl_cv_func_c99_strtold=no])]) + if test $gl_cv_func_c99_strtold = yes; then + AC_DEFINE([HAVE_C99_STRTOLD], [1], [Define to 1 if strtold conforms to C99.]) + fi +]) + +AC_DEFUN([gl_C_STRTOD], +[ + AC_LIBOBJ([c-strtod]) + + dnl Prerequisites of lib/c-strtod.c. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS([strtod_l]) + + AC_REQUIRE([AC_C_INLINE]) + : +]) + +AC_DEFUN([gl_C_STRTOLD], +[ + AC_LIBOBJ([c-strtold]) + + dnl Prerequisites of lib/c-strtold.c. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([gl_C99_STRTOLD]) + AC_CHECK_FUNCS([strtold_l]) + + AC_REQUIRE([AC_C_INLINE]) + : +])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/extensions.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,118 @@ +# serial 9 -*- Autoconf -*- +# Enable extensions on systems that normally disable them. + +# Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS +# Autoconf. Perhaps we can remove this once we can assume Autoconf +# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly +# enough in this area it's likely we'll need to redefine +# AC_USE_SYSTEM_EXTENSIONS for quite some time. + +# If autoconf reports a warning +# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS +# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS +# the fix is +# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked +# but always AC_REQUIREd, +# 2) to ensure that for each occurrence of +# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) +# or +# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) +# the corresponding gnulib module description has 'extensions' among +# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS +# invocation occurs in gl_EARLY, not in gl_INIT. + +# AC_USE_SYSTEM_EXTENSIONS +# ------------------------ +# Enable extensions on systems that normally disable them, +# typically due to standards-conformance issues. +# Remember that #undef in AH_VERBATIM gets replaced with #define by +# AC_DEFINE. The goal here is to define all known feature-enabling +# macros, then, if reports of conflicts are made, disable macros that +# cause problems on some platforms (such as __EXTENSIONS__). +AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], +[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl +AC_BEFORE([$0], [AC_RUN_IFELSE])dnl + + AC_REQUIRE([AC_CANONICAL_HOST]) + + AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) + if test "$MINIX" = yes; then + AC_DEFINE([_POSIX_SOURCE], [1], + [Define to 1 if you need to in order for `stat' and other + things to work.]) + AC_DEFINE([_POSIX_1_SOURCE], [2], + [Define to 2 if the system does not provide POSIX.1 features + except with this defined.]) + AC_DEFINE([_MINIX], [1], + [Define to 1 if on MINIX.]) + fi + + dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, + dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already + dnl provided. + case "$host_os" in + hpux*) + AC_DEFINE([_XOPEN_SOURCE], [500], + [Define to 500 only on HP-UX.]) + ;; + esac + + AH_VERBATIM([__EXTENSIONS__], +[/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif +]) + AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], + [ac_cv_safe_to_define___extensions__], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ +# define __EXTENSIONS__ 1 + ]AC_INCLUDES_DEFAULT])], + [ac_cv_safe_to_define___extensions__=yes], + [ac_cv_safe_to_define___extensions__=no])]) + test $ac_cv_safe_to_define___extensions__ = yes && + AC_DEFINE([__EXTENSIONS__]) + AC_DEFINE([_ALL_SOURCE]) + AC_DEFINE([_GNU_SOURCE]) + AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) + AC_DEFINE([_TANDEM_SOURCE]) +])# AC_USE_SYSTEM_EXTENSIONS + +# gl_USE_SYSTEM_EXTENSIONS +# ------------------------ +# Enable extensions on systems that normally disable them, +# typically due to standards-conformance issues. +AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], +[ + dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. + dnl gnulib does not need it. But if it gets required by third-party macros + dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a + dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". + dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, + dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. + AC_REQUIRE([AC_GNU_SOURCE]) + + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) +])
--- a/m4/getopt.m4 Sun Jan 16 23:45:28 2011 -0800 +++ b/m4/getopt.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -1,21 +1,307 @@ -# getopt.m4 serial 10 -dnl Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. +# getopt.m4 serial 32 +dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -# The getopt module assume you want GNU getopt, with getopt_long etc, -# rather than vanilla POSIX getopt. This means your your code should -# always include <getopt.h> for the getopt prototypes. +# Request a POSIX compliant getopt function. +AC_DEFUN([gl_FUNC_GETOPT_POSIX], +[ + m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX]) + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + gl_GETOPT_IFELSE([ + gl_REPLACE_GETOPT + ], + []) +]) -AC_DEFUN([gl_GETOPT_SUBSTITUTE], +# Request a POSIX compliant getopt function with GNU extensions (such as +# options with optional arguments) and the functions getopt_long, +# getopt_long_only. +AC_DEFUN([gl_FUNC_GETOPT_GNU], [ + m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) + + AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) +]) + +# Request the gnulib implementation of the getopt functions unconditionally. +# argp.m4 uses this. +AC_DEFUN([gl_REPLACE_GETOPT], +[ + dnl Arrange for getopt.h to be created. + gl_GETOPT_SUBSTITUTE_HEADER + dnl Arrange for unistd.h to include getopt.h. + GNULIB_UNISTD_H_GETOPT=1 + dnl Arrange to compile the getopt implementation. AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) - gl_GETOPT_SUBSTITUTE_HEADER gl_PREREQ_GETOPT ]) +# emacs' configure.in uses this. +AC_DEFUN([gl_GETOPT_IFELSE], +[ + AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) + AS_IF([test -n "$gl_replace_getopt"], [$1], [$2]) +]) + +# Determine whether to replace the entire getopt facility. +AC_DEFUN([gl_GETOPT_CHECK_HEADERS], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([AC_PROG_AWK]) dnl for awk that supports ENVIRON + + dnl Persuade Solaris <unistd.h> to declare optarg, optind, opterr, optopt. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + gl_CHECK_NEXT_HEADERS([getopt.h]) + AC_CHECK_HEADERS_ONCE([getopt.h]) + if test $ac_cv_header_getopt_h = yes; then + HAVE_GETOPT_H=1 + else + HAVE_GETOPT_H=0 + fi + AC_SUBST([HAVE_GETOPT_H]) + + gl_replace_getopt= + + dnl Test whether <getopt.h> is available. + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes]) + fi + + dnl Test whether the function getopt_long is available. + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes]) + fi + + dnl BSD getopt_long uses an incompatible method to reset option processing. + dnl Existence of the variable, in and of itself, is not a reason to replace + dnl getopt, but knowledge of the variable is needed to determine how to + dnl reset and whether a reset reparses the environment. + dnl Solaris supports neither optreset nor optind=0, but keeps no state that + dnl needs a reset beyond setting optind=1; detect Solaris by getopt_clip. + if test -z "$gl_replace_getopt"; then + AC_CHECK_DECLS([optreset], [], + [AC_CHECK_DECLS([getopt_clip], [], [], + [[#include <getopt.h>]]) + ], + [[#include <getopt.h>]]) + fi + + dnl mingw's getopt (in libmingwex.a) does weird things when the options + dnl strings starts with '+' and it's not the first call. Some internal state + dnl is left over from earlier calls, and neither setting optind = 0 nor + dnl setting optreset = 1 get rid of this internal state. + dnl POSIX is silent on optind vs. optreset, so we allow either behavior. + dnl POSIX 2008 does not specify leading '+' behavior, but see + dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on + dnl the next version of POSIX. For now, we only guarantee leading '+' + dnl behavior with getopt-gnu. + if test -z "$gl_replace_getopt"; then + AC_CACHE_CHECK([whether getopt is POSIX compatible], + [gl_cv_func_getopt_posix], + [ + dnl This test fails on mingw and succeeds on many other platforms. + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include <unistd.h> +#include <stdlib.h> +#include <string.h> + +#if !HAVE_DECL_OPTRESET && !HAVE_DECL_GETOPT_CLIP +# define OPTIND_MIN 0 +#else +# define OPTIND_MIN 1 +#endif + +int +main () +{ + { + int argc = 0; + char *argv[10]; + int c; + + argv[argc++] = "program"; + argv[argc++] = "-a"; + argv[argc++] = "foo"; + argv[argc++] = "bar"; + argv[argc] = NULL; + optind = OPTIND_MIN; + opterr = 0; + + c = getopt (argc, argv, "ab"); + if (!(c == 'a')) + return 1; + c = getopt (argc, argv, "ab"); + if (!(c == -1)) + return 2; + if (!(optind == 2)) + return 3; + } + /* Some internal state exists at this point. */ + { + int argc = 0; + char *argv[10]; + int c; + + argv[argc++] = "program"; + argv[argc++] = "donald"; + argv[argc++] = "-p"; + argv[argc++] = "billy"; + argv[argc++] = "duck"; + argv[argc++] = "-a"; + argv[argc++] = "bar"; + argv[argc] = NULL; + optind = OPTIND_MIN; + opterr = 0; + + c = getopt (argc, argv, "+abp:q:"); + if (!(c == -1)) + return 4; + if (!(strcmp (argv[0], "program") == 0)) + return 5; + if (!(strcmp (argv[1], "donald") == 0)) + return 6; + if (!(strcmp (argv[2], "-p") == 0)) + return 7; + if (!(strcmp (argv[3], "billy") == 0)) + return 8; + if (!(strcmp (argv[4], "duck") == 0)) + return 9; + if (!(strcmp (argv[5], "-a") == 0)) + return 10; + if (!(strcmp (argv[6], "bar") == 0)) + return 11; + if (!(optind == 1)) + return 12; + } + /* Detect MacOS 10.5, AIX 7.1 bug. */ + { + char *argv[3] = { "program", "-ab", NULL }; + optind = OPTIND_MIN; + opterr = 0; + if (getopt (2, argv, "ab:") != 'a') + return 13; + if (getopt (2, argv, "ab:") != '?') + return 14; + if (optopt != 'b') + return 15; + if (optind != 2) + return 16; + } + + return 0; +} +]])], + [gl_cv_func_getopt_posix=yes], [gl_cv_func_getopt_posix=no], + [case "$host_os" in + mingw*) gl_cv_func_getopt_posix="guessing no";; + darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; + *) gl_cv_func_getopt_posix="guessing yes";; + esac + ]) + ]) + case "$gl_cv_func_getopt_posix" in + *no) gl_replace_getopt=yes ;; + esac + fi + + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu], + [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the + # optstring is necessary for programs like m4 that have POSIX-mandated + # semantics for supporting options interspersed with files. + # Also, since getopt_long is a GNU extension, we require optind=0. + # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; + # so take care to revert to the correct (non-)export state. +dnl GNU Coding Standards currently allow awk but not env; besides, env +dnl is ambiguous with environment values that contain newlines. + gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' + case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in + xx) gl_had_POSIXLY_CORRECT=exported ;; + x) gl_had_POSIXLY_CORRECT=yes ;; + *) gl_had_POSIXLY_CORRECT= ;; + esac + POSIXLY_CORRECT=1 + export POSIXLY_CORRECT + AC_RUN_IFELSE( + [AC_LANG_PROGRAM([[#include <getopt.h> + #include <stddef.h> + #include <string.h> + ]], [[ + int result = 0; + /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, + and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, + OSF/1 5.1, Solaris 10. */ + { + char *myargv[3]; + myargv[0] = "conftest"; + myargv[1] = "-+"; + myargv[2] = 0; + opterr = 0; + if (getopt (2, myargv, "+a") != '?') + result |= 1; + } + /* This code succeeds on glibc 2.8, mingw, + and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, + IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ + { + char *argv[] = { "program", "-p", "foo", "bar", NULL }; + + optind = 1; + if (getopt (4, argv, "p::") != 'p') + result |= 2; + else if (optarg != NULL) + result |= 4; + else if (getopt (4, argv, "p::") != -1) + result |= 6; + else if (optind != 2) + result |= 8; + } + /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ + { + char *argv[] = { "program", "foo", "-p", NULL }; + optind = 0; + if (getopt (3, argv, "-p") != 1) + result |= 16; + else if (getopt (3, argv, "-p") != 'p') + result |= 32; + } + /* This code fails on glibc 2.11. */ + { + char *argv[] = { "program", "-b", "-a", NULL }; + optind = opterr = 0; + if (getopt (3, argv, "+:a:b") != 'b') + result |= 64; + else if (getopt (3, argv, "+:a:b") != ':') + result |= 64; + } + return result; + ]])], + [gl_cv_func_getopt_gnu=yes], + [gl_cv_func_getopt_gnu=no], + [dnl Cross compiling. Guess based on host and declarations. + case $host_os:$ac_cv_have_decl_optreset in + *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;; + *:yes) gl_cv_func_getopt_gnu=no;; + *) gl_cv_func_getopt_gnu=yes;; + esac + ]) + case $gl_had_POSIXLY_CORRECT in + exported) ;; + yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;; + *) AS_UNSET([POSIXLY_CORRECT]) ;; + esac + ]) + if test "$gl_cv_func_getopt_gnu" = "no"; then + gl_replace_getopt=yes + fi + fi +]) + +# emacs' configure.in uses this. AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], [ GETOPT_H=getopt.h @@ -25,55 +311,9 @@ AC_SUBST([GETOPT_H]) ]) -AC_DEFUN([gl_GETOPT_CHECK_HEADERS], +# Prerequisites of lib/getopt*. +# emacs' configure.in uses this. +AC_DEFUN([gl_PREREQ_GETOPT], [ - GETOPT_H= - AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h]) - if test -z "$GETOPT_H"; then - AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h]) - fi - - dnl BSD getopt_long uses an incompatible method to reset option processing, - dnl and (as of 2004-10-15) mishandles optional option-arguments. - if test -z "$GETOPT_H"; then - AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>]) - fi - - dnl Solaris 10 getopt doesn't handle `+' as a leading character in an - dnl option string (as of 2005-05-05). - if test -z "$GETOPT_H"; then - AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_gnu_getopt], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM([#include <getopt.h>], - [[ - char *myargv[3]; - myargv[0] = "conftest"; - myargv[1] = "-+"; - myargv[2] = 0; - return getopt (2, myargv, "+a") != '?'; - ]])], - [gl_cv_func_gnu_getopt=yes], - [gl_cv_func_gnu_getopt=no], - [dnl cross compiling - pessimistically guess based on decls - dnl Solaris 10 getopt doesn't handle `+' as a leading character in an - dnl option string (as of 2005-05-05). - AC_CHECK_DECL([getopt_clip], - [gl_cv_func_gnu_getopt=no], [gl_cv_func_gnu_getopt=yes], - [#include <getopt.h>])])]) - if test "$gl_cv_func_gnu_getopt" = "no"; then - GETOPT_H=getopt.h - fi - fi + AC_CHECK_DECLS_ONCE([getenv]) ]) - -AC_DEFUN([gl_GETOPT_IFELSE], -[ - AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) - AS_IF([test -n "$GETOPT_H"], [$1], [$2]) -]) - -AC_DEFUN([gl_GETOPT], [gl_GETOPT_IFELSE([gl_GETOPT_SUBSTITUTE])]) - -# Prerequisites of lib/getopt*. -AC_DEFUN([gl_PREREQ_GETOPT], [:]) -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/gnulib-cache.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,37 @@ +# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# +# This file is free software, distributed under the terms of the GNU +# General Public License. As a special exception to the GNU General +# Public License, this file may be distributed as part of a program +# that contains a configuration script generated by Autoconf, under +# the same distribution terms as the rest of that program. +# +# Generated by gnulib-tool. +# +# This file represents the specification of how gnulib-tool is used. +# It acts as a cache: It is written and read by gnulib-tool. +# In projects that use version control, this file is meant to be put under +# version control, like the configure.ac and various Makefile.am files. + + +# Specification in the form of a command-line invocation: +# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files dtoastr getopt-gnu mktime + +# Specification in the form of a few gnulib-tool.m4 macro invocations: +gl_LOCAL_DIR([]) +gl_MODULES([ + dtoastr + getopt-gnu + mktime +]) +gl_AVOID([]) +gl_SOURCE_BASE([lib]) +gl_M4_BASE([m4]) +gl_PO_BASE([]) +gl_DOC_BASE([doc]) +gl_TESTS_BASE([tests]) +gl_LIB([libgnu]) +gl_MAKEFILE_NAME([gnulib.mk]) +gl_MACRO_PREFIX([gl]) +gl_PO_DOMAIN([]) +gl_VC_FILES([false])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/gnulib-common.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,214 @@ +# gnulib-common.m4 serial 21 +dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# gl_COMMON +# is expanded unconditionally through gnulib-tool magic. +AC_DEFUN([gl_COMMON], [ + dnl Use AC_REQUIRE here, so that the code is expanded once only. + AC_REQUIRE([gl_00GNULIB]) + AC_REQUIRE([gl_COMMON_BODY]) +]) +AC_DEFUN([gl_COMMON_BODY], [ + AH_VERBATIM([isoc99_inline], +[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports + the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of + earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. + __APPLE__ && __MACH__ test for MacOS X. + __APPLE_CC__ tests for the Apple compiler and its version. + __STDC_VERSION__ tests for the C99 mode. */ +#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ +# define __GNUC_STDC_INLINE__ 1 +#endif]) + AH_VERBATIM([unused_parameter], +[/* Define as a marker that can be attached to declarations that might not + be used. This helps to reduce warnings, such as from + GCC -Wunused-parameter. */ +#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED __attribute__ ((__unused__)) +#else +# define _GL_UNUSED +#endif +/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name + is a misnomer outside of parameter lists. */ +#define _UNUSED_PARAMETER_ _GL_UNUSED +]) + dnl Preparation for running test programs: + dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not + dnl to /dev/tty, so they can be redirected to log files. Such diagnostics + dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N. + LIBC_FATAL_STDERR_=1 + export LIBC_FATAL_STDERR_ +]) + +# gl_MODULE_INDICATOR_CONDITION +# expands to a C preprocessor expression that evaluates to 1 or 0, depending +# whether a gnulib module that has been requested shall be considered present +# or not. +AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1]) + +# gl_MODULE_INDICATOR_SET_VARIABLE([modulename]) +# sets the shell variable that indicates the presence of the given module to +# a C preprocessor expression that will evaluate to 1. +AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], +[ + GNULIB_[]m4_translit([[$1]], + [abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION +]) + +# gl_MODULE_INDICATOR([modulename]) +# defines a C macro indicating the presence of the given module +# in a location where it can be used. +# | Value | Value | +# | in lib/ | in tests/ | +# --------------------------------------------+---------+-----------+ +# Module present among main modules: | 1 | 1 | +# --------------------------------------------+---------+-----------+ +# Module present among tests-related modules: | 0 | 1 | +# --------------------------------------------+---------+-----------+ +# Module not present at all: | 0 | 0 | +# --------------------------------------------+---------+-----------+ +AC_DEFUN([gl_MODULE_INDICATOR], +[ + AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]], + [abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), + [gl_MODULE_INDICATOR_CONDITION], + [Define to a C preprocessor expression that evaluates to 1 or 0, + depending whether the gnulib module $1 shall be considered present.]) +]) + +# gl_MODULE_INDICATOR_FOR_TESTS([modulename]) +# defines a C macro indicating the presence of the given module +# in lib or tests. This is useful to determine whether the module +# should be tested. +# | Value | Value | +# | in lib/ | in tests/ | +# --------------------------------------------+---------+-----------+ +# Module present among main modules: | 1 | 1 | +# --------------------------------------------+---------+-----------+ +# Module present among tests-related modules: | 1 | 1 | +# --------------------------------------------+---------+-----------+ +# Module not present at all: | 0 | 0 | +# --------------------------------------------+---------+-----------+ +AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], +[ + AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]], + [abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], + [Define to 1 when the gnulib module $1 should be tested.]) +]) + +# Test whether <features.h> exists. +# Set HAVE_FEATURES_H. +AC_DEFUN([gl_FEATURES_H], +[ + AC_CHECK_HEADERS_ONCE([features.h]) + if test $ac_cv_header_features_h = yes; then + HAVE_FEATURES_H=1 + else + HAVE_FEATURES_H=0 + fi + AC_SUBST([HAVE_FEATURES_H]) +]) + +# m4_foreach_w +# is a backport of autoconf-2.59c's m4_foreach_w. +# Remove this macro when we can assume autoconf >= 2.60. +m4_ifndef([m4_foreach_w], + [m4_define([m4_foreach_w], + [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) + +# AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) +# ---------------------------------------------------- +# Backport of autoconf-2.63b's macro. +# Remove this macro when we can assume autoconf >= 2.64. +m4_ifndef([AS_VAR_IF], +[m4_define([AS_VAR_IF], +[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) + +# AC_PROG_MKDIR_P +# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix +# for interoperability with automake-1.9.6 from autoconf-2.62. +# Remove this macro when we can assume autoconf >= 2.62 or +# autoconf >= 2.60 && automake >= 1.10. +m4_ifdef([AC_PROG_MKDIR_P], [ + dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed. + m4_define([AC_PROG_MKDIR_P], + m4_defn([AC_PROG_MKDIR_P])[ + AC_SUBST([MKDIR_P])])], [ + dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P. + AC_DEFUN_ONCE([AC_PROG_MKDIR_P], + [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + MKDIR_P='$(mkdir_p)' + AC_SUBST([MKDIR_P])])]) + +# AC_C_RESTRICT +# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61, +# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++ +# works. +# This definition can be removed once autoconf >= 2.62 can be assumed. +m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.62]),[-1],[ +AC_DEFUN([AC_C_RESTRICT], +[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], + [ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { + return ip[0]; + }]], + [[int s[1]; + int * $ac_kw t = s; + t[0] = 0; + return foo(t)]])], + [ac_cv_c_restrict=$ac_kw]) + test "$ac_cv_c_restrict" != no && break + done + ]) + AH_VERBATIM([restrict], +[/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#undef restrict +/* Work around a bug in Sun C++: it does not support _Restrict, even + though the corresponding Sun C compiler does, which causes + "#define restrict _Restrict" in the previous line. Perhaps some future + version of Sun C++ will work with _Restrict; if so, it'll probably + define __RESTRICT, just as Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +#endif]) + case $ac_cv_c_restrict in + restrict) ;; + no) AC_DEFINE([restrict], []) ;; + *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; + esac +]) +]) + +# gl_BIGENDIAN +# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. +# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some +# macros invoke AC_C_BIGENDIAN with arguments. +AC_DEFUN([gl_BIGENDIAN], +[ + AC_C_BIGENDIAN +]) + +# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) +# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not +# output a spurious "(cached)" mark in the midst of other configure output. +# This macro should be used instead of AC_CACHE_VAL when it is not surrounded +# by an AC_MSG_CHECKING/AC_MSG_RESULT pair. +AC_DEFUN([gl_CACHE_VAL_SILENT], +[ + saved_as_echo_n="$as_echo_n" + as_echo_n=':' + AC_CACHE_VAL([$1], [$2]) + as_echo_n="$saved_as_echo_n" +])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/gnulib-comp.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,266 @@ +# DO NOT EDIT! GENERATED AUTOMATICALLY! +# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# +# This file is free software, distributed under the terms of the GNU +# General Public License. As a special exception to the GNU General +# Public License, this file may be distributed as part of a program +# that contains a configuration script generated by Autoconf, under +# the same distribution terms as the rest of that program. +# +# Generated by gnulib-tool. +# +# This file represents the compiled summary of the specification in +# gnulib-cache.m4. It lists the computed macro invocations that need +# to be invoked from configure.ac. +# In projects that use version control, this file can be treated like +# other built files. + + +# This macro should be invoked from ./configure.in, in the section +# "Checks for programs", right after AC_PROG_CC, and certainly before +# any checks for libraries, header files, types and library functions. +AC_DEFUN([gl_EARLY], +[ + m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace + m4_pattern_allow([^gl_ES$])dnl a valid locale name + m4_pattern_allow([^gl_LIBOBJS$])dnl a variable + m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable + AC_REQUIRE([AC_PROG_RANLIB]) + # Code from module arg-nonnull: + # Code from module c++defs: + # Code from module dtoastr: + # Code from module extensions: + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + # Code from module getopt-gnu: + # Code from module getopt-posix: + # Code from module gettext-h: + # Code from module include_next: + # Code from module intprops: + # Code from module mktime: + # Code from module multiarch: + # Code from module stddef: + # Code from module time: + # Code from module time_r: + # Code from module unistd: + # Code from module warn-on-use: +]) + +# This macro should be invoked from ./configure.in, in the section +# "Check for header files, types and library functions". +AC_DEFUN([gl_INIT], +[ + AM_CONDITIONAL([GL_COND_LIBTOOL], [false]) + gl_cond_libtool=false + gl_libdeps= + gl_ltlibdeps= + gl_m4_base='m4' + m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) + m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) + m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) + m4_pushdef([gl_LIBSOURCES_LIST], []) + m4_pushdef([gl_LIBSOURCES_DIR], []) + gl_COMMON + gl_source_base='lib' + # Code from module arg-nonnull: + # Code from module c++defs: + # Code from module dtoastr: + AC_REQUIRE([gl_C99_STRTOLD]) + # Code from module extensions: + # Code from module getopt-gnu: + gl_FUNC_GETOPT_GNU + gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) + # Code from module getopt-posix: + gl_FUNC_GETOPT_POSIX + # Code from module gettext-h: + AC_SUBST([LIBINTL]) + AC_SUBST([LTLIBINTL]) + # Code from module include_next: + # Code from module intprops: + # Code from module mktime: + gl_FUNC_MKTIME + gl_TIME_MODULE_INDICATOR([mktime]) + # Code from module multiarch: + gl_MULTIARCH + # Code from module stddef: + gl_STDDEF_H + # Code from module time: + gl_HEADER_TIME_H + # Code from module time_r: + gl_TIME_R + gl_TIME_MODULE_INDICATOR([time_r]) + # Code from module unistd: + gl_UNISTD_H + # Code from module warn-on-use: + # End of code from modules + m4_ifval(gl_LIBSOURCES_LIST, [ + m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || + for gl_file in ]gl_LIBSOURCES_LIST[ ; do + if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then + echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2 + exit 1 + fi + done])dnl + m4_if(m4_sysval, [0], [], + [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) + ]) + m4_popdef([gl_LIBSOURCES_DIR]) + m4_popdef([gl_LIBSOURCES_LIST]) + m4_popdef([AC_LIBSOURCES]) + m4_popdef([AC_REPLACE_FUNCS]) + m4_popdef([AC_LIBOBJ]) + AC_CONFIG_COMMANDS_PRE([ + gl_libobjs= + gl_ltlibobjs= + if test -n "$gl_LIBOBJS"; then + # Remove the extension. + sed_drop_objext='s/\.o$//;s/\.obj$//' + for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do + gl_libobjs="$gl_libobjs $i.$ac_objext" + gl_ltlibobjs="$gl_ltlibobjs $i.lo" + done + fi + AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) + AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) + ]) + gltests_libdeps= + gltests_ltlibdeps= + m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) + m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) + m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) + m4_pushdef([gltests_LIBSOURCES_LIST], []) + m4_pushdef([gltests_LIBSOURCES_DIR], []) + gl_COMMON + gl_source_base='tests' +changequote(,)dnl + gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS +changequote([, ])dnl + AC_SUBST([gltests_WITNESS]) + gl_module_indicator_condition=$gltests_WITNESS + m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition]) + m4_popdef([gl_MODULE_INDICATOR_CONDITION]) + m4_ifval(gltests_LIBSOURCES_LIST, [ + m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || + for gl_file in ]gltests_LIBSOURCES_LIST[ ; do + if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then + echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2 + exit 1 + fi + done])dnl + m4_if(m4_sysval, [0], [], + [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) + ]) + m4_popdef([gltests_LIBSOURCES_DIR]) + m4_popdef([gltests_LIBSOURCES_LIST]) + m4_popdef([AC_LIBSOURCES]) + m4_popdef([AC_REPLACE_FUNCS]) + m4_popdef([AC_LIBOBJ]) + AC_CONFIG_COMMANDS_PRE([ + gltests_libobjs= + gltests_ltlibobjs= + if test -n "$gltests_LIBOBJS"; then + # Remove the extension. + sed_drop_objext='s/\.o$//;s/\.obj$//' + for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do + gltests_libobjs="$gltests_libobjs $i.$ac_objext" + gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" + done + fi + AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs]) + AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs]) + ]) + LIBGNU_LIBDEPS="$gl_libdeps" + AC_SUBST([LIBGNU_LIBDEPS]) + LIBGNU_LTLIBDEPS="$gl_ltlibdeps" + AC_SUBST([LIBGNU_LTLIBDEPS]) +]) + +# Like AC_LIBOBJ, except that the module name goes +# into gl_LIBOBJS instead of into LIBOBJS. +AC_DEFUN([gl_LIBOBJ], [ + AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl + gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext" +]) + +# Like AC_REPLACE_FUNCS, except that the module name goes +# into gl_LIBOBJS instead of into LIBOBJS. +AC_DEFUN([gl_REPLACE_FUNCS], [ + m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl + AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)]) +]) + +# Like AC_LIBSOURCES, except the directory where the source file is +# expected is derived from the gnulib-tool parameterization, +# and alloca is special cased (for the alloca-opt module). +# We could also entirely rely on EXTRA_lib..._SOURCES. +AC_DEFUN([gl_LIBSOURCES], [ + m4_foreach([_gl_NAME], [$1], [ + m4_if(_gl_NAME, [alloca.c], [], [ + m4_define([gl_LIBSOURCES_DIR], [lib]) + m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ]) + ]) + ]) +]) + +# Like AC_LIBOBJ, except that the module name goes +# into gltests_LIBOBJS instead of into LIBOBJS. +AC_DEFUN([gltests_LIBOBJ], [ + AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl + gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext" +]) + +# Like AC_REPLACE_FUNCS, except that the module name goes +# into gltests_LIBOBJS instead of into LIBOBJS. +AC_DEFUN([gltests_REPLACE_FUNCS], [ + m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl + AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)]) +]) + +# Like AC_LIBSOURCES, except the directory where the source file is +# expected is derived from the gnulib-tool parameterization, +# and alloca is special cased (for the alloca-opt module). +# We could also entirely rely on EXTRA_lib..._SOURCES. +AC_DEFUN([gltests_LIBSOURCES], [ + m4_foreach([_gl_NAME], [$1], [ + m4_if(_gl_NAME, [alloca.c], [], [ + m4_define([gltests_LIBSOURCES_DIR], [tests]) + m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ]) + ]) + ]) +]) + +# This macro records the list of files which have been installed by +# gnulib-tool and may be removed by future gnulib-tool invocations. +AC_DEFUN([gl_FILE_LIST], [ + build-aux/arg-nonnull.h + build-aux/c++defs.h + build-aux/warn-on-use.h + lib/dtoastr.c + lib/ftoastr.c + lib/ftoastr.h + lib/getopt.c + lib/getopt.in.h + lib/getopt1.c + lib/getopt_int.h + lib/gettext.h + lib/intprops.h + lib/mktime-internal.h + lib/mktime.c + lib/stddef.in.h + lib/time.in.h + lib/time_r.c + lib/unistd.in.h + m4/00gnulib.m4 + m4/c-strtod.m4 + m4/extensions.m4 + m4/getopt.m4 + m4/gnulib-common.m4 + m4/include_next.m4 + m4/mktime.m4 + m4/multiarch.m4 + m4/stddef_h.m4 + m4/time_h.m4 + m4/time_r.m4 + m4/unistd_h.m4 + m4/warn-on-use.m4 + m4/wchar_t.m4 +])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/gnulib-tool.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,57 @@ +# gnulib-tool.m4 serial 2 +dnl Copyright (C) 2004-2005, 2009-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl The following macros need not be invoked explicitly. +dnl Invoking them does nothing except to declare default arguments +dnl for "gnulib-tool --import". + +dnl Usage: gl_LOCAL_DIR([DIR]) +AC_DEFUN([gl_LOCAL_DIR], []) + +dnl Usage: gl_MODULES([module1 module2 ...]) +AC_DEFUN([gl_MODULES], []) + +dnl Usage: gl_AVOID([module1 module2 ...]) +AC_DEFUN([gl_AVOID], []) + +dnl Usage: gl_SOURCE_BASE([DIR]) +AC_DEFUN([gl_SOURCE_BASE], []) + +dnl Usage: gl_M4_BASE([DIR]) +AC_DEFUN([gl_M4_BASE], []) + +dnl Usage: gl_PO_BASE([DIR]) +AC_DEFUN([gl_PO_BASE], []) + +dnl Usage: gl_DOC_BASE([DIR]) +AC_DEFUN([gl_DOC_BASE], []) + +dnl Usage: gl_TESTS_BASE([DIR]) +AC_DEFUN([gl_TESTS_BASE], []) + +dnl Usage: gl_WITH_TESTS +AC_DEFUN([gl_WITH_TESTS], []) + +dnl Usage: gl_LIB([LIBNAME]) +AC_DEFUN([gl_LIB], []) + +dnl Usage: gl_LGPL or gl_LGPL([VERSION]) +AC_DEFUN([gl_LGPL], []) + +dnl Usage: gl_MAKEFILE_NAME([FILENAME]) +AC_DEFUN([gl_MAKEFILE_NAME], []) + +dnl Usage: gl_LIBTOOL +AC_DEFUN([gl_LIBTOOL], []) + +dnl Usage: gl_MACRO_PREFIX([PREFIX]) +AC_DEFUN([gl_MACRO_PREFIX], []) + +dnl Usage: gl_PO_DOMAIN([DOMAIN]) +AC_DEFUN([gl_PO_DOMAIN], []) + +dnl Usage: gl_VC_FILES([BOOLEAN]) +AC_DEFUN([gl_VC_FILES], [])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/include_next.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,217 @@ +# include_next.m4 serial 16 +dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert and Derek Price. + +dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. +dnl +dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to +dnl 'include' otherwise. +dnl +dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler +dnl supports it in the special case that it is the first include directive in +dnl the given file, or to 'include' otherwise. +dnl +dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, +dnl so as to avoid GCC warnings when the gcc option -pedantic is used. +dnl '#pragma GCC system_header' has the same effect as if the file was found +dnl through the include search path specified with '-isystem' options (as +dnl opposed to the search path specified with '-I' options). Namely, gcc +dnl does not warn about some things, and on some systems (Solaris and Interix) +dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side +dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead +dnl of plain '__STDC__'. +dnl +dnl PRAGMA_COLUMNS can be used in files that override system header files, so +dnl as to avoid compilation errors on HP NonStop systems when the gnulib file +dnl is included by a system header file that does a "#pragma COLUMNS 80" (which +dnl has the effect of truncating the lines of that file and all files that it +dnl includes to 80 columns) and the gnulib file has lines longer than 80 +dnl columns. + +AC_DEFUN([gl_INCLUDE_NEXT], +[ + AC_LANG_PREPROC_REQUIRE() + AC_CACHE_CHECK([whether the preprocessor supports include_next], + [gl_cv_have_include_next], + [rm -rf conftestd1a conftestd1b conftestd2 + mkdir conftestd1a conftestd1b conftestd2 + dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on + dnl AIX 6.1 support include_next when used as first preprocessor directive + dnl in a file, but not when preceded by another include directive. Check + dnl for this bug by including <stdio.h>. + dnl Additionally, with this same compiler, include_next is a no-op when + dnl used in a header file that was included by specifying its absolute + dnl file name. Despite these two bugs, include_next is used in the + dnl compiler's <math.h>. By virtue of the second bug, we need to use + dnl include_next as well in this case. + cat <<EOF > conftestd1a/conftest.h +#define DEFINED_IN_CONFTESTD1 +#include_next <conftest.h> +#ifdef DEFINED_IN_CONFTESTD2 +int foo; +#else +#error "include_next doesn't work" +#endif +EOF + cat <<EOF > conftestd1b/conftest.h +#define DEFINED_IN_CONFTESTD1 +#include <stdio.h> +#include_next <conftest.h> +#ifdef DEFINED_IN_CONFTESTD2 +int foo; +#else +#error "include_next doesn't work" +#endif +EOF + cat <<EOF > conftestd2/conftest.h +#ifndef DEFINED_IN_CONFTESTD1 +#error "include_next test doesn't work" +#endif +#define DEFINED_IN_CONFTESTD2 +EOF + gl_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" +dnl We intentionally avoid using AC_LANG_SOURCE here. + AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]], + [gl_cv_have_include_next=yes], + [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" + AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]], + [gl_cv_have_include_next=buggy], + [gl_cv_have_include_next=no]) + ]) + CPPFLAGS="$gl_save_CPPFLAGS" + rm -rf conftestd1a conftestd1b conftestd2 + ]) + PRAGMA_SYSTEM_HEADER= + if test $gl_cv_have_include_next = yes; then + INCLUDE_NEXT=include_next + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next + if test -n "$GCC"; then + PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' + fi + else + if test $gl_cv_have_include_next = buggy; then + INCLUDE_NEXT=include + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next + else + INCLUDE_NEXT=include + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include + fi + fi + AC_SUBST([INCLUDE_NEXT]) + AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) + AC_SUBST([PRAGMA_SYSTEM_HEADER]) + AC_CACHE_CHECK([whether system header files limit the line length], + [gl_cv_pragma_columns], + [dnl HP NonStop systems, which define __TANDEM, have this misfeature. + AC_EGREP_CPP([choke me], + [ +#ifdef __TANDEM +choke me +#endif + ], + [gl_cv_pragma_columns=yes], + [gl_cv_pragma_columns=no]) + ]) + if test $gl_cv_pragma_columns = yes; then + PRAGMA_COLUMNS="#pragma COLUMNS 10000" + else + PRAGMA_COLUMNS= + fi + AC_SUBST([PRAGMA_COLUMNS]) +]) + +# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) +# ------------------------------------------ +# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be +# '<foo.h>'; otherwise define it to be +# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. +# Also, if #include_next works as first preprocessing directive in a file, +# define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be '<foo.h>'; otherwise define it to +# be +# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. +# That way, a header file with the following line: +# #@INCLUDE_NEXT@ @NEXT_FOO_H@ +# or +# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ +# behaves (after sed substitution) as if it contained +# #include_next <foo.h> +# even if the compiler does not support include_next. +# The three "///" are to pacify Sun C 5.8, which otherwise would say +# "warning: #include of /usr/include/... may be non-portable". +# Use `""', not `<>', so that the /// cannot be confused with a C99 comment. +# Note: This macro assumes that the header file is not empty after +# preprocessing, i.e. it does not only define preprocessor macros but also +# provides some type/enum definitions or function/variable declarations. +AC_DEFUN([gl_CHECK_NEXT_HEADERS], +[ + AC_REQUIRE([gl_INCLUDE_NEXT]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CHECK_HEADERS_ONCE([$1]) + + m4_foreach_w([gl_HEADER_NAME], [$1], + [AS_VAR_PUSHDEF([gl_next_header], + [gl_cv_next_]m4_defn([gl_HEADER_NAME])) + if test $gl_cv_have_include_next = yes; then + AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) + else + AC_CACHE_CHECK( + [absolute name of <]m4_defn([gl_HEADER_NAME])[>], + m4_defn([gl_next_header]), + [AS_VAR_PUSHDEF([gl_header_exists], + [ac_cv_header_]m4_defn([gl_HEADER_NAME])) + if test AS_VAR_GET(gl_header_exists) = yes; then + AC_LANG_CONFTEST( + [AC_LANG_SOURCE( + [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] + )]) + dnl AIX "xlc -E" and "cc -E" omit #line directives for header files + dnl that contain only a #include of other header files and no + dnl non-comment tokens of their own. This leads to a failure to + dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h> + dnl and others. The workaround is to force preservation of comments + dnl through option -C. This ensures all necessary #line directives + dnl are present. GCC supports option -C as well. + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + dnl eval is necessary to expand gl_absname_cpp. + dnl Ultrix and Pyramid sh refuse to redirect output of eval, + dnl so use subshell. + AS_VAR_SET([gl_next_header], + ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | + sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{ + s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"']) + else + AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) + fi + AS_VAR_POPDEF([gl_header_exists])]) + fi + AC_SUBST( + AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), + [AS_VAR_GET([gl_next_header])]) + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'gl_HEADER_NAME'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=AS_VAR_GET([gl_next_header]) + fi + AC_SUBST( + AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), + [$gl_next_as_first_directive]) + AS_VAR_POPDEF([gl_next_header])]) +]) + +# Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE; +# this fallback is safe for all earlier autoconf versions. +m4_define_default([AC_LANG_DEFINES_PROVIDED])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/mktime.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,238 @@ +# serial 17 +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation, +dnl Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Jim Meyering. + +# Redefine AC_FUNC_MKTIME, because it is no longer maintained in Autoconf. +# AC_FUNC_MKTIME +# -------------- +AC_DEFUN([AC_FUNC_MKTIME], +[AC_CHECK_HEADERS_ONCE([unistd.h]) +AC_CHECK_FUNCS_ONCE([alarm]) +AC_REQUIRE([gl_MULTIARCH]) +if test $APPLE_UNIVERSAL_BUILD = 1; then + # A universal build on Apple MacOS X platforms. + # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. + # But we need a configuration result that is valid in both modes. + ac_cv_func_working_mktime=no +fi +AC_CACHE_CHECK([for working mktime], [ac_cv_func_working_mktime], +[AC_RUN_IFELSE([AC_LANG_SOURCE( +[[/* Test program from Paul Eggert and Tony Leneis. */ +#include <limits.h> +#include <stdlib.h> +#include <time.h> + +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif + +#ifndef HAVE_ALARM +# define alarm(X) /* empty */ +#endif + +/* Work around redefinition to rpl_putenv by other config tests. */ +#undef putenv + +static time_t time_t_max; +static time_t time_t_min; + +/* Values we'll use to set the TZ environment variable. */ +static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", + "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" +}; +#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) + +/* Return 0 if mktime fails to convert a date in the spring-forward gap. + Based on a problem report from Andreas Jaeger. */ +static int +spring_forward_gap () +{ + /* glibc (up to about 1998-10-07) failed this test. */ + struct tm tm; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + tm.tm_year = 98; + tm.tm_mon = 3; + tm.tm_mday = 5; + tm.tm_hour = 2; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + return mktime (&tm) != (time_t) -1; +} + +static int +mktime_test1 (time_t now) +{ + struct tm *lt; + return ! (lt = localtime (&now)) || mktime (lt) == now; +} + +static int +mktime_test (time_t now) +{ + return (mktime_test1 (now) + && mktime_test1 ((time_t) (time_t_max - now)) + && mktime_test1 ((time_t) (time_t_min + now))); +} + +static int +irix_6_4_bug () +{ + /* Based on code from Ariel Faigon. */ + struct tm tm; + tm.tm_year = 96; + tm.tm_mon = 3; + tm.tm_mday = 0; + tm.tm_hour = 0; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + mktime (&tm); + return tm.tm_mon == 2 && tm.tm_mday == 31; +} + +static int +bigtime_test (int j) +{ + struct tm tm; + time_t now; + tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; + now = mktime (&tm); + if (now != (time_t) -1) + { + struct tm *lt = localtime (&now); + if (! (lt + && lt->tm_year == tm.tm_year + && lt->tm_mon == tm.tm_mon + && lt->tm_mday == tm.tm_mday + && lt->tm_hour == tm.tm_hour + && lt->tm_min == tm.tm_min + && lt->tm_sec == tm.tm_sec + && lt->tm_yday == tm.tm_yday + && lt->tm_wday == tm.tm_wday + && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) + == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) + return 0; + } + return 1; +} + +static int +year_2050_test () +{ + /* The correct answer for 2050-02-01 00:00:00 in Pacific time, + ignoring leap seconds. */ + unsigned long int answer = 2527315200UL; + + struct tm tm; + time_t t; + tm.tm_year = 2050 - 1900; + tm.tm_mon = 2 - 1; + tm.tm_mday = 1; + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + tm.tm_isdst = -1; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + t = mktime (&tm); + + /* Check that the result is either a failure, or close enough + to the correct answer that we can assume the discrepancy is + due to leap seconds. */ + return (t == (time_t) -1 + || (0 < t && answer - 120 <= t && t <= answer + 120)); +} + +int +main () +{ + int result = 0; + time_t t, delta; + int i, j; + + /* This test makes some buggy mktime implementations loop. + Give up after 60 seconds; a mktime slower than that + isn't worth using anyway. */ + alarm (60); + + for (;;) + { + t = (time_t_max << 1) + 1; + if (t <= time_t_max) + break; + time_t_max = t; + } + time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; + + delta = time_t_max / 997; /* a suitable prime number */ + for (i = 0; i < N_STRINGS; i++) + { + if (tz_strings[i]) + putenv (tz_strings[i]); + + for (t = 0; t <= time_t_max - delta; t += delta) + if (! mktime_test (t)) + result |= 1; + if (! (mktime_test ((time_t) 1) + && mktime_test ((time_t) (60 * 60)) + && mktime_test ((time_t) (60 * 60 * 24)))) + result |= 2; + + for (j = 1; ; j <<= 1) + if (! bigtime_test (j)) + result |= 4; + else if (INT_MAX / 2 < j) + break; + if (! bigtime_test (INT_MAX)) + result |= 8; + } + if (! irix_6_4_bug ()) + result |= 16; + if (! spring_forward_gap ()) + result |= 32; + if (! year_2050_test ()) + result |= 64; + return result; +}]])], + [ac_cv_func_working_mktime=yes], + [ac_cv_func_working_mktime=no], + [ac_cv_func_working_mktime=no])]) +if test $ac_cv_func_working_mktime = no; then + AC_LIBOBJ([mktime]) +fi +])# AC_FUNC_MKTIME + +AC_DEFUN([gl_FUNC_MKTIME], +[ + AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + AC_FUNC_MKTIME + dnl Note: AC_FUNC_MKTIME does AC_LIBOBJ([mktime]). + if test $ac_cv_func_working_mktime = no; then + REPLACE_MKTIME=1 + gl_PREREQ_MKTIME + else + REPLACE_MKTIME=0 + fi +]) + +# Prerequisites of lib/mktime.c. +AC_DEFUN([gl_PREREQ_MKTIME], +[ + AC_REQUIRE([AC_C_INLINE]) +])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/multiarch.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,65 @@ +# multiarch.m4 serial 5 +dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Determine whether the compiler is or may be producing universal binaries. +# +# On MacOS X 10.5 and later systems, the user can create libraries and +# executables that work on multiple system types--known as "fat" or +# "universal" binaries--by specifying multiple '-arch' options to the +# compiler but only a single '-arch' option to the preprocessor. Like +# this: +# +# ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ +# CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ +# CPP="gcc -E" CXXCPP="g++ -E" +# +# Detect this situation and set the macro AA_APPLE_UNIVERSAL_BUILD at the +# beginning of config.h and set APPLE_UNIVERSAL_BUILD accordingly. + +AC_DEFUN_ONCE([gl_MULTIARCH], +[ + dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. + gl_cv_c_multiarch=no + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + ]])], + [ + dnl Check for potential -arch flags. It is not universal unless + dnl there are at least two -arch flags with different values. + arch= + prev= + for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do + if test -n "$prev"; then + case $word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$arch" || test "$arch" = "$word"; then + arch="$word" + else + gl_cv_c_multiarch=yes + fi + ;; + esac + prev= + else + if test "x$word" = "x-arch"; then + prev=arch + fi + fi + done + ]) + if test $gl_cv_c_multiarch = yes; then + AC_DEFINE([AA_APPLE_UNIVERSAL_BUILD], [1], + [Define if the compiler is building for multiple architectures of Apple platforms at once.]) + APPLE_UNIVERSAL_BUILD=1 + else + APPLE_UNIVERSAL_BUILD=0 + fi + AC_SUBST([APPLE_UNIVERSAL_BUILD]) +])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/stddef_h.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,45 @@ +dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues. +# stddef_h.m4 serial 2 +dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_STDDEF_H], +[ + AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) + AC_REQUIRE([gt_TYPE_WCHAR_T]) + if test $gt_cv_c_wchar_t = no; then + HAVE_WCHAR_T=0 + STDDEF_H=stddef.h + fi + AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], + [gl_cv_decl_null_works], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h> + int test[2 * (sizeof NULL == sizeof (void *)) -1]; +]])], + [gl_cv_decl_null_works=yes], + [gl_cv_decl_null_works=no])]) + if test $gl_cv_decl_null_works = no; then + REPLACE_NULL=1 + STDDEF_H=stddef.h + fi + if test -n "$STDDEF_H"; then + gl_CHECK_NEXT_HEADERS([stddef.h]) + fi +]) + +AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) +]) + +AC_DEFUN([gl_STDDEF_H_DEFAULTS], +[ + dnl Assume proper GNU behavior unless another module says otherwise. + REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) + HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) + STDDEF_H=''; AC_SUBST([STDDEF_H]) +])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/time_h.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,109 @@ +# Configure a more-standard replacement for <time.h>. + +# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. + +# serial 3 + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Written by Paul Eggert and Jim Meyering. + +AC_DEFUN([gl_HEADER_TIME_H], +[ + dnl Use AC_REQUIRE here, so that the default behavior below is expanded + dnl once only, before all statements that occur in other macros. + AC_REQUIRE([gl_HEADER_TIME_H_BODY]) +]) + +AC_DEFUN([gl_HEADER_TIME_H_BODY], +[ + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + gl_CHECK_NEXT_HEADERS([time.h]) + AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) +]) + +dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared +dnl in time.h, sys/time.h, or pthread.h. + +AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], +[ + AC_CHECK_HEADERS_ONCE([sys/time.h]) + AC_CACHE_CHECK([for struct timespec in <time.h>], + [gl_cv_sys_struct_timespec_in_time_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <time.h> + ]], + [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], + [gl_cv_sys_struct_timespec_in_time_h=yes], + [gl_cv_sys_struct_timespec_in_time_h=no])]) + + TIME_H_DEFINES_STRUCT_TIMESPEC=0 + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + if test $gl_cv_sys_struct_timespec_in_time_h = yes; then + TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + AC_CACHE_CHECK([for struct timespec in <sys/time.h>], + [gl_cv_sys_struct_timespec_in_sys_time_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <sys/time.h> + ]], + [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], + [gl_cv_sys_struct_timespec_in_sys_time_h=yes], + [gl_cv_sys_struct_timespec_in_sys_time_h=no])]) + if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + AC_CACHE_CHECK([for struct timespec in <pthread.h>], + [gl_cv_sys_struct_timespec_in_pthread_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <pthread.h> + ]], + [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], + [gl_cv_sys_struct_timespec_in_pthread_h=yes], + [gl_cv_sys_struct_timespec_in_pthread_h=no])]) + if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + fi + fi + fi + AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) + AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) + AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) +]) + +AC_DEFUN([gl_TIME_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], +[ + GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME]) + GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP]) + GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME]) + GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM]) + GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R]) + HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP]) + HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) + HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) + dnl If another module says to replace or to not replace, do that. + dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; + dnl this lets maintainers check for portability. + REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) + REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) + REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) + REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) +])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/time_r.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,62 @@ +dnl Reentrant time functions: localtime_r, gmtime_r. + +dnl Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Written by Paul Eggert. + +AC_DEFUN([gl_TIME_R], +[ + dnl Persuade glibc and Solaris <time.h> to declare localtime_r. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + AC_REQUIRE([AC_C_RESTRICT]) + + dnl Some systems don't declare localtime_r() and gmtime_r() if _REENTRANT is + dnl not defined. + AC_CHECK_DECLS_ONCE([localtime_r]) + if test $ac_cv_have_decl_localtime_r = no; then + HAVE_DECL_LOCALTIME_R=0 + fi + + AC_CHECK_FUNCS_ONCE([localtime_r]) + if test $ac_cv_func_localtime_r = yes; then + HAVE_LOCALTIME_R=1 + AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature], + [gl_cv_time_r_posix], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <time.h>]], + [[/* We don't need to append 'restrict's to the argument types, + even though the POSIX signature has the 'restrict's, + since C99 says they can't affect type compatibility. */ + struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; + if (ptr) return 0; + /* Check the return type is a pointer. + On HP-UX 10 it is 'int'. */ + *localtime_r (0, 0);]]) + ], + [gl_cv_time_r_posix=yes], + [gl_cv_time_r_posix=no]) + ]) + if test $gl_cv_time_r_posix = yes; then + REPLACE_LOCALTIME_R=0 + else + REPLACE_LOCALTIME_R=1 + fi + else + HAVE_LOCALTIME_R=0 + fi + if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then + AC_LIBOBJ([time_r]) + gl_PREREQ_TIME_R + fi +]) + +# Prerequisites of lib/time_r.c. +AC_DEFUN([gl_PREREQ_TIME_R], [ + : +])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/unistd_h.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,164 @@ +# unistd_h.m4 serial 52 +dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Written by Simon Josefsson, Bruno Haible. + +AC_DEFUN([gl_UNISTD_H], +[ + dnl Use AC_REQUIRE here, so that the default behavior below is expanded + dnl once only, before all statements that occur in other macros. + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([AC_C_INLINE]) + + gl_CHECK_NEXT_HEADERS([unistd.h]) + + AC_CHECK_HEADERS_ONCE([unistd.h]) + if test $ac_cv_header_unistd_h = yes; then + HAVE_UNISTD_H=1 + else + HAVE_UNISTD_H=0 + fi + AC_SUBST([HAVE_UNISTD_H]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include <unistd.h> +/* Some systems declare various items in the wrong headers. */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include <fcntl.h> +# include <stdio.h> +# include <stdlib.h> +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# include <io.h> +# endif +#endif + ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat + fsync ftruncate getcwd getdomainname getdtablesize getgroups + gethostname getlogin getlogin_r getpagesize getusershell setusershell + endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink + readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat + usleep]) +]) + +AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_UNISTD_H_DEFAULTS], +[ + GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) + GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) + GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) + GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3]) + GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) + GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) + GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT]) + GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) + GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT]) + GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) + GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) + GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) + GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) + GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) + GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS]) + GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) + GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) + GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) + GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) + GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) + GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) + GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) + GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) + GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) + GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE]) + GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2]) + GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD]) + GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE]) + GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) + GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) + GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) + GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) + GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) + GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) + GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) + GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT]) + GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) + GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) + GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT]) + GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP]) + GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) + HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) + HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) + HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) + HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) + HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) + HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) + HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) + HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) + HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) + HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) + HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) + HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) + HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) + HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) + HAVE_LINK=1; AC_SUBST([HAVE_LINK]) + HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) + HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) + HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) + HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) + HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) + HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) + HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) + HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) + HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) + HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) + HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) + HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) + HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) + HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) + HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) + HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) + HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) + HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) + HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) + HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) + HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) + REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) + REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) + REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) + REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) + REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) + REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) + REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) + REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) + REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) + REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) + REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) + REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) + REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) + REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) + REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) + REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) + REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) + REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) + REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) + REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) + REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) + REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) + REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) + REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) + REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) + UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) + UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; + AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) +])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/warn-on-use.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,45 @@ +# warn-on-use.m4 serial 2 +dnl Copyright (C) 2010-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) +# --------------------------------------- +# For each whitespace-separated element in the list of NAMES, define +# HAVE_RAW_DECL_name if the function has a declaration among INCLUDES +# even after being undefined as a macro. +# +# See warn-on-use.h for some hints on how to poison function names, as +# well as ideas on poisoning global variables and macros. NAMES may +# include global variables, but remember that only functions work with +# _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single +# header, but if the replacement header pulls in other headers because +# some systems declare functions in the wrong header, then INCLUDES +# should do likewise. +# +# If you assume C89, then it is generally safe to assume declarations +# for functions declared in that standard (such as gets) without +# needing gl_WARN_ON_USE_PREPARE. +AC_DEFUN([gl_WARN_ON_USE_PREPARE], +[ + m4_foreach_w([gl_decl], [$2], + [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), + [Define to 1 if ]m4_defn([gl_decl])[ is declared even after + undefining macros.])])dnl + for gl_func in m4_flatten([$2]); do + AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl + AC_CACHE_CHECK([whether $gl_func is declared without a macro], + gl_Symbol, + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], +[@%:@undef $gl_func + (void) $gl_func;])], + [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) + AS_VAR_IF(gl_Symbol, [yes], + [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) + dnl shortcut - if the raw declaration exists, then set a cache + dnl variable to allow skipping any later AC_CHECK_DECL efforts + eval ac_cv_have_decl_$gl_func=yes]) + AS_VAR_POPDEF([gl_Symbol])dnl + done +])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/wchar_t.m4 Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,24 @@ +# wchar_t.m4 serial 4 (gettext-0.18.2) +dnl Copyright (C) 2002-2003, 2008-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Test whether <stddef.h> has the 'wchar_t' type. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN([gt_TYPE_WCHAR_T], +[ + AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <stddef.h> + wchar_t foo = (wchar_t)'\0';]], + [[]])], + [gt_cv_c_wchar_t=yes], + [gt_cv_c_wchar_t=no])]) + if test $gt_cv_c_wchar_t = yes; then + AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) + fi +])
--- a/make-dist Sun Jan 16 23:45:28 2011 -0800 +++ b/make-dist Wed Jan 19 13:54:19 2011 -0800 @@ -286,12 +286,15 @@ ln ChangeLog Makefile.in configure configure.in ${tempdir} ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} ln mkinstalldirs config.sub config.guess install-sh ${tempdir} +ln aclocal.m4 ${tempdir} +ln compile depcomp missing ${tempdir} +ln arg-nonnull.h c++defs.h warn-on-use.h ${tempdir} echo "Creating subdirectories" for subdir in site-lisp \ leim leim/CXTERM-DIC leim/MISC-DIC \ leim/SKK-DIC leim/ja-dic leim/quail \ - src src/m src/s src/bitmaps lib-src oldXMenu lwlib \ + src src/m src/s src/bitmaps lib lib-src oldXMenu lwlib \ nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \ `find etc lisp -type d` \ doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \ @@ -369,14 +372,20 @@ (cd src/s ln README [a-zA-Z0-9]*.h ../../${tempdir}/src/s) +echo "Making links to \`lib'" +(build_aux_h=`(ls *.h)` + cd lib + ln [a-zA-Z]*.[ch] ../${tempdir}/lib + ln gnulib.mk Makefile.am Makefile.in ../${tempdir}/lib + cd ../${tempdir}/lib + rm -f `(echo "$build_aux_h"; ls *.in.h) | sed '/[*]/d; s/.in.h$/.h/'`) + echo "Making links to \`lib-src'" (cd lib-src ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src - ln makefile.w32-in ../${tempdir}/lib-src - cd ../${tempdir}/lib-src - rm -f getopt.h) + ln makefile.w32-in ../${tempdir}/lib-src) echo "Making links to \`m4'" (cd m4 @@ -498,7 +507,7 @@ ### It would be nice if they could all be symlinks to top-level copy, but ### you're not supposed to have any symlinks in distribution tar files. echo "Making sure copying notices are all copies of \`COPYING'" -for subdir in . etc info leim lib-src lisp lwlib msdos nt src; do +for subdir in . etc info leim lib lib-src lisp lwlib msdos nt src; do rm -f ${tempdir}/${subdir}/COPYING cp COPYING ${tempdir}/${subdir} done
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/missing Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,376 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. + +# 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 this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and +\`g' are ignored when checking the name. + +Send bug reports to <bug-automake@gnu.org>." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). This is about non-GNU programs, so use $1 not +# $program. +case $1 in + lex*|yacc*) + # Not GNU programs, they don't have --version. + ;; + + tar*) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $program in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te*) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison*|yacc*) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex*|flex*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit $? + fi + ;; + + makeinfo*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar*) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End:
--- a/src/ChangeLog Sun Jan 16 23:45:28 2011 -0800 +++ b/src/ChangeLog Wed Jan 19 13:54:19 2011 -0800 @@ -1,5 +1,565 @@ +2011-01-19 Sam Steingold <sds@gnu.org> + + * w32.c (check_windows_init_file): Remove declarations of + Vwindow_system, Vload_path, Qfile_exists_p to fix compilation. + * w32fns.c: Fix an error introduced by the previous patch. + +2011-01-19 Tom Tromey <tromey@redhat.com> + + * window.c: Fix error introduced by previous patch. + +2011-01-18 Tom Tromey <tromey@parfait> + + * globals.h: New file. + * xterm.h (Vx_pixel_size_width_font_regexp): Remove declaration. + * window.h (Vinitial_window_system, Vminibuf_scroll_window) + (Vwindow_system_version): Remove declaration. + * w32term.h (Vw32_enable_palette) + (Vx_pixel_size_width_font_regexp): Remove declaration. + * w32menu.c (Voverriding_local_map) + (Voverriding_local_map_menu_flag): Remove declaration. + * w32inevt.c (Vw32_alt_is_meta, Vw32_apps_modifier) + (Vw32_capslock_is_shiftlock, Vw32_enable_caps_lock) + (Vw32_enable_num_lock, Vw32_lwindow_modifier) + (Vw32_pass_lwindow_to_system, Vw32_pass_rwindow_to_system) + (Vw32_phantom_key_code, Vw32_recognize_altgr) + (Vw32_rwindow_modifier, Vw32_scroll_lock_modifier) + (w32_use_full_screen_buffer): Remove declaration. + * w32.c (Vsystem_configuration, Vw32_downcase_file_names) + (Vw32_generate_fake_inodes, Vw32_get_true_file_attributes) + (w32_num_mouse_buttons, w32_pipe_read_delay): Remove declaration. + * termopts.h (Vtruncate_partial_width_windows, inverse_video) + (no_redraw_on_reenter, visible_bell): Remove declaration. + * sysdep.c (Vsystem_name): Remove declaration. + * syntax.h (parse_sexp_lookup_properties): Remove declaration. + * menu.h (Vmenu_updating_frame): Remove declaration. + * macros.h (Vexecuting_kbd_macro, executing_kbd_macro_index): + Remove declaration. + * lisp.h (Vafter_init_time, Vafter_load_alist) + (Vauto_save_list_file_name, Vbefore_init_time, Vcommand_history) + (Vcompletion_regexp_list, Vcurrent_load_list) + (Vcurrent_prefix_arg, Vdata_directory, Vdebug_on_error) + (Vdoc_directory, Vdoc_file_name, Vdynamic_library_alist) + (Vexec_directory, Vexec_path, Vexec_suffixes) + (Vface_font_rescale_alist, Vface_ignored_fonts, Vfeatures) + (Vhelp_form, Vhistory_length, Vinhibit_field_text_motion) + (Vinhibit_quit, Vinhibit_read_only, Vinhibit_redisplay) + (Vinstallation_directory, Vinvocation_directory) + (Vinvocation_name, Vload_file_rep_suffixes, Vload_history) + (Vload_suffixes, Vmark_even_if_inactive, Vmemory_full) + (Vmessage_log_max, Vobarray, Vprint_length, Vprint_level) + (Vpurify_flag, Vquit_flag, Vsaved_region_selection) + (Vscalable_fonts_allowed, Vselect_active_regions) + (Vshell_file_name, Vstandard_input, Vstandard_output) + (Vsystem_name, Vtemporary_file_directory, Vthrow_on_input) + (Vtop_level, Vtty_erase_char, Vundo_outer_limit) + (Vuser_login_name, Vwindow_scroll_functions) + (Vwindow_system_version, Vx_no_window_manager) + (Vx_resource_class, Vx_resource_name, baud_rate) + (completion_ignore_case, debug_on_next_call, gc_cons_threshold) + (history_delete_duplicates, inhibit_x_resources) + (last_nonmenu_event, load_in_progress, max_specpdl_size) + (minibuffer_auto_raise, print_escape_newlines, scroll_margin) + (use_dialog_box, use_file_dialog): Remove declaration. Include + globals.h. + * keymap.h (Voverriding_local_map) + (Voverriding_local_map_menu_flag, meta_prefix_char): Remove + declaration. + * keyboard.h (Vdouble_click_time, Vfunction_key_map) + (Vinput_method_function, Vkey_translation_map) + (Vlucid_menu_bar_dirty_flag, Vthis_original_command) + (do_mouse_tracking, extra_keyboard_modifiers) + (num_nonmacro_input_events): Remove declaration. + * intervals.h (Vchar_property_alias_alist) + (Vdefault_text_properties, Vinhibit_point_motion_hooks) + (Vtext_property_default_nonsticky): Remove declaration. + * gtkutil.h (x_gtk_file_dialog_help_text) + (x_gtk_show_hidden_files, x_gtk_use_old_file_dialog) + (x_gtk_whole_detached_tool_bar): Remove declaration. + * frame.h (Vdefault_frame_alist, Vframe_alpha_lower_limit) + (Vmenu_bar_mode, Vmouse_highlight, Vterminal_frame) + (Vtool_bar_mode, Vx_resource_class, Vx_resource_name) + (focus_follows_mouse): Remove declaration. + * fontset.h (Valternate_fontname_alist, Vfontset_alias_alist) + (Vignore_relative_composition, Votf_script_alist) + (Vuse_default_ascent, Vvertical_centering_font_regexp): Remove + declaration. + * font.h (Vfont_log): Remove declaration. + * dosfns.h (Vdos_display_scancodes, Vdos_version) + (Vdos_windows_version, dos_codepage, dos_country_code) + (dos_decimal_point, dos_hyper_key, dos_keyboard_layout) + (dos_keypad_mode, dos_super_key, dos_timezone_offset): Remove + declaration. + * disptab.h (Vglyph_table, Vstandard_display_table): Remove + declaration. + * dispextern.h (Vface_remapping_alist, Vglyphless_char_display) + (Vmouse_autoselect_window, Voverflow_newline_into_fringe) + (Vshow_trailing_whitespace, Vtool_bar_button_margin) + (Vtool_bar_style, cursor_in_echo_area, display_hourglass_p) + (inverse_video, mode_line_in_non_selected_windows) + (tool_bar_button_relief, tool_bar_max_label_size) + (underline_minimum_offset) + (unibyte_display_via_language_environment, x_stretch_cursor_p): + Remove declaration. + * composite.h (Vauto_composition_function) + (Vcomposition_function_table): Remove declaration. + * commands.h (Vexecuting_kbd_macro) + (Vminibuffer_local_completion_map) + (Vminibuffer_local_filename_completion_map) + (Vminibuffer_local_filename_must_match_map) + (Vminibuffer_local_map, Vminibuffer_local_must_match_map) + (Vminibuffer_local_ns_map, Vthis_command) + (Vunread_command_events, cursor_in_echo_area) + (last_command_event, last_nonmenu_event, unread_command_char): + Remove declaration. + * coding.h (Vcoding_system_for_read, Vcoding_system_for_write) + (Vdefault_file_name_coding_system) + (Vdefault_process_coding_system, Vfile_name_coding_system) + (Vlast_coding_system_used, Vlocale_coding_system) + (Vselect_safe_coding_system_function) + (Vtranslation_table_for_input, coding_system_require_warning) + (eol_mnemonic_dos, eol_mnemonic_mac, eol_mnemonic_undecided) + (eol_mnemonic_unix, inherit_process_coding_system): Remove + declaration. + * charset.h (Vcharset_list, Vcurrent_iso639_language): Remove + declaration. + * character.h (Vauto_fill_chars, Vchar_direction_table) + (Vchar_script_table, Vchar_width_table, Vprintable_chars) + (Vscript_representative_chars, Vtranslation_table_vector) + (Vunicode_category_table): Remove declaration. + * ccl.h (Vfont_ccl_encoder_alist): Remove declaration. + * buffer.h (Vafter_change_functions, Vbefore_change_functions) + (Vdeactivate_mark, Vfirst_change_hook, Vtransient_mark_mode) + (inhibit_modification_hooks): Remove declaration. + * xterm.c (syms_of_xterm): Update. + (Vx_alt_keysym, Vx_hyper_keysym, Vx_keysym_table) + (Vx_meta_keysym, Vx_super_keysym, Vx_toolkit_scroll_bars) + (x_mouse_click_focus_ignore_position) + (x_underline_at_descent_line) + (x_use_underline_position_properties): Remove. + * xsmfns.c (syms_of_xsmfns): Update. + (Vx_session_id, Vx_session_previous_id): Remove. + * xsettings.c (syms_of_xsettings): Update. + (Vxft_settings, use_system_font): Remove. + * xselect.c (syms_of_xselect): Update. + (Vselection_converter_alist, Vx_lost_selection_functions) + (Vx_sent_selection_functions, x_selection_timeout): Remove. + * xfns.c (syms_of_xfns): Update. + (Vgtk_version_string, Vmotif_version_string) + (Vx_cursor_fore_pixel, Vx_hourglass_pointer_shape) + (Vx_max_tooltip_size, Vx_mode_pointer_shape) + (Vx_no_window_manager, Vx_nontext_pointer_shape) + (Vx_pixel_size_width_font_regexp, Vx_pointer_shape) + (Vx_sensitive_text_pointer_shape) + (Vx_window_horizontal_drag_shape, x_gtk_file_dialog_help_text) + (x_gtk_show_hidden_files, x_gtk_use_old_file_dialog) + (x_gtk_use_system_tooltips, x_gtk_whole_detached_tool_bar): + Remove. + * xfaces.c (syms_of_xfaces): Update. + (Vface_default_stipple, Vface_font_rescale_alist) + (Vface_ignored_fonts, Vface_new_frame_defaults) + (Vface_remapping_alist, Vfont_list_limit) + (Vscalable_fonts_allowed, Vtty_defined_color_alist): Remove. + * xdisp.c (syms_of_xdisp): Update. + (Vauto_resize_tool_bars, Vblink_cursor_alist) + (Vdisplay_pixels_per_inch, Vfontification_functions) + (Vframe_title_format, Vglobal_mode_string) + (Vglyphless_char_display, Vhourglass_delay, Vhscroll_step) + (Vicon_title_format, Vinhibit_redisplay) + (Vline_number_display_limit, Vline_prefix) + (Vmax_mini_window_height, Vmenu_bar_update_hook) + (Vmenu_updating_frame, Vmessage_log_max) + (Vmouse_autoselect_window, Vnobreak_char_display) + (Voverlay_arrow_position, Voverlay_arrow_string) + (Voverlay_arrow_variable_list, Vredisplay_end_trigger_functions) + (Vresize_mini_windows, Vshow_trailing_whitespace) + (Vtool_bar_border, Vtool_bar_button_margin, Vtool_bar_style) + (Vtruncate_partial_width_windows, Vvoid_text_area_pointer) + (Vwindow_scroll_functions, Vwindow_size_change_functions) + (Vwindow_text_change_functions, Vwrap_prefix) + (auto_raise_tool_bar_buttons_p, automatic_hscrolling_p) + (debug_end_pos, display_hourglass_p, emacs_scroll_step) + (highlight_nonselected_windows, hscroll_margin) + (inhibit_eval_during_redisplay, inhibit_free_realized_faces) + (inhibit_menubar_update, inhibit_try_cursor_movement) + (inhibit_try_window_id, inhibit_try_window_reusing) + (line_number_display_limit_width) + (make_cursor_line_fully_visible_p, message_truncate_lines) + (mode_line_inverse_video, multiple_frames, overline_margin) + (scroll_conservatively, scroll_margin, tool_bar_button_relief) + (tool_bar_max_label_size, underline_minimum_offset) + (unibyte_display_via_language_environment, x_stretch_cursor_p): + Remove. + * window.c (syms_of_window): Update. + (Vminibuf_scroll_window, Vother_window_scroll_buffer) + (Vrecenter_redisplay, Vscroll_preserve_screen_position) + (Vtemp_buffer_show_function, Vwindow_configuration_change_hook) + (Vwindow_point_insertion_type, auto_window_vscroll_p) + (mode_line_in_non_selected_windows, next_screen_context_lines) + (window_min_height, window_min_width): Remove. + (scroll_margin): Remove declaration. + * w32term.c (syms_of_w32term): Update. + (Vw32_capslock_is_shiftlock, Vw32_grab_focus_on_raise) + (Vw32_recognize_altgr, Vw32_swap_mouse_buttons) + (Vx_toolkit_scroll_bars, w32_num_mouse_buttons) + (w32_use_visible_system_caret, x_underline_at_descent_line) + (x_use_underline_position_properties): Remove. + (Vcommand_line_args, Vsystem_name, extra_keyboard_modifiers): + Remove declaration. + * w32select.c (syms_of_w32select): Update. + (Vnext_selection_coding_system, Vselection_coding_system): Remove. + * w32proc.c (syms_of_ntproc): Update. + (Vw32_downcase_file_names, Vw32_generate_fake_inodes) + (Vw32_get_true_file_attributes, Vw32_quote_process_args) + (Vw32_start_process_inherit_error_mode) + (Vw32_start_process_share_console) + (Vw32_start_process_show_window, w32_pipe_read_delay): Remove. + (Vsystem_name): Remove declaration. + * w32font.c (syms_of_w32font): Update. + (Vw32_charset_info_alist): Remove. + * w32fns.c (globals_of_w32fns, syms_of_w32fns): Update. + (Vw32_alt_is_meta, Vw32_apps_modifier, Vw32_bdf_filename_alist) + (Vw32_color_map, Vw32_enable_caps_lock, Vw32_enable_num_lock) + (Vw32_enable_palette, Vw32_lwindow_modifier) + (Vw32_pass_alt_to_system, Vw32_pass_lwindow_to_system) + (Vw32_pass_rwindow_to_system, Vw32_phantom_key_code) + (Vw32_rwindow_modifier, Vw32_scroll_lock_modifier) + (Vx_cursor_fore_pixel, Vx_hourglass_pointer_shape) + (Vx_max_tooltip_size, Vx_mode_pointer_shape) + (Vx_no_window_manager, Vx_nontext_pointer_shape) + (Vx_pixel_size_width_font_regexp, Vx_pointer_shape) + (Vx_sensitive_text_pointer_shape) + (Vx_window_horizontal_drag_shape, w32_ansi_code_page) + (w32_enable_synthesized_fonts, w32_mouse_button_tolerance) + (w32_mouse_move_interval) + (w32_pass_extra_mouse_buttons_to_system) + (w32_pass_multimedia_buttons_to_system, w32_quit_key) + (w32_strict_fontnames, w32_strict_painting): Remove. + (Vhourglass_delay, Vmenu_bar_mode, Vtool_bar_mode) + (Vw32_recognize_altgr, Vwindow_system_version) + (w32_num_mouse_buttons, w32_use_visible_system_caret): Remove + declaration. + * w32console.c (syms_of_ntterm): Update. + (w32_use_full_screen_buffer): Remove. + (Vtty_defined_color_alist): Remove declaration. + * w16select.c (syms_of_win16select): Update. + (Vnext_selection_coding_system, Vselection_coding_system): Remove. + * undo.c (syms_of_undo): Update. + (Vundo_outer_limit, Vundo_outer_limit_function) + (undo_inhibit_record_point, undo_limit, undo_strong_limit): + Remove. + * textprop.c (syms_of_textprop): Update. + (Vchar_property_alias_alist, Vdefault_text_properties) + (Vinhibit_point_motion_hooks, Vtext_property_default_nonsticky): + Remove. + * terminal.c (syms_of_terminal): Update. + (Vdelete_terminal_functions, Vring_bell_function): Remove. + * term.c (syms_of_term): Update. + (Vresume_tty_functions, Vsuspend_tty_functions) + (no_redraw_on_reenter, system_uses_terminfo, visible_cursor): + Remove. + * syntax.c (syms_of_syntax): Update. + (Vfind_word_boundary_function_table, multibyte_syntax_as_symbol) + (open_paren_in_column_0_is_defun_start) + (parse_sexp_ignore_comments, parse_sexp_lookup_properties) + (words_include_escapes): Remove. + * search.c (syms_of_search): Update. + (Vinhibit_changing_match_data, Vsearch_spaces_regexp): Remove. + * process.c (syms_of_process): Update. + (Vprocess_adaptive_read_buffering, Vprocess_connection_type) + (delete_exited_processes): Remove. + * print.c (syms_of_print): Update. + (Vfloat_output_format, Vprint_charset_text_property) + (Vprint_circle, Vprint_continuous_numbering, Vprint_gensym) + (Vprint_length, Vprint_level, Vprint_number_table) + (Vstandard_output, print_escape_multibyte) + (print_escape_newlines, print_escape_nonascii, print_quoted): + Remove. + * msdos.c (syms_of_msdos): Update. + (Vdos_unsupported_char_glyph): Remove. + (unibyte_display_via_language_environment): Remove declaration. + * minibuf.c (syms_of_minibuf): Update. + (Vcompletion_regexp_list, Vhistory_add_new_input) + (Vhistory_length, Vminibuffer_completing_file_name) + (Vminibuffer_completion_confirm) + (Vminibuffer_completion_predicate, Vminibuffer_completion_table) + (Vminibuffer_exit_hook, Vminibuffer_help_form) + (Vminibuffer_history_position, Vminibuffer_history_variable) + (Vminibuffer_prompt_properties, Vminibuffer_setup_hook) + (Vread_buffer_function, Vread_expression_map) + (completion_ignore_case, enable_recursive_minibuffers) + (history_delete_duplicates, minibuffer_allow_text_properties) + (minibuffer_auto_raise, read_buffer_completion_ignore_case): + Remove. + * marker.c (syms_of_marker): Update. + (byte_debug_flag): Remove. + * macros.c (syms_of_macros): Update. + (Vexecuting_kbd_macro, executing_kbd_macro_index): Remove. + * lread.c (syms_of_lread): Update. + (Vafter_load_alist, Vbyte_boolean_vars) + (Vbytecomp_version_regexp, Vcurrent_load_list) + (Veval_buffer_list, Vload_file_name, Vload_file_rep_suffixes) + (Vload_history, Vload_path, Vload_read_function) + (Vload_source_file_function, Vload_suffixes, Vobarray) + (Vold_style_backquotes, Vpreloaded_file_list, Vread_circle) + (Vread_symbol_positions_list, Vread_with_symbol_positions) + (Vsource_directory, Vstandard_input, Vuser_init_file, Vvalues) + (force_load_messages, load_convert_to_unibyte) + (load_dangerous_libraries, load_force_doc_strings) + (load_in_progress): Remove. + * keymap.c (syms_of_keymap): Update. + (Vdefine_key_rebound_commands, Vemulation_mode_map_alists) + (Vminibuffer_local_completion_map) + (Vminibuffer_local_filename_completion_map) + (Vminibuffer_local_filename_must_match_map) + (Vminibuffer_local_map, Vminibuffer_local_must_match_map) + (Vminibuffer_local_ns_map, Vminor_mode_map_alist) + (Vminor_mode_overriding_map_alist, Vwhere_is_preferred_modifier): + Remove. + * keyboard.c (syms_of_keyboard): Update. + (Vauto_save_timeout, Vcommand_error_function) + (Vcommand_hook_internal, Vdeactivate_mark) + (Vdeferred_action_function, Vdeferred_action_list) + (Vdisable_point_adjustment, Vdouble_click_time) + (Vecho_keystrokes, Venable_disabled_menus_and_buttons) + (Vfunction_key_map, Vglobal_disable_point_adjustment) + (Vhelp_char, Vhelp_event_list, Vhelp_form) + (Vinput_method_function, Vinput_method_previous_message) + (Vkey_translation_map, Vlast_event_frame) + (Vlucid_menu_bar_dirty_flag, Vmenu_bar_final_items) + (Vminibuffer_message_timeout, Voverriding_local_map) + (Voverriding_local_map_menu_flag, Vpost_command_hook) + (Vpre_command_hook, Vprefix_help_command) + (Vsaved_region_selection, Vselect_active_regions) + (Vshow_help_function, Vspecial_event_map, Vsuggest_key_bindings) + (Vthis_command, Vthis_command_keys_shift_translated) + (Vthis_original_command, Vthrow_on_input, Vtimer_idle_list) + (Vtimer_list, Vtool_bar_separator_image_expression, Vtop_level) + (Vtty_erase_char, Vunread_command_events) + (Vunread_input_method_events, Vunread_post_input_method_events) + (auto_save_interval, cannot_suspend, do_mouse_tracking) + (double_click_fuzz, extra_keyboard_modifiers) + (inhibit_local_menu_bar_menus, last_command_event) + (last_input_event, last_nonmenu_event, menu_prompt_more_char) + (menu_prompting, meta_prefix_char, num_input_keys) + (num_nonmacro_input_events, polling_period, unread_command_char): + Remove. + * insdel.c (syms_of_insdel): Update. + (Vcombine_after_change_calls, check_markers_debug_flag): Remove. + * indent.c (syms_of_indent): Update. + (indent_tabs_mode): Remove. + * image.c (syms_of_image): Update. + (Vimage_cache_eviction_delay, Vimage_types) + (Vimagemagick_render_type, Vmax_image_size, Vx_bitmap_file_path) + (cross_disabled_images): Remove. + * fringe.c (syms_of_fringe): Update. + (Vfringe_bitmaps, Voverflow_newline_into_fringe): Remove. + * frame.c (syms_of_frame): Update. + (Vdefault_frame_alist, Vdefault_frame_scroll_bars) + (Vdelete_frame_functions, Vframe_alpha_lower_limit) + (Vmake_pointer_invisible, Vmenu_bar_mode, Vmouse_highlight) + (Vmouse_position_function, Vterminal_frame, Vtool_bar_mode) + (Vx_resource_class, Vx_resource_name, focus_follows_mouse): + Remove. + * fontset.c (syms_of_fontset): Update. + (Valternate_fontname_alist, Vfont_encoding_charset_alist) + (Vfontset_alias_alist, Vignore_relative_composition) + (Votf_script_alist, Vuse_default_ascent) + (Vvertical_centering_font_regexp): Remove. + * font.c (syms_of_font): Update. + (Vfont_encoding_alist, Vfont_log, Vfont_slant_table) + (Vfont_weight_table, Vfont_width_table): Remove. + * fns.c (syms_of_fns): Update. + (Vfeatures, use_dialog_box, use_file_dialog): Remove. + * filelock.c (syms_of_filelock): Update. + (Vtemporary_file_directory): Remove. + * fileio.c (syms_of_fileio): Update. + (Vafter_insert_file_functions, Vauto_save_include_big_deletions) + (Vauto_save_list_file_name, Vauto_save_visited_file_name) + (Vdefault_file_name_coding_system, Vfile_name_coding_system) + (Vfile_name_handler_alist, Vinhibit_file_name_handlers) + (Vinhibit_file_name_operation, Vset_auto_coding_function) + (Vwrite_region_annotate_functions) + (Vwrite_region_annotations_so_far) + (Vwrite_region_post_annotation_function) + (delete_by_moving_to_trash, write_region_inhibit_fsync): Remove. + (Vw32_get_true_file_attributes): Remove declaration. + * eval.c (syms_of_eval): Update. + (Vdebug_ignored_errors, Vdebug_on_error, Vdebug_on_signal) + (Vdebugger, Vinhibit_quit, Vmacro_declaration_function) + (Vquit_flag, Vsignal_hook_function, Vstack_trace_on_error) + (debug_on_next_call, debug_on_quit, debugger_may_continue) + (max_lisp_eval_depth, max_specpdl_size): Remove. + * emacs.c (syms_of_emacs): Update. + (Vafter_init_time, Vbefore_init_time, Vcommand_line_args) + (Vdynamic_library_alist, Vemacs_copyright, Vemacs_version) + (Vinstallation_directory, Vinvocation_directory) + (Vinvocation_name, Vkill_emacs_hook, Vpath_separator) + (Vprevious_system_messages_locale, Vprevious_system_time_locale) + (Vsystem_configuration, Vsystem_configuration_options) + (Vsystem_messages_locale, Vsystem_time_locale, Vsystem_type) + (inhibit_x_resources, noninteractive1): Remove. + * editfns.c (syms_of_editfns): Update. + (Vbuffer_access_fontified_property) + (Vbuffer_access_fontify_functions, Vinhibit_field_text_motion) + (Voperating_system_release, Vsystem_name, Vuser_full_name) + (Vuser_login_name, Vuser_real_login_name): Remove. + * dosfns.c (syms_of_dosfns): Update. + (Vdos_display_scancodes, Vdos_version, Vdos_windows_version) + (dos_codepage, dos_country_code, dos_decimal_point) + (dos_hyper_key, dos_keyboard_layout, dos_keypad_mode) + (dos_super_key, dos_timezone_offset): Remove. + * doc.c (syms_of_doc): Update. + (Vbuild_files, Vdoc_file_name): Remove. + * dispnew.c (syms_of_display): Update. + (Vglyph_table, Vinitial_window_system) + (Vredisplay_preemption_period, Vstandard_display_table) + (Vwindow_system_version, baud_rate, cursor_in_echo_area) + (inverse_video, redisplay_dont_pause, visible_bell): Remove. + * dired.c (syms_of_dired): Update. + (Vcompletion_ignored_extensions): Remove. + (Vw32_get_true_file_attributes): Remove declaration. + * dbusbind.c (syms_of_dbusbind): Update. + (Vdbus_debug, Vdbus_registered_buses) + (Vdbus_registered_objects_table): Remove. + * data.c (syms_of_data): Update. + (Vmost_negative_fixnum, Vmost_positive_fixnum): Remove. + * composite.c (syms_of_composite): Update. + (Vauto_composition_function, Vauto_composition_mode) + (Vcompose_chars_after_function, Vcomposition_function_table): + Remove. + * coding.c (syms_of_coding): Update. + (Vcharset_revision_table, Vcoding_category_list) + (Vcoding_system_alist, Vcoding_system_for_read) + (Vcoding_system_for_write, Vcoding_system_list) + (Vdefault_process_coding_system, Venable_character_translation) + (Vfile_coding_system_alist, Vlast_code_conversion_error) + (Vlast_coding_system_used, Vlatin_extra_code_table) + (Vlocale_coding_system, Vnetwork_coding_system_alist) + (Vprocess_coding_system_alist) + (Vselect_safe_coding_system_function) + (Vstandard_translation_table_for_decode) + (Vstandard_translation_table_for_encode) + (Vtranslation_table_for_input, coding_system_require_warning) + (eol_mnemonic_dos, eol_mnemonic_mac, eol_mnemonic_undecided) + (eol_mnemonic_unix, inherit_process_coding_system) + (inhibit_eol_conversion, inhibit_iso_escape_detection) + (inhibit_null_byte_detection): Remove. + * cmds.c (syms_of_cmds): Update. + (Vpost_self_insert_hook): Remove. + * charset.c (syms_of_charset): Update. + (Vcharset_list, Vcharset_map_path, Vcurrent_iso639_language) + (inhibit_load_charset_map): Remove. + * character.c (syms_of_character): Update. + (Vauto_fill_chars, Vchar_direction_table, Vchar_script_table) + (Vchar_width_table, Vprintable_chars) + (Vscript_representative_chars, Vtranslation_table_vector) + (Vunicode_category_table): Remove. + * ccl.c (syms_of_ccl): Update. + (Vcode_conversion_map_vector, Vfont_ccl_encoder_alist) + (Vtranslation_hash_table_vector): Remove. + * category.c (syms_of_category): Update. + (Vword_combining_categories, Vword_separating_categories): Remove. + * callproc.c (syms_of_callproc): Update. + (Vconfigure_info_directory, Vdata_directory, Vdoc_directory) + (Vexec_directory, Vexec_path, Vexec_suffixes) + (Vinitial_environment, Vprocess_environment) + (Vshared_game_score_directory, Vshell_file_name): Remove. + * callint.c (syms_of_callint): Update. + (Vcommand_debug_status, Vcommand_history, Vcurrent_prefix_arg) + (Vmark_even_if_inactive, Vmouse_leave_buffer_hook): Remove. + * bytecode.c (syms_of_bytecode): Update. + (Vbyte_code_meter, byte_metering_on): Remove. + * buffer.c (syms_of_buffer): Update. + (Vafter_change_functions, Vbefore_change_functions) + (Vchange_major_mode_hook, Vfirst_change_hook) + (Vinhibit_read_only, Vkill_buffer_query_functions) + (Vtransient_mark_mode, inhibit_modification_hooks): Remove. + * alloc.c (syms_of_alloc): Update. + (Vgc_cons_percentage, Vgc_elapsed, Vmemory_full) + (Vmemory_signal_data, Vpost_gc_hook, Vpurify_flag) + (cons_cells_consed, floats_consed, garbage_collection_messages) + (gc_cons_threshold, gcs_done, intervals_consed) + (misc_objects_consed, pure_bytes_used, string_chars_consed) + (strings_consed, symbols_consed, vector_cells_consed): Remove. + + * lisp.h (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL) + (DEFVAR_INT): Assume global is in `globals'. + * alloc.c (globals): Define. + +2011-01-18 Tom Tromey <tromey@redhat.com> + + * image.c (Vimagemagick_render_type): Remove redundant + definition. + +2011-01-18 Tom Tromey <tromey@redhat.com> + + * xdisp.c (emacs_scroll_step): Rename from scroll_step. + (try_scrolling): Rename argument to 'arg_scroll_conservatively'. + (redisplay_window): Update. + (syms_of_xdisp): Update. + +2011-01-18 Tom Tromey <tromey@redhat.com> + + * gtkutil.h (x_gtk_use_old_file_dialog, x_gtk_show_hidden_files) + (x_gtk_file_dialog_help_text, x_gtk_whole_detached_tool_bar): + Declare. + * gtkutil.c (xg_uses_old_file_dialog): + (xg_get_file_with_chooser): + (xg_tool_bar_detach_callback): Don't redeclare globals. + +2011-01-18 Tom Tromey <tromey@redhat.com> + + * lisp.h (DEFVAR_BUFFER_DEFAULTS): New macro. + * buffer.c (syms_of_buffer): Use DEFVAR_BUFFER_DEFAULTS. + +2011-01-18 Paul Eggert <eggert@cs.ucla.edu> + + * lisp.h (DECL_ALIGN): Define if HAVE_ATTRIBUTE_ALIGNED, not if + defined __GNUC__. ../configure now checks for this GCC feature, + which is now also supported by IBM and Oracle compilers. + (USE_LSB_TAG) [defined DECL_ALIGN]: Also define if defined __sun, + since Solaris malloc returns mult-of-8. + +2011-01-18 Stefan Monnier <monnier@iro.umontreal.ca> + + * image.c (syms_of_image): Don't access XSYMBOL's internals directly. + 2011-01-17 Paul Eggert <eggert@cs.ucla.edu> + Give a name FLOAT_TO_STRING_BUFSIZE to the constant 350. + * lisp.h (FLOAT_TO_STRING_BUFSIZE): New macro. + * data.c (Fnumber_to_string): Use it. + * print.c (float_to_string, print_object): Likewise. + + Include <unistd.h> unilaterally. + * alloc.c, atimer.c, buffer.c, callproc.c, dired.c, dispnew.c, doc.c: + * doprnt.c, editfns.c, emacs.c, fileio.c, filelock.c, fns.c: + * getloadavg.c, getpagesize.h, gmalloc.c, image.c, keyboard.c: + * lread.c, process.c, process.h, ralloc.c, regex.c, sysdep.c: + * systty.h, term.c, termcap.c, xfns.c, xrdb.c, xselect.c, xsmfns.c: + * xterm.c: + Include <unistd.h> without worrying about HAVE_UNISTD_H, since + unistd.h is always present now, possibly supplied by gnulib. + + * mktime.c: Remove; moving to ../lib. + + Use gnulib's mktime module. + * deps.mk (mktime.o): Remove rule. + + Use gnulib's ftoastr module. + * print.c: Include ftoastr.h. + (FLT_RADIX, DBL_MANT_DIG, DBL_DIG, DBL_MIN, DOUBLE_DIGITS_BOUND): + Remove; no longer needed. + (float_to_string): Use dtoastr rather than rolling our own code, + which had an off-by-one bug on non-IEEE hosts. + + Automate syncing from gnulib. + * Makefile.in (lib): New macro. + (ALL_CFLAGS): Add -I$(lib) -I$(srcdir)/../lib. + ($(lib)/libgnu.a): New rule. + (temacs$(EXEEXT)): Also link $(lib)/libgnu.a. + * xfns.c (x_real_positions): Fix signedness of local var 'ign'. XGetGeometry wants unsigned int *, not int *, for its last 4 args, so change the type of 'ign' to unsigned int from int.
--- a/src/Makefile.in Sun Jan 16 23:45:28 2011 -0800 +++ b/src/Makefile.in Wed Jan 19 13:54:19 2011 -0800 @@ -47,6 +47,7 @@ LIBOBJS = @LIBOBJS@ lispsource = $(srcdir)/../lisp +lib = ../lib libsrc = ../lib-src etc = ../etc oldXMenudir = ../oldXMenu @@ -320,6 +321,7 @@ ## ## FIXME? MYCPPFLAGS only referenced in etc/DEBUG. ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I$(srcdir) \ + -I$(lib) -I$(srcdir)/../lib \ $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ $(C_SWITCH_X_SYSTEM) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \ $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \ @@ -644,10 +646,12 @@ buildobj.h: Makefile echo "#define BUILDOBJ \"$(obj) $(otherobj) " "\"" > buildobj.h +$(lib)/libgnu.a: $(config_h) + cd $(lib) && $(MAKE) libgnu.a -temacs$(EXEEXT): $(START_FILES) stamp-oldxmenu $(obj) $(otherobj) +temacs$(EXEEXT): $(START_FILES) stamp-oldxmenu $(obj) $(otherobj) $(lib)/libgnu.a $(CC) $(LD_FIRSTFLAG) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(TEMACS_LDFLAGS2) \ - -o temacs $(START_FILES) $(obj) $(otherobj) $(LIBES) + -o temacs $(START_FILES) $(obj) $(otherobj) $(lib)/libgnu.a $(LIBES) ## The following oldxmenu-related rules are only (possibly) used if ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them
--- a/src/alloc.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/alloc.c Wed Jan 19 13:54:19 2011 -0800 @@ -59,9 +59,8 @@ #undef GC_MALLOC_CHECK #endif -#ifdef HAVE_UNISTD_H #include <unistd.h> -#else +#ifndef HAVE_UNISTD_H extern POINTER_TYPE *sbrk (); #endif @@ -162,31 +161,17 @@ #define GC_STRING_BYTES(S) (STRING_BYTES (S)) #define GC_STRING_CHARS(S) ((S)->size & ~ARRAY_MARK_FLAG) +/* Global variables. */ +struct emacs_globals globals; + /* Number of bytes of consing done since the last gc. */ int consing_since_gc; -/* Count the amount of consing of various sorts of space. */ - -EMACS_INT cons_cells_consed; -EMACS_INT floats_consed; -EMACS_INT vector_cells_consed; -EMACS_INT symbols_consed; -EMACS_INT string_chars_consed; -EMACS_INT misc_objects_consed; -EMACS_INT intervals_consed; -EMACS_INT strings_consed; - -/* Minimum number of bytes of consing since GC before next GC. */ - -EMACS_INT gc_cons_threshold; - /* Similar minimum, computed from Vgc_cons_percentage. */ EMACS_INT gc_relative_threshold; -static Lisp_Object Vgc_cons_percentage; - /* Minimum number of bytes of consing since GC before next GC, when memory is full. */ @@ -202,10 +187,6 @@ int abort_on_gc; -/* Nonzero means display messages at beginning and end of GC. */ - -int garbage_collection_messages; - /* Number of live and free conses etc. */ static int total_conses, total_markers, total_symbols, total_vector_size; @@ -226,14 +207,6 @@ static int malloc_hysteresis; -/* Non-nil means defun should do purecopy on the function definition. */ - -Lisp_Object Vpurify_flag; - -/* Non-nil means we are handling a memory-full error. */ - -Lisp_Object Vmemory_full; - /* Initialize it to a nonzero value to force it into data space (rather than bss space). That way unexec will remap it into text space (pure), on some systems. We have not implemented the @@ -261,10 +234,6 @@ && ((PNTR_COMPARISON_TYPE) (P) \ >= (PNTR_COMPARISON_TYPE) purebeg)) -/* Total number of bytes allocated in pure storage. */ - -EMACS_INT pure_bytes_used; - /* Index in pure at which next pure Lisp object will be allocated.. */ static EMACS_INT pure_bytes_used_lisp; @@ -278,10 +247,6 @@ const char *pending_malloc_warning; -/* Pre-computed signal argument for use when memory is exhausted. */ - -Lisp_Object Vmemory_signal_data; - /* Maximum amount of C stack to save when a GC happens. */ #ifndef MAX_SAVE_STACK @@ -302,10 +267,7 @@ /* Hook run after GC has finished. */ -Lisp_Object Vpost_gc_hook, Qpost_gc_hook; - -Lisp_Object Vgc_elapsed; /* accumulated elapsed time in GC */ -EMACS_INT gcs_done; /* accumulated GCs */ +Lisp_Object Qpost_gc_hook; static void mark_buffer (Lisp_Object); static void mark_terminals (void); @@ -6211,7 +6173,7 @@ void syms_of_alloc (void) { - DEFVAR_INT ("gc-cons-threshold", &gc_cons_threshold, + DEFVAR_INT ("gc-cons-threshold", gc_cons_threshold, doc: /* *Number of bytes of consing between garbage collections. Garbage collection can happen automatically once this many bytes have been allocated since the last garbage collection. All data types count. @@ -6222,57 +6184,57 @@ prevent garbage collection during a part of the program. See also `gc-cons-percentage'. */); - DEFVAR_LISP ("gc-cons-percentage", &Vgc_cons_percentage, + DEFVAR_LISP ("gc-cons-percentage", Vgc_cons_percentage, doc: /* *Portion of the heap used for allocation. Garbage collection can happen automatically once this portion of the heap has been allocated since the last garbage collection. If this portion is smaller than `gc-cons-threshold', this is ignored. */); Vgc_cons_percentage = make_float (0.1); - DEFVAR_INT ("pure-bytes-used", &pure_bytes_used, + DEFVAR_INT ("pure-bytes-used", pure_bytes_used, doc: /* Number of bytes of sharable Lisp data allocated so far. */); - DEFVAR_INT ("cons-cells-consed", &cons_cells_consed, + DEFVAR_INT ("cons-cells-consed", cons_cells_consed, doc: /* Number of cons cells that have been consed so far. */); - DEFVAR_INT ("floats-consed", &floats_consed, + DEFVAR_INT ("floats-consed", floats_consed, doc: /* Number of floats that have been consed so far. */); - DEFVAR_INT ("vector-cells-consed", &vector_cells_consed, + DEFVAR_INT ("vector-cells-consed", vector_cells_consed, doc: /* Number of vector cells that have been consed so far. */); - DEFVAR_INT ("symbols-consed", &symbols_consed, + DEFVAR_INT ("symbols-consed", symbols_consed, doc: /* Number of symbols that have been consed so far. */); - DEFVAR_INT ("string-chars-consed", &string_chars_consed, + DEFVAR_INT ("string-chars-consed", string_chars_consed, doc: /* Number of string characters that have been consed so far. */); - DEFVAR_INT ("misc-objects-consed", &misc_objects_consed, + DEFVAR_INT ("misc-objects-consed", misc_objects_consed, doc: /* Number of miscellaneous objects that have been consed so far. */); - DEFVAR_INT ("intervals-consed", &intervals_consed, + DEFVAR_INT ("intervals-consed", intervals_consed, doc: /* Number of intervals that have been consed so far. */); - DEFVAR_INT ("strings-consed", &strings_consed, + DEFVAR_INT ("strings-consed", strings_consed, doc: /* Number of strings that have been consed so far. */); - DEFVAR_LISP ("purify-flag", &Vpurify_flag, + DEFVAR_LISP ("purify-flag", Vpurify_flag, doc: /* Non-nil means loading Lisp code in order to dump an executable. This means that certain objects should be allocated in shared (pure) space. It can also be set to a hash-table, in which case this table is used to do hash-consing of the objects allocated to pure space. */); - DEFVAR_BOOL ("garbage-collection-messages", &garbage_collection_messages, + DEFVAR_BOOL ("garbage-collection-messages", garbage_collection_messages, doc: /* Non-nil means display messages at start and end of garbage collection. */); garbage_collection_messages = 0; - DEFVAR_LISP ("post-gc-hook", &Vpost_gc_hook, + DEFVAR_LISP ("post-gc-hook", Vpost_gc_hook, doc: /* Hook run after garbage collection has finished. */); Vpost_gc_hook = Qnil; Qpost_gc_hook = intern_c_string ("post-gc-hook"); staticpro (&Qpost_gc_hook); - DEFVAR_LISP ("memory-signal-data", &Vmemory_signal_data, + DEFVAR_LISP ("memory-signal-data", Vmemory_signal_data, doc: /* Precomputed `signal' argument for memory-full error. */); /* We build this in advance because if we wait until we need it, we might not be able to allocate the memory to hold it. */ @@ -6280,7 +6242,7 @@ = pure_cons (Qerror, pure_cons (make_pure_c_string ("Memory exhausted--use M-x save-some-buffers then exit and restart Emacs"), Qnil)); - DEFVAR_LISP ("memory-full", &Vmemory_full, + DEFVAR_LISP ("memory-full", Vmemory_full, doc: /* Non-nil means Emacs cannot get much more Lisp memory. */); Vmemory_full = Qnil; @@ -6290,10 +6252,10 @@ staticpro (&Qchar_table_extra_slots); Qchar_table_extra_slots = intern_c_string ("char-table-extra-slots"); - DEFVAR_LISP ("gc-elapsed", &Vgc_elapsed, + DEFVAR_LISP ("gc-elapsed", Vgc_elapsed, doc: /* Accumulated time elapsed in garbage collections. The time is in seconds as a floating point value. */); - DEFVAR_INT ("gcs-done", &gcs_done, + DEFVAR_INT ("gcs-done", gcs_done, doc: /* Accumulated number of garbage collections done. */); defsubr (&Scons);
--- a/src/atimer.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/atimer.c Wed Jan 19 13:54:19 2011 -0800 @@ -26,10 +26,7 @@ #include "systime.h" #include "blockinput.h" #include "atimer.h" - -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #ifdef HAVE_SYS_TIME_H #include <sys/time.h>
--- a/src/buffer.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/buffer.c Wed Jan 19 13:54:19 2011 -0800 @@ -27,10 +27,7 @@ #include <errno.h> #include <stdio.h> #include <setjmp.h> - -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #include "lisp.h" #include "intervals.h" @@ -116,36 +113,16 @@ to prevent lossage due to user rplac'ing this alist or its elements. */ Lisp_Object Vbuffer_alist; -/* Functions to call before and after each text change. */ -Lisp_Object Vbefore_change_functions; -Lisp_Object Vafter_change_functions; - -Lisp_Object Vtransient_mark_mode; - -/* t means ignore all read-only text properties. - A list means ignore such a property if its value is a member of the list. - Any non-nil value means ignore buffer-read-only. */ -Lisp_Object Vinhibit_read_only; - -/* List of functions to call that can query about killing a buffer. - If any of these functions returns nil, we don't kill it. */ -Lisp_Object Vkill_buffer_query_functions; Lisp_Object Qkill_buffer_query_functions; /* Hook run before changing a major mode. */ -Lisp_Object Vchange_major_mode_hook, Qchange_major_mode_hook; - -/* List of functions to call before changing an unmodified buffer. */ -Lisp_Object Vfirst_change_hook; +Lisp_Object Qchange_major_mode_hook; Lisp_Object Qfirst_change_hook; Lisp_Object Qbefore_change_functions; Lisp_Object Qafter_change_functions; Lisp_Object Qucs_set_table_for_input; -/* If nonzero, all modification hooks are suppressed. */ -int inhibit_modification_hooks; - Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; Lisp_Object Qpermanent_local_hook; @@ -5365,147 +5342,147 @@ /* All these use DEFVAR_LISP_NOPRO because the slots in buffer_defaults will all be marked via Vbuffer_defaults. */ - DEFVAR_LISP_NOPRO ("default-mode-line-format", - &buffer_defaults.mode_line_format, - doc: /* Default value of `mode-line-format' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-mode-line-format", + mode_line_format, + doc: /* Default value of `mode-line-format' for buffers that don't override it. This is the same as (default-value 'mode-line-format). */); - DEFVAR_LISP_NOPRO ("default-header-line-format", - &buffer_defaults.header_line_format, - doc: /* Default value of `header-line-format' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-header-line-format", + header_line_format, + doc: /* Default value of `header-line-format' for buffers that don't override it. This is the same as (default-value 'header-line-format). */); - DEFVAR_LISP_NOPRO ("default-cursor-type", &buffer_defaults.cursor_type, - doc: /* Default value of `cursor-type' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-cursor-type", cursor_type, + doc: /* Default value of `cursor-type' for buffers that don't override it. This is the same as (default-value 'cursor-type). */); - DEFVAR_LISP_NOPRO ("default-line-spacing", - &buffer_defaults.extra_line_spacing, - doc: /* Default value of `line-spacing' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-line-spacing", + extra_line_spacing, + doc: /* Default value of `line-spacing' for buffers that don't override it. This is the same as (default-value 'line-spacing). */); - DEFVAR_LISP_NOPRO ("default-cursor-in-non-selected-windows", - &buffer_defaults.cursor_in_non_selected_windows, - doc: /* Default value of `cursor-in-non-selected-windows'. + DEFVAR_BUFFER_DEFAULTS ("default-cursor-in-non-selected-windows", + cursor_in_non_selected_windows, + doc: /* Default value of `cursor-in-non-selected-windows'. This is the same as (default-value 'cursor-in-non-selected-windows). */); - DEFVAR_LISP_NOPRO ("default-abbrev-mode", - &buffer_defaults.abbrev_mode, - doc: /* Default value of `abbrev-mode' for buffers that do not override it. + DEFVAR_BUFFER_DEFAULTS ("default-abbrev-mode", + abbrev_mode, + doc: /* Default value of `abbrev-mode' for buffers that do not override it. This is the same as (default-value 'abbrev-mode). */); - DEFVAR_LISP_NOPRO ("default-ctl-arrow", - &buffer_defaults.ctl_arrow, - doc: /* Default value of `ctl-arrow' for buffers that do not override it. + DEFVAR_BUFFER_DEFAULTS ("default-ctl-arrow", + ctl_arrow, + doc: /* Default value of `ctl-arrow' for buffers that do not override it. This is the same as (default-value 'ctl-arrow). */); - DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters", - &buffer_defaults.enable_multibyte_characters, - doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it. + DEFVAR_BUFFER_DEFAULTS ("default-enable-multibyte-characters", + enable_multibyte_characters, + doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it. This is the same as (default-value 'enable-multibyte-characters). */); - DEFVAR_LISP_NOPRO ("default-buffer-file-coding-system", - &buffer_defaults.buffer_file_coding_system, - doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it. + DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-coding-system", + buffer_file_coding_system, + doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it. This is the same as (default-value 'buffer-file-coding-system). */); - DEFVAR_LISP_NOPRO ("default-truncate-lines", - &buffer_defaults.truncate_lines, - doc: /* Default value of `truncate-lines' for buffers that do not override it. + DEFVAR_BUFFER_DEFAULTS ("default-truncate-lines", + truncate_lines, + doc: /* Default value of `truncate-lines' for buffers that do not override it. This is the same as (default-value 'truncate-lines). */); - DEFVAR_LISP_NOPRO ("default-fill-column", - &buffer_defaults.fill_column, - doc: /* Default value of `fill-column' for buffers that do not override it. + DEFVAR_BUFFER_DEFAULTS ("default-fill-column", + fill_column, + doc: /* Default value of `fill-column' for buffers that do not override it. This is the same as (default-value 'fill-column). */); - DEFVAR_LISP_NOPRO ("default-left-margin", - &buffer_defaults.left_margin, - doc: /* Default value of `left-margin' for buffers that do not override it. + DEFVAR_BUFFER_DEFAULTS ("default-left-margin", + left_margin, + doc: /* Default value of `left-margin' for buffers that do not override it. This is the same as (default-value 'left-margin). */); - DEFVAR_LISP_NOPRO ("default-tab-width", - &buffer_defaults.tab_width, - doc: /* Default value of `tab-width' for buffers that do not override it. + DEFVAR_BUFFER_DEFAULTS ("default-tab-width", + tab_width, + doc: /* Default value of `tab-width' for buffers that do not override it. This is the same as (default-value 'tab-width). */); - DEFVAR_LISP_NOPRO ("default-case-fold-search", - &buffer_defaults.case_fold_search, - doc: /* Default value of `case-fold-search' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-case-fold-search", + case_fold_search, + doc: /* Default value of `case-fold-search' for buffers that don't override it. This is the same as (default-value 'case-fold-search). */); #ifdef DOS_NT - DEFVAR_LISP_NOPRO ("default-buffer-file-type", - &buffer_defaults.buffer_file_type, - doc: /* Default file type for buffers that do not override it. + DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-type", + buffer_file_type, + doc: /* Default file type for buffers that do not override it. This is the same as (default-value 'buffer-file-type). The file type is nil for text, t for binary. */); #endif - DEFVAR_LISP_NOPRO ("default-left-margin-width", - &buffer_defaults.left_margin_cols, - doc: /* Default value of `left-margin-width' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-left-margin-width", + left_margin_cols, + doc: /* Default value of `left-margin-width' for buffers that don't override it. This is the same as (default-value 'left-margin-width). */); - DEFVAR_LISP_NOPRO ("default-right-margin-width", - &buffer_defaults.right_margin_cols, - doc: /* Default value of `right-margin-width' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-right-margin-width", + right_margin_cols, + doc: /* Default value of `right-margin-width' for buffers that don't override it. This is the same as (default-value 'right-margin-width). */); - DEFVAR_LISP_NOPRO ("default-left-fringe-width", - &buffer_defaults.left_fringe_width, - doc: /* Default value of `left-fringe-width' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-left-fringe-width", + left_fringe_width, + doc: /* Default value of `left-fringe-width' for buffers that don't override it. This is the same as (default-value 'left-fringe-width). */); - DEFVAR_LISP_NOPRO ("default-right-fringe-width", - &buffer_defaults.right_fringe_width, - doc: /* Default value of `right-fringe-width' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-right-fringe-width", + right_fringe_width, + doc: /* Default value of `right-fringe-width' for buffers that don't override it. This is the same as (default-value 'right-fringe-width). */); - DEFVAR_LISP_NOPRO ("default-fringes-outside-margins", - &buffer_defaults.fringes_outside_margins, - doc: /* Default value of `fringes-outside-margins' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-fringes-outside-margins", + fringes_outside_margins, + doc: /* Default value of `fringes-outside-margins' for buffers that don't override it. This is the same as (default-value 'fringes-outside-margins). */); - DEFVAR_LISP_NOPRO ("default-scroll-bar-width", - &buffer_defaults.scroll_bar_width, - doc: /* Default value of `scroll-bar-width' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-scroll-bar-width", + scroll_bar_width, + doc: /* Default value of `scroll-bar-width' for buffers that don't override it. This is the same as (default-value 'scroll-bar-width). */); - DEFVAR_LISP_NOPRO ("default-vertical-scroll-bar", - &buffer_defaults.vertical_scroll_bar_type, - doc: /* Default value of `vertical-scroll-bar' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-vertical-scroll-bar", + vertical_scroll_bar_type, + doc: /* Default value of `vertical-scroll-bar' for buffers that don't override it. This is the same as (default-value 'vertical-scroll-bar). */); - DEFVAR_LISP_NOPRO ("default-indicate-empty-lines", - &buffer_defaults.indicate_empty_lines, - doc: /* Default value of `indicate-empty-lines' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-indicate-empty-lines", + indicate_empty_lines, + doc: /* Default value of `indicate-empty-lines' for buffers that don't override it. This is the same as (default-value 'indicate-empty-lines). */); - DEFVAR_LISP_NOPRO ("default-indicate-buffer-boundaries", - &buffer_defaults.indicate_buffer_boundaries, - doc: /* Default value of `indicate-buffer-boundaries' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-indicate-buffer-boundaries", + indicate_buffer_boundaries, + doc: /* Default value of `indicate-buffer-boundaries' for buffers that don't override it. This is the same as (default-value 'indicate-buffer-boundaries). */); - DEFVAR_LISP_NOPRO ("default-fringe-indicator-alist", - &buffer_defaults.fringe_indicator_alist, - doc: /* Default value of `fringe-indicator-alist' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-fringe-indicator-alist", + fringe_indicator_alist, + doc: /* Default value of `fringe-indicator-alist' for buffers that don't override it. This is the same as (default-value 'fringe-indicator-alist'). */); - DEFVAR_LISP_NOPRO ("default-fringe-cursor-alist", - &buffer_defaults.fringe_cursor_alist, - doc: /* Default value of `fringe-cursor-alist' for buffers that don't override it. + DEFVAR_BUFFER_DEFAULTS ("default-fringe-cursor-alist", + fringe_cursor_alist, + doc: /* Default value of `fringe-cursor-alist' for buffers that don't override it. This is the same as (default-value 'fringe-cursor-alist'). */); - DEFVAR_LISP_NOPRO ("default-scroll-up-aggressively", - &buffer_defaults.scroll_up_aggressively, - doc: /* Default value of `scroll-up-aggressively'. + DEFVAR_BUFFER_DEFAULTS ("default-scroll-up-aggressively", + scroll_up_aggressively, + doc: /* Default value of `scroll-up-aggressively'. This value applies in buffers that don't have their own local values. This is the same as (default-value 'scroll-up-aggressively). */); - DEFVAR_LISP_NOPRO ("default-scroll-down-aggressively", - &buffer_defaults.scroll_down_aggressively, - doc: /* Default value of `scroll-down-aggressively'. + DEFVAR_BUFFER_DEFAULTS ("default-scroll-down-aggressively", + scroll_down_aggressively, + doc: /* Default value of `scroll-down-aggressively'. This value applies in buffers that don't have their own local values. This is the same as (default-value 'scroll-down-aggressively). */); @@ -5570,8 +5547,8 @@ %% -- print %. %- -- print infinitely many dashes. Decimal digits after the % specify field width to which to pad. */); - DEFVAR_LISP_NOPRO ("default-major-mode", &buffer_defaults.major_mode, - doc: /* *Value of `major-mode' for new buffers. */); + DEFVAR_BUFFER_DEFAULTS ("default-major-mode", major_mode, + doc: /* *Value of `major-mode' for new buffers. */); DEFVAR_PER_BUFFER ("major-mode", ¤t_buffer->major_mode, make_number (Lisp_Symbol), @@ -5946,7 +5923,7 @@ "Don't ask."); */ - DEFVAR_LISP ("before-change-functions", &Vbefore_change_functions, + DEFVAR_LISP ("before-change-functions", Vbefore_change_functions, doc: /* List of functions to call before each text change. Two arguments are passed to each function: the positions of the beginning and end of the range of old text to be changed. @@ -5962,7 +5939,7 @@ from happening repeatedly and making Emacs nonfunctional. */); Vbefore_change_functions = Qnil; - DEFVAR_LISP ("after-change-functions", &Vafter_change_functions, + DEFVAR_LISP ("after-change-functions", Vafter_change_functions, doc: /* List of functions to call after each text change. Three arguments are passed to each function: the positions of the beginning and end of the range of changed text, @@ -5980,7 +5957,7 @@ from happening repeatedly and making Emacs nonfunctional. */); Vafter_change_functions = Qnil; - DEFVAR_LISP ("first-change-hook", &Vfirst_change_hook, + DEFVAR_LISP ("first-change-hook", Vfirst_change_hook, doc: /* A list of functions to call before changing a buffer which is unmodified. The functions are run using the `run-hooks' function. */); Vfirst_change_hook = Qnil; @@ -6095,7 +6072,7 @@ to the value obtained by calling `current-time'. If the buffer has never been shown in a window, the value is nil. */); - DEFVAR_LISP ("transient-mark-mode", &Vtransient_mark_mode, + DEFVAR_LISP ("transient-mark-mode", Vtransient_mark_mode, doc: /* Non-nil if Transient Mark mode is enabled. See the command `transient-mark-mode' for a description of this minor mode. @@ -6116,7 +6093,7 @@ `transient-mark-mode' is set to OLDVAL. */); Vtransient_mark_mode = Qnil; - DEFVAR_LISP ("inhibit-read-only", &Vinhibit_read_only, + DEFVAR_LISP ("inhibit-read-only", Vinhibit_read_only, doc: /* *Non-nil means disregard read-only status of buffers or characters. If the value is t, disregard `buffer-read-only' and all `read-only' text properties. If the value is a list, disregard `buffer-read-only' @@ -6159,13 +6136,13 @@ You can also specify the cursor type as in the `cursor-type' variable. Use Custom to set this variable and update the display." */); - DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, + DEFVAR_LISP ("kill-buffer-query-functions", Vkill_buffer_query_functions, doc: /* List of functions called with no args to query before killing a buffer. The buffer being killed will be current while the functions are running. If any of them returns nil, the buffer is not killed. */); Vkill_buffer_query_functions = Qnil; - DEFVAR_LISP ("change-major-mode-hook", &Vchange_major_mode_hook, + DEFVAR_LISP ("change-major-mode-hook", Vchange_major_mode_hook, doc: /* Normal hook run before changing the major mode of a buffer. The function `kill-all-local-variables' runs this before doing anything else. */); Vchange_major_mode_hook = Qnil;
--- a/src/buffer.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/buffer.h Wed Jan 19 13:54:19 2011 -0800 @@ -901,19 +901,10 @@ EXFUN (Fdelete_overlay, 1); EXFUN (Fbuffer_local_value, 2); -/* Functions to call before and after each text change. */ -extern Lisp_Object Vbefore_change_functions; -extern Lisp_Object Vafter_change_functions; -extern Lisp_Object Vfirst_change_hook; extern Lisp_Object Qbefore_change_functions; extern Lisp_Object Qafter_change_functions; extern Lisp_Object Qfirst_change_hook; -/* If nonzero, all modification hooks are suppressed. */ -extern int inhibit_modification_hooks; - -extern Lisp_Object Vdeactivate_mark; -extern Lisp_Object Vtransient_mark_mode; /* Overlays */
--- a/src/bytecode.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/bytecode.c Wed Jan 19 13:54:19 2011 -0800 @@ -58,9 +58,7 @@ #ifdef BYTE_CODE_METER -Lisp_Object Vbyte_code_meter, Qbyte_code_meter; -int byte_metering_on; - +Lisp_Object Qbyte_code_meter; #define METER_2(code1, code2) \ XFASTINT (XVECTOR (XVECTOR (Vbyte_code_meter)->contents[(code1)]) \ ->contents[(code2)]) @@ -1686,7 +1684,7 @@ #ifdef BYTE_CODE_METER - DEFVAR_LISP ("byte-code-meter", &Vbyte_code_meter, + DEFVAR_LISP ("byte-code-meter", Vbyte_code_meter, doc: /* A vector of vectors which holds a histogram of byte-code usage. \(aref (aref byte-code-meter 0) CODE) indicates how many times the byte opcode CODE has been executed. @@ -1694,7 +1692,7 @@ indicates how many times the byte opcodes CODE1 and CODE2 have been executed in succession. */); - DEFVAR_BOOL ("byte-metering-on", &byte_metering_on, + DEFVAR_BOOL ("byte-metering-on", byte_metering_on, doc: /* If non-nil, keep profiling information on byte code usage. The variable byte-code-meter indicates how often each byte opcode is used. If a symbol has a property named `byte-code-meter' whose value is an
--- a/src/callint.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/callint.c Wed Jan 19 13:54:19 2011 -0800 @@ -29,20 +29,14 @@ #include "window.h" #include "keymap.h" -Lisp_Object Vcurrent_prefix_arg, Qminus, Qplus; +Lisp_Object Qminus, Qplus; Lisp_Object Qcall_interactively; -Lisp_Object Vcommand_history; - -Lisp_Object Vcommand_debug_status, Qcommand_debug_status; +Lisp_Object Qcommand_debug_status; Lisp_Object Qenable_recursive_minibuffers; -/* Non-nil means treat the mark as active - even if mark_active is 0. */ -Lisp_Object Vmark_even_if_inactive; - Lisp_Object Qhandle_shift_selection; -Lisp_Object Vmouse_leave_buffer_hook, Qmouse_leave_buffer_hook; +Lisp_Object Qmouse_leave_buffer_hook; Lisp_Object Qlist, Qlet, Qletx, Qsave_excursion, Qprogn, Qif, Qwhen; static Lisp_Object preserved_fns; @@ -940,7 +934,7 @@ doc: /* The value of the prefix argument for the previous editing command. See `prefix-arg' for the meaning of the value. */); - DEFVAR_LISP ("current-prefix-arg", &Vcurrent_prefix_arg, + DEFVAR_LISP ("current-prefix-arg", Vcurrent_prefix_arg, doc: /* The value of the prefix argument for this editing command. It may be a number, or the symbol `-' for just a minus sign as arg, or a list whose car is a number for just one or more C-u's @@ -948,7 +942,7 @@ This is what `(interactive \"P\")' returns. */); Vcurrent_prefix_arg = Qnil; - DEFVAR_LISP ("command-history", &Vcommand_history, + DEFVAR_LISP ("command-history", Vcommand_history, doc: /* List of recent commands that read arguments from terminal. Each command is represented as a form to evaluate. @@ -956,13 +950,13 @@ of `history-length', which see. */); Vcommand_history = Qnil; - DEFVAR_LISP ("command-debug-status", &Vcommand_debug_status, + DEFVAR_LISP ("command-debug-status", Vcommand_debug_status, doc: /* Debugging status of current interactive command. Bound each time `call-interactively' is called; may be set by the debugger as a reminder for itself. */); Vcommand_debug_status = Qnil; - DEFVAR_LISP ("mark-even-if-inactive", &Vmark_even_if_inactive, + DEFVAR_LISP ("mark-even-if-inactive", Vmark_even_if_inactive, doc: /* *Non-nil means you can use the mark even when inactive. This option makes a difference in Transient Mark mode. When the option is non-nil, deactivation of the mark @@ -970,7 +964,7 @@ behave as if the mark were still active. */); Vmark_even_if_inactive = Qt; - DEFVAR_LISP ("mouse-leave-buffer-hook", &Vmouse_leave_buffer_hook, + DEFVAR_LISP ("mouse-leave-buffer-hook", Vmouse_leave_buffer_hook, doc: /* Hook to run when about to switch windows with a mouse command. Its purpose is to give temporary modes such as Isearch mode a way to turn themselves off when a mouse command switches windows. */);
--- a/src/callproc.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/callproc.c Wed Jan 19 13:54:19 2011 -0800 @@ -25,10 +25,7 @@ #include <stdio.h> #include <setjmp.h> #include <sys/types.h> - -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #include <sys/file.h> #include <fcntl.h> @@ -75,17 +72,9 @@ #endif #endif -Lisp_Object Vexec_path, Vexec_directory, Vexec_suffixes; -Lisp_Object Vdata_directory, Vdoc_directory; -Lisp_Object Vconfigure_info_directory, Vshared_game_score_directory; - /* Pattern used by call-process-region to make temp files. */ static Lisp_Object Vtemp_file_name_pattern; -Lisp_Object Vshell_file_name; - -Lisp_Object Vprocess_environment, Vinitial_environment; - #ifdef DOS_NT Lisp_Object Qbuffer_file_type; #endif /* DOS_NT */ @@ -1529,41 +1518,41 @@ #endif staticpro (&Vtemp_file_name_pattern); - DEFVAR_LISP ("shell-file-name", &Vshell_file_name, + DEFVAR_LISP ("shell-file-name", Vshell_file_name, doc: /* *File name to load inferior shells from. Initialized from the SHELL environment variable, or to a system-dependent default if SHELL is not set. */); - DEFVAR_LISP ("exec-path", &Vexec_path, + DEFVAR_LISP ("exec-path", Vexec_path, doc: /* *List of directories to search programs to run in subprocesses. Each element is a string (directory name) or nil (try default directory). */); - DEFVAR_LISP ("exec-suffixes", &Vexec_suffixes, + DEFVAR_LISP ("exec-suffixes", Vexec_suffixes, doc: /* *List of suffixes to try to find executable file names. Each element is a string. */); Vexec_suffixes = Qnil; - DEFVAR_LISP ("exec-directory", &Vexec_directory, + DEFVAR_LISP ("exec-directory", Vexec_directory, doc: /* Directory for executables for Emacs to invoke. More generally, this includes any architecture-dependent files that are built and installed from the Emacs distribution. */); - DEFVAR_LISP ("data-directory", &Vdata_directory, + DEFVAR_LISP ("data-directory", Vdata_directory, doc: /* Directory of machine-independent files that come with GNU Emacs. These are files intended for Emacs to use while it runs. */); - DEFVAR_LISP ("doc-directory", &Vdoc_directory, + DEFVAR_LISP ("doc-directory", Vdoc_directory, doc: /* Directory containing the DOC file that comes with GNU Emacs. This is usually the same as `data-directory'. */); - DEFVAR_LISP ("configure-info-directory", &Vconfigure_info_directory, + DEFVAR_LISP ("configure-info-directory", Vconfigure_info_directory, doc: /* For internal use by the build procedure only. This is the name of the directory in which the build procedure installed Emacs's info files; the default value for `Info-default-directory-list' includes this. */); Vconfigure_info_directory = build_string (PATH_INFO); - DEFVAR_LISP ("shared-game-score-directory", &Vshared_game_score_directory, + DEFVAR_LISP ("shared-game-score-directory", Vshared_game_score_directory, doc: /* Directory of score files for games which come with GNU Emacs. If this variable is nil, then Emacs is unable to use a shared directory. */); #ifdef DOS_NT @@ -1572,13 +1561,13 @@ Vshared_game_score_directory = build_string (PATH_GAME); #endif - DEFVAR_LISP ("initial-environment", &Vinitial_environment, + DEFVAR_LISP ("initial-environment", Vinitial_environment, doc: /* List of environment variables inherited from the parent process. Each element should be a string of the form ENVVARNAME=VALUE. The elements must normally be decoded (using `locale-coding-system') for use. */); Vinitial_environment = Qnil; - DEFVAR_LISP ("process-environment", &Vprocess_environment, + DEFVAR_LISP ("process-environment", Vprocess_environment, doc: /* List of overridden environment variables for subprocesses to inherit. Each element should be a string of the form ENVVARNAME=VALUE.
--- a/src/category.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/category.c Wed Jan 19 13:54:19 2011 -0800 @@ -50,9 +50,6 @@ Lisp_Object Qcategory_table, Qcategoryp, Qcategorysetp, Qcategory_table_p; -/* Variables to determine word boundary. */ -Lisp_Object Vword_combining_categories, Vword_separating_categories; - /* Temporary internal variable used in macro CHAR_HAS_CATEGORY. */ Lisp_Object _temp_category_set; @@ -481,7 +478,7 @@ Qcategory_table_p = intern_c_string ("category-table-p"); staticpro (&Qcategory_table_p); - DEFVAR_LISP ("word-combining-categories", &Vword_combining_categories, + DEFVAR_LISP ("word-combining-categories", Vword_combining_categories, doc: /* List of pair (cons) of categories to determine word boundary. Emacs treats a sequence of word constituent characters as a single @@ -519,7 +516,7 @@ Vword_combining_categories = Qnil; - DEFVAR_LISP ("word-separating-categories", &Vword_separating_categories, + DEFVAR_LISP ("word-separating-categories", Vword_separating_categories, doc: /* List of pair (cons) of categories to determine word boundary. See the documentation of the variable `word-combining-categories'. */);
--- a/src/ccl.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/ccl.c Wed Jan 19 13:54:19 2011 -0800 @@ -37,12 +37,6 @@ Lisp_Object Qccl, Qcclp; -/* This contains all code conversion map available to CCL. */ -Lisp_Object Vcode_conversion_map_vector; - -/* Alist of fontname patterns vs corresponding CCL program. */ -Lisp_Object Vfont_ccl_encoder_alist; - /* This symbol is a property which associates with ccl program vector. Ex: (get 'ccl-big5-encoder 'ccl-program) returns ccl program vector. */ Lisp_Object Qccl_program; @@ -65,9 +59,6 @@ was once used. */ Lisp_Object Vccl_program_table; -/* Vector of registered hash tables for translation. */ -Lisp_Object Vtranslation_hash_table_vector; - /* Return a hash table of id number ID. */ #define GET_HASH_TABLE(id) \ (XHASH_TABLE (XCDR(XVECTOR(Vtranslation_hash_table_vector)->contents[(id)]))) @@ -2321,11 +2312,11 @@ Qcode_conversion_map_id = intern_c_string ("code-conversion-map-id"); staticpro (&Qcode_conversion_map_id); - DEFVAR_LISP ("code-conversion-map-vector", &Vcode_conversion_map_vector, + DEFVAR_LISP ("code-conversion-map-vector", Vcode_conversion_map_vector, doc: /* Vector of code conversion maps. */); Vcode_conversion_map_vector = Fmake_vector (make_number (16), Qnil); - DEFVAR_LISP ("font-ccl-encoder-alist", &Vfont_ccl_encoder_alist, + DEFVAR_LISP ("font-ccl-encoder-alist", Vfont_ccl_encoder_alist, doc: /* Alist of fontname patterns vs corresponding CCL program. Each element looks like (REGEXP . CCL-CODE), where CCL-CODE is a compiled CCL program. @@ -2338,7 +2329,7 @@ If the font is single-byte font, the register R2 is not used. */); Vfont_ccl_encoder_alist = Qnil; - DEFVAR_LISP ("translation-hash-table-vector", &Vtranslation_hash_table_vector, + DEFVAR_LISP ("translation-hash-table-vector", Vtranslation_hash_table_vector, doc: /* Vector containing all translation hash tables ever defined. Comprises pairs (SYMBOL . TABLE) where SYMBOL and TABLE were set up by calls to `define-translation-hash-table'. The vector is indexed by the table id
--- a/src/ccl.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/ccl.h Wed Jan 19 13:54:19 2011 -0800 @@ -92,9 +92,6 @@ #define CODING_SPEC_CCL_PROGRAM(coding) ((coding)->spec.ccl.ccl) -/* Alist of fontname patterns vs corresponding CCL program. */ -extern Lisp_Object Vfont_ccl_encoder_alist; - /* Setup fields of the structure pointed by CCL appropriately for the execution of ccl program CCL_PROG (symbol or vector). */ extern int setup_ccl_program (struct ccl_program *, Lisp_Object);
--- a/src/character.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/character.c Wed Jan 19 13:54:19 2011 -0800 @@ -50,43 +50,17 @@ Lisp_Object Qcharacterp; -/* Vector of translation table ever defined. - ID of a translation table is used to index this vector. */ -Lisp_Object Vtranslation_table_vector; - -/* A char-table for characters which may invoke auto-filling. */ -Lisp_Object Vauto_fill_chars; - Lisp_Object Qauto_fill_chars; /* Char-table of information about which character to unify to which Unicode character. Mainly used by the macro MAYBE_UNIFY_CHAR. */ Lisp_Object Vchar_unify_table; -/* A char-table. An element is non-nil iff the corresponding - character has a printable glyph. */ -Lisp_Object Vprintable_chars; - -/* A char-table. An elemnent is a column-width of the corresponding - character. */ -Lisp_Object Vchar_width_table; - -/* A char-table. An element is a symbol indicating the direction - property of corresponding character. */ -Lisp_Object Vchar_direction_table; - /* Variable used locally in the macro FETCH_MULTIBYTE_CHAR. */ unsigned char *_fetch_multibyte_char_p; -/* Char table of scripts. */ -Lisp_Object Vchar_script_table; - -/* Alist of scripts vs representative characters. */ -Lisp_Object Vscript_representative_chars; - static Lisp_Object Qchar_script_table; -Lisp_Object Vunicode_category_table; /* If character code C has modifier masks, reflect them to the @@ -1071,14 +1045,14 @@ defsubr (&Schar_resolve_modifiers); defsubr (&Sget_byte); - DEFVAR_LISP ("translation-table-vector", &Vtranslation_table_vector, + DEFVAR_LISP ("translation-table-vector", Vtranslation_table_vector, doc: /* Vector recording all translation tables ever defined. Each element is a pair (SYMBOL . TABLE) relating the table to the symbol naming it. The ID of a translation table is an index into this vector. */); Vtranslation_table_vector = Fmake_vector (make_number (16), Qnil); - DEFVAR_LISP ("auto-fill-chars", &Vauto_fill_chars, + DEFVAR_LISP ("auto-fill-chars", Vauto_fill_chars, doc: /* A char-table for characters which invoke auto-filling. Such characters have value t in this table. */); @@ -1086,7 +1060,7 @@ CHAR_TABLE_SET (Vauto_fill_chars, ' ', Qt); CHAR_TABLE_SET (Vauto_fill_chars, '\n', Qt); - DEFVAR_LISP ("char-width-table", &Vchar_width_table, + DEFVAR_LISP ("char-width-table", Vchar_width_table, doc: /* A char-table for width (columns) of each character. */); Vchar_width_table = Fmake_char_table (Qnil, make_number (1)); @@ -1094,11 +1068,11 @@ char_table_set_range (Vchar_width_table, MAX_5_BYTE_CHAR + 1, MAX_CHAR, make_number (4)); - DEFVAR_LISP ("char-direction-table", &Vchar_direction_table, + DEFVAR_LISP ("char-direction-table", Vchar_direction_table, doc: /* A char-table for direction of each character. */); Vchar_direction_table = Fmake_char_table (Qnil, make_number (1)); - DEFVAR_LISP ("printable-chars", &Vprintable_chars, + DEFVAR_LISP ("printable-chars", Vprintable_chars, doc: /* A char-table for each printable character. */); Vprintable_chars = Fmake_char_table (Qnil, Qnil); Fset_char_table_range (Vprintable_chars, @@ -1107,7 +1081,7 @@ Fcons (make_number (160), make_number (MAX_5_BYTE_CHAR)), Qt); - DEFVAR_LISP ("char-script-table", &Vchar_script_table, + DEFVAR_LISP ("char-script-table", Vchar_script_table, doc: /* Char table of script symbols. It has one extra slot whose value is a list of script symbols. */); @@ -1119,7 +1093,7 @@ Fput (Qchar_script_table, Qchar_table_extra_slots, make_number (1)); Vchar_script_table = Fmake_char_table (Qchar_script_table, Qnil); - DEFVAR_LISP ("script-representative-chars", &Vscript_representative_chars, + DEFVAR_LISP ("script-representative-chars", Vscript_representative_chars, doc: /* Alist of scripts vs the representative characters. Each element is a cons (SCRIPT . CHARS). SCRIPT is a symbol representing a script or a subgroup of a script. @@ -1129,7 +1103,7 @@ This variable is used to find a font for a specific script. */); Vscript_representative_chars = Qnil; - DEFVAR_LISP ("unicode-category-table", &Vunicode_category_table, + DEFVAR_LISP ("unicode-category-table", Vunicode_category_table, doc: /* Char table of Unicode's "General Category". All Unicode characters have one of the following values (symbol): Lu, Ll, Lt, Lm, Lo, Mn, Mc, Me, Nd, Nl, No, Pc, Pd, Ps, Pe, Pi, Pf, Po,
--- a/src/character.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/character.h Wed Jan 19 13:54:19 2011 -0800 @@ -618,27 +618,14 @@ extern EMACS_INT lisp_string_width (Lisp_Object, int, EMACS_INT *, EMACS_INT *); -extern Lisp_Object Vprintable_chars; - extern Lisp_Object Qcharacterp, Qauto_fill_chars; -extern Lisp_Object Vtranslation_table_vector; -extern Lisp_Object Vchar_width_table; -extern Lisp_Object Vchar_direction_table; extern Lisp_Object Vchar_unify_table; -extern Lisp_Object Vunicode_category_table; - extern Lisp_Object string_escape_byte8 (Lisp_Object); /* Return a translation table of id number ID. */ #define GET_TRANSLATION_TABLE(id) \ (XCDR(XVECTOR(Vtranslation_table_vector)->contents[(id)])) -/* A char-table for characters which may invoke auto-filling. */ -extern Lisp_Object Vauto_fill_chars; - -extern Lisp_Object Vchar_script_table; -extern Lisp_Object Vscript_representative_chars; - #define DEFSYM(sym, name) \ do { (sym) = intern_c_string ((name)); staticpro (&(sym)); } while (0)
--- a/src/charset.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/charset.c Wed Jan 19 13:54:19 2011 -0800 @@ -54,10 +54,6 @@ */ -/* List of all charsets. This variable is used only from Emacs - Lisp. */ -Lisp_Object Vcharset_list; - /* Hash table that contains attributes of each charset. Keys are charset symbols, and values are vectors of charset attributes. */ Lisp_Object Vcharset_hash_table; @@ -120,13 +116,6 @@ CHARS, and FINAL-CHAR) to Emacs' charset. */ int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL]; -Lisp_Object Vcharset_map_path; - -/* If nonzero, don't load charset maps. */ -int inhibit_load_charset_map; - -Lisp_Object Vcurrent_iso639_language; - #define CODE_POINT_TO_INDEX(charset, code) \ ((charset)->code_linear_p \ ? (code) - (charset)->min_code \ @@ -2404,19 +2393,19 @@ defsubr (&Scharset_id_internal); defsubr (&Ssort_charsets); - DEFVAR_LISP ("charset-map-path", &Vcharset_map_path, + DEFVAR_LISP ("charset-map-path", Vcharset_map_path, doc: /* *List of directories to search for charset map files. */); Vcharset_map_path = Qnil; - DEFVAR_BOOL ("inhibit-load-charset-map", &inhibit_load_charset_map, + DEFVAR_BOOL ("inhibit-load-charset-map", inhibit_load_charset_map, doc: /* Inhibit loading of charset maps. Used when dumping Emacs. */); inhibit_load_charset_map = 0; - DEFVAR_LISP ("charset-list", &Vcharset_list, + DEFVAR_LISP ("charset-list", Vcharset_list, doc: /* List of all charsets ever defined. */); Vcharset_list = Qnil; - DEFVAR_LISP ("current-iso639-language", &Vcurrent_iso639_language, + DEFVAR_LISP ("current-iso639-language", Vcurrent_iso639_language, doc: /* ISO639 language mnemonic symbol for the current language environment. If the current language environment is for multiple languages (e.g. "Latin-1"), the value may be a list of mnemonics. */);
--- a/src/charset.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/charset.h Wed Jan 19 13:54:19 2011 -0800 @@ -251,14 +251,11 @@ /* Incremented everytime we change the priority of charsets. */ extern unsigned short charset_ordered_list_tick; -extern Lisp_Object Vcharset_list; extern Lisp_Object Viso_2022_charset_list; extern Lisp_Object Vemacs_mule_charset_list; extern int emacs_mule_charset[256]; -extern Lisp_Object Vcurrent_iso639_language; - /* Macros to access information about charset. */ /* Return the attribute vector of charset whose symbol is SYMBOL. */
--- a/src/cmds.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/cmds.c Wed Jan 19 13:54:19 2011 -0800 @@ -320,7 +320,7 @@ A value of 2 means this did things that call for an undo boundary. */ static Lisp_Object Qexpand_abbrev; -static Lisp_Object Qpost_self_insert_hook, Vpost_self_insert_hook; +static Lisp_Object Qpost_self_insert_hook; static int internal_self_insert (int c, EMACS_INT n) @@ -523,7 +523,7 @@ Qpost_self_insert_hook = intern_c_string ("post-self-insert-hook"); staticpro (&Qpost_self_insert_hook); - DEFVAR_LISP ("post-self-insert-hook", &Vpost_self_insert_hook, + DEFVAR_LISP ("post-self-insert-hook", Vpost_self_insert_hook, doc: /* Hook run at the end of `self-insert-command'. This is run after inserting the character. */); Vpost_self_insert_hook = Qnil;
--- a/src/coding.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/coding.c Wed Jan 19 13:54:19 2011 -0800 @@ -327,16 +327,6 @@ symbol as a coding system. */ static Lisp_Object Qcoding_system_define_form; -int coding_system_require_warning; - -Lisp_Object Vselect_safe_coding_system_function; - -/* Mnemonic string for each format of end-of-line. */ -Lisp_Object eol_mnemonic_unix, eol_mnemonic_dos, eol_mnemonic_mac; -/* Mnemonic string to indicate format of end-of-line is not yet - decided. */ -Lisp_Object eol_mnemonic_undecided; - /* Format of end-of-line decided by system. This is Qunix on Unix and Mac, Qdos on DOS/Windows. This has an effect only for external encoding (i.e. for output to @@ -345,8 +335,6 @@ #ifdef emacs -Lisp_Object Vcoding_system_list, Vcoding_system_alist; - Lisp_Object Qcoding_system_p, Qcoding_system_error; /* Coding system emacs-mule and raw-text are for converting only @@ -356,64 +344,17 @@ /* Coding-systems are handed between Emacs Lisp programs and C internal routines by the following three variables. */ -/* Coding-system for reading files and receiving data from process. */ -Lisp_Object Vcoding_system_for_read; -/* Coding-system for writing files and sending data to process. */ -Lisp_Object Vcoding_system_for_write; -/* Coding-system actually used in the latest I/O. */ -Lisp_Object Vlast_coding_system_used; -/* Set to non-nil when an error is detected while code conversion. */ -Lisp_Object Vlast_code_conversion_error; -/* A vector of length 256 which contains information about special - Latin codes (especially for dealing with Microsoft codes). */ -Lisp_Object Vlatin_extra_code_table; - -/* Flag to inhibit code conversion of end-of-line format. */ -int inhibit_eol_conversion; - -/* Flag to inhibit ISO2022 escape sequence detection. */ -int inhibit_iso_escape_detection; - -/* Flag to inhibit detection of binary files through null bytes. */ -int inhibit_null_byte_detection; - -/* Flag to make buffer-file-coding-system inherit from process-coding. */ -int inherit_process_coding_system; - /* Coding system to be used to encode text for terminal display when terminal coding system is nil. */ struct coding_system safe_terminal_coding; -Lisp_Object Vfile_coding_system_alist; -Lisp_Object Vprocess_coding_system_alist; -Lisp_Object Vnetwork_coding_system_alist; - -Lisp_Object Vlocale_coding_system; - #endif /* emacs */ -/* Flag to tell if we look up translation table on character code - conversion. */ -Lisp_Object Venable_character_translation; -/* Standard translation table to look up on decoding (reading). */ -Lisp_Object Vstandard_translation_table_for_decode; -/* Standard translation table to look up on encoding (writing). */ -Lisp_Object Vstandard_translation_table_for_encode; - Lisp_Object Qtranslation_table; Lisp_Object Qtranslation_table_id; Lisp_Object Qtranslation_table_for_decode; Lisp_Object Qtranslation_table_for_encode; -/* Alist of charsets vs revision number. */ -static Lisp_Object Vcharset_revision_table; - -/* Default coding systems used for process I/O. */ -Lisp_Object Vdefault_process_coding_system; - -/* Char table for translating Quail and self-inserting input. */ -Lisp_Object Vtranslation_table_for_input; - /* Two special coding systems. */ Lisp_Object Vsjis_coding_system; Lisp_Object Vbig5_coding_system; @@ -681,10 +622,6 @@ | CATEGORY_MASK_UTF_8_NOSIG \ | CATEGORY_MASK_UTF_8_SIG) -/* List of symbols `coding-category-xxx' ordered by priority. This - variable is exposed to Emacs Lisp. */ -static Lisp_Object Vcoding_category_list; - /* Table of coding categories (Lisp symbols). This variable is for internal use only. */ static Lisp_Object Vcoding_category_table; @@ -10525,7 +10462,7 @@ defsubr (&Scoding_system_eol_type); defsubr (&Scoding_system_priority_list); - DEFVAR_LISP ("coding-system-list", &Vcoding_system_list, + DEFVAR_LISP ("coding-system-list", Vcoding_system_list, doc: /* List of coding systems. Do not alter the value of this variable manually. This variable should be @@ -10533,7 +10470,7 @@ `define-coding-system-alias'. */); Vcoding_system_list = Qnil; - DEFVAR_LISP ("coding-system-alist", &Vcoding_system_alist, + DEFVAR_LISP ("coding-system-alist", Vcoding_system_alist, doc: /* Alist of coding system names. Each element is one element list of coding system name. This variable is given to `completing-read' as COLLECTION argument. @@ -10543,7 +10480,7 @@ `define-coding-system-alias'. */); Vcoding_system_alist = Qnil; - DEFVAR_LISP ("coding-category-list", &Vcoding_category_list, + DEFVAR_LISP ("coding-category-list", Vcoding_category_list, doc: /* List of coding-categories (symbols) ordered by priority. On detecting a coding system, Emacs tries code detection algorithms @@ -10562,7 +10499,7 @@ Vcoding_category_list); } - DEFVAR_LISP ("coding-system-for-read", &Vcoding_system_for_read, + DEFVAR_LISP ("coding-system-for-read", Vcoding_system_for_read, doc: /* Specify the coding system for read operations. It is useful to bind this variable with `let', but do not set it globally. If the value is a coding system, it is used for decoding on read operation. @@ -10571,7 +10508,7 @@ `process-coding-system-alist', and `network-coding-system-alist'. */); Vcoding_system_for_read = Qnil; - DEFVAR_LISP ("coding-system-for-write", &Vcoding_system_for_write, + DEFVAR_LISP ("coding-system-for-write", Vcoding_system_for_write, doc: /* Specify the coding system for write operations. Programs bind this variable with `let', but you should not set it globally. If the value is a coding system, it is used for encoding of output, @@ -10585,12 +10522,12 @@ the value of `buffer-file-coding-system' is used. */); Vcoding_system_for_write = Qnil; - DEFVAR_LISP ("last-coding-system-used", &Vlast_coding_system_used, + DEFVAR_LISP ("last-coding-system-used", Vlast_coding_system_used, doc: /* Coding system used in the latest file or process I/O. */); Vlast_coding_system_used = Qnil; - DEFVAR_LISP ("last-code-conversion-error", &Vlast_code_conversion_error, + DEFVAR_LISP ("last-code-conversion-error", Vlast_code_conversion_error, doc: /* Error status of the last code conversion. @@ -10607,21 +10544,21 @@ conversion. */); Vlast_code_conversion_error = Qnil; - DEFVAR_BOOL ("inhibit-eol-conversion", &inhibit_eol_conversion, + DEFVAR_BOOL ("inhibit-eol-conversion", inhibit_eol_conversion, doc: /* *Non-nil means always inhibit code conversion of end-of-line format. See info node `Coding Systems' and info node `Text and Binary' concerning such conversion. */); inhibit_eol_conversion = 0; - DEFVAR_BOOL ("inherit-process-coding-system", &inherit_process_coding_system, + DEFVAR_BOOL ("inherit-process-coding-system", inherit_process_coding_system, doc: /* Non-nil means process buffer inherits coding system of process output. Bind it to t if the process output is to be treated as if it were a file read from some filesystem. */); inherit_process_coding_system = 0; - DEFVAR_LISP ("file-coding-system-alist", &Vfile_coding_system_alist, + DEFVAR_LISP ("file-coding-system-alist", Vfile_coding_system_alist, doc: /* Alist to decide a coding system to use for a file I/O operation. The format is ((PATTERN . VAL) ...), @@ -10642,7 +10579,7 @@ and the variable `auto-coding-alist'. */); Vfile_coding_system_alist = Qnil; - DEFVAR_LISP ("process-coding-system-alist", &Vprocess_coding_system_alist, + DEFVAR_LISP ("process-coding-system-alist", Vprocess_coding_system_alist, doc: /* Alist to decide a coding system to use for a process I/O operation. The format is ((PATTERN . VAL) ...), @@ -10658,7 +10595,7 @@ See also the function `find-operation-coding-system'. */); Vprocess_coding_system_alist = Qnil; - DEFVAR_LISP ("network-coding-system-alist", &Vnetwork_coding_system_alist, + DEFVAR_LISP ("network-coding-system-alist", Vnetwork_coding_system_alist, doc: /* Alist to decide a coding system to use for a network I/O operation. The format is ((PATTERN . VAL) ...), @@ -10675,48 +10612,48 @@ See also the function `find-operation-coding-system'. */); Vnetwork_coding_system_alist = Qnil; - DEFVAR_LISP ("locale-coding-system", &Vlocale_coding_system, + DEFVAR_LISP ("locale-coding-system", Vlocale_coding_system, doc: /* Coding system to use with system messages. Also used for decoding keyboard input on X Window system. */); Vlocale_coding_system = Qnil; /* The eol mnemonics are reset in startup.el system-dependently. */ - DEFVAR_LISP ("eol-mnemonic-unix", &eol_mnemonic_unix, + DEFVAR_LISP ("eol-mnemonic-unix", eol_mnemonic_unix, doc: /* *String displayed in mode line for UNIX-like (LF) end-of-line format. */); eol_mnemonic_unix = make_pure_c_string (":"); - DEFVAR_LISP ("eol-mnemonic-dos", &eol_mnemonic_dos, + DEFVAR_LISP ("eol-mnemonic-dos", eol_mnemonic_dos, doc: /* *String displayed in mode line for DOS-like (CRLF) end-of-line format. */); eol_mnemonic_dos = make_pure_c_string ("\\"); - DEFVAR_LISP ("eol-mnemonic-mac", &eol_mnemonic_mac, + DEFVAR_LISP ("eol-mnemonic-mac", eol_mnemonic_mac, doc: /* *String displayed in mode line for MAC-like (CR) end-of-line format. */); eol_mnemonic_mac = make_pure_c_string ("/"); - DEFVAR_LISP ("eol-mnemonic-undecided", &eol_mnemonic_undecided, + DEFVAR_LISP ("eol-mnemonic-undecided", eol_mnemonic_undecided, doc: /* *String displayed in mode line when end-of-line format is not yet determined. */); eol_mnemonic_undecided = make_pure_c_string (":"); - DEFVAR_LISP ("enable-character-translation", &Venable_character_translation, + DEFVAR_LISP ("enable-character-translation", Venable_character_translation, doc: /* *Non-nil enables character translation while encoding and decoding. */); Venable_character_translation = Qt; DEFVAR_LISP ("standard-translation-table-for-decode", - &Vstandard_translation_table_for_decode, + Vstandard_translation_table_for_decode, doc: /* Table for translating characters while decoding. */); Vstandard_translation_table_for_decode = Qnil; DEFVAR_LISP ("standard-translation-table-for-encode", - &Vstandard_translation_table_for_encode, + Vstandard_translation_table_for_encode, doc: /* Table for translating characters while encoding. */); Vstandard_translation_table_for_encode = Qnil; - DEFVAR_LISP ("charset-revision-table", &Vcharset_revision_table, + DEFVAR_LISP ("charset-revision-table", Vcharset_revision_table, doc: /* Alist of charsets vs revision numbers. While encoding, if a charset (car part of an element) is found, designate it with the escape sequence identifying revision (cdr part @@ -10724,13 +10661,13 @@ Vcharset_revision_table = Qnil; DEFVAR_LISP ("default-process-coding-system", - &Vdefault_process_coding_system, + Vdefault_process_coding_system, doc: /* Cons of coding systems used for process I/O by default. The car part is used for decoding a process output, the cdr part is used for encoding a text to be sent to a process. */); Vdefault_process_coding_system = Qnil; - DEFVAR_LISP ("latin-extra-code-table", &Vlatin_extra_code_table, + DEFVAR_LISP ("latin-extra-code-table", Vlatin_extra_code_table, doc: /* Table of extra Latin codes in the range 128..159 (inclusive). This is a vector of length 256. @@ -10743,7 +10680,7 @@ Vlatin_extra_code_table = Fmake_vector (make_number (256), Qnil); DEFVAR_LISP ("select-safe-coding-system-function", - &Vselect_safe_coding_system_function, + Vselect_safe_coding_system_function, doc: /* Function to call to select safe coding system for encoding a text. @@ -10757,7 +10694,7 @@ Vselect_safe_coding_system_function = Qnil; DEFVAR_BOOL ("coding-system-require-warning", - &coding_system_require_warning, + coding_system_require_warning, doc: /* Internal use only. If non-nil, on writing a file, `select-safe-coding-system-function' is called even if `coding-system-for-write' is non-nil. The command @@ -10766,7 +10703,7 @@ DEFVAR_BOOL ("inhibit-iso-escape-detection", - &inhibit_iso_escape_detection, + inhibit_iso_escape_detection, doc: /* If non-nil, Emacs ignores ISO-2022 escape sequences during code detection. @@ -10794,7 +10731,7 @@ inhibit_iso_escape_detection = 0; DEFVAR_BOOL ("inhibit-null-byte-detection", - &inhibit_null_byte_detection, + inhibit_null_byte_detection, doc: /* If non-nil, Emacs ignores null bytes on code detection. By default, Emacs treats it as binary data, and does not attempt to decode it. The effect is as if you specified `no-conversion' for @@ -10806,7 +10743,7 @@ decode text as usual. */); inhibit_null_byte_detection = 0; - DEFVAR_LISP ("translation-table-for-input", &Vtranslation_table_for_input, + DEFVAR_LISP ("translation-table-for-input", Vtranslation_table_for_input, doc: /* Char table for translating self-inserting characters. This is applied to the result of input methods, not their input. See also `keyboard-translate-table'.
--- a/src/coding.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/coding.h Wed Jan 19 13:54:19 2011 -0800 @@ -769,11 +769,6 @@ extern Lisp_Object Qtranslation_table; extern Lisp_Object Qtranslation_table_id; -/* Mnemonic strings to indicate each type of end-of-line. */ -extern Lisp_Object eol_mnemonic_unix, eol_mnemonic_dos, eol_mnemonic_mac; -/* Mnemonic string to indicate type of end-of-line is not yet decided. */ -extern Lisp_Object eol_mnemonic_undecided; - #ifdef emacs extern Lisp_Object Qfile_coding_system; extern Lisp_Object Qcall_process, Qcall_process_region; @@ -782,44 +777,10 @@ extern char *emacs_strerror (int); -/* Coding-system for reading files and receiving data from process. */ -extern Lisp_Object Vcoding_system_for_read; -/* Coding-system for writing files and sending data to process. */ -extern Lisp_Object Vcoding_system_for_write; -/* Coding-system actually used in the latest I/O. */ -extern Lisp_Object Vlast_coding_system_used; -/* Coding-system to use with system messages (e.g. strerror). */ -extern Lisp_Object Vlocale_coding_system; - -/* If non-zero, process buffer inherits the coding system used to decode - the subprocess output. */ -extern int inherit_process_coding_system; - /* Coding system to be used to encode text for terminal display when terminal coding system is nil. */ extern struct coding_system safe_terminal_coding; -/* Default coding systems used for process I/O. */ -extern Lisp_Object Vdefault_process_coding_system; - -/* Char table for translating Quail and self-inserting input. */ -extern Lisp_Object Vtranslation_table_for_input; - -/* Function to call to force a user to force select a propert coding - system. */ -extern Lisp_Object Vselect_safe_coding_system_function; - -/* If nonzero, on writing a file, Vselect_safe_coding_system_function - is called even if Vcoding_system_for_write is non-nil. */ -extern int coding_system_require_warning; - -/* Coding system for file names, or nil if none. */ -extern Lisp_Object Vfile_name_coding_system; - -/* Coding system for file names used only when - Vfile_name_coding_system is nil. */ -extern Lisp_Object Vdefault_file_name_coding_system; - #endif /* Error signaled when there's a problem with detecting coding system */
--- a/src/commands.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/commands.h Wed Jan 19 13:54:19 2011 -0800 @@ -28,42 +28,6 @@ extern Lisp_Object meta_map; extern Lisp_Object control_x_map; -extern Lisp_Object Vminibuffer_local_map; - -extern Lisp_Object Vminibuffer_local_ns_map; - -/* keymap used for minibuffers when doing completion */ -extern Lisp_Object Vminibuffer_local_completion_map; - -/* keymap used for minibuffers when doing completion in filenames*/ -extern Lisp_Object Vminibuffer_local_filename_completion_map; - -/* keymap used for minibuffers when doing completion and require a match */ -extern Lisp_Object Vminibuffer_local_must_match_map; - -/* keymap used for minibuffers when doing completion in filenames - and require a match */ -extern Lisp_Object Vminibuffer_local_filename_must_match_map; - -/* Last input event read as a command. */ -extern Lisp_Object last_command_event; - -/* Last input event read as a command, not counting menus - reached by the mouse. */ -extern Lisp_Object last_nonmenu_event; - -/* List of command events to be re-read, or Qnil. */ -extern Lisp_Object Vunread_command_events; - -/* Command char event to be re-read, or -1 if none. - Setting this is obsolete, but some things should still check it. */ -extern EMACS_INT unread_command_char; - -/* The command being executed by the command loop. - Commands may set this, and the value set will be copied into - current_kboard->Vlast_command instead of the actual command. */ -extern Lisp_Object Vthis_command; - /* If not Qnil, this is a switch-frame event which we decided to put off until the end of a key sequence. This should be read as the next command input, after any Vunread_command_events. @@ -85,8 +49,6 @@ /* Nonzero means ^G can quit instantly */ extern int immediate_quit; -extern Lisp_Object Vexecuting_kbd_macro; - /* Nonzero if input is coming from the keyboard */ #define INTERACTIVE (NILP (Vexecuting_kbd_macro) && !noninteractive) @@ -95,8 +57,3 @@ extern int update_mode_lines; -/* Nonzero means reading single-character input with prompt - so put cursor on minibuffer after the prompt. */ - -extern int cursor_in_echo_area; -
--- a/src/composite.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/composite.c Wed Jan 19 13:54:19 2011 -0800 @@ -153,15 +153,8 @@ COMPOSITION-ID. */ Lisp_Object composition_hash_table; -/* Function to call to adjust composition. */ -Lisp_Object Vcompose_chars_after_function; - Lisp_Object Qauto_composed; -Lisp_Object Vauto_composition_mode; -Lisp_Object Vauto_composition_function; Lisp_Object Qauto_composition_function; -Lisp_Object Vcomposition_function_table; - /* Maximum number of characters to look back for auto-compositions. */ #define MAX_AUTO_COMPOSITION_LOOKBACK 3 @@ -1964,7 +1957,7 @@ Vtext_property_default_nonsticky = Fcons (Fcons (Qcomposition, Qt), Vtext_property_default_nonsticky); - DEFVAR_LISP ("compose-chars-after-function", &Vcompose_chars_after_function, + DEFVAR_LISP ("compose-chars-after-function", Vcompose_chars_after_function, doc: /* Function to adjust composition of buffer text. This function is called with three arguments: FROM, TO, and OBJECT. @@ -1984,12 +1977,12 @@ Qauto_composition_function = intern_c_string ("auto-composition-function"); staticpro (&Qauto_composition_function); - DEFVAR_LISP ("auto-composition-mode", &Vauto_composition_mode, + DEFVAR_LISP ("auto-composition-mode", Vauto_composition_mode, doc: /* Non-nil if Auto-Composition mode is enabled. Use the command `auto-composition-mode' to change this variable. */); Vauto_composition_mode = Qt; - DEFVAR_LISP ("auto-composition-function", &Vauto_composition_function, + DEFVAR_LISP ("auto-composition-function", Vauto_composition_function, doc: /* Function to call to compose characters automatically. This function is called from the display routine with four arguments: FROM, TO, WINDOW, and STRING. @@ -2002,7 +1995,7 @@ string. */); Vauto_composition_function = Qnil; - DEFVAR_LISP ("composition-function-table", &Vcomposition_function_table, + DEFVAR_LISP ("composition-function-table", Vcomposition_function_table, doc: /* Char-table of functions for automatic character composition. For each character that has to be composed automatically with preceding and/or following characters, this char-table contains
--- a/src/composite.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/composite.h Wed Jan 19 13:54:19 2011 -0800 @@ -208,10 +208,7 @@ extern Lisp_Object Qcomposition; extern Lisp_Object composition_hash_table; extern Lisp_Object Qauto_composed; -extern Lisp_Object Vauto_composition_function; extern Lisp_Object Qauto_composition_function; -extern Lisp_Object Vcomposition_function_table; - extern int get_composition_id (EMACS_INT, EMACS_INT, EMACS_INT, Lisp_Object, Lisp_Object); extern int find_composition (EMACS_INT, EMACS_INT, EMACS_INT *, EMACS_INT *,
--- a/src/config.in Sun Jan 16 23:45:28 2011 -0800 +++ b/src/config.in Wed Jan 19 13:54:19 2011 -0800 @@ -27,12 +27,13 @@ #define EMACS_CONFIG_H +/* Define if the compiler is building for multiple architectures of Apple + platforms at once. */ +#undef AA_APPLE_UNIVERSAL_BUILD + /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD -/* Define to 1 if the mktime function is broken. */ -#undef BROKEN_MKTIME - /* Define if Emacs cannot be dumped on your system. */ #undef CANNOT_DUMP @@ -86,6 +87,15 @@ /* Define to 1 if gettimeofday accepts only one argument. */ #undef GETTIMEOFDAY_ONE_ARGUMENT +/* Define to 1 when the gnulib module getopt-gnu should be tested. */ +#undef GNULIB_TEST_GETOPT_GNU + +/* Define to 1 when the gnulib module mktime should be tested. */ +#undef GNULIB_TEST_MKTIME + +/* Define to 1 when the gnulib module time_r should be tested. */ +#undef GNULIB_TEST_TIME_R + /* Define to 1 if you want to use the GNU memory allocator. */ #undef GNU_MALLOC @@ -105,6 +115,12 @@ /* Define to 1 if ALSA is available. */ #undef HAVE_ALSA +/* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */ +#undef HAVE_ATTRIBUTE_ALIGNED + +/* Define to 1 if strtold conforms to C99. */ +#undef HAVE_C99_STRTOLD + /* Define to 1 if you have the `cbrt' function. */ #undef HAVE_CBRT @@ -132,6 +148,22 @@ /* Define to 1 if you have the `dbus_watch_get_unix_fd' function. */ #undef HAVE_DBUS_WATCH_GET_UNIX_FD +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#undef HAVE_DECL_GETENV + +/* Define to 1 if you have the declaration of `getopt_clip', and to 0 if you + don't. */ +#undef HAVE_DECL_GETOPT_CLIP + +/* Define to 1 if you have the declaration of `localtime_r', and to 0 if you + don't. */ +#undef HAVE_DECL_LOCALTIME_R + +/* Define to 1 if you have the declaration of `optreset', and to 0 if you + don't. */ +#undef HAVE_DECL_OPTRESET + /* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you don't. */ #undef HAVE_DECL_SYS_SIGLIST @@ -426,6 +458,9 @@ /* Define to 1 if you have the <locale.h> header file. */ #undef HAVE_LOCALE_H +/* Define to 1 if you have the `localtime_r' function. */ +#undef HAVE_LOCALTIME_R + /* Define to 1 if you have the `logb' function. */ #undef HAVE_LOGB @@ -494,9 +529,6 @@ /* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP -/* Define to 1 if you have the `mktime' function. */ -#undef HAVE_MKTIME - /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP @@ -546,6 +578,123 @@ /* Define to 1 if you have the `random' function. */ #undef HAVE_RANDOM +/* Define to 1 if chown is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CHOWN + +/* Define to 1 if dup2 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_DUP2 + +/* Define to 1 if dup3 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_DUP3 + +/* Define to 1 if endusershell is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ENDUSERSHELL + +/* Define to 1 if environ is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ENVIRON + +/* Define to 1 if euidaccess is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EUIDACCESS + +/* Define to 1 if faccessat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FACCESSAT + +/* Define to 1 if fchdir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FCHDIR + +/* Define to 1 if fchownat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FCHOWNAT + +/* Define to 1 if fsync is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FSYNC + +/* Define to 1 if ftruncate is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FTRUNCATE + +/* Define to 1 if getcwd is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETCWD + +/* Define to 1 if getdomainname is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETDOMAINNAME + +/* Define to 1 if getdtablesize is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETDTABLESIZE + +/* Define to 1 if getgroups is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETGROUPS + +/* Define to 1 if gethostname is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETHOSTNAME + +/* Define to 1 if getlogin is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETLOGIN + +/* Define to 1 if getlogin_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETLOGIN_R + +/* Define to 1 if getpagesize is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETPAGESIZE + +/* Define to 1 if getusershell is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETUSERSHELL + +/* Define to 1 if lchown is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LCHOWN + +/* Define to 1 if link is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LINK + +/* Define to 1 if linkat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LINKAT + +/* Define to 1 if lseek is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LSEEK + +/* Define to 1 if pipe is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PIPE + +/* Define to 1 if pipe2 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PIPE2 + +/* Define to 1 if pread is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PREAD + +/* Define to 1 if pwrite is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PWRITE + +/* Define to 1 if readlink is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_READLINK + +/* Define to 1 if readlinkat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_READLINKAT + +/* Define to 1 if rmdir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RMDIR + +/* Define to 1 if setusershell is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SETUSERSHELL + +/* Define to 1 if sleep is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SLEEP + +/* Define to 1 if symlink is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SYMLINK + +/* Define to 1 if symlinkat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SYMLINKAT + +/* Define to 1 if ttyname_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TTYNAME_R + +/* Define to 1 if unlink is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_UNLINK + +/* Define to 1 if unlinkat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_UNLINKAT + +/* Define to 1 if usleep is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_USLEEP + /* Define to 1 if you have the `recvfrom' function. */ #undef HAVE_RECVFROM @@ -603,6 +752,9 @@ /* Define to 1 if `speed_t' is declared by <termios.h>. */ #undef HAVE_SPEED_T +/* Define to 1 if you have the <stddef.h> header file. */ +#undef HAVE_STDDEF_H + /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H @@ -717,6 +869,9 @@ /* Define to 1 if `struct timeval' is declared by <sys/time.h>. */ #undef HAVE_TIMEVAL +/* Define to 1 if you have the <time.h> header file. */ +#undef HAVE_TIME_H + /* Define to 1 if `tm_gmtoff' is member of `struct tm'. */ #undef HAVE_TM_GMTOFF @@ -758,6 +913,9 @@ /* Define to 1 if you have the <vfork.h> header file. */ #undef HAVE_VFORK_H +/* Define if you have the 'wchar_t' type. */ +#undef HAVE_WCHAR_T + /* Define if you have a window system. */ #undef HAVE_WINDOW_SYSTEM @@ -862,6 +1020,9 @@ /* Define to 1 if you don't have struct exception in math.h. */ #undef NO_MATHERR +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O + /* Define to 1 if `NSInteger' is defined. */ #undef NS_HAVE_NSINTEGER @@ -874,6 +1035,9 @@ /* Define if the C compiler is the linker. */ #undef ORDINARY_LINK +/* Name of package */ +#undef PACKAGE + /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT @@ -957,28 +1121,6 @@ /* Define to 1 if using the Motif X toolkit. */ #undef USE_MOTIF -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - /* Define to 1 if we should use toolkit scroll bars. */ #undef USE_TOOLKIT_SCROLL_BARS @@ -988,6 +1130,9 @@ /* Define to 1 if using an X toolkit. */ #undef USE_X_TOOLKIT +/* Version number of package */ +#undef VERSION + /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD @@ -1026,6 +1171,31 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE +/* Define to 500 only on HP-UX. */ +#undef _XOPEN_SOURCE + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + /* Define to rpl_ if the getopt replacement functions and variables should be used. */ #undef __GETOPT_PREFIX @@ -1033,10 +1203,6 @@ /* Define like PROTOTYPES; this can be used by system headers. */ #undef __PROTOTYPES -/* Define to compiler's equivalent of C99 restrict keyword. Don't define if - equivalent is `__restrict'. */ -#undef __restrict - /* Define to compiler's equivalent of C99 restrict keyword in array declarations. Define as empty for no equivalent. */ #undef __restrict_arr @@ -1050,18 +1216,61 @@ /* Define to empty if `const' does not conform to ANSI C. */ #undef const +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports + the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of + earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. + __APPLE__ && __MACH__ test for MacOS X. + __APPLE_CC__ tests for the Apple compiler and its version. + __STDC_VERSION__ tests for the C99 mode. */ +#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ +# define __GNUC_STDC_INLINE__ 1 +#endif + /* Define to a type if <wchar.h> does not define. */ #undef mbstate_t /* Define to `int' if <sys/types.h> does not define. */ #undef pid_t +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#undef restrict +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +# define __restrict__ +#endif + /* Define to `unsigned int' if <sys/types.h> does not define. */ #undef size_t /* Define to any substitute for sys_siglist. */ #undef sys_siglist +/* Define as a marker that can be attached to declarations that might not + be used. This helps to reduce warnings, such as from + GCC -Wunused-parameter. */ +#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED __attribute__ ((__unused__)) +#else +# define _GL_UNUSED +#endif +/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name + is a misnomer outside of parameter lists. */ +#define _UNUSED_PARAMETER_ _GL_UNUSED + + /* Define as `fork' if `vfork' does not work. */ #undef vfork @@ -1126,11 +1335,6 @@ #endif #endif -/* Avoid link-time collision with system mktime if we will use our own. */ -#if ! HAVE_MKTIME || BROKEN_MKTIME -#define mktime emacs_mktime -#endif - #define my_strftime nstrftime /* for strftime.c */ /* These default definitions are good for almost all machines.
--- a/src/data.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/data.c Wed Jan 19 13:54:19 2011 -0800 @@ -94,8 +94,6 @@ static void swap_in_symval_forwarding (struct Lisp_Symbol *, struct Lisp_Buffer_Local_Value *); -Lisp_Object Vmost_positive_fixnum, Vmost_negative_fixnum; - void circular_list_error (Lisp_Object list) @@ -2375,7 +2373,7 @@ if (FLOATP (number)) { - char pigbuf[350]; /* see comments in float_to_string */ + char pigbuf[FLOAT_TO_STRING_BUFSIZE]; float_to_string (pigbuf, XFLOAT_DATA (number)); return build_string (pigbuf); @@ -3300,12 +3298,12 @@ XSYMBOL (Qwholenump)->function = XSYMBOL (Qnatnump)->function; - DEFVAR_LISP ("most-positive-fixnum", &Vmost_positive_fixnum, + DEFVAR_LISP ("most-positive-fixnum", Vmost_positive_fixnum, doc: /* The largest value that is representable in a Lisp integer. */); Vmost_positive_fixnum = make_number (MOST_POSITIVE_FIXNUM); XSYMBOL (intern_c_string ("most-positive-fixnum"))->constant = 1; - DEFVAR_LISP ("most-negative-fixnum", &Vmost_negative_fixnum, + DEFVAR_LISP ("most-negative-fixnum", Vmost_negative_fixnum, doc: /* The smallest value that is representable in a Lisp integer. */); Vmost_negative_fixnum = make_number (MOST_NEGATIVE_FIXNUM); XSYMBOL (intern_c_string ("most-negative-fixnum"))->constant = 1;
--- a/src/dbusbind.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/dbusbind.c Wed Jan 19 13:54:19 2011 -0800 @@ -75,15 +75,6 @@ Lisp_Object QCdbus_type_array, QCdbus_type_variant; Lisp_Object QCdbus_type_struct, QCdbus_type_dict_entry; -/* Registered buses. */ -Lisp_Object Vdbus_registered_buses; - -/* Hash table which keeps function definitions. */ -Lisp_Object Vdbus_registered_objects_table; - -/* Whether to debug D-Bus. */ -Lisp_Object Vdbus_debug; - /* Whether we are reading a D-Bus event. */ int xd_in_read_queued_messages = 0; @@ -2301,12 +2292,12 @@ staticpro (&QCdbus_type_dict_entry); DEFVAR_LISP ("dbus-registered-buses", - &Vdbus_registered_buses, + Vdbus_registered_buses, doc: /* List of D-Bus buses we are polling for messages. */); Vdbus_registered_buses = Qnil; DEFVAR_LISP ("dbus-registered-objects-table", - &Vdbus_registered_objects_table, + Vdbus_registered_objects_table, doc: /* Hash table of registered functions for D-Bus. There are two different uses of the hash table: for accessing @@ -2343,7 +2334,7 @@ Vdbus_registered_objects_table = Fmake_hash_table (2, args); } - DEFVAR_LISP ("dbus-debug", &Vdbus_debug, + DEFVAR_LISP ("dbus-debug", Vdbus_debug, doc: /* If non-nil, debug messages of D-Bus bindings are raised. */); #ifdef DBUS_DEBUG Vdbus_debug = Qt;
--- a/src/deps.mk Sun Jan 16 23:45:28 2011 -0800 +++ b/src/deps.mk Wed Jan 19 13:54:19 2011 -0800 @@ -138,7 +138,6 @@ minibuf.o: minibuf.c syntax.h frame.h window.h keyboard.h systime.h \ buffer.h commands.h character.h msdos.h $(INTERVALS_H) keymap.h \ termhooks.h lisp.h $(config_h) coding.h -mktime.o: mktime.c $(config_h) msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \ termopts.h termchar.h character.h coding.h ccl.h disptab.h window.h \ keyboard.h $(INTERVALS_H) buffer.h commands.h blockinput.h atimer.h \
--- a/src/dired.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/dired.c Wed Jan 19 13:54:19 2011 -0800 @@ -31,10 +31,7 @@ #include <grp.h> #include <errno.h> - -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif /* The d_nameln member of a struct dirent includes the '\0' character on some systems, but not on others. What's worse, you can't tell @@ -96,9 +93,6 @@ #define lstat stat #endif -extern Lisp_Object Vw32_get_true_file_attributes; - -Lisp_Object Vcompletion_ignored_extensions; Lisp_Object Qdirectory_files; Lisp_Object Qdirectory_files_and_attributes; Lisp_Object Qfile_name_completion; @@ -1098,7 +1092,7 @@ defsubr (&Sfile_attributes); defsubr (&Sfile_attributes_lessp); - DEFVAR_LISP ("completion-ignored-extensions", &Vcompletion_ignored_extensions, + DEFVAR_LISP ("completion-ignored-extensions", Vcompletion_ignored_extensions, doc: /* Completion ignores file names ending in any string in this list. It does not ignore them if all possible completions end in one of these strings or when displaying a list of completions.
--- a/src/dispextern.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/dispextern.h Wed Jan 19 13:54:19 2011 -0800 @@ -1145,12 +1145,6 @@ extern struct glyph_row *updated_row; extern int updated_area; -/* Non-zero means reading single-character input with prompt so put - cursor on mini-buffer after the prompt. Positive means at end of - text in echo area; negative means at beginning of line. */ - -extern int cursor_in_echo_area; - /* Non-zero means last display completed. Zero means it was preempted. */ @@ -2914,23 +2908,8 @@ TOOL_BAR_IMAGE_DISABLED_DESELECTED }; -/* Margin around tool-bar buttons in pixels. */ - -extern Lisp_Object Vtool_bar_button_margin; - -/* Tool bar style */ - -extern Lisp_Object Vtool_bar_style; - -/* Maximum number of characters a label can have to be shown. */ - -extern EMACS_INT tool_bar_max_label_size; #define DEFAULT_TOOL_BAR_LABEL_SIZE 14 -/* Thickness of relief to draw around tool-bar buttons. */ - -extern EMACS_INT tool_bar_button_relief; - /* Default values of the above variables. */ #define DEFAULT_TOOL_BAR_BUTTON_MARGIN 4 @@ -3020,8 +2999,6 @@ int frame_mode_line_height (struct frame *); void highlight_trailing_whitespace (struct frame *, struct glyph_row *); extern Lisp_Object Qtool_bar; -extern Lisp_Object Vshow_trailing_whitespace; -extern int mode_line_in_non_selected_windows; extern int redisplaying_p; extern int help_echo_showing_p; extern int current_mode_line_height, current_header_line_height; @@ -3030,11 +3007,6 @@ extern EMACS_INT help_echo_pos; extern struct frame *last_mouse_frame; extern int last_tool_bar_item; -extern Lisp_Object Vmouse_autoselect_window; -extern int unibyte_display_via_language_environment; -extern EMACS_INT underline_minimum_offset; -extern Lisp_Object Vglyphless_char_display; - extern void reseat_at_previous_visible_line_start (struct it *); extern Lisp_Object lookup_glyphless_char_display (int, struct it *); extern int calc_pixel_width_or_height (double *, struct it *, Lisp_Object, @@ -3054,7 +3026,6 @@ extern void x_insert_glyphs (struct glyph *, int len); extern void x_clear_end_of_line (int); -extern int x_stretch_cursor_p; extern struct cursor_pos output_cursor; extern void x_fix_overlapping_area (struct window *, struct glyph_row *, @@ -3105,9 +3076,6 @@ #define TRY_WINDOW_CHECK_MARGINS (1 << 0) #define TRY_WINDOW_IGNORE_FONTS_CHANGE (1 << 1) -/* Defined in fringe.c */ - -extern Lisp_Object Voverflow_newline_into_fringe; int lookup_fringe_bitmap (Lisp_Object); void draw_fringe_bitmap (struct window *, struct glyph_row *, int); void draw_row_fringe_bitmaps (struct window *, struct glyph_row *); @@ -3213,8 +3181,6 @@ extern Lisp_Object Qframe_set_background_mode; extern char unspecified_fg[], unspecified_bg[]; -extern Lisp_Object Vface_remapping_alist; - /* Defined in xfns.c */ #ifdef HAVE_X_WINDOWS @@ -3235,7 +3201,6 @@ extern void start_hourglass (void); extern void cancel_hourglass (void); extern int hourglass_started (void); -extern int display_hourglass_p; extern int hourglass_shown_p; struct atimer; /* Defined in atimer.h. */ /* If non-null, an asynchronous timer that, when it expires, displays @@ -3271,9 +3236,6 @@ int popup_activated (void); -/* Defined in dispnew.c */ - -extern int inverse_video; extern Lisp_Object buffer_posn_from_coords (struct window *, int *, int *, struct display_pos *,
--- a/src/dispnew.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/dispnew.c Wed Jan 19 13:54:19 2011 -0800 @@ -23,10 +23,7 @@ #include <stdio.h> #include <ctype.h> #include <setjmp.h> - -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #include "lisp.h" #include "termchar.h" @@ -173,12 +170,6 @@ static void adjust_frame_glyphs_for_frame_redisplay (struct frame *); -/* Non-zero means don't pause redisplay for pending input. (This is - for debugging and for a future implementation of EDT-like - scrolling. */ - -int redisplay_dont_pause; - /* Define PERIODIC_PREEMPTION_CHECKING to 1, if micro-second timers are supported, so we can check for input during redisplay at regular intervals. */ @@ -190,10 +181,6 @@ #if PERIODIC_PREEMPTION_CHECKING -/* If a number (float), check for user input every N seconds. */ - -Lisp_Object Vredisplay_preemption_period; - /* Redisplay preemption timers. */ static EMACS_TIME preemption_period; @@ -210,49 +197,6 @@ int display_completed; -/* Lisp variable visible-bell; enables use of screen-flash instead of - audible bell. */ - -int visible_bell; - -/* Invert the color of the whole frame, at a low level. */ - -int inverse_video; - -/* Line speed of the terminal. */ - -EMACS_INT baud_rate; - -/* Either nil or a symbol naming the window system under which Emacs - creates the first frame. */ - -Lisp_Object Vinitial_window_system; - -/* Version number of X windows: 10, 11 or nil. */ - -Lisp_Object Vwindow_system_version; - -/* Vector of glyph definitions. Indexed by glyph number, the contents - are a string which is how to output the glyph. - - If Vglyph_table is nil, a glyph is output by using its low 8 bits - as a character code. - - This is an obsolete feature that is no longer used. The variable - is retained for compatibility. */ - -Lisp_Object Vglyph_table; - -/* Display table to use for vectors that don't specify their own. */ - -Lisp_Object Vstandard_display_table; - -/* Nonzero means reading single-character input with prompt so put - cursor on mini-buffer after the prompt. Positive means at end of - text in echo area; negative means at beginning of line. */ - -int cursor_in_echo_area; - Lisp_Object Qdisplay_table, Qredisplay_dont_pause; @@ -6559,27 +6503,27 @@ Qredisplay_dont_pause = intern_c_string ("redisplay-dont-pause"); staticpro (&Qredisplay_dont_pause); - DEFVAR_INT ("baud-rate", &baud_rate, + DEFVAR_INT ("baud-rate", baud_rate, doc: /* *The output baud rate of the terminal. On most systems, changing this value will affect the amount of padding and the other strategic decisions made during redisplay. */); - DEFVAR_BOOL ("inverse-video", &inverse_video, + DEFVAR_BOOL ("inverse-video", inverse_video, doc: /* *Non-nil means invert the entire frame display. This means everything is in inverse video which otherwise would not be. */); - DEFVAR_BOOL ("visible-bell", &visible_bell, + DEFVAR_BOOL ("visible-bell", visible_bell, doc: /* *Non-nil means try to flash the frame to represent a bell. See also `ring-bell-function'. */); - DEFVAR_BOOL ("no-redraw-on-reenter", &no_redraw_on_reenter, + DEFVAR_BOOL ("no-redraw-on-reenter", no_redraw_on_reenter, doc: /* *Non-nil means no need to redraw entire frame after suspending. A non-nil value is useful if the terminal can automatically preserve Emacs's frame display when you reenter Emacs. It is up to you to set this variable if your terminal can do that. */); - DEFVAR_LISP ("initial-window-system", &Vinitial_window_system, + DEFVAR_LISP ("initial-window-system", Vinitial_window_system, doc: /* Name of the window system that Emacs uses for the first frame. The value is a symbol: nil for a termcap frame (a character-only terminal), @@ -6605,14 +6549,14 @@ use `display-graphic-p' or any of the other `display-*-p' predicates which report frame's specific UI-related capabilities. */); - DEFVAR_LISP ("window-system-version", &Vwindow_system_version, + DEFVAR_LISP ("window-system-version", Vwindow_system_version, doc: /* The version number of the window system in use. For X windows, this is 11. */); - DEFVAR_BOOL ("cursor-in-echo-area", &cursor_in_echo_area, + DEFVAR_BOOL ("cursor-in-echo-area", cursor_in_echo_area, doc: /* Non-nil means put cursor in minibuffer, at end of any message there. */); - DEFVAR_LISP ("glyph-table", &Vglyph_table, + DEFVAR_LISP ("glyph-table", Vglyph_table, doc: /* Table defining how to output a glyph code to the frame. If not nil, this is a vector indexed by glyph code to define the glyph. Each element can be: @@ -6623,17 +6567,17 @@ while outputting it. */); Vglyph_table = Qnil; - DEFVAR_LISP ("standard-display-table", &Vstandard_display_table, + DEFVAR_LISP ("standard-display-table", Vstandard_display_table, doc: /* Display table to use for buffers that specify none. See `buffer-display-table' for more information. */); Vstandard_display_table = Qnil; - DEFVAR_BOOL ("redisplay-dont-pause", &redisplay_dont_pause, + DEFVAR_BOOL ("redisplay-dont-pause", redisplay_dont_pause, doc: /* *Non-nil means update isn't paused when input is detected. */); redisplay_dont_pause = 0; #if PERIODIC_PREEMPTION_CHECKING - DEFVAR_LISP ("redisplay-preemption-period", &Vredisplay_preemption_period, + DEFVAR_LISP ("redisplay-preemption-period", Vredisplay_preemption_period, doc: /* *The period in seconds between checking for input during redisplay. If input is detected, redisplay is pre-empted, and the input is processed. If nil, never pre-empt redisplay. */);
--- a/src/disptab.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/disptab.h Wed Jan 19 13:54:19 2011 -0800 @@ -49,16 +49,9 @@ /* Defined in indent.c. */ extern struct Lisp_Char_Table *buffer_display_table (void); -/* Display table to use for vectors that don't specify their own. */ -extern Lisp_Object Vstandard_display_table; - /* This is the `purpose' slot of a display table. */ extern Lisp_Object Qdisplay_table; -/* Vector of GLYPH definitions. Indexed by GLYPH number, - the contents are a string which is how to output the GLYPH. */ -extern Lisp_Object Vglyph_table; - /* Return the current length of the GLYPH table, or 0 if the table isn't currently valid. */ #define GLYPH_TABLE_LENGTH \
--- a/src/doc.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/doc.c Wed Jan 19 13:54:19 2011 -0800 @@ -26,10 +26,7 @@ #include <ctype.h> #include <setjmp.h> #include <fcntl.h> - -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #include "lisp.h" #include "buffer.h" @@ -38,13 +35,8 @@ #include "keymap.h" #include "buildobj.h" -Lisp_Object Vdoc_file_name; - Lisp_Object Qfunction_documentation; -/* A list of files used to build this Emacs binary. */ -static Lisp_Object Vbuild_files; - /* Buffer used for reading from documentation file. */ static char *get_doc_string_buffer; static int get_doc_string_buffer_size; @@ -933,11 +925,11 @@ Qfunction_documentation = intern_c_string ("function-documentation"); staticpro (&Qfunction_documentation); - DEFVAR_LISP ("internal-doc-file-name", &Vdoc_file_name, + DEFVAR_LISP ("internal-doc-file-name", Vdoc_file_name, doc: /* Name of file containing documentation strings of built-in symbols. */); Vdoc_file_name = Qnil; - DEFVAR_LISP ("build-files", &Vbuild_files, + DEFVAR_LISP ("build-files", Vbuild_files, doc: /* A list of files used to build this Emacs binary. */); Vbuild_files = Qnil;
--- a/src/doprnt.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/doprnt.c Wed Jan 19 13:54:19 2011 -0800 @@ -29,9 +29,7 @@ #include <float.h> #endif -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #include "lisp.h"
--- a/src/dosfns.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/dosfns.c Wed Jan 19 13:54:19 2011 -0800 @@ -227,12 +227,6 @@ return Qt; } -/* country info */ -EMACS_INT dos_country_code; -EMACS_INT dos_codepage; -EMACS_INT dos_timezone_offset; -EMACS_INT dos_decimal_point; -EMACS_INT dos_keyboard_layout; unsigned char dos_country_info[DOS_COUNTRY_INFO]; static unsigned char usa_country_info[DOS_COUNTRY_INFO] = { 0, 0, /* date format */ @@ -249,17 +243,8 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* reserved */ }; -EMACS_INT dos_hyper_key; -EMACS_INT dos_super_key; -EMACS_INT dos_keypad_mode; - -Lisp_Object Vdos_version; -Lisp_Object Vdos_display_scancodes; - #ifndef HAVE_X_WINDOWS static unsigned dos_windows_version; -Lisp_Object Vdos_windows_version; - char parent_vm_title[50]; /* Ralf Brown says 30 is enough */ int w95_set_virtual_machine_title (const char *); @@ -697,11 +682,11 @@ defsubr (&Smsdos_mouse_p); #endif - DEFVAR_INT ("dos-country-code", &dos_country_code, + DEFVAR_INT ("dos-country-code", dos_country_code, doc: /* The country code returned by Dos when Emacs was started. Usually this is the international telephone prefix. */); - DEFVAR_INT ("dos-codepage", &dos_codepage, + DEFVAR_INT ("dos-codepage", dos_codepage, doc: /* The codepage active when Emacs was started. The following are known: 437 United States @@ -713,19 +698,19 @@ 863 Canada (French) 865 Norway/Denmark */); - DEFVAR_INT ("dos-timezone-offset", &dos_timezone_offset, + DEFVAR_INT ("dos-timezone-offset", dos_timezone_offset, doc: /* The current timezone offset to UTC in minutes. Implicitly modified when the TZ variable is changed. */); - DEFVAR_LISP ("dos-version", &Vdos_version, + DEFVAR_LISP ("dos-version", Vdos_version, doc: /* The (MAJOR . MINOR) Dos version (subject to modification with setver). */); #ifndef HAVE_X_WINDOWS - DEFVAR_LISP ("dos-windows-version", &Vdos_windows_version, + DEFVAR_LISP ("dos-windows-version", Vdos_windows_version, doc: /* The (MAJOR . MINOR) Windows version for DOS session on MS-Windows. */); #endif - DEFVAR_LISP ("dos-display-scancodes", &Vdos_display_scancodes, + DEFVAR_LISP ("dos-display-scancodes", Vdos_display_scancodes, doc: /* *Controls whether DOS raw keyboard events are displayed as you type. When non-nil, the keyboard scan-codes are displayed at the bottom right corner of the display (typically at the end of the mode line). @@ -733,17 +718,17 @@ Vdos_display_scancodes = Qnil; - DEFVAR_INT ("dos-hyper-key", &dos_hyper_key, + DEFVAR_INT ("dos-hyper-key", dos_hyper_key, doc: /* *If set to 1, use right ALT key as hyper key. If set to 2, use right CTRL key as hyper key. */); dos_hyper_key = 0; - DEFVAR_INT ("dos-super-key", &dos_super_key, + DEFVAR_INT ("dos-super-key", dos_super_key, doc: /* *If set to 1, use right ALT key as super key. If set to 2, use right CTRL key as super key. */); dos_super_key = 0; - DEFVAR_INT ("dos-keypad-mode", &dos_keypad_mode, + DEFVAR_INT ("dos-keypad-mode", dos_keypad_mode, doc: /* *Controls what key code is returned by a key in the numeric keypad. The `numlock ON' action is only taken if no modifier keys are pressed. The value is an integer constructed by adding the following bits together: @@ -767,12 +752,12 @@ 0x200 ALT-0..ALT-9 in top-row produces shifted codes. */); dos_keypad_mode = 0x75; - DEFVAR_INT ("dos-keyboard-layout", &dos_keyboard_layout, + DEFVAR_INT ("dos-keyboard-layout", dos_keyboard_layout, doc: /* Contains the country code for the current keyboard layout. Use msdos-set-keyboard to select another keyboard layout. */); dos_keyboard_layout = 1; /* US */ - DEFVAR_INT ("dos-decimal-point", &dos_decimal_point, + DEFVAR_INT ("dos-decimal-point", dos_decimal_point, doc: /* The character to produce when kp-decimal key is pressed. If non-zero, this variable contains the character to be returned when the decimal point key in the numeric keypad is pressed when Num Lock is on.
--- a/src/dosfns.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/dosfns.h Wed Jan 19 13:54:19 2011 -0800 @@ -20,24 +20,10 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ -extern EMACS_INT dos_hyper_key; -extern EMACS_INT dos_super_key; -extern EMACS_INT dos_decimal_point; -extern EMACS_INT dos_keypad_mode; - -extern EMACS_INT dos_keyboard_layout; -extern EMACS_INT dos_country_code; -extern EMACS_INT dos_codepage; -extern EMACS_INT dos_timezone_offset; - #define DOS_COUNTRY_INFO 34 /* no of bytes returned by dos int 38h */ extern unsigned char dos_country_info[DOS_COUNTRY_INFO]; -extern Lisp_Object Vdos_version; -extern Lisp_Object Vdos_windows_version; #ifndef HAVE_X_WINDOWS -extern Lisp_Object Vdos_display_scancodes; - extern int msdos_stdcolor_idx (const char *); extern Lisp_Object msdos_stdcolor_name (int); extern void x_set_title (struct frame *, Lisp_Object);
--- a/src/editfns.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/editfns.c Wed Jan 19 13:54:19 2011 -0800 @@ -29,9 +29,7 @@ #include <pwd.h> #endif -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #ifdef HAVE_SYS_UTSNAME_H #include <sys/utsname.h> @@ -110,24 +108,9 @@ static void transpose_markers (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT); -Lisp_Object Vbuffer_access_fontify_functions; Lisp_Object Qbuffer_access_fontify_functions; -Lisp_Object Vbuffer_access_fontified_property; - Lisp_Object Fuser_full_name (Lisp_Object); -/* Non-nil means don't stop at field boundary in text motion commands. */ - -Lisp_Object Vinhibit_field_text_motion; - -/* Some static data, and a function to initialize it for each run */ - -Lisp_Object Vsystem_name; -Lisp_Object Vuser_real_login_name; /* login name of current user ID */ -Lisp_Object Vuser_full_name; /* full name of current user */ -Lisp_Object Vuser_login_name; /* user name from LOGNAME or USER */ -Lisp_Object Voperating_system_release; /* Operating System Release */ - /* Symbol for the text property used to mark fields. */ Lisp_Object Qfield; @@ -4557,12 +4540,12 @@ = intern_c_string ("buffer-access-fontify-functions"); staticpro (&Qbuffer_access_fontify_functions); - DEFVAR_LISP ("inhibit-field-text-motion", &Vinhibit_field_text_motion, + DEFVAR_LISP ("inhibit-field-text-motion", Vinhibit_field_text_motion, doc: /* Non-nil means text motion commands don't notice fields. */); Vinhibit_field_text_motion = Qnil; DEFVAR_LISP ("buffer-access-fontify-functions", - &Vbuffer_access_fontify_functions, + Vbuffer_access_fontify_functions, doc: /* List of functions called by `buffer-substring' to fontify if necessary. Each function is called with two arguments which specify the range of the buffer being accessed. */); @@ -4580,25 +4563,25 @@ } DEFVAR_LISP ("buffer-access-fontified-property", - &Vbuffer_access_fontified_property, + Vbuffer_access_fontified_property, doc: /* Property which (if non-nil) indicates text has been fontified. `buffer-substring' need not call the `buffer-access-fontify-functions' functions if all the text being accessed has this property. */); Vbuffer_access_fontified_property = Qnil; - DEFVAR_LISP ("system-name", &Vsystem_name, + DEFVAR_LISP ("system-name", Vsystem_name, doc: /* The host name of the machine Emacs is running on. */); - DEFVAR_LISP ("user-full-name", &Vuser_full_name, + DEFVAR_LISP ("user-full-name", Vuser_full_name, doc: /* The full name of the user logged in. */); - DEFVAR_LISP ("user-login-name", &Vuser_login_name, + DEFVAR_LISP ("user-login-name", Vuser_login_name, doc: /* The user's name, taken from environment variables if possible. */); - DEFVAR_LISP ("user-real-login-name", &Vuser_real_login_name, + DEFVAR_LISP ("user-real-login-name", Vuser_real_login_name, doc: /* The user's name, based upon the real uid only. */); - DEFVAR_LISP ("operating-system-release", &Voperating_system_release, + DEFVAR_LISP ("operating-system-release", Voperating_system_release, doc: /* The release of the operating system Emacs is running on. */); defsubr (&Spropertize);
--- a/src/emacs.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/emacs.c Wed Jan 19 13:54:19 2011 -0800 @@ -28,10 +28,7 @@ #include <sys/types.h> #include <sys/file.h> #include <setjmp.h> - -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #ifdef WINDOWSNT #include <fcntl.h> @@ -122,32 +119,9 @@ least one symbol with that type, and then xbacktrace could fail. */ enum pvec_type gdb_pvec_type EXTERNALLY_VISIBLE = PVEC_TYPE_MASK; -/* Command line args from shell, as list of strings. */ -Lisp_Object Vcommand_line_args; - -/* The name under which Emacs was invoked, with any leading directory - names discarded. */ -Lisp_Object Vinvocation_name; - -/* The directory name from which Emacs was invoked. */ -Lisp_Object Vinvocation_directory; - -/* The directory name in which to find subdirs such as lisp and etc. - nil means get them only from PATH_LOADSEARCH. */ -Lisp_Object Vinstallation_directory; - -/* The values of `current-time' before and after Emacs initialization. */ -Lisp_Object Vbefore_init_time, Vafter_init_time; - -/* Hook run by `kill-emacs' before it does really anything. */ -Lisp_Object Vkill_emacs_hook; - /* Empty lisp strings. To avoid having to build any others. */ Lisp_Object empty_unibyte_string, empty_multibyte_string; -/* Search path separator. */ -Lisp_Object Vpath_separator; - /* Set nonzero after Emacs has started up the first time. Prevents reinitialization of the Lisp world and keymaps on subsequent starts. */ @@ -166,33 +140,10 @@ int malloc_using_checking; #endif -/* Variable whose value is symbol giving operating system type. */ -Lisp_Object Vsystem_type; - -/* Variable whose value is string giving configuration built for. */ -Lisp_Object Vsystem_configuration; - -/* Variable whose value is string giving configuration options, - for use when reporting bugs. */ -Lisp_Object Vsystem_configuration_options; - Lisp_Object Qfile_name_handler_alist; Lisp_Object Qrisky_local_variable; -/* Current and previous system locales for messages and time. */ -Lisp_Object Vsystem_messages_locale; -Lisp_Object Vprevious_system_messages_locale; -Lisp_Object Vsystem_time_locale; -Lisp_Object Vprevious_system_time_locale; - -/* Copyright and version info. The version number may be updated by - Lisp code. */ -Lisp_Object Vemacs_copyright, Vemacs_version; - -/* Alist of external libraries and files implementing them. */ -Lisp_Object Vdynamic_library_alist; - /* If non-zero, emacs should not attempt to use a window-specific code, but instead should use the virtual terminal under which it was started. */ int inhibit_window_system; @@ -224,15 +175,6 @@ int noninteractive; -/* Value of Lisp variable `noninteractive'. - Normally same as C variable `noninteractive' - but nothing terrible happens if user sets this one. */ - -int noninteractive1; - -/* Nonzero means Emacs was run in --quick mode. */ -int inhibit_x_resources; - /* Nonzero means remove site-lisp directories from load-path. */ int no_site_lisp; @@ -2423,11 +2365,11 @@ defsubr (&Sdaemonp); defsubr (&Sdaemon_initialized); - DEFVAR_LISP ("command-line-args", &Vcommand_line_args, + DEFVAR_LISP ("command-line-args", Vcommand_line_args, doc: /* Args passed by shell to Emacs, as a list of strings. Many arguments are deleted from the list as they are processed. */); - DEFVAR_LISP ("system-type", &Vsystem_type, + DEFVAR_LISP ("system-type", Vsystem_type, doc: /* The value is a symbol indicating the type of operating system you are using. Special values: `gnu' compiled for a GNU Hurd system. @@ -2442,20 +2384,20 @@ Vsystem_type = intern_c_string (SYSTEM_TYPE); /* Above values are from SYSTEM_TYPE in src/s/*.h. */ - DEFVAR_LISP ("system-configuration", &Vsystem_configuration, + DEFVAR_LISP ("system-configuration", Vsystem_configuration, doc: /* Value is string indicating configuration Emacs was built for. On MS-Windows, the value reflects the OS flavor and version on which Emacs is running. */); Vsystem_configuration = build_string (EMACS_CONFIGURATION); - DEFVAR_LISP ("system-configuration-options", &Vsystem_configuration_options, + DEFVAR_LISP ("system-configuration-options", Vsystem_configuration_options, doc: /* String containing the configuration options Emacs was built with. */); Vsystem_configuration_options = build_string (EMACS_CONFIG_OPTIONS); - DEFVAR_BOOL ("noninteractive", &noninteractive1, + DEFVAR_BOOL ("noninteractive", noninteractive1, doc: /* Non-nil means Emacs is running without interactive terminal. */); - DEFVAR_LISP ("kill-emacs-hook", &Vkill_emacs_hook, + DEFVAR_LISP ("kill-emacs-hook", Vkill_emacs_hook, doc: /* Hook to be run when `kill-emacs' is called. Since `kill-emacs' may be invoked when the terminal is disconnected (or in other similar situations), functions placed on this hook should not @@ -2466,7 +2408,7 @@ `noninteractive' was non-nil. */); Vkill_emacs_hook = Qnil; - DEFVAR_LISP ("path-separator", &Vpath_separator, + DEFVAR_LISP ("path-separator", Vpath_separator, doc: /* String containing the character that separates directories in search paths, such as PATH and other similar environment variables. */); { @@ -2474,60 +2416,60 @@ Vpath_separator = make_string (&c, 1); } - DEFVAR_LISP ("invocation-name", &Vinvocation_name, + DEFVAR_LISP ("invocation-name", Vinvocation_name, doc: /* The program name that was used to run Emacs. Any directory names are omitted. */); - DEFVAR_LISP ("invocation-directory", &Vinvocation_directory, + DEFVAR_LISP ("invocation-directory", Vinvocation_directory, doc: /* The directory in which the Emacs executable was found, to run it. The value is nil if that directory's name is not known. */); - DEFVAR_LISP ("installation-directory", &Vinstallation_directory, + DEFVAR_LISP ("installation-directory", Vinstallation_directory, doc: /* A directory within which to look for the `lib-src' and `etc' directories. This is non-nil when we can't find those directories in their standard installed locations, but we can find them near where the Emacs executable was found. */); Vinstallation_directory = Qnil; - DEFVAR_LISP ("system-messages-locale", &Vsystem_messages_locale, + DEFVAR_LISP ("system-messages-locale", Vsystem_messages_locale, doc: /* System locale for messages. */); Vsystem_messages_locale = Qnil; DEFVAR_LISP ("previous-system-messages-locale", - &Vprevious_system_messages_locale, + Vprevious_system_messages_locale, doc: /* Most recently used system locale for messages. */); Vprevious_system_messages_locale = Qnil; - DEFVAR_LISP ("system-time-locale", &Vsystem_time_locale, + DEFVAR_LISP ("system-time-locale", Vsystem_time_locale, doc: /* System locale for time. */); Vsystem_time_locale = Qnil; - DEFVAR_LISP ("previous-system-time-locale", &Vprevious_system_time_locale, + DEFVAR_LISP ("previous-system-time-locale", Vprevious_system_time_locale, doc: /* Most recently used system locale for time. */); Vprevious_system_time_locale = Qnil; - DEFVAR_LISP ("before-init-time", &Vbefore_init_time, + DEFVAR_LISP ("before-init-time", Vbefore_init_time, doc: /* Value of `current-time' before Emacs begins initialization. */); Vbefore_init_time = Qnil; - DEFVAR_LISP ("after-init-time", &Vafter_init_time, + DEFVAR_LISP ("after-init-time", Vafter_init_time, doc: /* Value of `current-time' after loading the init files. This is nil during initialization. */); Vafter_init_time = Qnil; - DEFVAR_BOOL ("inhibit-x-resources", &inhibit_x_resources, + DEFVAR_BOOL ("inhibit-x-resources", inhibit_x_resources, doc: /* If non-nil, X resources, Windows Registry settings, and NS defaults are not used. */); inhibit_x_resources = 0; - DEFVAR_LISP ("emacs-copyright", &Vemacs_copyright, + DEFVAR_LISP ("emacs-copyright", Vemacs_copyright, doc: /* Short copyright string for this version of Emacs. */); Vemacs_copyright = build_string (emacs_copyright); - DEFVAR_LISP ("emacs-version", &Vemacs_version, + DEFVAR_LISP ("emacs-version", Vemacs_version, doc: /* Version numbers of this version of Emacs. */); Vemacs_version = build_string (emacs_version); - DEFVAR_LISP ("dynamic-library-alist", &Vdynamic_library_alist, + DEFVAR_LISP ("dynamic-library-alist", Vdynamic_library_alist, doc: /* Alist of dynamic libraries vs external files implementing them. Each element is a list (LIBRARY FILE...), where the car is a symbol representing a supported external library, and the rest are strings giving
--- a/src/eval.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/eval.c Wed Jan 19 13:54:19 2011 -0800 @@ -58,7 +58,7 @@ #endif Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp, Qdefun; -Lisp_Object Qinhibit_quit, Vinhibit_quit, Vquit_flag; +Lisp_Object Qinhibit_quit; Lisp_Object Qand_rest, Qand_optional; Lisp_Object Qdebug_on_error; Lisp_Object Qdeclare; @@ -89,56 +89,10 @@ struct specbinding *specpdl_ptr; -/* Maximum size allowed for specpdl allocation */ - -EMACS_INT max_specpdl_size; - /* Depth in Lisp evaluations and function calls. */ EMACS_INT lisp_eval_depth; -/* Maximum allowed depth in Lisp evaluations and function calls. */ - -EMACS_INT max_lisp_eval_depth; - -/* Nonzero means enter debugger before next function call */ - -int debug_on_next_call; - -/* Non-zero means debugger may continue. This is zero when the - debugger is called during redisplay, where it might not be safe to - continue the interrupted redisplay. */ - -int debugger_may_continue; - -/* List of conditions (non-nil atom means all) which cause a backtrace - if an error is handled by the command loop's error handler. */ - -Lisp_Object Vstack_trace_on_error; - -/* List of conditions (non-nil atom means all) which enter the debugger - if an error is handled by the command loop's error handler. */ - -Lisp_Object Vdebug_on_error; - -/* List of conditions and regexps specifying error messages which - do not enter the debugger even if Vdebug_on_error says they should. */ - -Lisp_Object Vdebug_ignored_errors; - -/* Non-nil means call the debugger even if the error will be handled. */ - -Lisp_Object Vdebug_on_signal; - -/* Hook for edebug to use. */ - -Lisp_Object Vsignal_hook_function; - -/* Nonzero means enter debugger if a quit signal - is handled by the command loop's error handler. */ - -int debug_on_quit; - /* The value of num_nonmacro_input_events as of the last time we started to enter the debugger. If we decide to enter the debugger again when this is still equal to num_nonmacro_input_events, then we @@ -148,8 +102,6 @@ int when_entered_debugger; -Lisp_Object Vdebugger; - /* The function from which the last `signal' was called. Set in Fsignal. */ @@ -161,10 +113,6 @@ int handling_signal; -/* Function to process declarations in defmacro forms. */ - -Lisp_Object Vmacro_declaration_function; - static Lisp_Object funcall_lambda (Lisp_Object, int, Lisp_Object*); static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; static int interactive_p (int); @@ -3505,7 +3453,7 @@ void syms_of_eval (void) { - DEFVAR_INT ("max-specpdl-size", &max_specpdl_size, + DEFVAR_INT ("max-specpdl-size", max_specpdl_size, doc: /* *Limit on number of Lisp variable bindings and `unwind-protect's. If Lisp code tries to increase the total number past this amount, an error is signaled. @@ -3513,7 +3461,7 @@ if that proves inconveniently small. However, if you increase it too far, Emacs could run out of memory trying to make the stack bigger. */); - DEFVAR_INT ("max-lisp-eval-depth", &max_lisp_eval_depth, + DEFVAR_INT ("max-lisp-eval-depth", max_lisp_eval_depth, doc: /* *Limit on depth in `eval', `apply' and `funcall' before error. This limit serves to catch infinite recursions for you before they cause @@ -3522,7 +3470,7 @@ if that proves inconveniently small. However, if you increase it too far, Emacs could overflow the real C stack, and crash. */); - DEFVAR_LISP ("quit-flag", &Vquit_flag, + DEFVAR_LISP ("quit-flag", Vquit_flag, doc: /* Non-nil causes `eval' to abort, unless `inhibit-quit' is non-nil. If the value is t, that means do an ordinary quit. If the value equals `throw-on-input', that means quit by throwing @@ -3531,7 +3479,7 @@ but `inhibit-quit' non-nil prevents anything from taking notice of that. */); Vquit_flag = Qnil; - DEFVAR_LISP ("inhibit-quit", &Vinhibit_quit, + DEFVAR_LISP ("inhibit-quit", Vinhibit_quit, doc: /* Non-nil inhibits C-g quitting from happening immediately. Note that `quit-flag' will still be set by typing C-g, so a quit will be signaled as soon as `inhibit-quit' is nil. @@ -3577,7 +3525,7 @@ Qdebug = intern_c_string ("debug"); staticpro (&Qdebug); - DEFVAR_LISP ("stack-trace-on-error", &Vstack_trace_on_error, + DEFVAR_LISP ("stack-trace-on-error", Vstack_trace_on_error, doc: /* *Non-nil means errors display a backtrace buffer. More precisely, this happens for any error that is handled by the editor command loop. @@ -3585,7 +3533,7 @@ if one of its condition symbols appears in the list. */); Vstack_trace_on_error = Qnil; - DEFVAR_LISP ("debug-on-error", &Vdebug_on_error, + DEFVAR_LISP ("debug-on-error", Vdebug_on_error, doc: /* *Non-nil means enter debugger if an error is signaled. Does not apply to errors handled by `condition-case' or those matched by `debug-ignored-errors'. @@ -3597,7 +3545,7 @@ See also the variable `debug-on-quit'. */); Vdebug_on_error = Qnil; - DEFVAR_LISP ("debug-ignored-errors", &Vdebug_ignored_errors, + DEFVAR_LISP ("debug-ignored-errors", Vdebug_ignored_errors, doc: /* *List of errors for which the debugger should not be called. Each element may be a condition-name or a regexp that matches error messages. If any element applies to a given error, that error skips the debugger @@ -3606,21 +3554,21 @@ It does not apply to errors handled by `condition-case'. */); Vdebug_ignored_errors = Qnil; - DEFVAR_BOOL ("debug-on-quit", &debug_on_quit, + DEFVAR_BOOL ("debug-on-quit", debug_on_quit, doc: /* *Non-nil means enter debugger if quit is signaled (C-g, for example). Does not apply if quit is handled by a `condition-case'. */); debug_on_quit = 0; - DEFVAR_BOOL ("debug-on-next-call", &debug_on_next_call, + DEFVAR_BOOL ("debug-on-next-call", debug_on_next_call, doc: /* Non-nil means enter debugger before next `eval', `apply' or `funcall'. */); - DEFVAR_BOOL ("debugger-may-continue", &debugger_may_continue, + DEFVAR_BOOL ("debugger-may-continue", debugger_may_continue, doc: /* Non-nil means debugger may continue execution. This is nil when the debugger is called under circumstances where it might not be safe to continue. */); debugger_may_continue = 1; - DEFVAR_LISP ("debugger", &Vdebugger, + DEFVAR_LISP ("debugger", Vdebugger, doc: /* Function to call to invoke debugger. If due to frame exit, args are `exit' and the value being returned; this function's value will be returned instead of that. @@ -3629,19 +3577,19 @@ If due to `eval' entry, one arg, t. */); Vdebugger = Qnil; - DEFVAR_LISP ("signal-hook-function", &Vsignal_hook_function, + DEFVAR_LISP ("signal-hook-function", Vsignal_hook_function, doc: /* If non-nil, this is a function for `signal' to call. It receives the same arguments that `signal' was given. The Edebug package uses this to regain control. */); Vsignal_hook_function = Qnil; - DEFVAR_LISP ("debug-on-signal", &Vdebug_on_signal, + DEFVAR_LISP ("debug-on-signal", Vdebug_on_signal, doc: /* *Non-nil means call the debugger regardless of condition handlers. Note that `debug-on-error', `debug-on-quit' and friends still determine whether to handle the particular condition. */); Vdebug_on_signal = Qnil; - DEFVAR_LISP ("macro-declaration-function", &Vmacro_declaration_function, + DEFVAR_LISP ("macro-declaration-function", Vmacro_declaration_function, doc: /* Function to process declarations in a macro definition. The function will be called with two args MACRO and DECL. MACRO is the name of the macro being defined.
--- a/src/fileio.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/fileio.c Wed Jan 19 13:54:19 2011 -0800 @@ -26,10 +26,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <setjmp.h> - -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #if !defined (S_ISLNK) && defined (S_IFLNK) # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) @@ -125,17 +122,6 @@ auto saving and recovering a file. */ Lisp_Object Qauto_save_coding; -/* Coding system for file names, or nil if none. */ -Lisp_Object Vfile_name_coding_system; - -/* Coding system for file names used only when - Vfile_name_coding_system is nil. */ -Lisp_Object Vdefault_file_name_coding_system; - -/* Alist of elements (REGEXP . HANDLER) for file names - whose I/O is done with a special handler. */ -Lisp_Object Vfile_name_handler_alist; - /* Property name of a file name handler, which gives a list of operations it handles.. */ Lisp_Object Qoperations; @@ -143,47 +129,18 @@ /* Lisp functions for translating file formats */ Lisp_Object Qformat_decode, Qformat_annotate_function; -/* Function to be called to decide a coding system of a reading file. */ -Lisp_Object Vset_auto_coding_function; - -/* Functions to be called to process text properties in inserted file. */ -Lisp_Object Vafter_insert_file_functions; - /* Lisp function for setting buffer-file-coding-system and the multibyteness of the current buffer after inserting a file. */ Lisp_Object Qafter_insert_file_set_coding; -/* Functions to be called to create text property annotations for file. */ -Lisp_Object Vwrite_region_annotate_functions; Lisp_Object Qwrite_region_annotate_functions; -Lisp_Object Vwrite_region_post_annotation_function; - -/* During build_annotations, each time an annotation function is called, - this holds the annotations made by the previous functions. */ -Lisp_Object Vwrite_region_annotations_so_far; - /* Each time an annotation function changes the buffer, the new buffer is added here. */ Lisp_Object Vwrite_region_annotation_buffers; -/* File name in which we write a list of all our auto save files. */ -Lisp_Object Vauto_save_list_file_name; - -/* Whether or not files are auto-saved into themselves. */ -Lisp_Object Vauto_save_visited_file_name; - -/* Whether or not to continue auto-saving after a large deletion. */ -Lisp_Object Vauto_save_include_big_deletions; - #ifdef HAVE_FSYNC -/* Nonzero means skip the call to fsync in Fwrite-region. */ -int write_region_inhibit_fsync; #endif -/* Non-zero means call move-file-to-trash in Fdelete_file or - Fdelete_directory_internal. */ -int delete_by_moving_to_trash; - Lisp_Object Qdelete_by_moving_to_trash; /* Lisp function for moving files to trash. */ @@ -196,19 +153,8 @@ Lisp_Object Qdelete_directory; #ifdef WINDOWSNT -extern Lisp_Object Vw32_get_true_file_attributes; #endif -/* These variables describe handlers that have "already" had a chance - to handle the current operation. - - Vinhibit_file_name_handlers is a list of file name handlers. - Vinhibit_file_name_operation is the operation being handled. - If we try to handle that operation, we ignore those handlers. */ - -static Lisp_Object Vinhibit_file_name_handlers; -static Lisp_Object Vinhibit_file_name_operation; - Lisp_Object Qfile_error, Qfile_already_exists, Qfile_date_error; Lisp_Object Qexcl; Lisp_Object Qfile_name_history; @@ -5641,13 +5587,13 @@ staticpro (&Qfind_buffer_file_type); #endif /* DOS_NT */ - DEFVAR_LISP ("file-name-coding-system", &Vfile_name_coding_system, + DEFVAR_LISP ("file-name-coding-system", Vfile_name_coding_system, doc: /* *Coding system for encoding file names. If it is nil, `default-file-name-coding-system' (which see) is used. */); Vfile_name_coding_system = Qnil; DEFVAR_LISP ("default-file-name-coding-system", - &Vdefault_file_name_coding_system, + Vdefault_file_name_coding_system, doc: /* Default coding system for encoding file names. This variable is used only when `file-name-coding-system' is nil. @@ -5682,7 +5628,7 @@ Fput (Qfile_date_error, Qerror_message, make_pure_c_string ("Cannot set file date")); - DEFVAR_LISP ("file-name-handler-alist", &Vfile_name_handler_alist, + DEFVAR_LISP ("file-name-handler-alist", Vfile_name_handler_alist, doc: /* *Alist of elements (REGEXP . HANDLER) for file names handled specially. If a file name matches REGEXP, then all I/O on that file is done by calling HANDLER. @@ -5698,7 +5644,7 @@ Vfile_name_handler_alist = Qnil; DEFVAR_LISP ("set-auto-coding-function", - &Vset_auto_coding_function, + Vset_auto_coding_function, doc: /* If non-nil, a function to call to decide a coding system of file. Two arguments are passed to this function: the file name and the length of a file contents following the point. @@ -5710,7 +5656,7 @@ or local variable spec of the tailing lines with `coding:' tag. */); Vset_auto_coding_function = Qnil; - DEFVAR_LISP ("after-insert-file-functions", &Vafter_insert_file_functions, + DEFVAR_LISP ("after-insert-file-functions", Vafter_insert_file_functions, doc: /* A list of functions to be called at the end of `insert-file-contents'. Each is passed one argument, the number of characters inserted, with point at the start of the inserted text. Each function @@ -5720,7 +5666,7 @@ functions in `after-insert-file-functions' if appropriate. */); Vafter_insert_file_functions = Qnil; - DEFVAR_LISP ("write-region-annotate-functions", &Vwrite_region_annotate_functions, + DEFVAR_LISP ("write-region-annotate-functions", Vwrite_region_annotate_functions, doc: /* A list of functions to be called at the start of `write-region'. Each is passed two arguments, START and END as for `write-region'. These are usually two numbers but not always; see the documentation @@ -5749,7 +5695,7 @@ = intern_c_string ("write-region-annotate-functions"); DEFVAR_LISP ("write-region-post-annotation-function", - &Vwrite_region_post_annotation_function, + Vwrite_region_post_annotation_function, doc: /* Function to call after `write-region' completes. The function is called with no arguments. If one or more of the annotation functions in `write-region-annotate-functions' changed the @@ -5760,34 +5706,34 @@ staticpro (&Vwrite_region_annotation_buffers); DEFVAR_LISP ("write-region-annotations-so-far", - &Vwrite_region_annotations_so_far, + Vwrite_region_annotations_so_far, doc: /* When an annotation function is called, this holds the previous annotations. These are the annotations made by other annotation functions that were already called. See also `write-region-annotate-functions'. */); Vwrite_region_annotations_so_far = Qnil; - DEFVAR_LISP ("inhibit-file-name-handlers", &Vinhibit_file_name_handlers, + DEFVAR_LISP ("inhibit-file-name-handlers", Vinhibit_file_name_handlers, doc: /* A list of file name handlers that temporarily should not be used. This applies only to the operation `inhibit-file-name-operation'. */); Vinhibit_file_name_handlers = Qnil; - DEFVAR_LISP ("inhibit-file-name-operation", &Vinhibit_file_name_operation, + DEFVAR_LISP ("inhibit-file-name-operation", Vinhibit_file_name_operation, doc: /* The operation for which `inhibit-file-name-handlers' is applicable. */); Vinhibit_file_name_operation = Qnil; - DEFVAR_LISP ("auto-save-list-file-name", &Vauto_save_list_file_name, + DEFVAR_LISP ("auto-save-list-file-name", Vauto_save_list_file_name, doc: /* File name in which we write a list of all auto save file names. This variable is initialized automatically from `auto-save-list-file-prefix' shortly after Emacs reads your `.emacs' file, if you have not yet given it a non-nil value. */); Vauto_save_list_file_name = Qnil; - DEFVAR_LISP ("auto-save-visited-file-name", &Vauto_save_visited_file_name, + DEFVAR_LISP ("auto-save-visited-file-name", Vauto_save_visited_file_name, doc: /* Non-nil says auto-save a buffer in the file it is visiting, when practical. Normally auto-save files are written under other names. */); Vauto_save_visited_file_name = Qnil; - DEFVAR_LISP ("auto-save-include-big-deletions", &Vauto_save_include_big_deletions, + DEFVAR_LISP ("auto-save-include-big-deletions", Vauto_save_include_big_deletions, doc: /* If non-nil, auto-save even if a large part of the text is deleted. If nil, deleting a substantial portion of the text disables auto-save in the buffer; this is the default behavior, because the auto-save @@ -5795,14 +5741,14 @@ Vauto_save_include_big_deletions = Qnil; #ifdef HAVE_FSYNC - DEFVAR_BOOL ("write-region-inhibit-fsync", &write_region_inhibit_fsync, + DEFVAR_BOOL ("write-region-inhibit-fsync", write_region_inhibit_fsync, doc: /* *Non-nil means don't call fsync in `write-region'. This variable affects calls to `write-region' as well as save commands. A non-nil value may result in data loss! */); write_region_inhibit_fsync = 0; #endif - DEFVAR_BOOL ("delete-by-moving-to-trash", &delete_by_moving_to_trash, + DEFVAR_BOOL ("delete-by-moving-to-trash", delete_by_moving_to_trash, doc: /* Specifies whether to use the system's trash can. When non-nil, certain file deletion commands use the function `move-file-to-trash' instead of deleting files outright.
--- a/src/filelock.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/filelock.c Wed Jan 19 13:54:19 2011 -0800 @@ -32,10 +32,7 @@ #include <sys/file.h> #include <fcntl.h> - -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #ifdef __FreeBSD__ #include <sys/sysctl.h> @@ -49,10 +46,6 @@ #include "coding.h" #include "systime.h" -/* The directory for writing temporary files. */ - -Lisp_Object Vtemporary_file_directory; - #ifdef CLASH_DETECTION #ifdef HAVE_UTMP_H @@ -735,7 +728,7 @@ void syms_of_filelock (void) { - DEFVAR_LISP ("temporary-file-directory", &Vtemporary_file_directory, + DEFVAR_LISP ("temporary-file-directory", Vtemporary_file_directory, doc: /* The directory for writing temporary files. */); Vtemporary_file_directory = Qnil;
--- a/src/fns.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/fns.c Wed Jan 19 13:54:19 2011 -0800 @@ -21,9 +21,7 @@ #include <config.h> -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #include <time.h> #include <setjmp.h> @@ -53,14 +51,6 @@ #define NULL ((POINTER_TYPE *)0) #endif -/* Nonzero enables use of dialog boxes for questions - asked by mouse commands. */ -int use_dialog_box; - -/* Nonzero enables use of a file dialog for file name - questions asked by mouse commands. */ -int use_file_dialog; - Lisp_Object Qstring_lessp, Qprovide, Qrequire; Lisp_Object Qyes_or_no_p_history; Lisp_Object Qcursor_in_echo_area; @@ -2560,7 +2550,7 @@ return ret; } -Lisp_Object Vfeatures, Qsubfeatures; +Lisp_Object Qsubfeatures; DEFUN ("featurep", Ffeaturep, Sfeaturep, 1, 2, 0, doc: /* Return t if FEATURE is present in this Emacs. @@ -4838,7 +4828,7 @@ Fset (Qyes_or_no_p_history, Qnil); - DEFVAR_LISP ("features", &Vfeatures, + DEFVAR_LISP ("features", Vfeatures, doc: /* A list of symbols which are the features of the executing Emacs. Used by `featurep' and `require', and altered by `provide'. */); Vfeatures = Fcons (intern_c_string ("emacs"), Qnil); @@ -4856,7 +4846,7 @@ staticpro (&Qpaper); #endif /* HAVE_LANGINFO_CODESET */ - DEFVAR_BOOL ("use-dialog-box", &use_dialog_box, + DEFVAR_BOOL ("use-dialog-box", use_dialog_box, doc: /* *Non-nil means mouse commands use dialog boxes to ask questions. This applies to `y-or-n-p' and `yes-or-no-p' questions asked by commands invoked by mouse clicks and mouse menu items. @@ -4865,7 +4855,7 @@ non-nil. */); use_dialog_box = 1; - DEFVAR_BOOL ("use-file-dialog", &use_file_dialog, + DEFVAR_BOOL ("use-file-dialog", use_file_dialog, doc: /* *Non-nil means mouse commands use a file dialog to ask for files. This applies to commands from menus and tool bar buttons even when they are initiated from the keyboard. If `use-dialog-box' is nil,
--- a/src/font.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/font.c Wed Jan 19 13:54:19 2011 -0800 @@ -63,8 +63,6 @@ font_driver *)->list when a specified font is not found. */ static Lisp_Object null_vector; -static Lisp_Object Vfont_weight_table, Vfont_slant_table, Vfont_width_table; - /* Vector of Vfont_weight_table, Vfont_slant_table, and Vfont_width_table. */ static Lisp_Object font_style_table; @@ -137,8 +135,6 @@ Lisp_Object QCuser_spec; -Lisp_Object Vfont_encoding_alist; - /* Alist of font registry symbol and the corresponding charsets information. The information is retrieved from Vfont_encoding_alist on demand. @@ -4976,8 +4972,6 @@ return table; } -Lisp_Object Vfont_log; - /* The deferred font-log data of the form [ACTION ARG RESULT]. If ACTION is not nil, that is added to the log when font_add_log is called next time. At that time, ACTION is set back to nil. */ @@ -5183,7 +5177,7 @@ defsubr (&Sfont_info); #endif - DEFVAR_LISP ("font-encoding-alist", &Vfont_encoding_alist, + DEFVAR_LISP ("font-encoding-alist", Vfont_encoding_alist, doc: /* Alist of fontname patterns vs the corresponding encoding and repertory info. Each element looks like (REGEXP . (ENCODING . REPERTORY)), @@ -5210,7 +5204,7 @@ table used by the font display code. So we make them read-only, to avoid this confusing situation. */ - DEFVAR_LISP_NOPRO ("font-weight-table", &Vfont_weight_table, + DEFVAR_LISP_NOPRO ("font-weight-table", Vfont_weight_table, doc: /* Vector of valid font weight values. Each element has the form: [NUMERIC-VALUE SYMBOLIC-NAME ALIAS-NAME ...] @@ -5218,13 +5212,13 @@ Vfont_weight_table = BUILD_STYLE_TABLE (weight_table); XSYMBOL (intern_c_string ("font-weight-table"))->constant = 1; - DEFVAR_LISP_NOPRO ("font-slant-table", &Vfont_slant_table, + DEFVAR_LISP_NOPRO ("font-slant-table", Vfont_slant_table, doc: /* Vector of font slant symbols vs the corresponding numeric values. See `font-weight-table' for the format of the vector. */); Vfont_slant_table = BUILD_STYLE_TABLE (slant_table); XSYMBOL (intern_c_string ("font-slant-table"))->constant = 1; - DEFVAR_LISP_NOPRO ("font-width-table", &Vfont_width_table, + DEFVAR_LISP_NOPRO ("font-width-table", Vfont_width_table, doc: /* Alist of font width symbols vs the corresponding numeric values. See `font-weight-table' for the format of the vector. */); Vfont_width_table = BUILD_STYLE_TABLE (width_table); @@ -5236,7 +5230,7 @@ ASET (font_style_table, 1, Vfont_slant_table); ASET (font_style_table, 2, Vfont_width_table); - DEFVAR_LISP ("font-log", &Vfont_log, doc: /* + DEFVAR_LISP ("font-log", Vfont_log, doc: /* *Logging list of font related actions and results. The value t means to suppress the logging. The initial value is set to nil if the environment variable
--- a/src/font.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/font.h Wed Jan 19 13:54:19 2011 -0800 @@ -849,7 +849,6 @@ extern Lisp_Object QCfoundry; -extern Lisp_Object Vfont_log; extern void font_add_log (const char *, Lisp_Object, Lisp_Object); extern void font_deferred_log (const char *, Lisp_Object, Lisp_Object);
--- a/src/fontset.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/fontset.c Wed Jan 19 13:54:19 2011 -0800 @@ -191,14 +191,6 @@ font for each character. */ static Lisp_Object Vdefault_fontset; -Lisp_Object Vfont_encoding_charset_alist; -Lisp_Object Vuse_default_ascent; -Lisp_Object Vignore_relative_composition; -Lisp_Object Valternate_fontname_alist; -Lisp_Object Vfontset_alias_alist; -Lisp_Object Vvertical_centering_font_regexp; -Lisp_Object Votf_script_alist; - /* Check if any window system is used now. */ void (*check_window_system_func) (void); @@ -2199,7 +2191,7 @@ auto_fontset_alist = Qnil; staticpro (&auto_fontset_alist); - DEFVAR_LISP ("font-encoding-charset-alist", &Vfont_encoding_charset_alist, + DEFVAR_LISP ("font-encoding-charset-alist", Vfont_encoding_charset_alist, doc: /* Alist of charsets vs the charsets to determine the preferred font encoding. Each element looks like (CHARSET . ENCODING-CHARSET), @@ -2210,7 +2202,7 @@ whose encoding corresponds to ENCODING-CHARSET is preferred. */); Vfont_encoding_charset_alist = Qnil; - DEFVAR_LISP ("use-default-ascent", &Vuse_default_ascent, + DEFVAR_LISP ("use-default-ascent", Vuse_default_ascent, doc: /* Char table of characters whose ascent values should be ignored. If an entry for a character is non-nil, the ascent value of the glyph @@ -2220,7 +2212,7 @@ such a character is displayed on screen. */); Vuse_default_ascent = Qnil; - DEFVAR_LISP ("ignore-relative-composition", &Vignore_relative_composition, + DEFVAR_LISP ("ignore-relative-composition", Vignore_relative_composition, doc: /* Char table of characters which are not composed relatively. If an entry for a character is non-nil, a composition sequence @@ -2229,26 +2221,26 @@ an ascent and descent value of a previous character. */); Vignore_relative_composition = Qnil; - DEFVAR_LISP ("alternate-fontname-alist", &Valternate_fontname_alist, + DEFVAR_LISP ("alternate-fontname-alist", Valternate_fontname_alist, doc: /* Alist of fontname vs list of the alternate fontnames. When a specified font name is not found, the corresponding alternate fontnames (if any) are tried instead. */); Valternate_fontname_alist = Qnil; - DEFVAR_LISP ("fontset-alias-alist", &Vfontset_alias_alist, + DEFVAR_LISP ("fontset-alias-alist", Vfontset_alias_alist, doc: /* Alist of fontset names vs the aliases. */); Vfontset_alias_alist = Fcons (Fcons (FONTSET_NAME (Vdefault_fontset), make_pure_c_string ("fontset-default")), Qnil); DEFVAR_LISP ("vertical-centering-font-regexp", - &Vvertical_centering_font_regexp, + Vvertical_centering_font_regexp, doc: /* *Regexp matching font names that require vertical centering on display. When a character is displayed with such fonts, the character is displayed at the vertical center of lines. */); Vvertical_centering_font_regexp = Qnil; - DEFVAR_LISP ("otf-script-alist", &Votf_script_alist, + DEFVAR_LISP ("otf-script-alist", Votf_script_alist, doc: /* Alist of OpenType script tags vs the corresponding script names. */); Votf_script_alist = Qnil;
--- a/src/fontset.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/fontset.h Wed Jan 19 13:54:19 2011 -0800 @@ -45,13 +45,6 @@ extern Lisp_Object list_fontsets (struct frame *, Lisp_Object, int); extern Lisp_Object Qlatin; -extern Lisp_Object Vuse_default_ascent; -extern Lisp_Object Vignore_relative_composition; -extern Lisp_Object Valternate_fontname_alist; -extern Lisp_Object Vfontset_alias_alist; -extern Lisp_Object Vvertical_centering_font_regexp; -extern Lisp_Object Votf_script_alist; - extern Lisp_Object fontset_name (int); extern Lisp_Object fontset_ascii (int);
--- a/src/frame.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/frame.c Wed Jan 19 13:54:19 2011 -0800 @@ -55,24 +55,8 @@ #endif -/* If we shall make pointer invisible when typing or not. */ -Lisp_Object Vmake_pointer_invisible; - #ifdef HAVE_WINDOW_SYSTEM -/* The name we're using in resource queries. Most often "emacs". */ - -Lisp_Object Vx_resource_name; - -/* The application class we're using in resource queries. - Normally "Emacs". */ - -Lisp_Object Vx_resource_class; - -/* Lower limit value of the frame opacity (alpha transparency). */ - -Lisp_Object Vframe_alpha_lower_limit; - #endif #ifdef HAVE_NS @@ -122,7 +106,6 @@ Lisp_Object Qexplicit_name; Lisp_Object Qunsplittable; Lisp_Object Qmenu_bar_lines, Qtool_bar_lines, Qtool_bar_position; -Lisp_Object Vmenu_bar_mode, Vtool_bar_mode; Lisp_Object Qleft_fringe, Qright_fringe; Lisp_Object Qbuffer_predicate, Qbuffer_list, Qburied_buffer_list; Lisp_Object Qtty_color_mode; @@ -135,14 +118,8 @@ Lisp_Object Qface_set_after_frame_default; -Lisp_Object Vterminal_frame; -Lisp_Object Vdefault_frame_alist; -Lisp_Object Vdefault_frame_scroll_bars; -Lisp_Object Vmouse_position_function; -Lisp_Object Vmouse_highlight; -static Lisp_Object Vdelete_frame_functions, Qdelete_frame_functions; - -int focus_follows_mouse; +static Lisp_Object Qdelete_frame_functions; + static void set_menu_bar_lines_1 (Lisp_Object window, int n) @@ -4464,7 +4441,7 @@ } #ifdef HAVE_WINDOW_SYSTEM - DEFVAR_LISP ("x-resource-name", &Vx_resource_name, + DEFVAR_LISP ("x-resource-name", Vx_resource_name, doc: /* The name Emacs uses to look up X resources. `x-get-resource' uses this as the first component of the instance name when requesting resource values. @@ -4476,7 +4453,7 @@ to `x-get-resource'. See also the variable `x-resource-class'. */); Vx_resource_name = Qnil; - DEFVAR_LISP ("x-resource-class", &Vx_resource_class, + DEFVAR_LISP ("x-resource-class", Vx_resource_class, doc: /* The class Emacs uses to look up X resources. `x-get-resource' uses this as the first component of the instance class when requesting resource values. @@ -4488,7 +4465,7 @@ is a reasonable practice. See also the variable `x-resource-name'. */); Vx_resource_class = build_string (EMACS_CLASS); - DEFVAR_LISP ("frame-alpha-lower-limit", &Vframe_alpha_lower_limit, + DEFVAR_LISP ("frame-alpha-lower-limit", Vframe_alpha_lower_limit, doc: /* The lower limit of the frame opacity (alpha transparency). The value should range from 0 (invisible) to 100 (completely opaque). You can also use a floating number between 0.0 and 1.0. @@ -4496,7 +4473,7 @@ Vframe_alpha_lower_limit = make_number (20); #endif - DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist, + DEFVAR_LISP ("default-frame-alist", Vdefault_frame_alist, doc: /* Alist of default values for frame creation. These may be set in your init file, like this: (setq default-frame-alist '((width . 80) (height . 55) (menu-bar-lines . 1))) @@ -4511,7 +4488,7 @@ Setting this variable does not affect existing frames, only new ones. */); Vdefault_frame_alist = Qnil; - DEFVAR_LISP ("default-frame-scroll-bars", &Vdefault_frame_scroll_bars, + DEFVAR_LISP ("default-frame-scroll-bars", Vdefault_frame_scroll_bars, doc: /* Default position of scroll bars on this window-system. */); #ifdef HAVE_WINDOW_SYSTEM #if defined(HAVE_NTGUI) || defined(NS_IMPL_COCOA) || (defined(USE_GTK) && defined(USE_TOOLKIT_SCROLL_BARS)) @@ -4525,10 +4502,10 @@ Vdefault_frame_scroll_bars = Qnil; #endif - DEFVAR_LISP ("terminal-frame", &Vterminal_frame, + DEFVAR_LISP ("terminal-frame", Vterminal_frame, doc: /* The initial frame-object, which represents Emacs's stdout. */); - DEFVAR_LISP ("mouse-position-function", &Vmouse_position_function, + DEFVAR_LISP ("mouse-position-function", Vmouse_position_function, doc: /* If non-nil, function to transform normal value of `mouse-position'. `mouse-position' calls this function, passing its usual return value as argument, and returns whatever this function returns. @@ -4536,7 +4513,7 @@ which need to do mouse handling at the Lisp level. */); Vmouse_position_function = Qnil; - DEFVAR_LISP ("mouse-highlight", &Vmouse_highlight, + DEFVAR_LISP ("mouse-highlight", Vmouse_highlight, doc: /* If non-nil, clickable text is highlighted when mouse is over it. If the value is an integer, highlighting is only shown after moving the mouse, while keyboard input turns off the highlight even when the mouse @@ -4544,12 +4521,12 @@ when the mouse is over clickable text. */); Vmouse_highlight = Qt; - DEFVAR_LISP ("make-pointer-invisible", &Vmake_pointer_invisible, + DEFVAR_LISP ("make-pointer-invisible", Vmake_pointer_invisible, doc: /* If non-nil, make pointer invisible while typing. The pointer becomes visible again when the mouse is moved. */); Vmake_pointer_invisible = Qt; - DEFVAR_LISP ("delete-frame-functions", &Vdelete_frame_functions, + DEFVAR_LISP ("delete-frame-functions", Vdelete_frame_functions, doc: /* Functions to be run before deleting a frame. The functions are run with one arg, the frame to be deleted. See `delete-frame'. @@ -4562,7 +4539,7 @@ Qdelete_frame_functions = intern_c_string ("delete-frame-functions"); staticpro (&Qdelete_frame_functions); - DEFVAR_LISP ("menu-bar-mode", &Vmenu_bar_mode, + DEFVAR_LISP ("menu-bar-mode", Vmenu_bar_mode, doc: /* Non-nil if Menu-Bar mode is enabled. See the command `menu-bar-mode' for a description of this minor mode. Setting this variable directly does not take effect; @@ -4570,7 +4547,7 @@ or call the function `menu-bar-mode'. */); Vmenu_bar_mode = Qt; - DEFVAR_LISP ("tool-bar-mode", &Vtool_bar_mode, + DEFVAR_LISP ("tool-bar-mode", Vtool_bar_mode, doc: /* Non-nil if Tool-Bar mode is enabled. See the command `tool-bar-mode' for a description of this minor mode. Setting this variable directly does not take effect; @@ -4597,7 +4574,7 @@ This variable is local to the current terminal and cannot be buffer-local. */); - DEFVAR_BOOL ("focus-follows-mouse", &focus_follows_mouse, + DEFVAR_BOOL ("focus-follows-mouse", focus_follows_mouse, doc: /* Non-nil if window system changes focus when you move the mouse. You should set this variable to tell Emacs how your window manager handles focus, since there is no way in general for Emacs to find out
--- a/src/frame.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/frame.h Wed Jan 19 13:54:19 2011 -0800 @@ -37,11 +37,6 @@ extern int message_buf_print; -/* Nonzero means window system changes focus when moving the - mouse. */ - -extern int focus_follows_mouse; - /* The structure representing a frame. */ @@ -862,11 +857,6 @@ extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object); extern Lisp_Object Vframe_list; -extern Lisp_Object Vdefault_frame_alist; - -extern Lisp_Object Vterminal_frame; - -extern Lisp_Object Vmouse_highlight; /* The currently selected frame. */ @@ -1108,12 +1098,6 @@ extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int); -/* These are in frame.c */ - -extern Lisp_Object Vx_resource_name; -extern Lisp_Object Vx_resource_class; -extern Lisp_Object Vmenu_bar_mode, Vtool_bar_mode; - extern Lisp_Object Qface_set_after_frame_default; @@ -1145,7 +1129,6 @@ extern int x_figure_window_size (struct frame *, Lisp_Object, int); -extern Lisp_Object Vframe_alpha_lower_limit; extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object); extern void validate_x_resource_name (void);
--- a/src/fringe.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/fringe.c Wed Jan 19 13:54:19 2011 -0800 @@ -32,19 +32,6 @@ #ifdef HAVE_WINDOW_SYSTEM -/* Non-nil means that newline may flow into the right fringe. */ - -Lisp_Object Voverflow_newline_into_fringe; - -/* List of known fringe bitmap symbols. - - The fringe bitmap number is stored in the `fringe' property on - those symbols. Names for the built-in bitmaps are installed by - loading fringe.el. - */ - -Lisp_Object Vfringe_bitmaps; - /* Fringe bitmaps are represented in three different ways: Logical bitmaps are used internally to denote things like @@ -1756,7 +1743,7 @@ defsubr (&Sfringe_bitmaps_at_pos); defsubr (&Sset_fringe_bitmap_face); - DEFVAR_LISP ("overflow-newline-into-fringe", &Voverflow_newline_into_fringe, + DEFVAR_LISP ("overflow-newline-into-fringe", Voverflow_newline_into_fringe, doc: /* *Non-nil means that newline may flow into the right fringe. This means that display lines which are exactly as wide as the window (not counting the final newline) will only occupy one screen line, by @@ -1765,7 +1752,7 @@ If nil, also continue lines which are exactly as wide as the window. */); Voverflow_newline_into_fringe = Qt; - DEFVAR_LISP ("fringe-bitmaps", &Vfringe_bitmaps, + DEFVAR_LISP ("fringe-bitmaps", Vfringe_bitmaps, doc: /* List of fringe bitmap symbols. */); Vfringe_bitmaps = Qnil; }
--- a/src/getloadavg.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/getloadavg.c Wed Jan 19 13:54:19 2011 -0800 @@ -355,10 +355,7 @@ # define LDAV_SYMBOL "avenrun" # endif -# ifdef HAVE_UNISTD_H -# include <unistd.h> -# endif - +# include <unistd.h> # include <stdio.h> /* LOAD_AVE_TYPE should only get defined if we're going to use the
--- a/src/getpagesize.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/getpagesize.h Wed Jan 19 13:54:19 2011 -0800 @@ -19,9 +19,7 @@ #ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include <unistd.h> -# endif +# include <unistd.h> # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/globals.h Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,2775 @@ +/* Declare all global lisp variables. + + Copyright (C) 2011 Free Software Foundation, Inc. + + This file is part of GNU Emacs. + + GNU Emacs 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 3 of the License, or + (at your option) any later version. + + GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ + +struct emacs_globals +{ + + /* Count the amount of consing of various sorts of space. */ + EMACS_INT f_cons_cells_consed; + + EMACS_INT f_floats_consed; + + EMACS_INT f_vector_cells_consed; + + EMACS_INT f_symbols_consed; + + EMACS_INT f_string_chars_consed; + + EMACS_INT f_misc_objects_consed; + + EMACS_INT f_intervals_consed; + + EMACS_INT f_strings_consed; + + /* Minimum number of bytes of consing since GC before next GC. */ + EMACS_INT f_gc_cons_threshold; + + Lisp_Object f_Vgc_cons_percentage; + + /* Nonzero means display messages at beginning and end of GC. */ + int f_garbage_collection_messages; + + /* Non-nil means defun should do purecopy on the function definition. */ + Lisp_Object f_Vpurify_flag; + + /* Non-nil means we are handling a memory-full error. */ + Lisp_Object f_Vmemory_full; + + /* Total number of bytes allocated in pure storage. */ + EMACS_INT f_pure_bytes_used; + + /* Pre-computed signal argument for use when memory is exhausted. */ + Lisp_Object f_Vmemory_signal_data; + + Lisp_Object f_Vpost_gc_hook; + + Lisp_Object f_Vgc_elapsed; + + EMACS_INT f_gcs_done; + + /* Functions to call before and after each text change. */ + Lisp_Object f_Vbefore_change_functions; + + Lisp_Object f_Vafter_change_functions; + + Lisp_Object f_Vtransient_mark_mode; + + /* t means ignore all read-only text properties. + A list means ignore such a property if its value is a member of the list. + Any non-nil value means ignore buffer-read-only. */ + Lisp_Object f_Vinhibit_read_only; + + /* List of functions to call that can query about killing a buffer. + If any of these functions returns nil, we don't kill it. */ + Lisp_Object f_Vkill_buffer_query_functions; + + Lisp_Object f_Vchange_major_mode_hook; + + /* List of functions to call before changing an unmodified buffer. */ + Lisp_Object f_Vfirst_change_hook; + + /* If nonzero, all modification hooks are suppressed. */ + int f_inhibit_modification_hooks; + + Lisp_Object f_Vbyte_code_meter; + + int f_byte_metering_on; + + Lisp_Object f_Vcurrent_prefix_arg; + + Lisp_Object f_Vcommand_history; + + Lisp_Object f_Vcommand_debug_status; + + /* Non-nil means treat the mark as active + even if mark_active is 0. */ + Lisp_Object f_Vmark_even_if_inactive; + + Lisp_Object f_Vmouse_leave_buffer_hook; + + Lisp_Object f_Vexec_path; + Lisp_Object f_Vexec_directory; + Lisp_Object f_Vexec_suffixes; + + Lisp_Object f_Vdata_directory; + Lisp_Object f_Vdoc_directory; + + Lisp_Object f_Vconfigure_info_directory; + Lisp_Object f_Vshared_game_score_directory; + + Lisp_Object f_Vshell_file_name; + + Lisp_Object f_Vprocess_environment; + Lisp_Object f_Vinitial_environment; + + /* Variables to determine word boundary. */ + Lisp_Object f_Vword_combining_categories; + Lisp_Object f_Vword_separating_categories; + + /* This contains all code conversion map available to CCL. */ + Lisp_Object f_Vcode_conversion_map_vector; + + /* Alist of fontname patterns vs corresponding CCL program. */ + Lisp_Object f_Vfont_ccl_encoder_alist; + + /* Vector of registered hash tables for translation. */ + Lisp_Object f_Vtranslation_hash_table_vector; + + /* Vector of translation table ever defined. + ID of a translation table is used to index this vector. */ + Lisp_Object f_Vtranslation_table_vector; + + /* A char-table for characters which may invoke auto-filling. */ + Lisp_Object f_Vauto_fill_chars; + + /* A char-table. An element is non-nil iff the corresponding + character has a printable glyph. */ + Lisp_Object f_Vprintable_chars; + + /* A char-table. An elemnent is a column-width of the corresponding + character. */ + Lisp_Object f_Vchar_width_table; + + /* A char-table. An element is a symbol indicating the direction + property of corresponding character. */ + Lisp_Object f_Vchar_direction_table; + + /* Char table of scripts. */ + Lisp_Object f_Vchar_script_table; + + /* Alist of scripts vs representative characters. */ + Lisp_Object f_Vscript_representative_chars; + + Lisp_Object f_Vunicode_category_table; + + /* List of all charsets. This variable is used only from Emacs + Lisp. */ + Lisp_Object f_Vcharset_list; + + Lisp_Object f_Vcharset_map_path; + + /* If nonzero, don't load charset maps. */ + int f_inhibit_load_charset_map; + + Lisp_Object f_Vcurrent_iso639_language; + + Lisp_Object f_Vpost_self_insert_hook; + + int f_coding_system_require_warning; + + Lisp_Object f_Vselect_safe_coding_system_function; + + /* Mnemonic string for each format of end-of-line. */ + Lisp_Object f_eol_mnemonic_unix; + Lisp_Object f_eol_mnemonic_dos; + Lisp_Object f_eol_mnemonic_mac; + + /* Mnemonic string to indicate format of end-of-line is not yet + decided. */ + Lisp_Object f_eol_mnemonic_undecided; + + Lisp_Object f_Vcoding_system_list; + Lisp_Object f_Vcoding_system_alist; + + /* Coding-system for reading files and receiving data from process. */ + Lisp_Object f_Vcoding_system_for_read; + + /* Coding-system for writing files and sending data to process. */ + Lisp_Object f_Vcoding_system_for_write; + + /* Coding-system actually used in the latest I/O. */ + Lisp_Object f_Vlast_coding_system_used; + + /* Set to non-nil when an error is detected while code conversion. */ + Lisp_Object f_Vlast_code_conversion_error; + + /* A vector of length 256 which contains information about special + Latin codes (especially for dealing with Microsoft codes). */ + Lisp_Object f_Vlatin_extra_code_table; + + /* Flag to inhibit code conversion of end-of-line format. */ + int f_inhibit_eol_conversion; + + /* Flag to inhibit ISO2022 escape sequence detection. */ + int f_inhibit_iso_escape_detection; + + /* Flag to inhibit detection of binary files through null bytes. */ + int f_inhibit_null_byte_detection; + + /* Flag to make buffer-file-coding-system inherit from process-coding. */ + int f_inherit_process_coding_system; + + Lisp_Object f_Vfile_coding_system_alist; + + Lisp_Object f_Vprocess_coding_system_alist; + + Lisp_Object f_Vnetwork_coding_system_alist; + + Lisp_Object f_Vlocale_coding_system; + + /* Flag to tell if we look up translation table on character code + conversion. */ + Lisp_Object f_Venable_character_translation; + + /* Standard translation table to look up on decoding (reading). */ + Lisp_Object f_Vstandard_translation_table_for_decode; + + /* Standard translation table to look up on encoding (writing). */ + Lisp_Object f_Vstandard_translation_table_for_encode; + + /* Alist of charsets vs revision number. */ + Lisp_Object f_Vcharset_revision_table; + + /* Default coding systems used for process I/O. */ + Lisp_Object f_Vdefault_process_coding_system; + + /* Char table for translating Quail and self-inserting input. */ + Lisp_Object f_Vtranslation_table_for_input; + + /* List of symbols `coding-category-xxx' ordered by priority. This + variable is exposed to Emacs Lisp. */ + Lisp_Object f_Vcoding_category_list; + + /* Function to call to adjust composition. */ + Lisp_Object f_Vcompose_chars_after_function; + + Lisp_Object f_Vauto_composition_mode; + + Lisp_Object f_Vauto_composition_function; + + Lisp_Object f_Vcomposition_function_table; + + Lisp_Object f_Vmost_positive_fixnum; + Lisp_Object f_Vmost_negative_fixnum; + + /* Registered buses. */ + Lisp_Object f_Vdbus_registered_buses; + + /* Hash table which keeps function definitions. */ + Lisp_Object f_Vdbus_registered_objects_table; + + /* Whether to debug D-Bus. */ + Lisp_Object f_Vdbus_debug; + + Lisp_Object f_Vcompletion_ignored_extensions; + + /* Non-zero means don't pause redisplay for pending input. (This is + for debugging and for a future implementation of EDT-like + scrolling. */ + int f_redisplay_dont_pause; + + /* If a number (float), check for user input every N seconds. */ + Lisp_Object f_Vredisplay_preemption_period; + + /* Lisp variable visible-bell; enables use of screen-flash instead of + audible bell. */ + int f_visible_bell; + + /* Invert the color of the whole frame, at a low level. */ + int f_inverse_video; + + /* Line speed of the terminal. */ + EMACS_INT f_baud_rate; + + /* Either nil or a symbol naming the window system under which Emacs + creates the first frame. */ + Lisp_Object f_Vinitial_window_system; + + /* Version number of X windows: 10, 11 or nil. */ + Lisp_Object f_Vwindow_system_version; + + /* Vector of glyph definitions. Indexed by glyph number, the contents + are a string which is how to output the glyph. + + If Vglyph_table is nil, a glyph is output by using its low 8 bits + as a character code. + + This is an obsolete feature that is no longer used. The variable + is retained for compatibility. */ + Lisp_Object f_Vglyph_table; + + /* Display table to use for vectors that don't specify their own. */ + Lisp_Object f_Vstandard_display_table; + + /* Nonzero means reading single-character input with prompt so put + cursor on mini-buffer after the prompt. Positive means at end of + text in echo area; negative means at beginning of line. */ + int f_cursor_in_echo_area; + + Lisp_Object f_Vdoc_file_name; + + /* A list of files used to build this Emacs binary. */ + Lisp_Object f_Vbuild_files; + + /* country info */ + EMACS_INT f_dos_country_code; + + EMACS_INT f_dos_codepage; + + EMACS_INT f_dos_timezone_offset; + + EMACS_INT f_dos_decimal_point; + + EMACS_INT f_dos_keyboard_layout; + + EMACS_INT f_dos_hyper_key; + + EMACS_INT f_dos_super_key; + + EMACS_INT f_dos_keypad_mode; + + Lisp_Object f_Vdos_version; + + Lisp_Object f_Vdos_display_scancodes; + + Lisp_Object f_Vdos_windows_version; + + Lisp_Object f_Vbuffer_access_fontify_functions; + + Lisp_Object f_Vbuffer_access_fontified_property; + + /* Non-nil means don't stop at field boundary in text motion commands. */ + Lisp_Object f_Vinhibit_field_text_motion; + + /* Some static data, and a function to initialize it for each run */ + Lisp_Object f_Vsystem_name; + + Lisp_Object f_Vuser_real_login_name; + + Lisp_Object f_Vuser_full_name; + + Lisp_Object f_Vuser_login_name; + + Lisp_Object f_Voperating_system_release; + + /* Command line args from shell, as list of strings. */ + Lisp_Object f_Vcommand_line_args; + + /* The name under which Emacs was invoked, with any leading directory + names discarded. */ + Lisp_Object f_Vinvocation_name; + + /* The directory name from which Emacs was invoked. */ + Lisp_Object f_Vinvocation_directory; + + /* The directory name in which to find subdirs such as lisp and etc. + nil means get them only from PATH_LOADSEARCH. */ + Lisp_Object f_Vinstallation_directory; + + /* The values of `current-time' before and after Emacs initialization. */ + Lisp_Object f_Vbefore_init_time; + Lisp_Object f_Vafter_init_time; + + /* Hook run by `kill-emacs' before it does really anything. */ + Lisp_Object f_Vkill_emacs_hook; + + /* Search path separator. */ + Lisp_Object f_Vpath_separator; + + /* Variable whose value is symbol giving operating system type. */ + Lisp_Object f_Vsystem_type; + + /* Variable whose value is string giving configuration built for. */ + Lisp_Object f_Vsystem_configuration; + + /* Variable whose value is string giving configuration options, + for use when reporting bugs. */ + Lisp_Object f_Vsystem_configuration_options; + + /* Current and previous system locales for messages and time. */ + Lisp_Object f_Vsystem_messages_locale; + + Lisp_Object f_Vprevious_system_messages_locale; + + Lisp_Object f_Vsystem_time_locale; + + Lisp_Object f_Vprevious_system_time_locale; + + /* Copyright and version info. The version number may be updated by + Lisp code. */ + Lisp_Object f_Vemacs_copyright; + Lisp_Object f_Vemacs_version; + + /* Alist of external libraries and files implementing them. */ + Lisp_Object f_Vdynamic_library_alist; + + /* Value of Lisp variable `noninteractive'. + Normally same as C variable `noninteractive' + but nothing terrible happens if user sets this one. */ + int f_noninteractive1; + + /* Nonzero means Emacs was run in --quick mode. */ + int f_inhibit_x_resources; + + Lisp_Object f_Vinhibit_quit; + Lisp_Object f_Vquit_flag; + + /* Maximum size allowed for specpdl allocation */ + EMACS_INT f_max_specpdl_size; + + /* Maximum allowed depth in Lisp evaluations and function calls. */ + EMACS_INT f_max_lisp_eval_depth; + + /* Nonzero means enter debugger before next function call */ + int f_debug_on_next_call; + + /* Non-zero means debugger may continue. This is zero when the + debugger is called during redisplay, where it might not be safe to + continue the interrupted redisplay. */ + int f_debugger_may_continue; + + /* List of conditions (non-nil atom means all) which cause a backtrace + if an error is handled by the command loop's error handler. */ + Lisp_Object f_Vstack_trace_on_error; + + /* List of conditions (non-nil atom means all) which enter the debugger + if an error is handled by the command loop's error handler. */ + Lisp_Object f_Vdebug_on_error; + + /* List of conditions and regexps specifying error messages which + do not enter the debugger even if Vdebug_on_error says they should. */ + Lisp_Object f_Vdebug_ignored_errors; + + /* Non-nil means call the debugger even if the error will be handled. */ + Lisp_Object f_Vdebug_on_signal; + + /* Hook for edebug to use. */ + Lisp_Object f_Vsignal_hook_function; + + /* Nonzero means enter debugger if a quit signal + is handled by the command loop's error handler. */ + int f_debug_on_quit; + + Lisp_Object f_Vdebugger; + + /* Function to process declarations in defmacro forms. */ + Lisp_Object f_Vmacro_declaration_function; + + /* Coding system for file names, or nil if none. */ + Lisp_Object f_Vfile_name_coding_system; + + /* Coding system for file names used only when + Vfile_name_coding_system is nil. */ + Lisp_Object f_Vdefault_file_name_coding_system; + + /* Alist of elements (REGEXP . HANDLER) for file names + whose I/O is done with a special handler. */ + Lisp_Object f_Vfile_name_handler_alist; + + /* Function to be called to decide a coding system of a reading file. */ + Lisp_Object f_Vset_auto_coding_function; + + /* Functions to be called to process text properties in inserted file. */ + Lisp_Object f_Vafter_insert_file_functions; + + /* Functions to be called to create text property annotations for file. */ + Lisp_Object f_Vwrite_region_annotate_functions; + + Lisp_Object f_Vwrite_region_post_annotation_function; + + /* During build_annotations, each time an annotation function is called, + this holds the annotations made by the previous functions. */ + Lisp_Object f_Vwrite_region_annotations_so_far; + + /* File name in which we write a list of all our auto save files. */ + Lisp_Object f_Vauto_save_list_file_name; + + /* Whether or not files are auto-saved into themselves. */ + Lisp_Object f_Vauto_save_visited_file_name; + + /* Whether or not to continue auto-saving after a large deletion. */ + Lisp_Object f_Vauto_save_include_big_deletions; + + /* Nonzero means skip the call to fsync in Fwrite-region. */ + int f_write_region_inhibit_fsync; + + /* Non-zero means call move-file-to-trash in Fdelete_file or + Fdelete_directory_internal. */ + int f_delete_by_moving_to_trash; + + /* These variables describe handlers that have "already" had a chance + to handle the current operation. + + Vinhibit_file_name_handlers is a list of file name handlers. + Vinhibit_file_name_operation is the operation being handled. + If we try to handle that operation, we ignore those handlers. */ + Lisp_Object f_Vinhibit_file_name_handlers; + + Lisp_Object f_Vinhibit_file_name_operation; + + /* The directory for writing temporary files. */ + Lisp_Object f_Vtemporary_file_directory; + + /* Nonzero enables use of dialog boxes for questions + asked by mouse commands. */ + int f_use_dialog_box; + + /* Nonzero enables use of a file dialog for file name + questions asked by mouse commands. */ + int f_use_file_dialog; + + Lisp_Object f_Vfeatures; + + Lisp_Object f_Vfont_weight_table; + Lisp_Object f_Vfont_slant_table; + Lisp_Object f_Vfont_width_table; + + Lisp_Object f_Vfont_encoding_alist; + + Lisp_Object f_Vfont_log; + + Lisp_Object f_Vfont_encoding_charset_alist; + + Lisp_Object f_Vuse_default_ascent; + + Lisp_Object f_Vignore_relative_composition; + + Lisp_Object f_Valternate_fontname_alist; + + Lisp_Object f_Vfontset_alias_alist; + + Lisp_Object f_Vvertical_centering_font_regexp; + + Lisp_Object f_Votf_script_alist; + + /* If we shall make pointer invisible when typing or not. */ + Lisp_Object f_Vmake_pointer_invisible; + + /* The name we're using in resource queries. Most often "emacs". */ + Lisp_Object f_Vx_resource_name; + + /* The application class we're using in resource queries. + Normally "Emacs". */ + Lisp_Object f_Vx_resource_class; + + /* Lower limit value of the frame opacity (alpha transparency). */ + Lisp_Object f_Vframe_alpha_lower_limit; + + Lisp_Object f_Vmenu_bar_mode; + Lisp_Object f_Vtool_bar_mode; + + Lisp_Object f_Vterminal_frame; + + Lisp_Object f_Vdefault_frame_alist; + + Lisp_Object f_Vdefault_frame_scroll_bars; + + Lisp_Object f_Vmouse_position_function; + + Lisp_Object f_Vmouse_highlight; + + Lisp_Object f_Vdelete_frame_functions; + + int f_focus_follows_mouse; + + /* Non-nil means that newline may flow into the right fringe. */ + Lisp_Object f_Voverflow_newline_into_fringe; + + /* List of known fringe bitmap symbols. + + The fringe bitmap number is stored in the `fringe' property on + those symbols. Names for the built-in bitmaps are installed by + loading fringe.el. + */ + Lisp_Object f_Vfringe_bitmaps; + + /* Search path for bitmap files. */ + Lisp_Object f_Vx_bitmap_file_path; + + /* A list of symbols, one for each supported image type. */ + Lisp_Object f_Vimage_types; + + /* Time in seconds after which images should be removed from the cache + if not displayed. */ + Lisp_Object f_Vimage_cache_eviction_delay; + + Lisp_Object f_Vmax_image_size; + + /* Non-zero means draw a cross on images having `:conversion + disabled'. */ + int f_cross_disabled_images; + + Lisp_Object f_Vimagemagick_render_type; + + /* Indentation can insert tabs if this is non-zero; + otherwise always uses spaces. */ + int f_indent_tabs_mode; + + /* Non-nil means don't call the after-change-functions right away, + just record an element in combine_after_change_list. */ + Lisp_Object f_Vcombine_after_change_calls; + + /* Check all markers in the current buffer, looking for something invalid. */ + int f_check_markers_debug_flag; + + /* Non-nil if the present key sequence was obtained by shift translation. */ + Lisp_Object f_Vthis_command_keys_shift_translated; + + /* If non-nil, the function that implements the display of help. + It's called with one argument, the help string to display. */ + Lisp_Object f_Vshow_help_function; + + /* Nonzero means do menu prompting. */ + int f_menu_prompting; + + /* Character to see next line of menu prompt. */ + Lisp_Object f_menu_prompt_more_char; + + /* Nonzero means disregard local maps for the menu bar. */ + int f_inhibit_local_menu_bar_menus; + + /* The user's hook function for outputting an error message. */ + Lisp_Object f_Vcommand_error_function; + + /* The user's ERASE setting. */ + Lisp_Object f_Vtty_erase_char; + + /* Character to recognize as the help char. */ + Lisp_Object f_Vhelp_char; + + /* List of other event types to recognize as meaning "help". */ + Lisp_Object f_Vhelp_event_list; + + /* Form to execute when help char is typed. */ + Lisp_Object f_Vhelp_form; + + /* Command to run when the help character follows a prefix key. */ + Lisp_Object f_Vprefix_help_command; + + /* List of items that should move to the end of the menu bar. */ + Lisp_Object f_Vmenu_bar_final_items; + + /* Expression to evaluate for the tool bar separator image. + This is used for build_desired_tool_bar_string only. For GTK, we + use GTK tool bar seperators. */ + Lisp_Object f_Vtool_bar_separator_image_expression; + + /* Non-nil means show the equivalent key-binding for + any M-x command that has one. + The value can be a length of time to show the message for. + If the value is non-nil and not a number, we wait 2 seconds. */ + Lisp_Object f_Vsuggest_key_bindings; + + /* How long to display an echo-area message when the minibuffer is active. + If the value is not a number, such messages don't time out. */ + Lisp_Object f_Vminibuffer_message_timeout; + + /* If non-nil, this is a map that overrides all other local maps. */ + Lisp_Object f_Voverriding_local_map; + + /* If non-nil, Voverriding_local_map applies to the menu bar. */ + Lisp_Object f_Voverriding_local_map_menu_flag; + + /* Keymap that defines special misc events that should + be processed immediately at a low level. */ + Lisp_Object f_Vspecial_event_map; + + /* Total number of times command_loop has read a key sequence. */ + EMACS_INT f_num_input_keys; + + /* Last input event read as a command. */ + Lisp_Object f_last_command_event; + + /* Last input character read as a command, not counting menus + reached by the mouse. */ + Lisp_Object f_last_nonmenu_event; + + /* Last input event read for any purpose. */ + Lisp_Object f_last_input_event; + + /* If not Qnil, a list of objects to be read as subsequent command input. */ + Lisp_Object f_Vunread_command_events; + + /* If not Qnil, a list of objects to be read as subsequent command input + including input method processing. */ + Lisp_Object f_Vunread_input_method_events; + + /* If not Qnil, a list of objects to be read as subsequent command input + but NOT including input method processing. */ + Lisp_Object f_Vunread_post_input_method_events; + + /* If not -1, an event to be read as subsequent command input. */ + EMACS_INT f_unread_command_char; + + /* A mask of extra modifier bits to put into every keyboard char. */ + EMACS_INT f_extra_keyboard_modifiers; + + /* Char to use as prefix when a meta character is typed in. + This is bound on entry to minibuffer in case ESC is changed there. */ + Lisp_Object f_meta_prefix_char; + + /* Number of idle seconds before an auto-save and garbage collection. */ + Lisp_Object f_Vauto_save_timeout; + + /* Total number of times read_char has returned, outside of macros. */ + EMACS_INT f_num_nonmacro_input_events; + + /* Auto-save automatically when this many characters have been typed + since the last time. */ + EMACS_INT f_auto_save_interval; + + /* The command being executed by the command loop. + Commands may set this, and the value set will be copied into + current_kboard->Vlast_command instead of the actual command. */ + Lisp_Object f_Vthis_command; + + /* If the lookup of the command returns a binding, the original + command is stored in this-original-command. It is nil otherwise. */ + Lisp_Object f_Vthis_original_command; + + /* A user-visible version of the above, intended to allow users to + figure out where the last event came from, if the event doesn't + carry that information itself (i.e. if it was a character). */ + Lisp_Object f_Vlast_event_frame; + + /* If non-nil, active regions automatically become the window selection. */ + Lisp_Object f_Vselect_active_regions; + + /* The text in the active region prior to modifying the buffer. + Used by the `select-active-regions' feature. */ + Lisp_Object f_Vsaved_region_selection; + + /* Echo unfinished commands after this many seconds of pause. */ + Lisp_Object f_Vecho_keystrokes; + + /* Form to evaluate (if non-nil) when Emacs is started. */ + Lisp_Object f_Vtop_level; + + /* If non-nil, this implements the current input method. */ + Lisp_Object f_Vinput_method_function; + + /* When we call Vinput_method_function, + this holds the echo area message that was just erased. */ + Lisp_Object f_Vinput_method_previous_message; + + /* Non-nil means deactivate the mark at end of this command. */ + Lisp_Object f_Vdeactivate_mark; + + /* Menu bar specified in Lucid Emacs fashion. */ + Lisp_Object f_Vlucid_menu_bar_dirty_flag; + + Lisp_Object f_Vpre_command_hook; + + Lisp_Object f_Vpost_command_hook; + + Lisp_Object f_Vcommand_hook_internal; + + /* Parent keymap of terminal-local function-key-map instances. */ + Lisp_Object f_Vfunction_key_map; + + /* Keymap of key translations that can override keymaps. */ + Lisp_Object f_Vkey_translation_map; + + /* List of deferred actions to be performed at a later time. + The precise format isn't relevant here; we just check whether it is nil. */ + Lisp_Object f_Vdeferred_action_list; + + /* Function to call to handle deferred actions, when there are any. */ + Lisp_Object f_Vdeferred_action_function; + + /* If this flag is non-nil, we check mouse_moved to see when the + mouse moves, and motion events will appear in the input stream. + Otherwise, mouse motion is ignored. */ + Lisp_Object f_do_mouse_tracking; + + /* List of absolute timers. Appears in order of next scheduled event. */ + Lisp_Object f_Vtimer_list; + + /* List of idle time timers. Appears in order of next scheduled event. */ + Lisp_Object f_Vtimer_idle_list; + + /* After a command is executed, if point is moved into a region that + has specific properties (e.g. composition, display), we adjust + point to the boundary of the region. But, if a command sets this + variable to non-nil, we suppress this point adjustment. This + variable is set to nil before reading a command. */ + Lisp_Object f_Vdisable_point_adjustment; + + /* If non-nil, always disable point adjustment. */ + Lisp_Object f_Vglobal_disable_point_adjustment; + + /* If non-nil, events produced by disabled menu items and tool-bar + buttons are not ignored. Help functions bind this to allow help on + those items and buttons. */ + Lisp_Object f_Venable_disabled_menus_and_buttons; + + /* Nonzero means don't try to suspend even if the operating system seems + to support it. */ + int f_cannot_suspend; + + /* Number of seconds between polling for input. This is a Lisp + variable that can be bound. */ + EMACS_INT f_polling_period; + + /* subprocesses */ + Lisp_Object f_Vthrow_on_input; + + /* The maximum time between clicks to make a double-click, or Qnil to + disable double-click detection, or Qt for no time limit. */ + Lisp_Object f_Vdouble_click_time; + + /* Maximum number of pixels the mouse may be moved between clicks + to make a double-click. */ + EMACS_INT f_double_click_fuzz; + + /* was MinibufLocalMap */ + Lisp_Object f_Vminibuffer_local_map; + + /* was MinibufLocalNSMap */ + Lisp_Object f_Vminibuffer_local_ns_map; + + /* was MinibufLocalCompletionMap */ + Lisp_Object f_Vminibuffer_local_completion_map; + + /* keymap used for minibuffers when doing completion in filenames */ + Lisp_Object f_Vminibuffer_local_filename_completion_map; + + /* keymap used for minibuffers when doing completion in filenames + with require-match*/ + Lisp_Object f_Vminibuffer_local_filename_must_match_map; + + /* was MinibufLocalMustMatchMap */ + Lisp_Object f_Vminibuffer_local_must_match_map; + + /* Alist of minor mode variables and keymaps. */ + Lisp_Object f_Vminor_mode_map_alist; + + /* Alist of major-mode-specific overrides for + minor mode variables and keymaps. */ + Lisp_Object f_Vminor_mode_overriding_map_alist; + + /* List of emulation mode keymap alists. */ + Lisp_Object f_Vemulation_mode_map_alists; + + /* A list of all commands given new bindings since a certain time + when nil was stored here. + This is used to speed up recomputation of menu key equivalents + when Emacs starts up. t means don't record anything here. */ + Lisp_Object f_Vdefine_key_rebound_commands; + + Lisp_Object f_Vwhere_is_preferred_modifier; + + Lisp_Object f_Vvalues; + Lisp_Object f_Vstandard_input; + Lisp_Object f_Vafter_load_alist; + + Lisp_Object f_Veval_buffer_list; + + /* non-zero if inside `load' */ + int f_load_in_progress; + + /* Directory in which the sources were found. */ + Lisp_Object f_Vsource_directory; + + /* Search path and suffixes for files to be loaded. */ + Lisp_Object f_Vload_path; + Lisp_Object f_Vload_suffixes; + Lisp_Object f_Vload_file_rep_suffixes; + + /* File name of user's init file. */ + Lisp_Object f_Vuser_init_file; + + /* This is the user-visible association list that maps features to + lists of defs in their load files. */ + Lisp_Object f_Vload_history; + + /* This is used to build the load history. */ + Lisp_Object f_Vcurrent_load_list; + + /* List of files that were preloaded. */ + Lisp_Object f_Vpreloaded_file_list; + + /* Name of file actually being read by `load'. */ + Lisp_Object f_Vload_file_name; + + /* Function to use for reading, in `load' and friends. */ + Lisp_Object f_Vload_read_function; + + /* Non-nil means read recursive structures using #n= and #n# syntax. */ + Lisp_Object f_Vread_circle; + + /* Nonzero means load should forcibly load all dynamic doc strings. */ + int f_load_force_doc_strings; + + /* Nonzero means read should convert strings to unibyte. */ + int f_load_convert_to_unibyte; + + /* Function to use for loading an Emacs Lisp source file (not + compiled) instead of readevalloop. */ + Lisp_Object f_Vload_source_file_function; + + /* List of all DEFVAR_BOOL variables. Used by the byte optimizer. */ + Lisp_Object f_Vbyte_boolean_vars; + + /* Whether or not to add a `read-positions' property to symbols + read. */ + Lisp_Object f_Vread_with_symbol_positions; + + /* List of (SYMBOL . POSITION) accumulated so far. */ + Lisp_Object f_Vread_symbol_positions_list; + + Lisp_Object f_Vold_style_backquotes; + + /* Non-zero means load dangerous compiled Lisp files. */ + int f_load_dangerous_libraries; + + /* Non-zero means force printing messages when loading Lisp files. */ + int f_force_load_messages; + + /* A regular expression used to detect files compiled with Emacs. */ + Lisp_Object f_Vbytecomp_version_regexp; + + Lisp_Object f_Vobarray; + + /* Kbd macro currently being executed (a string or vector). */ + Lisp_Object f_Vexecuting_kbd_macro; + + /* Index of next character to fetch from that macro. */ + EMACS_INT f_executing_kbd_macro_index; + + /* Nonzero means enable debugging checks on byte/char correspondences. */ + int f_byte_debug_flag; + + Lisp_Object f_Vhistory_length; + + /* No duplicates in history. */ + int f_history_delete_duplicates; + + /* Non-nil means add new input to history. */ + Lisp_Object f_Vhistory_add_new_input; + + /* Nonzero means let functions called when within a minibuffer + invoke recursive minibuffers (to read arguments, or whatever) */ + int f_enable_recursive_minibuffers; + + /* Nonzero means don't ignore text properties + in Fread_from_minibuffer. */ + int f_minibuffer_allow_text_properties; + + /* help-form is bound to this while in the minibuffer. */ + Lisp_Object f_Vminibuffer_help_form; + + /* Variable which is the history list to add minibuffer values to. */ + Lisp_Object f_Vminibuffer_history_variable; + + /* Current position in the history list (adjusted by M-n and M-p). */ + Lisp_Object f_Vminibuffer_history_position; + + /* Text properties that are added to minibuffer prompts. + These are in addition to the basic `field' property, and stickiness + properties. */ + Lisp_Object f_Vminibuffer_prompt_properties; + + Lisp_Object f_Vminibuffer_setup_hook; + + Lisp_Object f_Vminibuffer_exit_hook; + + /* Function to call to read a buffer name. */ + Lisp_Object f_Vread_buffer_function; + + /* Nonzero means completion ignores case. */ + int f_completion_ignore_case; + + int f_read_buffer_completion_ignore_case; + + /* List of regexps that should restrict possible completions. */ + Lisp_Object f_Vcompletion_regexp_list; + + /* Nonzero means raise the minibuffer frame when the minibuffer + is entered. */ + int f_minibuffer_auto_raise; + + /* Keymap for reading expressions. */ + Lisp_Object f_Vread_expression_map; + + Lisp_Object f_Vminibuffer_completion_table; + + Lisp_Object f_Vminibuffer_completion_predicate; + + Lisp_Object f_Vminibuffer_completion_confirm; + + Lisp_Object f_Vminibuffer_completing_file_name; + + Lisp_Object f_Vdos_unsupported_char_glyph; + + Lisp_Object f_Vstandard_output; + + Lisp_Object f_Vfloat_output_format; + + /* Maximum length of list to print in full; noninteger means + effectively infinity */ + Lisp_Object f_Vprint_length; + + /* Maximum depth of list to print in full; noninteger means + effectively infinity. */ + Lisp_Object f_Vprint_level; + + /* Nonzero means print newlines in strings as \n. */ + int f_print_escape_newlines; + + /* Nonzero means to print single-byte non-ascii characters in strings as + octal escapes. */ + int f_print_escape_nonascii; + + /* Nonzero means to print multibyte characters in strings as hex escapes. */ + int f_print_escape_multibyte; + + /* Nonzero means print (quote foo) forms as 'foo, etc. */ + int f_print_quoted; + + /* Non-nil means print #: before uninterned symbols. */ + Lisp_Object f_Vprint_gensym; + + /* Non-nil means print recursive structures using #n= and #n# syntax. */ + Lisp_Object f_Vprint_circle; + + /* Non-nil means keep continuous number for #n= and #n# syntax + between several print functions. */ + Lisp_Object f_Vprint_continuous_numbering; + + Lisp_Object f_Vprint_number_table; + + /* A flag to control printing of `charset' text property. + The default value is Qdefault. */ + Lisp_Object f_Vprint_charset_text_property; + + /* Nonzero means delete a process right away if it exits. */ + int f_delete_exited_processes; + + /* t means use pty, nil means use a pipe, + maybe other values to come. */ + Lisp_Object f_Vprocess_connection_type; + + /* Non-nil means to delay reading process output to improve buffering. + A value of t means that delay is reset after each send, any other + non-nil value does not reset the delay. A value of nil disables + adaptive read buffering completely. */ + Lisp_Object f_Vprocess_adaptive_read_buffering; + + Lisp_Object f_Vsearch_spaces_regexp; + + /* If non-nil, the match data will not be changed during call to + searching or matching functions. This variable is for internal use + only. */ + Lisp_Object f_Vinhibit_changing_match_data; + + int f_words_include_escapes; + + int f_parse_sexp_lookup_properties; + + /* Nonzero means `scan-sexps' treat all multibyte characters as symbol. */ + int f_multibyte_syntax_as_symbol; + + /* Non-zero means an open parenthesis in column 0 is always considered + to be the start of a defun. Zero means an open parenthesis in + column 0 has no special meaning. */ + int f_open_paren_in_column_0_is_defun_start; + + int f_parse_sexp_ignore_comments; + + /* Char-table of functions that find the next or previous word + boundary. */ + Lisp_Object f_Vfind_word_boundary_function_table; + + /* If true, use "vs", otherwise use "ve" to make the cursor visible. */ + int f_visible_cursor; + + /* Functions to call after suspending a tty. */ + Lisp_Object f_Vsuspend_tty_functions; + + /* Functions to call after resuming a tty. */ + Lisp_Object f_Vresume_tty_functions; + + /* Nonzero means no need to redraw the entire frame on resuming a + suspended Emacs. This is useful on terminals with multiple + pages, where one page is used for Emacs and another for all + else. */ + int f_no_redraw_on_reenter; + + /* Provided for lisp packages. */ + int f_system_uses_terminfo; + + /* Function to use to ring the bell. */ + Lisp_Object f_Vring_bell_function; + + Lisp_Object f_Vdelete_terminal_functions; + + Lisp_Object f_Vinhibit_point_motion_hooks; + + Lisp_Object f_Vdefault_text_properties; + + Lisp_Object f_Vchar_property_alias_alist; + + Lisp_Object f_Vtext_property_default_nonsticky; + + /* Limits controlling how much undo information to keep. */ + EMACS_INT f_undo_limit; + + EMACS_INT f_undo_strong_limit; + + Lisp_Object f_Vundo_outer_limit; + + /* Function to call when undo_outer_limit is exceeded. */ + Lisp_Object f_Vundo_outer_limit_function; + + /* Nonzero means do not record point in record_point. */ + int f_undo_inhibit_record_point; + + /* Coding system for communicating with other Windows programs via the + clipboard. */ + Lisp_Object f_Vselection_coding_system; + + /* Coding system for the next communicating with other Windows programs. */ + Lisp_Object f_Vnext_selection_coding_system; + + /* Determine whether to make frame dimensions match the screen buffer, + or the current window size. The former is desirable when running + over telnet, while the latter is more useful when working directly at + the console with a large scroll-back buffer. */ + int f_w32_use_full_screen_buffer; + + /* The colormap for converting color names to RGB values */ + Lisp_Object f_Vw32_color_map; + + /* Non nil if alt key presses are passed on to Windows. */ + Lisp_Object f_Vw32_pass_alt_to_system; + + /* Non nil if alt key is translated to meta_modifier, nil if it is translated + to alt_modifier. */ + Lisp_Object f_Vw32_alt_is_meta; + + /* If non-zero, the windows virtual key code for an alternative quit key. */ + int f_w32_quit_key; + + /* Non nil if left window key events are passed on to Windows (this only + affects whether "tapping" the key opens the Start menu). */ + Lisp_Object f_Vw32_pass_lwindow_to_system; + + /* Non nil if right window key events are passed on to Windows (this + only affects whether "tapping" the key opens the Start menu). */ + Lisp_Object f_Vw32_pass_rwindow_to_system; + + /* Virtual key code used to generate "phantom" key presses in order + to stop system from acting on Windows key events. */ + Lisp_Object f_Vw32_phantom_key_code; + + /* Modifier associated with the left "Windows" key, or nil to act as a + normal key. */ + Lisp_Object f_Vw32_lwindow_modifier; + + /* Modifier associated with the right "Windows" key, or nil to act as a + normal key. */ + Lisp_Object f_Vw32_rwindow_modifier; + + /* Modifier associated with the "Apps" key, or nil to act as a normal + key. */ + Lisp_Object f_Vw32_apps_modifier; + + /* Value is nil if Num Lock acts as a function key. */ + Lisp_Object f_Vw32_enable_num_lock; + + /* Value is nil if Caps Lock acts as a function key. */ + Lisp_Object f_Vw32_enable_caps_lock; + + /* Modifier associated with Scroll Lock, or nil to act as a normal key. */ + Lisp_Object f_Vw32_scroll_lock_modifier; + + /* Switch to control whether we inhibit requests for synthesized bold + and italic versions of fonts. */ + int f_w32_enable_synthesized_fonts; + + /* Enable palette management. */ + Lisp_Object f_Vw32_enable_palette; + + /* Control how close left/right button down events must be to + be converted to a middle button down event. */ + int f_w32_mouse_button_tolerance; + + /* Minimum interval between mouse movement (and scroll bar drag) + events that are passed on to the event loop. */ + int f_w32_mouse_move_interval; + + /* Flag to indicate if XBUTTON events should be passed on to Windows. */ + int f_w32_pass_extra_mouse_buttons_to_system; + + /* Flag to indicate if media keys should be passed on to Windows. */ + int f_w32_pass_multimedia_buttons_to_system; + + /* Non nil if no window manager is in use. */ + Lisp_Object f_Vx_no_window_manager; + + /* The background and shape of the mouse pointer, and shape when not + over text or in the modeline. */ + Lisp_Object f_Vx_pointer_shape; + Lisp_Object f_Vx_nontext_pointer_shape; + Lisp_Object f_Vx_mode_pointer_shape; + + /* TODO: Mouse cursor customization. */ + Lisp_Object f_Vx_hourglass_pointer_shape; + Lisp_Object f_Vx_window_horizontal_drag_shape; + + /* The shape when over mouse-sensitive text. */ + Lisp_Object f_Vx_sensitive_text_pointer_shape; + + /* Color of chars displayed in cursor box. */ + Lisp_Object f_Vx_cursor_fore_pixel; + + /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */ + Lisp_Object f_Vx_pixel_size_width_font_regexp; + + /* Alist of bdf fonts and the files that define them. */ + Lisp_Object f_Vw32_bdf_filename_alist; + + /* A flag to control whether fonts are matched strictly or not. */ + int f_w32_strict_fontnames; + + /* A flag to control whether we should only repaint if GetUpdateRect + indicates there is an update region. */ + int f_w32_strict_painting; + + /* The ANSI codepage. */ + int f_w32_ansi_code_page; + + /* Maximum size for tooltips; a cons (COLUMNS . ROWS). */ + Lisp_Object f_Vx_max_tooltip_size; + + /* Associative list linking character set strings to Windows codepages. */ + Lisp_Object f_Vw32_charset_info_alist; + + /* Control whether spawnve quotes arguments as necessary to ensure + correct parsing by child process. Because not all uses of spawnve + are careful about constructing argv arrays, we make this behavior + conditional (off by default). */ + Lisp_Object f_Vw32_quote_process_args; + + /* Control whether create_child causes the process' window to be + hidden. The default is nil. */ + Lisp_Object f_Vw32_start_process_show_window; + + /* Control whether create_child causes the process to inherit Emacs' + console window, or be given a new one of its own. The default is + nil, to allow multiple DOS programs to run on Win95. Having separate + consoles also allows Emacs to cleanly terminate process groups. */ + Lisp_Object f_Vw32_start_process_share_console; + + /* Control whether create_child cause the process to inherit Emacs' + error mode setting. The default is t, to minimize the possibility of + subprocesses blocking when accessing unmounted drives. */ + Lisp_Object f_Vw32_start_process_inherit_error_mode; + + /* Time to sleep before reading from a subprocess output pipe - this + avoids the inefficiency of frequently reading small amounts of data. + This is primarily necessary for handling DOS processes on Windows 95, + but is useful for W32 processes on both Windows 95 and NT as well. */ + int f_w32_pipe_read_delay; + + /* Control conversion of upper case file names to lower case. + nil means no, t means yes. */ + Lisp_Object f_Vw32_downcase_file_names; + + /* Control whether stat() attempts to generate fake but hopefully + "accurate" inode values, by hashing the absolute truenames of files. + This should detect aliasing between long and short names, but still + allows the possibility of hash collisions. */ + Lisp_Object f_Vw32_generate_fake_inodes; + + /* Control whether stat() attempts to determine file type and link count + exactly, at the expense of slower operation. Since true hard links + are supported on NTFS volumes, this is only relevant on NT. */ + Lisp_Object f_Vw32_get_true_file_attributes; + + /* Coding system for communicating with other programs via the + clipboard. */ + + /* Coding system for the next communication with other programs. */ + + /* Non-nil means Emacs uses toolkit scroll bars. */ + Lisp_Object f_Vx_toolkit_scroll_bars; + + /* Non-zero means make use of UNDERLINE_POSITION font properties. */ + int f_x_use_underline_position_properties; + + /* Non-zero means to draw the underline at the same place as the descent line. */ + int f_x_underline_at_descent_line; + + int f_w32_use_visible_system_caret; + + int f_w32_num_mouse_buttons; + + Lisp_Object f_Vw32_swap_mouse_buttons; + + /* Control whether x_raise_frame also sets input focus. */ + Lisp_Object f_Vw32_grab_focus_on_raise; + + /* Control whether Caps Lock affects non-ascii characters. */ + Lisp_Object f_Vw32_capslock_is_shiftlock; + + /* Control whether right-alt and left-ctrl should be recognized as AltGr. */ + Lisp_Object f_Vw32_recognize_altgr; + + /* Non-nil means it is the window for C-M-v to scroll + when the mini-buffer is selected. */ + Lisp_Object f_Vminibuf_scroll_window; + + /* Non-nil means this is the buffer whose window C-M-v should scroll. */ + Lisp_Object f_Vother_window_scroll_buffer; + + /* Non-nil means it's function to call to display temp buffers. */ + Lisp_Object f_Vtemp_buffer_show_function; + + /* Non-zero means line and page scrolling on tall lines (with images) + does partial scrolling by modifying window-vscroll. */ + int f_auto_window_vscroll_p; + + /* Non-zero means to use mode-line-inactive face in all windows but the + selected-window and the minibuffer-scroll-window when the + minibuffer is active. */ + int f_mode_line_in_non_selected_windows; + + /* If a window gets smaller than either of these, it is removed. */ + EMACS_INT f_window_min_height; + + EMACS_INT f_window_min_width; + + /* Number of lines of continuity in scrolling by screenfuls. */ + EMACS_INT f_next_screen_context_lines; + + Lisp_Object f_Vwindow_configuration_change_hook; + + /* Non-nil means scroll commands try to put point + at the same screen height as previously. */ + Lisp_Object f_Vscroll_preserve_screen_position; + + /* Non-nil means that text is inserted before window's markers. */ + Lisp_Object f_Vwindow_point_insertion_type; + + /* If non-nil, then the `recenter' command with a nil argument + the entire frame to be redrawn; the special value `tty' causes the + frame to be redrawn only if it is a tty frame. */ + Lisp_Object f_Vrecenter_redisplay; + + Lisp_Object f_Vwindow_scroll_functions; + + Lisp_Object f_Vwindow_text_change_functions; + + Lisp_Object f_Vredisplay_end_trigger_functions; + + /* Functions called to fontify regions of text. */ + Lisp_Object f_Vfontification_functions; + + /* Non-nil means automatically select any window when the mouse + cursor moves into it. */ + Lisp_Object f_Vmouse_autoselect_window; + + Lisp_Object f_Vwrap_prefix; + + Lisp_Object f_Vline_prefix; + + /* Non-zero means draw tool bar buttons raised when the mouse moves + over them. */ + int f_auto_raise_tool_bar_buttons_p; + + /* Non-zero means to reposition window if cursor line is only partially visible. */ + int f_make_cursor_line_fully_visible_p; + + /* Margin below tool bar in pixels. 0 or nil means no margin. + If value is `internal-border-width' or `border-width', + the corresponding frame parameter is used. */ + Lisp_Object f_Vtool_bar_border; + + /* Margin around tool bar buttons in pixels. */ + Lisp_Object f_Vtool_bar_button_margin; + + /* Thickness of shadow to draw around tool bar buttons. */ + EMACS_INT f_tool_bar_button_relief; + + /* Non-nil means automatically resize tool-bars so that all tool-bar + items are visible, and no blank lines remain. + + If value is `grow-only', only make tool-bar bigger. */ + Lisp_Object f_Vauto_resize_tool_bars; + + /* Type of tool bar. Can be symbols image, text, both or both-hroiz. */ + Lisp_Object f_Vtool_bar_style; + + /* Maximum number of characters a label can have to be shown. */ + EMACS_INT f_tool_bar_max_label_size; + + /* Non-zero means draw block and hollow cursor as wide as the glyph + under it. For example, if a block cursor is over a tab, it will be + drawn as wide as that tab on the display. */ + int f_x_stretch_cursor_p; + + Lisp_Object f_Vinhibit_redisplay; + + /* Non-zero means Lisp evaluation during redisplay is inhibited. */ + int f_inhibit_eval_during_redisplay; + + /* Symbols used in text property values. */ + Lisp_Object f_Vdisplay_pixels_per_inch; + + /* Non-nil means highlight trailing whitespace. */ + Lisp_Object f_Vshow_trailing_whitespace; + + /* Non-nil means escape non-break space and hyphens. */ + Lisp_Object f_Vnobreak_char_display; + + /* Non-nil means show the text cursor in void text areas + i.e. in blank areas after eol and eob. This used to be + the default in 21.3. */ + Lisp_Object f_Vvoid_text_area_pointer; + + /* Nonzero means truncate lines in all windows less wide than the + frame. */ + Lisp_Object f_Vtruncate_partial_width_windows; + + /* A flag to control how to display unibyte 8-bit character. */ + int f_unibyte_display_via_language_environment; + + /* Nonzero means we have more than one non-mini-buffer-only frame. + Not guaranteed to be accurate except while parsing + frame-title-format. */ + int f_multiple_frames; + + Lisp_Object f_Vglobal_mode_string; + + /* List of variables (symbols) which hold markers for overlay arrows. + The symbols on this list are examined during redisplay to determine + where to display overlay arrows. */ + Lisp_Object f_Voverlay_arrow_variable_list; + + /* Marker for where to display an arrow on top of the buffer text. */ + Lisp_Object f_Voverlay_arrow_position; + + /* String to display for the arrow. Only used on terminal frames. */ + Lisp_Object f_Voverlay_arrow_string; + + /* Like mode-line-format, but for the title bar on a visible frame. */ + Lisp_Object f_Vframe_title_format; + + /* Like mode-line-format, but for the title bar on an iconified frame. */ + Lisp_Object f_Vicon_title_format; + + /* List of functions to call when a window's size changes. These + functions get one arg, a frame on which one or more windows' sizes + have changed. */ + Lisp_Object f_Vwindow_size_change_functions; + + Lisp_Object f_Vmenu_bar_update_hook; + + /* Nonzero means highlight the region even in nonselected windows. */ + int f_highlight_nonselected_windows; + + /* If cursor motion alone moves point off frame, try scrolling this + many lines up or down if that will bring it back. */ + EMACS_INT f_emacs_scroll_step; + + /* Nonzero means scroll just far enough to bring point back on the + screen, when appropriate. */ + EMACS_INT f_scroll_conservatively; + + /* Recenter the window whenever point gets within this many lines of + the top or bottom of the window. This value is translated into a + pixel value by multiplying it with FRAME_LINE_HEIGHT, which means + that there is really a fixed pixel height scroll margin. */ + EMACS_INT f_scroll_margin; + + /* Zero means display the mode-line/header-line/menu-bar in the default face + (this slightly odd definition is for compatibility with previous versions + of emacs), non-zero means display them using their respective faces. + + This variable is deprecated. */ + int f_mode_line_inverse_video; + + /* Maximum buffer size for which to display line numbers. */ + Lisp_Object f_Vline_number_display_limit; + + /* Line width to consider when repositioning for line number display. */ + EMACS_INT f_line_number_display_limit_width; + + /* Number of lines to keep in the message log buffer. t means + infinite. nil means don't log at all. */ + Lisp_Object f_Vmessage_log_max; + + int f_inhibit_menubar_update; + + /* When evaluating expressions from menu bar items (enable conditions, + for instance), this is the frame they are being processed for. */ + Lisp_Object f_Vmenu_updating_frame; + + /* Maximum height for resizing mini-windows. Either a float + specifying a fraction of the available height, or an integer + specifying a number of lines. */ + Lisp_Object f_Vmax_mini_window_height; + + /* Non-zero means messages should be displayed with truncated + lines instead of being continued. */ + int f_message_truncate_lines; + + /* How to blink the default frame cursor off. */ + Lisp_Object f_Vblink_cursor_alist; + + /* Variables to turn off display optimizations from Lisp. */ + int f_inhibit_try_window_id; + int f_inhibit_try_window_reusing; + + int f_inhibit_try_cursor_movement; + + /* Non-zero means automatically scroll windows horizontally to make + point visible. */ + int f_automatic_hscrolling_p; + + /* How close to the margin can point get before the window is scrolled + horizontally. */ + EMACS_INT f_hscroll_margin; + + /* How much to scroll horizontally when point is inside the above margin. */ + Lisp_Object f_Vhscroll_step; + + /* The variable `resize-mini-windows'. If nil, don't resize + mini-windows. If t, always resize them to fit the text they + display. If `grow-only', let mini-windows grow only until they + become empty. */ + Lisp_Object f_Vresize_mini_windows; + + /* Space between overline and text. */ + EMACS_INT f_overline_margin; + + /* Require underline to be at least this many screen pixels below baseline + This to avoid underline "merging" with the base of letters at small + font sizes, particularly when x_use_underline_position_properties is on. */ + EMACS_INT f_underline_minimum_offset; + + /* Non-zero means don't free realized faces. Bound while freeing + realized faces is dangerous because glyph matrices might still + reference them. */ + int f_inhibit_free_realized_faces; + + /* Non-zero means we're allowed to display a hourglass pointer. */ + int f_display_hourglass_p; + + /* Number of seconds to wait before displaying an hourglass cursor. */ + Lisp_Object f_Vhourglass_delay; + + /* Char-table to control the display of glyphless characters. */ + Lisp_Object f_Vglyphless_char_display; + + EMACS_INT f_debug_end_pos; + + /* Default stipple pattern used on monochrome displays. This stipple + pattern is used on monochrome displays instead of shades of gray + for a face background color. See `set-face-stipple' for possible + values for this variable. */ + Lisp_Object f_Vface_default_stipple; + + Lisp_Object f_Vscalable_fonts_allowed; + + /* List of regular expressions that matches names of fonts to ignore. */ + Lisp_Object f_Vface_ignored_fonts; + + /* Alist of font name patterns vs the rescaling factor. */ + Lisp_Object f_Vface_font_rescale_alist; + + /* Maximum number of fonts to consider in font_list. If not an + integer > 0, DEFAULT_FONT_LIST_LIMIT is used instead. */ + Lisp_Object f_Vfont_list_limit; + + /* Alist of global face definitions. Each element is of the form + (FACE . LFACE) where FACE is a symbol naming a face and LFACE + is a Lisp vector of face attributes. These faces are used + to initialize faces for new frames. */ + Lisp_Object f_Vface_new_frame_defaults; + + /* Alist of face remappings. Each element is of the form: + (FACE REPLACEMENT...) which causes display of the face FACE to use + REPLACEMENT... instead. REPLACEMENT... is interpreted the same way + the value of a `face' text property is: it may be (1) A face name, + (2) A list of face names, (3) A property-list of face attribute/value + pairs, or (4) A list of face names intermixed with lists containing + face attribute/value pairs. + + Multiple entries in REPLACEMENT... are merged together to form the final + result, with faces or attributes earlier in the list taking precedence + over those that are later. + + Face-name remapping cycles are suppressed; recursive references use + the underlying face instead of the remapped face. */ + Lisp_Object f_Vface_remapping_alist; + + /* An alist of defined terminal colors and their RGB values. */ + Lisp_Object f_Vtty_defined_color_alist; + + /* LessTif/Motif version info. */ + Lisp_Object f_Vmotif_version_string; + + /* GTK+ version info */ + Lisp_Object f_Vgtk_version_string; + + /* Non-zero means prompt with the old GTK file selection dialog. */ + int f_x_gtk_use_old_file_dialog; + + /* If non-zero, by default show hidden files in the GTK file chooser. */ + int f_x_gtk_show_hidden_files; + + /* If non-zero, don't show additional help text in the GTK file chooser. */ + int f_x_gtk_file_dialog_help_text; + + /* If non-zero, don't collapse to tool bar when it is detached. */ + int f_x_gtk_whole_detached_tool_bar; + + /* If non-zero, use Gtk+ tooltips. */ + int f_x_gtk_use_system_tooltips; + + /* The background and shape of the mouse pointer, and shape when not + over text or in the modeline. */ + + /* The shape when over mouse-sensitive text. */ + + /* If non-nil, the pointer shape to indicate that windows can be + dragged horizontally. */ + + /* Color of chars displayed in cursor box. */ + + /* Non nil if no window manager is in use. */ + + /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */ + + /* Maximum size for tooltips; a cons (COLUMNS . ROWS). */ + + Lisp_Object f_Vx_lost_selection_functions; + + Lisp_Object f_Vx_sent_selection_functions; + + /* This is an alist whose CARs are selection-types (whose names are the same + as the names of X Atoms) and whose CDRs are the names of Lisp functions to + call to convert the given Emacs selection value to a string representing + the given selection type. This is for Lisp-level extension of the emacs + selection handling. */ + Lisp_Object f_Vselection_converter_alist; + + /* If the selection owner takes too long to reply to a selection request, + we give up on it. This is in milliseconds (0 = no timeout.) */ + EMACS_INT f_x_selection_timeout; + + int f_use_system_font; + + Lisp_Object f_Vxft_settings; + + /* The client session id for this session as a lisp object. */ + Lisp_Object f_Vx_session_id; + + /* The id we had the previous session. This is only available if we + have been started by the session manager with SMID_OPT. */ + Lisp_Object f_Vx_session_previous_id; + + /* Non-nil means Emacs uses toolkit scroll bars. */ + + /* Non-zero means make use of UNDERLINE_POSITION font properties. */ + + /* Non-zero means to draw the underline at the same place as the descent line. */ + + /* Non-zero means to not move point as a result of clicking on a + frame to focus it (when focus-follows-mouse is nil). */ + int f_x_mouse_click_focus_ignore_position; + + /* The keysyms to use for the various modifiers. */ + Lisp_Object f_Vx_alt_keysym; + Lisp_Object f_Vx_hyper_keysym; + Lisp_Object f_Vx_meta_keysym; + Lisp_Object f_Vx_super_keysym; + + Lisp_Object f_Vx_keysym_table; +}; + +extern struct emacs_globals globals; + +#define Vafter_change_functions \ + globals.f_Vafter_change_functions +#define Vafter_init_time \ + globals.f_Vafter_init_time +#define Vafter_insert_file_functions \ + globals.f_Vafter_insert_file_functions +#define Vafter_load_alist \ + globals.f_Vafter_load_alist +#define Valternate_fontname_alist \ + globals.f_Valternate_fontname_alist +#define Vauto_composition_function \ + globals.f_Vauto_composition_function +#define Vauto_composition_mode \ + globals.f_Vauto_composition_mode +#define Vauto_fill_chars \ + globals.f_Vauto_fill_chars +#define Vauto_resize_tool_bars \ + globals.f_Vauto_resize_tool_bars +#define Vauto_save_include_big_deletions \ + globals.f_Vauto_save_include_big_deletions +#define Vauto_save_list_file_name \ + globals.f_Vauto_save_list_file_name +#define Vauto_save_timeout \ + globals.f_Vauto_save_timeout +#define Vauto_save_visited_file_name \ + globals.f_Vauto_save_visited_file_name +#define Vbefore_change_functions \ + globals.f_Vbefore_change_functions +#define Vbefore_init_time \ + globals.f_Vbefore_init_time +#define Vblink_cursor_alist \ + globals.f_Vblink_cursor_alist +#define Vbuffer_access_fontified_property \ + globals.f_Vbuffer_access_fontified_property +#define Vbuffer_access_fontify_functions \ + globals.f_Vbuffer_access_fontify_functions +#define Vbuild_files \ + globals.f_Vbuild_files +#define Vbyte_boolean_vars \ + globals.f_Vbyte_boolean_vars +#define Vbyte_code_meter \ + globals.f_Vbyte_code_meter +#define Vbytecomp_version_regexp \ + globals.f_Vbytecomp_version_regexp +#define Vchange_major_mode_hook \ + globals.f_Vchange_major_mode_hook +#define Vchar_direction_table \ + globals.f_Vchar_direction_table +#define Vchar_property_alias_alist \ + globals.f_Vchar_property_alias_alist +#define Vchar_script_table \ + globals.f_Vchar_script_table +#define Vchar_width_table \ + globals.f_Vchar_width_table +#define Vcharset_list \ + globals.f_Vcharset_list +#define Vcharset_map_path \ + globals.f_Vcharset_map_path +#define Vcharset_revision_table \ + globals.f_Vcharset_revision_table +#define Vcode_conversion_map_vector \ + globals.f_Vcode_conversion_map_vector +#define Vcoding_category_list \ + globals.f_Vcoding_category_list +#define Vcoding_system_alist \ + globals.f_Vcoding_system_alist +#define Vcoding_system_for_read \ + globals.f_Vcoding_system_for_read +#define Vcoding_system_for_write \ + globals.f_Vcoding_system_for_write +#define Vcoding_system_list \ + globals.f_Vcoding_system_list +#define Vcombine_after_change_calls \ + globals.f_Vcombine_after_change_calls +#define Vcommand_debug_status \ + globals.f_Vcommand_debug_status +#define Vcommand_error_function \ + globals.f_Vcommand_error_function +#define Vcommand_history \ + globals.f_Vcommand_history +#define Vcommand_hook_internal \ + globals.f_Vcommand_hook_internal +#define Vcommand_line_args \ + globals.f_Vcommand_line_args +#define Vcompletion_ignored_extensions \ + globals.f_Vcompletion_ignored_extensions +#define Vcompletion_regexp_list \ + globals.f_Vcompletion_regexp_list +#define Vcompose_chars_after_function \ + globals.f_Vcompose_chars_after_function +#define Vcomposition_function_table \ + globals.f_Vcomposition_function_table +#define Vconfigure_info_directory \ + globals.f_Vconfigure_info_directory +#define Vcurrent_iso639_language \ + globals.f_Vcurrent_iso639_language +#define Vcurrent_load_list \ + globals.f_Vcurrent_load_list +#define Vcurrent_prefix_arg \ + globals.f_Vcurrent_prefix_arg +#define Vdata_directory \ + globals.f_Vdata_directory +#define Vdbus_debug \ + globals.f_Vdbus_debug +#define Vdbus_registered_buses \ + globals.f_Vdbus_registered_buses +#define Vdbus_registered_objects_table \ + globals.f_Vdbus_registered_objects_table +#define Vdeactivate_mark \ + globals.f_Vdeactivate_mark +#define Vdebug_ignored_errors \ + globals.f_Vdebug_ignored_errors +#define Vdebug_on_error \ + globals.f_Vdebug_on_error +#define Vdebug_on_signal \ + globals.f_Vdebug_on_signal +#define Vdebugger \ + globals.f_Vdebugger +#define Vdefault_file_name_coding_system \ + globals.f_Vdefault_file_name_coding_system +#define Vdefault_frame_alist \ + globals.f_Vdefault_frame_alist +#define Vdefault_frame_scroll_bars \ + globals.f_Vdefault_frame_scroll_bars +#define Vdefault_process_coding_system \ + globals.f_Vdefault_process_coding_system +#define Vdefault_text_properties \ + globals.f_Vdefault_text_properties +#define Vdeferred_action_function \ + globals.f_Vdeferred_action_function +#define Vdeferred_action_list \ + globals.f_Vdeferred_action_list +#define Vdefine_key_rebound_commands \ + globals.f_Vdefine_key_rebound_commands +#define Vdelete_frame_functions \ + globals.f_Vdelete_frame_functions +#define Vdelete_terminal_functions \ + globals.f_Vdelete_terminal_functions +#define Vdisable_point_adjustment \ + globals.f_Vdisable_point_adjustment +#define Vdisplay_pixels_per_inch \ + globals.f_Vdisplay_pixels_per_inch +#define Vdoc_directory \ + globals.f_Vdoc_directory +#define Vdoc_file_name \ + globals.f_Vdoc_file_name +#define Vdos_display_scancodes \ + globals.f_Vdos_display_scancodes +#define Vdos_unsupported_char_glyph \ + globals.f_Vdos_unsupported_char_glyph +#define Vdos_version \ + globals.f_Vdos_version +#define Vdos_windows_version \ + globals.f_Vdos_windows_version +#define Vdouble_click_time \ + globals.f_Vdouble_click_time +#define Vdynamic_library_alist \ + globals.f_Vdynamic_library_alist +#define Vecho_keystrokes \ + globals.f_Vecho_keystrokes +#define Vemacs_copyright \ + globals.f_Vemacs_copyright +#define Vemacs_version \ + globals.f_Vemacs_version +#define Vemulation_mode_map_alists \ + globals.f_Vemulation_mode_map_alists +#define Venable_character_translation \ + globals.f_Venable_character_translation +#define Venable_disabled_menus_and_buttons \ + globals.f_Venable_disabled_menus_and_buttons +#define Veval_buffer_list \ + globals.f_Veval_buffer_list +#define Vexec_directory \ + globals.f_Vexec_directory +#define Vexec_path \ + globals.f_Vexec_path +#define Vexec_suffixes \ + globals.f_Vexec_suffixes +#define Vexecuting_kbd_macro \ + globals.f_Vexecuting_kbd_macro +#define Vface_default_stipple \ + globals.f_Vface_default_stipple +#define Vface_font_rescale_alist \ + globals.f_Vface_font_rescale_alist +#define Vface_ignored_fonts \ + globals.f_Vface_ignored_fonts +#define Vface_new_frame_defaults \ + globals.f_Vface_new_frame_defaults +#define Vface_remapping_alist \ + globals.f_Vface_remapping_alist +#define Vfeatures \ + globals.f_Vfeatures +#define Vfile_coding_system_alist \ + globals.f_Vfile_coding_system_alist +#define Vfile_name_coding_system \ + globals.f_Vfile_name_coding_system +#define Vfile_name_handler_alist \ + globals.f_Vfile_name_handler_alist +#define Vfind_word_boundary_function_table \ + globals.f_Vfind_word_boundary_function_table +#define Vfirst_change_hook \ + globals.f_Vfirst_change_hook +#define Vfloat_output_format \ + globals.f_Vfloat_output_format +#define Vfont_ccl_encoder_alist \ + globals.f_Vfont_ccl_encoder_alist +#define Vfont_encoding_alist \ + globals.f_Vfont_encoding_alist +#define Vfont_encoding_charset_alist \ + globals.f_Vfont_encoding_charset_alist +#define Vfont_list_limit \ + globals.f_Vfont_list_limit +#define Vfont_log \ + globals.f_Vfont_log +#define Vfont_slant_table \ + globals.f_Vfont_slant_table +#define Vfont_weight_table \ + globals.f_Vfont_weight_table +#define Vfont_width_table \ + globals.f_Vfont_width_table +#define Vfontification_functions \ + globals.f_Vfontification_functions +#define Vfontset_alias_alist \ + globals.f_Vfontset_alias_alist +#define Vframe_alpha_lower_limit \ + globals.f_Vframe_alpha_lower_limit +#define Vframe_title_format \ + globals.f_Vframe_title_format +#define Vfringe_bitmaps \ + globals.f_Vfringe_bitmaps +#define Vfunction_key_map \ + globals.f_Vfunction_key_map +#define Vgc_cons_percentage \ + globals.f_Vgc_cons_percentage +#define Vgc_elapsed \ + globals.f_Vgc_elapsed +#define Vglobal_disable_point_adjustment \ + globals.f_Vglobal_disable_point_adjustment +#define Vglobal_mode_string \ + globals.f_Vglobal_mode_string +#define Vglyph_table \ + globals.f_Vglyph_table +#define Vglyphless_char_display \ + globals.f_Vglyphless_char_display +#define Vgtk_version_string \ + globals.f_Vgtk_version_string +#define Vhelp_char \ + globals.f_Vhelp_char +#define Vhelp_event_list \ + globals.f_Vhelp_event_list +#define Vhelp_form \ + globals.f_Vhelp_form +#define Vhistory_add_new_input \ + globals.f_Vhistory_add_new_input +#define Vhistory_length \ + globals.f_Vhistory_length +#define Vhourglass_delay \ + globals.f_Vhourglass_delay +#define Vhscroll_step \ + globals.f_Vhscroll_step +#define Vicon_title_format \ + globals.f_Vicon_title_format +#define Vignore_relative_composition \ + globals.f_Vignore_relative_composition +#define Vimage_cache_eviction_delay \ + globals.f_Vimage_cache_eviction_delay +#define Vimage_types \ + globals.f_Vimage_types +#define Vimagemagick_render_type \ + globals.f_Vimagemagick_render_type +#define Vinhibit_changing_match_data \ + globals.f_Vinhibit_changing_match_data +#define Vinhibit_field_text_motion \ + globals.f_Vinhibit_field_text_motion +#define Vinhibit_file_name_handlers \ + globals.f_Vinhibit_file_name_handlers +#define Vinhibit_file_name_operation \ + globals.f_Vinhibit_file_name_operation +#define Vinhibit_point_motion_hooks \ + globals.f_Vinhibit_point_motion_hooks +#define Vinhibit_quit \ + globals.f_Vinhibit_quit +#define Vinhibit_read_only \ + globals.f_Vinhibit_read_only +#define Vinhibit_redisplay \ + globals.f_Vinhibit_redisplay +#define Vinitial_environment \ + globals.f_Vinitial_environment +#define Vinitial_window_system \ + globals.f_Vinitial_window_system +#define Vinput_method_function \ + globals.f_Vinput_method_function +#define Vinput_method_previous_message \ + globals.f_Vinput_method_previous_message +#define Vinstallation_directory \ + globals.f_Vinstallation_directory +#define Vinvocation_directory \ + globals.f_Vinvocation_directory +#define Vinvocation_name \ + globals.f_Vinvocation_name +#define Vkey_translation_map \ + globals.f_Vkey_translation_map +#define Vkill_buffer_query_functions \ + globals.f_Vkill_buffer_query_functions +#define Vkill_emacs_hook \ + globals.f_Vkill_emacs_hook +#define Vlast_code_conversion_error \ + globals.f_Vlast_code_conversion_error +#define Vlast_coding_system_used \ + globals.f_Vlast_coding_system_used +#define Vlast_event_frame \ + globals.f_Vlast_event_frame +#define Vlatin_extra_code_table \ + globals.f_Vlatin_extra_code_table +#define Vline_number_display_limit \ + globals.f_Vline_number_display_limit +#define Vline_prefix \ + globals.f_Vline_prefix +#define Vload_file_name \ + globals.f_Vload_file_name +#define Vload_file_rep_suffixes \ + globals.f_Vload_file_rep_suffixes +#define Vload_history \ + globals.f_Vload_history +#define Vload_path \ + globals.f_Vload_path +#define Vload_read_function \ + globals.f_Vload_read_function +#define Vload_source_file_function \ + globals.f_Vload_source_file_function +#define Vload_suffixes \ + globals.f_Vload_suffixes +#define Vlocale_coding_system \ + globals.f_Vlocale_coding_system +#define Vlucid_menu_bar_dirty_flag \ + globals.f_Vlucid_menu_bar_dirty_flag +#define Vmacro_declaration_function \ + globals.f_Vmacro_declaration_function +#define Vmake_pointer_invisible \ + globals.f_Vmake_pointer_invisible +#define Vmark_even_if_inactive \ + globals.f_Vmark_even_if_inactive +#define Vmax_image_size \ + globals.f_Vmax_image_size +#define Vmax_mini_window_height \ + globals.f_Vmax_mini_window_height +#define Vmemory_full \ + globals.f_Vmemory_full +#define Vmemory_signal_data \ + globals.f_Vmemory_signal_data +#define Vmenu_bar_final_items \ + globals.f_Vmenu_bar_final_items +#define Vmenu_bar_mode \ + globals.f_Vmenu_bar_mode +#define Vmenu_bar_update_hook \ + globals.f_Vmenu_bar_update_hook +#define Vmenu_updating_frame \ + globals.f_Vmenu_updating_frame +#define Vmessage_log_max \ + globals.f_Vmessage_log_max +#define Vminibuf_scroll_window \ + globals.f_Vminibuf_scroll_window +#define Vminibuffer_completing_file_name \ + globals.f_Vminibuffer_completing_file_name +#define Vminibuffer_completion_confirm \ + globals.f_Vminibuffer_completion_confirm +#define Vminibuffer_completion_predicate \ + globals.f_Vminibuffer_completion_predicate +#define Vminibuffer_completion_table \ + globals.f_Vminibuffer_completion_table +#define Vminibuffer_exit_hook \ + globals.f_Vminibuffer_exit_hook +#define Vminibuffer_help_form \ + globals.f_Vminibuffer_help_form +#define Vminibuffer_history_position \ + globals.f_Vminibuffer_history_position +#define Vminibuffer_history_variable \ + globals.f_Vminibuffer_history_variable +#define Vminibuffer_local_completion_map \ + globals.f_Vminibuffer_local_completion_map +#define Vminibuffer_local_filename_completion_map \ + globals.f_Vminibuffer_local_filename_completion_map +#define Vminibuffer_local_filename_must_match_map \ + globals.f_Vminibuffer_local_filename_must_match_map +#define Vminibuffer_local_map \ + globals.f_Vminibuffer_local_map +#define Vminibuffer_local_must_match_map \ + globals.f_Vminibuffer_local_must_match_map +#define Vminibuffer_local_ns_map \ + globals.f_Vminibuffer_local_ns_map +#define Vminibuffer_message_timeout \ + globals.f_Vminibuffer_message_timeout +#define Vminibuffer_prompt_properties \ + globals.f_Vminibuffer_prompt_properties +#define Vminibuffer_setup_hook \ + globals.f_Vminibuffer_setup_hook +#define Vminor_mode_map_alist \ + globals.f_Vminor_mode_map_alist +#define Vminor_mode_overriding_map_alist \ + globals.f_Vminor_mode_overriding_map_alist +#define Vmost_negative_fixnum \ + globals.f_Vmost_negative_fixnum +#define Vmost_positive_fixnum \ + globals.f_Vmost_positive_fixnum +#define Vmotif_version_string \ + globals.f_Vmotif_version_string +#define Vmouse_autoselect_window \ + globals.f_Vmouse_autoselect_window +#define Vmouse_highlight \ + globals.f_Vmouse_highlight +#define Vmouse_leave_buffer_hook \ + globals.f_Vmouse_leave_buffer_hook +#define Vmouse_position_function \ + globals.f_Vmouse_position_function +#define Vnetwork_coding_system_alist \ + globals.f_Vnetwork_coding_system_alist +#define Vnext_selection_coding_system \ + globals.f_Vnext_selection_coding_system +#define Vnobreak_char_display \ + globals.f_Vnobreak_char_display +#define Vobarray \ + globals.f_Vobarray +#define Vold_style_backquotes \ + globals.f_Vold_style_backquotes +#define Voperating_system_release \ + globals.f_Voperating_system_release +#define Votf_script_alist \ + globals.f_Votf_script_alist +#define Vother_window_scroll_buffer \ + globals.f_Vother_window_scroll_buffer +#define Voverflow_newline_into_fringe \ + globals.f_Voverflow_newline_into_fringe +#define Voverlay_arrow_position \ + globals.f_Voverlay_arrow_position +#define Voverlay_arrow_string \ + globals.f_Voverlay_arrow_string +#define Voverlay_arrow_variable_list \ + globals.f_Voverlay_arrow_variable_list +#define Voverriding_local_map \ + globals.f_Voverriding_local_map +#define Voverriding_local_map_menu_flag \ + globals.f_Voverriding_local_map_menu_flag +#define Vpath_separator \ + globals.f_Vpath_separator +#define Vpost_command_hook \ + globals.f_Vpost_command_hook +#define Vpost_gc_hook \ + globals.f_Vpost_gc_hook +#define Vpost_self_insert_hook \ + globals.f_Vpost_self_insert_hook +#define Vpre_command_hook \ + globals.f_Vpre_command_hook +#define Vprefix_help_command \ + globals.f_Vprefix_help_command +#define Vpreloaded_file_list \ + globals.f_Vpreloaded_file_list +#define Vprevious_system_messages_locale \ + globals.f_Vprevious_system_messages_locale +#define Vprevious_system_time_locale \ + globals.f_Vprevious_system_time_locale +#define Vprint_charset_text_property \ + globals.f_Vprint_charset_text_property +#define Vprint_circle \ + globals.f_Vprint_circle +#define Vprint_continuous_numbering \ + globals.f_Vprint_continuous_numbering +#define Vprint_gensym \ + globals.f_Vprint_gensym +#define Vprint_length \ + globals.f_Vprint_length +#define Vprint_level \ + globals.f_Vprint_level +#define Vprint_number_table \ + globals.f_Vprint_number_table +#define Vprintable_chars \ + globals.f_Vprintable_chars +#define Vprocess_adaptive_read_buffering \ + globals.f_Vprocess_adaptive_read_buffering +#define Vprocess_coding_system_alist \ + globals.f_Vprocess_coding_system_alist +#define Vprocess_connection_type \ + globals.f_Vprocess_connection_type +#define Vprocess_environment \ + globals.f_Vprocess_environment +#define Vpurify_flag \ + globals.f_Vpurify_flag +#define Vquit_flag \ + globals.f_Vquit_flag +#define Vread_buffer_function \ + globals.f_Vread_buffer_function +#define Vread_circle \ + globals.f_Vread_circle +#define Vread_expression_map \ + globals.f_Vread_expression_map +#define Vread_symbol_positions_list \ + globals.f_Vread_symbol_positions_list +#define Vread_with_symbol_positions \ + globals.f_Vread_with_symbol_positions +#define Vrecenter_redisplay \ + globals.f_Vrecenter_redisplay +#define Vredisplay_end_trigger_functions \ + globals.f_Vredisplay_end_trigger_functions +#define Vredisplay_preemption_period \ + globals.f_Vredisplay_preemption_period +#define Vresize_mini_windows \ + globals.f_Vresize_mini_windows +#define Vresume_tty_functions \ + globals.f_Vresume_tty_functions +#define Vring_bell_function \ + globals.f_Vring_bell_function +#define Vsaved_region_selection \ + globals.f_Vsaved_region_selection +#define Vscalable_fonts_allowed \ + globals.f_Vscalable_fonts_allowed +#define Vscript_representative_chars \ + globals.f_Vscript_representative_chars +#define Vscroll_preserve_screen_position \ + globals.f_Vscroll_preserve_screen_position +#define Vsearch_spaces_regexp \ + globals.f_Vsearch_spaces_regexp +#define Vselect_active_regions \ + globals.f_Vselect_active_regions +#define Vselect_safe_coding_system_function \ + globals.f_Vselect_safe_coding_system_function +#define Vselection_coding_system \ + globals.f_Vselection_coding_system +#define Vselection_converter_alist \ + globals.f_Vselection_converter_alist +#define Vset_auto_coding_function \ + globals.f_Vset_auto_coding_function +#define Vshared_game_score_directory \ + globals.f_Vshared_game_score_directory +#define Vshell_file_name \ + globals.f_Vshell_file_name +#define Vshow_help_function \ + globals.f_Vshow_help_function +#define Vshow_trailing_whitespace \ + globals.f_Vshow_trailing_whitespace +#define Vsignal_hook_function \ + globals.f_Vsignal_hook_function +#define Vsource_directory \ + globals.f_Vsource_directory +#define Vspecial_event_map \ + globals.f_Vspecial_event_map +#define Vstack_trace_on_error \ + globals.f_Vstack_trace_on_error +#define Vstandard_display_table \ + globals.f_Vstandard_display_table +#define Vstandard_input \ + globals.f_Vstandard_input +#define Vstandard_output \ + globals.f_Vstandard_output +#define Vstandard_translation_table_for_decode \ + globals.f_Vstandard_translation_table_for_decode +#define Vstandard_translation_table_for_encode \ + globals.f_Vstandard_translation_table_for_encode +#define Vsuggest_key_bindings \ + globals.f_Vsuggest_key_bindings +#define Vsuspend_tty_functions \ + globals.f_Vsuspend_tty_functions +#define Vsystem_configuration \ + globals.f_Vsystem_configuration +#define Vsystem_configuration_options \ + globals.f_Vsystem_configuration_options +#define Vsystem_messages_locale \ + globals.f_Vsystem_messages_locale +#define Vsystem_name \ + globals.f_Vsystem_name +#define Vsystem_time_locale \ + globals.f_Vsystem_time_locale +#define Vsystem_type \ + globals.f_Vsystem_type +#define Vtemp_buffer_show_function \ + globals.f_Vtemp_buffer_show_function +#define Vtemporary_file_directory \ + globals.f_Vtemporary_file_directory +#define Vterminal_frame \ + globals.f_Vterminal_frame +#define Vtext_property_default_nonsticky \ + globals.f_Vtext_property_default_nonsticky +#define Vthis_command \ + globals.f_Vthis_command +#define Vthis_command_keys_shift_translated \ + globals.f_Vthis_command_keys_shift_translated +#define Vthis_original_command \ + globals.f_Vthis_original_command +#define Vthrow_on_input \ + globals.f_Vthrow_on_input +#define Vtimer_idle_list \ + globals.f_Vtimer_idle_list +#define Vtimer_list \ + globals.f_Vtimer_list +#define Vtool_bar_border \ + globals.f_Vtool_bar_border +#define Vtool_bar_button_margin \ + globals.f_Vtool_bar_button_margin +#define Vtool_bar_mode \ + globals.f_Vtool_bar_mode +#define Vtool_bar_separator_image_expression \ + globals.f_Vtool_bar_separator_image_expression +#define Vtool_bar_style \ + globals.f_Vtool_bar_style +#define Vtop_level \ + globals.f_Vtop_level +#define Vtransient_mark_mode \ + globals.f_Vtransient_mark_mode +#define Vtranslation_hash_table_vector \ + globals.f_Vtranslation_hash_table_vector +#define Vtranslation_table_for_input \ + globals.f_Vtranslation_table_for_input +#define Vtranslation_table_vector \ + globals.f_Vtranslation_table_vector +#define Vtruncate_partial_width_windows \ + globals.f_Vtruncate_partial_width_windows +#define Vtty_defined_color_alist \ + globals.f_Vtty_defined_color_alist +#define Vtty_erase_char \ + globals.f_Vtty_erase_char +#define Vundo_outer_limit \ + globals.f_Vundo_outer_limit +#define Vundo_outer_limit_function \ + globals.f_Vundo_outer_limit_function +#define Vunicode_category_table \ + globals.f_Vunicode_category_table +#define Vunread_command_events \ + globals.f_Vunread_command_events +#define Vunread_input_method_events \ + globals.f_Vunread_input_method_events +#define Vunread_post_input_method_events \ + globals.f_Vunread_post_input_method_events +#define Vuse_default_ascent \ + globals.f_Vuse_default_ascent +#define Vuser_full_name \ + globals.f_Vuser_full_name +#define Vuser_init_file \ + globals.f_Vuser_init_file +#define Vuser_login_name \ + globals.f_Vuser_login_name +#define Vuser_real_login_name \ + globals.f_Vuser_real_login_name +#define Vvalues \ + globals.f_Vvalues +#define Vvertical_centering_font_regexp \ + globals.f_Vvertical_centering_font_regexp +#define Vvoid_text_area_pointer \ + globals.f_Vvoid_text_area_pointer +#define Vw32_alt_is_meta \ + globals.f_Vw32_alt_is_meta +#define Vw32_apps_modifier \ + globals.f_Vw32_apps_modifier +#define Vw32_bdf_filename_alist \ + globals.f_Vw32_bdf_filename_alist +#define Vw32_capslock_is_shiftlock \ + globals.f_Vw32_capslock_is_shiftlock +#define Vw32_charset_info_alist \ + globals.f_Vw32_charset_info_alist +#define Vw32_color_map \ + globals.f_Vw32_color_map +#define Vw32_downcase_file_names \ + globals.f_Vw32_downcase_file_names +#define Vw32_enable_caps_lock \ + globals.f_Vw32_enable_caps_lock +#define Vw32_enable_num_lock \ + globals.f_Vw32_enable_num_lock +#define Vw32_enable_palette \ + globals.f_Vw32_enable_palette +#define Vw32_generate_fake_inodes \ + globals.f_Vw32_generate_fake_inodes +#define Vw32_get_true_file_attributes \ + globals.f_Vw32_get_true_file_attributes +#define Vw32_grab_focus_on_raise \ + globals.f_Vw32_grab_focus_on_raise +#define Vw32_lwindow_modifier \ + globals.f_Vw32_lwindow_modifier +#define Vw32_pass_alt_to_system \ + globals.f_Vw32_pass_alt_to_system +#define Vw32_pass_lwindow_to_system \ + globals.f_Vw32_pass_lwindow_to_system +#define Vw32_pass_rwindow_to_system \ + globals.f_Vw32_pass_rwindow_to_system +#define Vw32_phantom_key_code \ + globals.f_Vw32_phantom_key_code +#define Vw32_quote_process_args \ + globals.f_Vw32_quote_process_args +#define Vw32_recognize_altgr \ + globals.f_Vw32_recognize_altgr +#define Vw32_rwindow_modifier \ + globals.f_Vw32_rwindow_modifier +#define Vw32_scroll_lock_modifier \ + globals.f_Vw32_scroll_lock_modifier +#define Vw32_start_process_inherit_error_mode \ + globals.f_Vw32_start_process_inherit_error_mode +#define Vw32_start_process_share_console \ + globals.f_Vw32_start_process_share_console +#define Vw32_start_process_show_window \ + globals.f_Vw32_start_process_show_window +#define Vw32_swap_mouse_buttons \ + globals.f_Vw32_swap_mouse_buttons +#define Vwhere_is_preferred_modifier \ + globals.f_Vwhere_is_preferred_modifier +#define Vwindow_configuration_change_hook \ + globals.f_Vwindow_configuration_change_hook +#define Vwindow_point_insertion_type \ + globals.f_Vwindow_point_insertion_type +#define Vwindow_scroll_functions \ + globals.f_Vwindow_scroll_functions +#define Vwindow_size_change_functions \ + globals.f_Vwindow_size_change_functions +#define Vwindow_system_version \ + globals.f_Vwindow_system_version +#define Vwindow_text_change_functions \ + globals.f_Vwindow_text_change_functions +#define Vword_combining_categories \ + globals.f_Vword_combining_categories +#define Vword_separating_categories \ + globals.f_Vword_separating_categories +#define Vwrap_prefix \ + globals.f_Vwrap_prefix +#define Vwrite_region_annotate_functions \ + globals.f_Vwrite_region_annotate_functions +#define Vwrite_region_annotations_so_far \ + globals.f_Vwrite_region_annotations_so_far +#define Vwrite_region_post_annotation_function \ + globals.f_Vwrite_region_post_annotation_function +#define Vx_alt_keysym \ + globals.f_Vx_alt_keysym +#define Vx_bitmap_file_path \ + globals.f_Vx_bitmap_file_path +#define Vx_cursor_fore_pixel \ + globals.f_Vx_cursor_fore_pixel +#define Vx_hourglass_pointer_shape \ + globals.f_Vx_hourglass_pointer_shape +#define Vx_hyper_keysym \ + globals.f_Vx_hyper_keysym +#define Vx_keysym_table \ + globals.f_Vx_keysym_table +#define Vx_lost_selection_functions \ + globals.f_Vx_lost_selection_functions +#define Vx_max_tooltip_size \ + globals.f_Vx_max_tooltip_size +#define Vx_meta_keysym \ + globals.f_Vx_meta_keysym +#define Vx_mode_pointer_shape \ + globals.f_Vx_mode_pointer_shape +#define Vx_no_window_manager \ + globals.f_Vx_no_window_manager +#define Vx_nontext_pointer_shape \ + globals.f_Vx_nontext_pointer_shape +#define Vx_pixel_size_width_font_regexp \ + globals.f_Vx_pixel_size_width_font_regexp +#define Vx_pointer_shape \ + globals.f_Vx_pointer_shape +#define Vx_resource_class \ + globals.f_Vx_resource_class +#define Vx_resource_name \ + globals.f_Vx_resource_name +#define Vx_sensitive_text_pointer_shape \ + globals.f_Vx_sensitive_text_pointer_shape +#define Vx_sent_selection_functions \ + globals.f_Vx_sent_selection_functions +#define Vx_session_id \ + globals.f_Vx_session_id +#define Vx_session_previous_id \ + globals.f_Vx_session_previous_id +#define Vx_super_keysym \ + globals.f_Vx_super_keysym +#define Vx_toolkit_scroll_bars \ + globals.f_Vx_toolkit_scroll_bars +#define Vx_window_horizontal_drag_shape \ + globals.f_Vx_window_horizontal_drag_shape +#define Vxft_settings \ + globals.f_Vxft_settings +#define auto_raise_tool_bar_buttons_p \ + globals.f_auto_raise_tool_bar_buttons_p +#define auto_save_interval \ + globals.f_auto_save_interval +#define auto_window_vscroll_p \ + globals.f_auto_window_vscroll_p +#define automatic_hscrolling_p \ + globals.f_automatic_hscrolling_p +#define baud_rate \ + globals.f_baud_rate +#define byte_debug_flag \ + globals.f_byte_debug_flag +#define byte_metering_on \ + globals.f_byte_metering_on +#define cannot_suspend \ + globals.f_cannot_suspend +#define check_markers_debug_flag \ + globals.f_check_markers_debug_flag +#define coding_system_require_warning \ + globals.f_coding_system_require_warning +#define completion_ignore_case \ + globals.f_completion_ignore_case +#define cons_cells_consed \ + globals.f_cons_cells_consed +#define cross_disabled_images \ + globals.f_cross_disabled_images +#define cursor_in_echo_area \ + globals.f_cursor_in_echo_area +#define debug_end_pos \ + globals.f_debug_end_pos +#define debug_on_next_call \ + globals.f_debug_on_next_call +#define debug_on_quit \ + globals.f_debug_on_quit +#define debugger_may_continue \ + globals.f_debugger_may_continue +#define delete_by_moving_to_trash \ + globals.f_delete_by_moving_to_trash +#define delete_exited_processes \ + globals.f_delete_exited_processes +#define display_hourglass_p \ + globals.f_display_hourglass_p +#define do_mouse_tracking \ + globals.f_do_mouse_tracking +#define dos_codepage \ + globals.f_dos_codepage +#define dos_country_code \ + globals.f_dos_country_code +#define dos_decimal_point \ + globals.f_dos_decimal_point +#define dos_hyper_key \ + globals.f_dos_hyper_key +#define dos_keyboard_layout \ + globals.f_dos_keyboard_layout +#define dos_keypad_mode \ + globals.f_dos_keypad_mode +#define dos_super_key \ + globals.f_dos_super_key +#define dos_timezone_offset \ + globals.f_dos_timezone_offset +#define double_click_fuzz \ + globals.f_double_click_fuzz +#define emacs_scroll_step \ + globals.f_emacs_scroll_step +#define enable_recursive_minibuffers \ + globals.f_enable_recursive_minibuffers +#define eol_mnemonic_dos \ + globals.f_eol_mnemonic_dos +#define eol_mnemonic_mac \ + globals.f_eol_mnemonic_mac +#define eol_mnemonic_undecided \ + globals.f_eol_mnemonic_undecided +#define eol_mnemonic_unix \ + globals.f_eol_mnemonic_unix +#define executing_kbd_macro_index \ + globals.f_executing_kbd_macro_index +#define extra_keyboard_modifiers \ + globals.f_extra_keyboard_modifiers +#define floats_consed \ + globals.f_floats_consed +#define focus_follows_mouse \ + globals.f_focus_follows_mouse +#define force_load_messages \ + globals.f_force_load_messages +#define garbage_collection_messages \ + globals.f_garbage_collection_messages +#define gc_cons_threshold \ + globals.f_gc_cons_threshold +#define gcs_done \ + globals.f_gcs_done +#define highlight_nonselected_windows \ + globals.f_highlight_nonselected_windows +#define history_delete_duplicates \ + globals.f_history_delete_duplicates +#define hscroll_margin \ + globals.f_hscroll_margin +#define indent_tabs_mode \ + globals.f_indent_tabs_mode +#define inherit_process_coding_system \ + globals.f_inherit_process_coding_system +#define inhibit_eol_conversion \ + globals.f_inhibit_eol_conversion +#define inhibit_eval_during_redisplay \ + globals.f_inhibit_eval_during_redisplay +#define inhibit_free_realized_faces \ + globals.f_inhibit_free_realized_faces +#define inhibit_iso_escape_detection \ + globals.f_inhibit_iso_escape_detection +#define inhibit_load_charset_map \ + globals.f_inhibit_load_charset_map +#define inhibit_local_menu_bar_menus \ + globals.f_inhibit_local_menu_bar_menus +#define inhibit_menubar_update \ + globals.f_inhibit_menubar_update +#define inhibit_modification_hooks \ + globals.f_inhibit_modification_hooks +#define inhibit_null_byte_detection \ + globals.f_inhibit_null_byte_detection +#define inhibit_try_cursor_movement \ + globals.f_inhibit_try_cursor_movement +#define inhibit_try_window_id \ + globals.f_inhibit_try_window_id +#define inhibit_try_window_reusing \ + globals.f_inhibit_try_window_reusing +#define inhibit_x_resources \ + globals.f_inhibit_x_resources +#define intervals_consed \ + globals.f_intervals_consed +#define inverse_video \ + globals.f_inverse_video +#define last_command_event \ + globals.f_last_command_event +#define last_input_event \ + globals.f_last_input_event +#define last_nonmenu_event \ + globals.f_last_nonmenu_event +#define line_number_display_limit_width \ + globals.f_line_number_display_limit_width +#define load_convert_to_unibyte \ + globals.f_load_convert_to_unibyte +#define load_dangerous_libraries \ + globals.f_load_dangerous_libraries +#define load_force_doc_strings \ + globals.f_load_force_doc_strings +#define load_in_progress \ + globals.f_load_in_progress +#define make_cursor_line_fully_visible_p \ + globals.f_make_cursor_line_fully_visible_p +#define max_lisp_eval_depth \ + globals.f_max_lisp_eval_depth +#define max_specpdl_size \ + globals.f_max_specpdl_size +#define menu_prompt_more_char \ + globals.f_menu_prompt_more_char +#define menu_prompting \ + globals.f_menu_prompting +#define message_truncate_lines \ + globals.f_message_truncate_lines +#define meta_prefix_char \ + globals.f_meta_prefix_char +#define minibuffer_allow_text_properties \ + globals.f_minibuffer_allow_text_properties +#define minibuffer_auto_raise \ + globals.f_minibuffer_auto_raise +#define misc_objects_consed \ + globals.f_misc_objects_consed +#define mode_line_in_non_selected_windows \ + globals.f_mode_line_in_non_selected_windows +#define mode_line_inverse_video \ + globals.f_mode_line_inverse_video +#define multibyte_syntax_as_symbol \ + globals.f_multibyte_syntax_as_symbol +#define multiple_frames \ + globals.f_multiple_frames +#define next_screen_context_lines \ + globals.f_next_screen_context_lines +#define no_redraw_on_reenter \ + globals.f_no_redraw_on_reenter +#define noninteractive1 \ + globals.f_noninteractive1 +#define num_input_keys \ + globals.f_num_input_keys +#define num_nonmacro_input_events \ + globals.f_num_nonmacro_input_events +#define open_paren_in_column_0_is_defun_start \ + globals.f_open_paren_in_column_0_is_defun_start +#define overline_margin \ + globals.f_overline_margin +#define parse_sexp_ignore_comments \ + globals.f_parse_sexp_ignore_comments +#define parse_sexp_lookup_properties \ + globals.f_parse_sexp_lookup_properties +#define polling_period \ + globals.f_polling_period +#define print_escape_multibyte \ + globals.f_print_escape_multibyte +#define print_escape_newlines \ + globals.f_print_escape_newlines +#define print_escape_nonascii \ + globals.f_print_escape_nonascii +#define print_quoted \ + globals.f_print_quoted +#define pure_bytes_used \ + globals.f_pure_bytes_used +#define read_buffer_completion_ignore_case \ + globals.f_read_buffer_completion_ignore_case +#define redisplay_dont_pause \ + globals.f_redisplay_dont_pause +#define scroll_conservatively \ + globals.f_scroll_conservatively +#define scroll_margin \ + globals.f_scroll_margin +#define string_chars_consed \ + globals.f_string_chars_consed +#define strings_consed \ + globals.f_strings_consed +#define symbols_consed \ + globals.f_symbols_consed +#define system_uses_terminfo \ + globals.f_system_uses_terminfo +#define tool_bar_button_relief \ + globals.f_tool_bar_button_relief +#define tool_bar_max_label_size \ + globals.f_tool_bar_max_label_size +#define underline_minimum_offset \ + globals.f_underline_minimum_offset +#define undo_inhibit_record_point \ + globals.f_undo_inhibit_record_point +#define undo_limit \ + globals.f_undo_limit +#define undo_strong_limit \ + globals.f_undo_strong_limit +#define unibyte_display_via_language_environment \ + globals.f_unibyte_display_via_language_environment +#define unread_command_char \ + globals.f_unread_command_char +#define use_dialog_box \ + globals.f_use_dialog_box +#define use_file_dialog \ + globals.f_use_file_dialog +#define use_system_font \ + globals.f_use_system_font +#define vector_cells_consed \ + globals.f_vector_cells_consed +#define visible_bell \ + globals.f_visible_bell +#define visible_cursor \ + globals.f_visible_cursor +#define w32_ansi_code_page \ + globals.f_w32_ansi_code_page +#define w32_enable_synthesized_fonts \ + globals.f_w32_enable_synthesized_fonts +#define w32_mouse_button_tolerance \ + globals.f_w32_mouse_button_tolerance +#define w32_mouse_move_interval \ + globals.f_w32_mouse_move_interval +#define w32_num_mouse_buttons \ + globals.f_w32_num_mouse_buttons +#define w32_pass_extra_mouse_buttons_to_system \ + globals.f_w32_pass_extra_mouse_buttons_to_system +#define w32_pass_multimedia_buttons_to_system \ + globals.f_w32_pass_multimedia_buttons_to_system +#define w32_pipe_read_delay \ + globals.f_w32_pipe_read_delay +#define w32_quit_key \ + globals.f_w32_quit_key +#define w32_strict_fontnames \ + globals.f_w32_strict_fontnames +#define w32_strict_painting \ + globals.f_w32_strict_painting +#define w32_use_full_screen_buffer \ + globals.f_w32_use_full_screen_buffer +#define w32_use_visible_system_caret \ + globals.f_w32_use_visible_system_caret +#define window_min_height \ + globals.f_window_min_height +#define window_min_width \ + globals.f_window_min_width +#define words_include_escapes \ + globals.f_words_include_escapes +#define write_region_inhibit_fsync \ + globals.f_write_region_inhibit_fsync +#define x_gtk_file_dialog_help_text \ + globals.f_x_gtk_file_dialog_help_text +#define x_gtk_show_hidden_files \ + globals.f_x_gtk_show_hidden_files +#define x_gtk_use_old_file_dialog \ + globals.f_x_gtk_use_old_file_dialog +#define x_gtk_use_system_tooltips \ + globals.f_x_gtk_use_system_tooltips +#define x_gtk_whole_detached_tool_bar \ + globals.f_x_gtk_whole_detached_tool_bar +#define x_mouse_click_focus_ignore_position \ + globals.f_x_mouse_click_focus_ignore_position +#define x_selection_timeout \ + globals.f_x_selection_timeout +#define x_stretch_cursor_p \ + globals.f_x_stretch_cursor_p +#define x_underline_at_descent_line \ + globals.f_x_underline_at_descent_line +#define x_use_underline_position_properties \ + globals.f_x_use_underline_position_properties
--- a/src/gmalloc.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/gmalloc.c Wed Jan 19 13:54:19 2011 -0800 @@ -72,9 +72,7 @@ #define CHAR_BIT 8 #endif -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #ifdef USE_PTHREAD #include <pthread.h>
--- a/src/gtkutil.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/gtkutil.c Wed Jan 19 13:54:19 2011 -0800 @@ -1536,7 +1536,6 @@ xg_uses_old_file_dialog (void) { #ifdef HAVE_GTK_FILE_SELECTION_NEW - extern int x_gtk_use_old_file_dialog; return x_gtk_use_old_file_dialog; #else return 0; @@ -1577,8 +1576,6 @@ static void xg_toggle_notify_cb (GObject *gobject, GParamSpec *arg1, gpointer user_data) { - extern int x_gtk_show_hidden_files; - if (strcmp (arg1->name, "show-hidden") == 0) { GtkWidget *wtoggle = GTK_WIDGET (user_data); @@ -1626,9 +1623,6 @@ GtkFileChooserAction action = (mustmatch_p ? GTK_FILE_CHOOSER_ACTION_OPEN : GTK_FILE_CHOOSER_ACTION_SAVE); - extern int x_gtk_show_hidden_files; - extern int x_gtk_file_dialog_help_text; - if (only_dir_p) action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER; @@ -3794,7 +3788,6 @@ gpointer client_data) { FRAME_PTR f = (FRAME_PTR) client_data; - extern int x_gtk_whole_detached_tool_bar; g_object_set (G_OBJECT (w), "show-arrow", !x_gtk_whole_detached_tool_bar, NULL);
--- a/src/image.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/image.c Wed Jan 19 13:54:19 2011 -0800 @@ -22,10 +22,7 @@ #include <stdio.h> #include <math.h> #include <ctype.h> - -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #ifdef HAVE_PNG #if defined HAVE_LIBPNG_PNG_H @@ -127,10 +124,6 @@ #endif /* HAVE_NS */ -/* Search path for bitmap files. */ - -Lisp_Object Vx_bitmap_file_path; - /* The symbol `postscript' identifying images of this type. */ Lisp_Object Qpostscript; @@ -568,10 +561,6 @@ static struct image_type *image_types; -/* A list of symbols, one for each supported image type. */ - -Lisp_Object Vimage_types; - /* Cache for delayed-loading image types. */ static Lisp_Object Vimage_type_cache; @@ -590,11 +579,6 @@ Lisp_Object Qlaplace, Qemboss, Qedge_detection, Qheuristic; -/* Time in seconds after which images should be removed from the cache - if not displayed. */ - -Lisp_Object Vimage_cache_eviction_delay; - /* Function prototypes. */ static Lisp_Object define_image_type (struct image_type *type, int loaded); @@ -1006,8 +990,6 @@ static int check_image_size (struct frame *f, int width, int height); #define MAX_IMAGE_SIZE 6.0 -Lisp_Object Vmax_image_size; - /* Allocate and return a new image structure for image specification SPEC. SPEC has a hash value of HASH. */ @@ -4410,11 +4392,6 @@ static void XPutPixel (XImagePtr , int, int, COLORREF); #endif /* HAVE_NTGUI */ -/* Non-zero means draw a cross on images having `:conversion - disabled'. */ - -int cross_disabled_images; - /* Edge detection matrices for different edge-detection strategies. */ @@ -7383,13 +7360,10 @@ imagemagick ***********************************************************************/ #if defined (HAVE_IMAGEMAGICK) -Lisp_Object Vimagemagick_render_type; /* The symbol `imagemagick' identifying images of this type. */ Lisp_Object Qimagemagick; -Lisp_Object Vimagemagick_render_type; - /* Indices of image specification fields in imagemagick_format, below. */ enum imagemagick_keyword_index @@ -8714,13 +8688,13 @@ /* Must be defined now becase we're going to update it below, while defining the supported image types. */ - DEFVAR_LISP ("image-types", &Vimage_types, + DEFVAR_LISP ("image-types", Vimage_types, doc: /* List of potentially supported image types. Each element of the list is a symbol for an image type, like 'jpeg or 'png. To check whether it is really supported, use `image-type-available-p'. */); Vimage_types = Qnil; - DEFVAR_LISP ("max-image-size", &Vmax_image_size, + DEFVAR_LISP ("max-image-size", Vmax_image_size, doc: /* Maximum size of images. Emacs will not load an image into memory if its pixel width or pixel height exceeds this limit. @@ -8804,11 +8778,13 @@ #ifdef HAVE_NTGUI Qlibpng_version = intern_c_string ("libpng-version"); staticpro (&Qlibpng_version); + Fset (Qlibpng_version, #if HAVE_PNG - SET_SYMBOL_VAL (XSYMBOL (Qlibpng_version), make_number (PNG_LIBPNG_VER)); + make_number (PNG_LIBPNG_VER) #else - SET_SYMBOL_VAL (XSYMBOL (Qlibpng_version), make_number (-1)); + make_number (-1) #endif + ); #endif #if defined (HAVE_XPM) || defined (HAVE_NS) @@ -8877,17 +8853,17 @@ defsubr (&Slookup_image); #endif - DEFVAR_BOOL ("cross-disabled-images", &cross_disabled_images, + DEFVAR_BOOL ("cross-disabled-images", cross_disabled_images, doc: /* Non-nil means always draw a cross over disabled images. Disabled images are those having a `:conversion disabled' property. A cross is always drawn on black & white displays. */); cross_disabled_images = 0; - DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path, + DEFVAR_LISP ("x-bitmap-file-path", Vx_bitmap_file_path, doc: /* List of directories to search for window system bitmap files. */); Vx_bitmap_file_path = decode_env_path ((char *) 0, PATH_BITMAPS); - DEFVAR_LISP ("image-cache-eviction-delay", &Vimage_cache_eviction_delay, + DEFVAR_LISP ("image-cache-eviction-delay", Vimage_cache_eviction_delay, doc: /* Maximum time after which images are removed from the cache. When an image has not been displayed this many seconds, Emacs automatically removes it from the image cache. If the cache contains @@ -8897,7 +8873,7 @@ The function `clear-image-cache' disregards this variable. */); Vimage_cache_eviction_delay = make_number (300); #ifdef HAVE_IMAGEMAGICK - DEFVAR_LISP ("imagemagick-render-type", &Vimagemagick_render_type, + DEFVAR_LISP ("imagemagick-render-type", Vimagemagick_render_type, doc: /* Choose between ImageMagick render methods. */); #endif
--- a/src/indent.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/indent.c Wed Jan 19 13:54:19 2011 -0800 @@ -38,11 +38,6 @@ #include "dispextern.h" #include "region-cache.h" -/* Indentation can insert tabs if this is non-zero; - otherwise always uses spaces. */ - -static int indent_tabs_mode; - #define CR 015 /* These three values memorize the current column to avoid recalculation. */ @@ -2159,7 +2154,7 @@ void syms_of_indent (void) { - DEFVAR_BOOL ("indent-tabs-mode", &indent_tabs_mode, + DEFVAR_BOOL ("indent-tabs-mode", indent_tabs_mode, doc: /* *Indentation can insert tabs if this is non-nil. */); indent_tabs_mode = 1;
--- a/src/insdel.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/insdel.c Wed Jan 19 13:54:19 2011 -0800 @@ -53,10 +53,6 @@ Lisp_Object Fcombine_after_change_execute (void); -/* Non-nil means don't call the after-change-functions right away, - just record an element in combine_after_change_list. */ -Lisp_Object Vcombine_after_change_calls; - /* List of elements of the form (BEG-UNCHANGED END-UNCHANGED CHANGE-AMOUNT) describing changes which happened while combine_after_change_calls was nonzero. We use this to decide how to call them @@ -74,10 +70,6 @@ Lisp_Object Qinhibit_modification_hooks; -/* Check all markers in the current buffer, looking for something invalid. */ - -static int check_markers_debug_flag; - #define CHECK_MARKERS() \ if (check_markers_debug_flag) \ check_markers (); \ @@ -2374,14 +2366,14 @@ combine_after_change_list = Qnil; combine_after_change_buffer = Qnil; - DEFVAR_BOOL ("check-markers-debug-flag", &check_markers_debug_flag, + DEFVAR_BOOL ("check-markers-debug-flag", check_markers_debug_flag, doc: /* Non-nil means enable debugging checks for invalid marker positions. */); check_markers_debug_flag = 0; - DEFVAR_LISP ("combine-after-change-calls", &Vcombine_after_change_calls, + DEFVAR_LISP ("combine-after-change-calls", Vcombine_after_change_calls, doc: /* Used internally by the `combine-after-change-calls' macro. */); Vcombine_after_change_calls = Qnil; - DEFVAR_BOOL ("inhibit-modification-hooks", &inhibit_modification_hooks, + DEFVAR_BOOL ("inhibit-modification-hooks", inhibit_modification_hooks, doc: /* Non-nil means don't run any of the hooks that respond to buffer changes. This affects `before-change-functions' and `after-change-functions', as well as hooks attached to text properties and overlays. */);
--- a/src/intervals.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/intervals.h Wed Jan 19 13:54:19 2011 -0800 @@ -304,11 +304,6 @@ extern Lisp_Object Qforeground, Qbackground, Qfont, Qunderline, Qstipple; extern Lisp_Object Qinvisible, Qintangible, Qread_only; -extern Lisp_Object Vinhibit_point_motion_hooks; -extern Lisp_Object Vdefault_text_properties; -extern Lisp_Object Vchar_property_alias_alist; -extern Lisp_Object Vtext_property_default_nonsticky; - /* Sticky properties */ extern Lisp_Object Qfront_sticky, Qrear_nonsticky;
--- a/src/keyboard.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/keyboard.c Wed Jan 19 13:54:19 2011 -0800 @@ -58,10 +58,7 @@ #include "syssignal.h" #include <sys/types.h> -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif - #include <fcntl.h> /* This is to get the definitions of the XK_ symbols. */ @@ -128,9 +125,6 @@ Lisp_Object raw_keybuf; int raw_keybuf_count; -/* Non-nil if the present key sequence was obtained by shift translation. */ -Lisp_Object Vthis_command_keys_shift_translated; - #define GROW_RAW_KEYBUF \ if (raw_keybuf_count == XVECTOR (raw_keybuf)->size) \ raw_keybuf = larger_vector (raw_keybuf, raw_keybuf_count * 2, Qnil) \ @@ -144,19 +138,6 @@ static int before_command_key_count; static int before_command_echo_length; -/* If non-nil, the function that implements the display of help. - It's called with one argument, the help string to display. */ - -Lisp_Object Vshow_help_function; - -/* Nonzero means do menu prompting. */ - -static int menu_prompting; - -/* Character to see next line of menu prompt. */ - -static Lisp_Object menu_prompt_more_char; - /* For longjmp to where kbd input is being done. */ static jmp_buf getcjmp; @@ -185,49 +166,9 @@ Lisp_Object echo_message_buffer; -/* Nonzero means disregard local maps for the menu bar. */ -static int inhibit_local_menu_bar_menus; - /* Nonzero means C-g should cause immediate error-signal. */ int immediate_quit; -/* The user's hook function for outputting an error message. */ -Lisp_Object Vcommand_error_function; - -/* The user's ERASE setting. */ -Lisp_Object Vtty_erase_char; - -/* Character to recognize as the help char. */ -Lisp_Object Vhelp_char; - -/* List of other event types to recognize as meaning "help". */ -Lisp_Object Vhelp_event_list; - -/* Form to execute when help char is typed. */ -Lisp_Object Vhelp_form; - -/* Command to run when the help character follows a prefix key. */ -Lisp_Object Vprefix_help_command; - -/* List of items that should move to the end of the menu bar. */ -Lisp_Object Vmenu_bar_final_items; - -/* Expression to evaluate for the tool bar separator image. - This is used for build_desired_tool_bar_string only. For GTK, we - use GTK tool bar seperators. */ - -Lisp_Object Vtool_bar_separator_image_expression; - -/* Non-nil means show the equivalent key-binding for - any M-x command that has one. - The value can be a length of time to show the message for. - If the value is non-nil and not a number, we wait 2 seconds. */ -Lisp_Object Vsuggest_key_bindings; - -/* How long to display an echo-area message when the minibuffer is active. - If the value is not a number, such messages don't time out. */ -Lisp_Object Vminibuffer_message_timeout; - /* Character that causes a quit. Normally C-g. If we are running on an ordinary terminal, this must be an ordinary @@ -246,46 +187,9 @@ ASCII character. */ int quit_char; -/* If non-nil, this is a map that overrides all other local maps. */ -Lisp_Object Voverriding_local_map; - -/* If non-nil, Voverriding_local_map applies to the menu bar. */ -Lisp_Object Voverriding_local_map_menu_flag; - -/* Keymap that defines special misc events that should - be processed immediately at a low level. */ -Lisp_Object Vspecial_event_map; - /* Current depth in recursive edits. */ int command_loop_level; -/* Total number of times command_loop has read a key sequence. */ -EMACS_INT num_input_keys; - -/* Last input event read as a command. */ -Lisp_Object last_command_event; - -/* Last input character read as a command, not counting menus - reached by the mouse. */ -Lisp_Object last_nonmenu_event; - -/* Last input event read for any purpose. */ -Lisp_Object last_input_event; - -/* If not Qnil, a list of objects to be read as subsequent command input. */ -Lisp_Object Vunread_command_events; - -/* If not Qnil, a list of objects to be read as subsequent command input - including input method processing. */ -Lisp_Object Vunread_input_method_events; - -/* If not Qnil, a list of objects to be read as subsequent command input - but NOT including input method processing. */ -Lisp_Object Vunread_post_input_method_events; - -/* If not -1, an event to be read as subsequent command input. */ -EMACS_INT unread_command_char; - /* If not Qnil, this is a switch-frame event which we decided to put off until the end of a key sequence. This should be read as the next command input, after any unread_command_events. @@ -295,47 +199,19 @@ events until a non-ASCII event is acceptable as input. */ Lisp_Object unread_switch_frame; -/* A mask of extra modifier bits to put into every keyboard char. */ -EMACS_INT extra_keyboard_modifiers; - -/* Char to use as prefix when a meta character is typed in. - This is bound on entry to minibuffer in case ESC is changed there. */ - -Lisp_Object meta_prefix_char; - /* Last size recorded for a current buffer which is not a minibuffer. */ static EMACS_INT last_non_minibuf_size; -/* Number of idle seconds before an auto-save and garbage collection. */ -static Lisp_Object Vauto_save_timeout; - /* Total number of times read_char has returned. */ int num_input_events; -/* Total number of times read_char has returned, outside of macros. */ -EMACS_INT num_nonmacro_input_events; - -/* Auto-save automatically when this many characters have been typed - since the last time. */ - -static EMACS_INT auto_save_interval; - /* Value of num_nonmacro_input_events as of last auto save. */ int last_auto_save; -/* The command being executed by the command loop. - Commands may set this, and the value set will be copied into - current_kboard->Vlast_command instead of the actual command. */ -Lisp_Object Vthis_command; - /* This is like Vthis_command, except that commands never set it. */ Lisp_Object real_this_command; -/* If the lookup of the command returns a binding, the original - command is stored in this-original-command. It is nil otherwise. */ -Lisp_Object Vthis_original_command; - /* The value of point when the last command was started. */ EMACS_INT last_point_position; @@ -352,22 +228,10 @@ generated by the next character. */ Lisp_Object internal_last_event_frame; -/* A user-visible version of the above, intended to allow users to - figure out where the last event came from, if the event doesn't - carry that information itself (i.e. if it was a character). */ -Lisp_Object Vlast_event_frame; - /* The timestamp of the last input event we received from the X server. X Windows wants this for selection ownership. */ unsigned long last_event_timestamp; -/* If non-nil, active regions automatically become the window selection. */ -Lisp_Object Vselect_active_regions; - -/* The text in the active region prior to modifying the buffer. - Used by the `select-active-regions' feature. */ -Lisp_Object Vsaved_region_selection; - Lisp_Object Qx_set_selection, QPRIMARY, Qhandle_switch_frame; Lisp_Object Qself_insert_command; @@ -380,48 +244,19 @@ key sequence that it reads. */ Lisp_Object read_key_sequence_cmd; -/* Echo unfinished commands after this many seconds of pause. */ -Lisp_Object Vecho_keystrokes; - -/* Form to evaluate (if non-nil) when Emacs is started. */ -Lisp_Object Vtop_level; - -/* If non-nil, this implements the current input method. */ -Lisp_Object Vinput_method_function; Lisp_Object Qinput_method_function; -/* When we call Vinput_method_function, - this holds the echo area message that was just erased. */ -Lisp_Object Vinput_method_previous_message; - -/* Non-nil means deactivate the mark at end of this command. */ -Lisp_Object Vdeactivate_mark; Lisp_Object Qdeactivate_mark; -/* Menu bar specified in Lucid Emacs fashion. */ - -Lisp_Object Vlucid_menu_bar_dirty_flag; Lisp_Object Qrecompute_lucid_menubar, Qactivate_menubar_hook; Lisp_Object Qecho_area_clear_hook; /* Hooks to run before and after each command. */ -Lisp_Object Qpre_command_hook, Vpre_command_hook; -Lisp_Object Qpost_command_hook, Vpost_command_hook; -Lisp_Object Qcommand_hook_internal, Vcommand_hook_internal; - -/* Parent keymap of terminal-local function-key-map instances. */ -Lisp_Object Vfunction_key_map; - -/* Keymap of key translations that can override keymaps. */ -Lisp_Object Vkey_translation_map; - -/* List of deferred actions to be performed at a later time. - The precise format isn't relevant here; we just check whether it is nil. */ -Lisp_Object Vdeferred_action_list; - -/* Function to call to handle deferred actions, when there are any. */ -Lisp_Object Vdeferred_action_function; +Lisp_Object Qpre_command_hook; +Lisp_Object Qpost_command_hook; +Lisp_Object Qcommand_hook_internal; + Lisp_Object Qdeferred_action_function; Lisp_Object Qinput_method_exit_on_first_char; @@ -457,11 +292,6 @@ dequeuing functions? Such a flag could be screwed up by interrupts at inopportune times. */ -/* If this flag is non-nil, we check mouse_moved to see when the - mouse moves, and motion events will appear in the input stream. - Otherwise, mouse motion is ignored. */ -Lisp_Object do_mouse_tracking; - /* Symbols to head events. */ Lisp_Object Qmouse_movement; Lisp_Object Qscroll_bar_movement; @@ -529,12 +359,6 @@ Lisp_Object Qpolling_period; -/* List of absolute timers. Appears in order of next scheduled event. */ -Lisp_Object Vtimer_list; - -/* List of idle time timers. Appears in order of next scheduled event. */ -Lisp_Object Vtimer_idle_list; - /* Incremented whenever a timer is run. */ int timers_run; @@ -568,18 +392,6 @@ #define POLL_FOR_INPUT #endif -/* After a command is executed, if point is moved into a region that - has specific properties (e.g. composition, display), we adjust - point to the boundary of the region. But, if a command sets this - variable to non-nil, we suppress this point adjustment. This - variable is set to nil before reading a command. */ - -Lisp_Object Vdisable_point_adjustment; - -/* If non-nil, always disable point adjustment. */ - -Lisp_Object Vglobal_disable_point_adjustment; - /* The time when Emacs started being idle. */ static EMACS_TIME timer_idleness_start_time; @@ -589,11 +401,6 @@ static EMACS_TIME timer_last_idleness_start_time; -/* If non-nil, events produced by disabled menu items and tool-bar - buttons are not ignored. Help functions bind this to allow help on - those items and buttons. */ -Lisp_Object Venable_disabled_menus_and_buttons; - /* Global variable declarations. */ @@ -640,10 +447,6 @@ static char *find_user_signal_name (int); static int store_user_signal_events (void); -/* Nonzero means don't try to suspend even if the operating system seems - to support it. */ -static int cannot_suspend; - /* Add C to the echo string, if echoing is going on. C can be a character, which is printed prettily ("M-C-x" and all that @@ -2049,11 +1852,6 @@ } -/* Number of seconds between polling for input. This is a Lisp - variable that can be bound. */ - -EMACS_INT polling_period; - /* Nonzero means polling for input is temporarily suppressed. */ int poll_suppress_count; @@ -3614,11 +3412,7 @@ : ((kbd_buffer + KBD_BUFFER_SIZE) - kbd_fetch_ptr + (kbd_store_ptr - kbd_buffer))); } -#endif /* subprocesses */ - -Lisp_Object Vthrow_on_input; - -/* Store an event obtained at interrupt level into kbd_buffer, fifo */ +#endif /* Store an event obtained at interrupt level into kbd_buffer, fifo */ void kbd_buffer_store_event (register struct input_event *event) @@ -5235,16 +5029,6 @@ static int last_mouse_y; static unsigned long button_down_time; -/* The maximum time between clicks to make a double-click, or Qnil to - disable double-click detection, or Qt for no time limit. */ - -Lisp_Object Vdouble_click_time; - -/* Maximum number of pixels the mouse may be moved between clicks - to make a double-click. */ - -EMACS_INT double_click_fuzz; - /* The number of clicks in this multiple-click. */ int double_click_count; @@ -11891,19 +11675,19 @@ defsubr (&Sposn_at_point); defsubr (&Sposn_at_x_y); - DEFVAR_LISP ("last-command-event", &last_command_event, + DEFVAR_LISP ("last-command-event", last_command_event, doc: /* Last input event that was part of a command. */); - DEFVAR_LISP ("last-nonmenu-event", &last_nonmenu_event, + DEFVAR_LISP ("last-nonmenu-event", last_nonmenu_event, doc: /* Last input event in a command, except for mouse menu events. Mouse menus give back keys that don't look like mouse events; this variable holds the actual mouse event that led to the menu, so that you can determine whether the command was run by mouse or not. */); - DEFVAR_LISP ("last-input-event", &last_input_event, + DEFVAR_LISP ("last-input-event", last_input_event, doc: /* Last input event. */); - DEFVAR_LISP ("unread-command-events", &Vunread_command_events, + DEFVAR_LISP ("unread-command-events", Vunread_command_events, doc: /* List of events to be read as the command input. These events are processed first, before actual keyboard input. Events read from this list are not normally added to `this-command-keys', @@ -11911,16 +11695,16 @@ An element of the form (t . EVENT) forces EVENT to be added to that list. */); Vunread_command_events = Qnil; - DEFVAR_INT ("unread-command-char", &unread_command_char, + DEFVAR_INT ("unread-command-char", unread_command_char, doc: /* If not -1, an object to be read as next command input event. */); - DEFVAR_LISP ("unread-post-input-method-events", &Vunread_post_input_method_events, + DEFVAR_LISP ("unread-post-input-method-events", Vunread_post_input_method_events, doc: /* List of events to be processed as input by input methods. These events are processed before `unread-command-events' and actual keyboard input, but are not given to `input-method-function'. */); Vunread_post_input_method_events = Qnil; - DEFVAR_LISP ("unread-input-method-events", &Vunread_input_method_events, + DEFVAR_LISP ("unread-input-method-events", Vunread_input_method_events, doc: /* List of events to be processed as input by input methods. These events are processed after `unread-command-events', but before actual keyboard input. @@ -11928,7 +11712,7 @@ `input-method-function'. */); Vunread_input_method_events = Qnil; - DEFVAR_LISP ("meta-prefix-char", &meta_prefix_char, + DEFVAR_LISP ("meta-prefix-char", meta_prefix_char, doc: /* Meta-prefix character code. Meta-foo as command input turns into this character followed by foo. */); XSETINT (meta_prefix_char, 033); @@ -11958,59 +11742,59 @@ The last command executed that was not bound to an input event. This is the command `repeat' will try to repeat. */); - DEFVAR_LISP ("this-command", &Vthis_command, + DEFVAR_LISP ("this-command", Vthis_command, doc: /* The command now being executed. The command can set this variable; whatever is put here will be in `last-command' during the following command. */); Vthis_command = Qnil; DEFVAR_LISP ("this-command-keys-shift-translated", - &Vthis_command_keys_shift_translated, + Vthis_command_keys_shift_translated, doc: /* Non-nil if the key sequence activating this command was shift-translated. Shift-translation occurs when there is no binding for the key sequence as entered, but a binding was found by changing an upper-case letter to lower-case, or a shifted function key to an unshifted one. */); Vthis_command_keys_shift_translated = Qnil; - DEFVAR_LISP ("this-original-command", &Vthis_original_command, + DEFVAR_LISP ("this-original-command", Vthis_original_command, doc: /* The command bound to the current key sequence before remapping. It equals `this-command' if the original command was not remapped through any of the active keymaps. Otherwise, the value of `this-command' is the result of looking up the original command in the active keymaps. */); Vthis_original_command = Qnil; - DEFVAR_INT ("auto-save-interval", &auto_save_interval, + DEFVAR_INT ("auto-save-interval", auto_save_interval, doc: /* *Number of input events between auto-saves. Zero means disable autosaving due to number of characters typed. */); auto_save_interval = 300; - DEFVAR_LISP ("auto-save-timeout", &Vauto_save_timeout, + DEFVAR_LISP ("auto-save-timeout", Vauto_save_timeout, doc: /* *Number of seconds idle time before auto-save. Zero or nil means disable auto-saving due to idleness. After auto-saving due to this many seconds of idle time, Emacs also does a garbage collection if that seems to be warranted. */); XSETFASTINT (Vauto_save_timeout, 30); - DEFVAR_LISP ("echo-keystrokes", &Vecho_keystrokes, + DEFVAR_LISP ("echo-keystrokes", Vecho_keystrokes, doc: /* *Nonzero means echo unfinished commands after this many seconds of pause. The value may be integer or floating point. */); Vecho_keystrokes = make_number (1); - DEFVAR_INT ("polling-period", &polling_period, + DEFVAR_INT ("polling-period", polling_period, doc: /* *Interval between polling for input during Lisp execution. The reason for polling is to make C-g work to stop a running program. Polling is needed only when using X windows and SIGIO does not work. Polling is automatically disabled in all other cases. */); polling_period = 2; - DEFVAR_LISP ("double-click-time", &Vdouble_click_time, + DEFVAR_LISP ("double-click-time", Vdouble_click_time, doc: /* *Maximum time between mouse clicks to make a double-click. Measured in milliseconds. The value nil means disable double-click recognition; t means double-clicks have no time limit and are detected by position only. */); Vdouble_click_time = make_number (500); - DEFVAR_INT ("double-click-fuzz", &double_click_fuzz, + DEFVAR_INT ("double-click-fuzz", double_click_fuzz, doc: /* *Maximum mouse movement between clicks to make a double-click. On window-system frames, value is the number of pixels the mouse may have moved horizontally or vertically between two clicks to make a double-click. @@ -12021,54 +11805,54 @@ to count as a drag. */); double_click_fuzz = 3; - DEFVAR_BOOL ("inhibit-local-menu-bar-menus", &inhibit_local_menu_bar_menus, + DEFVAR_BOOL ("inhibit-local-menu-bar-menus", inhibit_local_menu_bar_menus, doc: /* *Non-nil means inhibit local map menu bar menus. */); inhibit_local_menu_bar_menus = 0; - DEFVAR_INT ("num-input-keys", &num_input_keys, + DEFVAR_INT ("num-input-keys", num_input_keys, doc: /* Number of complete key sequences read as input so far. This includes key sequences read from keyboard macros. The number is effectively the number of interactive command invocations. */); num_input_keys = 0; - DEFVAR_INT ("num-nonmacro-input-events", &num_nonmacro_input_events, + DEFVAR_INT ("num-nonmacro-input-events", num_nonmacro_input_events, doc: /* Number of input events read from the keyboard so far. This does not include events generated by keyboard macros. */); num_nonmacro_input_events = 0; - DEFVAR_LISP ("last-event-frame", &Vlast_event_frame, + DEFVAR_LISP ("last-event-frame", Vlast_event_frame, doc: /* The frame in which the most recently read event occurred. If the last event came from a keyboard macro, this is set to `macro'. */); Vlast_event_frame = Qnil; /* This variable is set up in sysdep.c. */ - DEFVAR_LISP ("tty-erase-char", &Vtty_erase_char, + DEFVAR_LISP ("tty-erase-char", Vtty_erase_char, doc: /* The ERASE character as set by the user with stty. */); - DEFVAR_LISP ("help-char", &Vhelp_char, + DEFVAR_LISP ("help-char", Vhelp_char, doc: /* Character to recognize as meaning Help. When it is read, do `(eval help-form)', and display result if it's a string. If the value of `help-form' is nil, this char can be read normally. */); XSETINT (Vhelp_char, Ctl ('H')); - DEFVAR_LISP ("help-event-list", &Vhelp_event_list, + DEFVAR_LISP ("help-event-list", Vhelp_event_list, doc: /* List of input events to recognize as meaning Help. These work just like the value of `help-char' (see that). */); Vhelp_event_list = Qnil; - DEFVAR_LISP ("help-form", &Vhelp_form, + DEFVAR_LISP ("help-form", Vhelp_form, doc: /* Form to execute when character `help-char' is read. If the form returns a string, that string is displayed. If `help-form' is nil, the help char is not recognized. */); Vhelp_form = Qnil; - DEFVAR_LISP ("prefix-help-command", &Vprefix_help_command, + DEFVAR_LISP ("prefix-help-command", Vprefix_help_command, doc: /* Command to run when `help-char' character follows a prefix key. This command is used only when there is no actual binding for that character after that prefix key. */); Vprefix_help_command = Qnil; - DEFVAR_LISP ("top-level", &Vtop_level, + DEFVAR_LISP ("top-level", Vtop_level, doc: /* Form to evaluate when Emacs starts up. Useful to set before you dump a modified Emacs. */); Vtop_level = Qnil; @@ -12089,12 +11873,12 @@ This variable has a separate binding for each terminal. See Info node `(elisp)Multiple Terminals'. */); - DEFVAR_BOOL ("cannot-suspend", &cannot_suspend, + DEFVAR_BOOL ("cannot-suspend", cannot_suspend, doc: /* Non-nil means to always spawn a subshell instead of suspending. \(Even if the operating system has support for stopping a process.\) */); cannot_suspend = 0; - DEFVAR_BOOL ("menu-prompting", &menu_prompting, + DEFVAR_BOOL ("menu-prompting", menu_prompting, doc: /* Non-nil means prompt with menus when appropriate. This is done when reading from a keymap that has a prompt string, for elements that have prompt strings. @@ -12104,12 +11888,12 @@ Otherwise, menu prompting uses the echo area. */); menu_prompting = 1; - DEFVAR_LISP ("menu-prompt-more-char", &menu_prompt_more_char, + DEFVAR_LISP ("menu-prompt-more-char", menu_prompt_more_char, doc: /* Character to see next line of menu prompt. Type this character while in a menu prompt to rotate around the lines of it. */); XSETINT (menu_prompt_more_char, ' '); - DEFVAR_INT ("extra-keyboard-modifiers", &extra_keyboard_modifiers, + DEFVAR_INT ("extra-keyboard-modifiers", extra_keyboard_modifiers, doc: /* A mask of additional modifier keys to use with every keyboard character. Emacs applies the modifiers of the character stored here to each keyboard character it reads. For example, after evaluating the expression @@ -12122,7 +11906,7 @@ cancels any modification. */); extra_keyboard_modifiers = 0; - DEFVAR_LISP ("deactivate-mark", &Vdeactivate_mark, + DEFVAR_LISP ("deactivate-mark", Vdeactivate_mark, doc: /* If an editing command sets this to t, deactivate the mark afterward. The command loop sets this to nil before each command, and tests the value when the command returns. @@ -12131,18 +11915,18 @@ Qdeactivate_mark = intern_c_string ("deactivate-mark"); staticpro (&Qdeactivate_mark); - DEFVAR_LISP ("command-hook-internal", &Vcommand_hook_internal, + DEFVAR_LISP ("command-hook-internal", Vcommand_hook_internal, doc: /* Temporary storage of `pre-command-hook' or `post-command-hook'. */); Vcommand_hook_internal = Qnil; - DEFVAR_LISP ("pre-command-hook", &Vpre_command_hook, + DEFVAR_LISP ("pre-command-hook", Vpre_command_hook, doc: /* Normal hook run before each command is executed. If an unhandled error happens in running this hook, the hook value is set to nil, since otherwise the error might happen repeatedly and make Emacs nonfunctional. */); Vpre_command_hook = Qnil; - DEFVAR_LISP ("post-command-hook", &Vpost_command_hook, + DEFVAR_LISP ("post-command-hook", Vpost_command_hook, doc: /* Normal hook run after each command is executed. If an unhandled error happens in running this hook, the hook value is set to nil, since otherwise the error @@ -12157,16 +11941,16 @@ staticpro (&Qecho_area_clear_hook); Fset (Qecho_area_clear_hook, Qnil); - DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag, + DEFVAR_LISP ("lucid-menu-bar-dirty-flag", Vlucid_menu_bar_dirty_flag, doc: /* Non-nil means menu bar, specified Lucid style, needs to be recomputed. */); Vlucid_menu_bar_dirty_flag = Qnil; - DEFVAR_LISP ("menu-bar-final-items", &Vmenu_bar_final_items, + DEFVAR_LISP ("menu-bar-final-items", Vmenu_bar_final_items, doc: /* List of menu bar items to move to the end of the menu bar. The elements of the list are event types that may have menu bar bindings. */); Vmenu_bar_final_items = Qnil; - DEFVAR_LISP ("tool-bar-separator-image-expression", &Vtool_bar_separator_image_expression, + DEFVAR_LISP ("tool-bar-separator-image-expression", Vtool_bar_separator_image_expression, doc: /* Expression evaluating to the image spec for a tool-bar separator. This is used internally by graphical displays that do not render tool-bar separators natively. Otherwise it is unused (e.g. on GTK). */); @@ -12186,23 +11970,23 @@ terminal device. See Info node `(elisp)Multiple Terminals'. */); - DEFVAR_LISP ("overriding-local-map", &Voverriding_local_map, + DEFVAR_LISP ("overriding-local-map", Voverriding_local_map, doc: /* Keymap that overrides all other local keymaps. If this variable is non-nil, it is used as a keymap--replacing the buffer's local map, the minor mode keymaps, and char property keymaps. */); Voverriding_local_map = Qnil; - DEFVAR_LISP ("overriding-local-map-menu-flag", &Voverriding_local_map_menu_flag, + DEFVAR_LISP ("overriding-local-map-menu-flag", Voverriding_local_map_menu_flag, doc: /* Non-nil means `overriding-local-map' applies to the menu bar. Otherwise, the menu bar continues to reflect the buffer's local map and the minor mode maps regardless of `overriding-local-map'. */); Voverriding_local_map_menu_flag = Qnil; - DEFVAR_LISP ("special-event-map", &Vspecial_event_map, + DEFVAR_LISP ("special-event-map", Vspecial_event_map, doc: /* Keymap defining bindings for special events to execute at low level. */); Vspecial_event_map = Fcons (intern_c_string ("keymap"), Qnil); - DEFVAR_LISP ("track-mouse", &do_mouse_tracking, + DEFVAR_LISP ("track-mouse", do_mouse_tracking, doc: /* *Non-nil means generate motion events for mouse motion. */); DEFVAR_KBOARD ("system-key-alist", Vsystem_key_alist, @@ -12262,7 +12046,7 @@ This variable is keyboard-local. */); - DEFVAR_LISP ("function-key-map", &Vfunction_key_map, + DEFVAR_LISP ("function-key-map", Vfunction_key_map, doc: /* The parent keymap of all `local-function-key-map' instances. Function key definitions that apply to all terminal devices should go here. If a mapping is defined in both the current @@ -12270,39 +12054,39 @@ definition will take precendence. */); Vfunction_key_map = Fmake_sparse_keymap (Qnil); - DEFVAR_LISP ("key-translation-map", &Vkey_translation_map, + DEFVAR_LISP ("key-translation-map", Vkey_translation_map, doc: /* Keymap of key translations that can override keymaps. This keymap works like `function-key-map', but comes after that, and its non-prefix bindings override ordinary bindings. Another difference is that it is global rather than keyboard-local. */); Vkey_translation_map = Fmake_sparse_keymap (Qnil); - DEFVAR_LISP ("deferred-action-list", &Vdeferred_action_list, + DEFVAR_LISP ("deferred-action-list", Vdeferred_action_list, doc: /* List of deferred actions to be performed at a later time. The precise format isn't relevant here; we just check whether it is nil. */); Vdeferred_action_list = Qnil; - DEFVAR_LISP ("deferred-action-function", &Vdeferred_action_function, + DEFVAR_LISP ("deferred-action-function", Vdeferred_action_function, doc: /* Function to call to handle deferred actions, after each command. This function is called with no arguments after each command whenever `deferred-action-list' is non-nil. */); Vdeferred_action_function = Qnil; - DEFVAR_LISP ("suggest-key-bindings", &Vsuggest_key_bindings, + DEFVAR_LISP ("suggest-key-bindings", Vsuggest_key_bindings, doc: /* *Non-nil means show the equivalent key-binding when M-x command has one. The value can be a length of time to show the message for. If the value is non-nil and not a number, we wait 2 seconds. */); Vsuggest_key_bindings = Qt; - DEFVAR_LISP ("timer-list", &Vtimer_list, + DEFVAR_LISP ("timer-list", Vtimer_list, doc: /* List of active absolute time timers in order of increasing time. */); Vtimer_list = Qnil; - DEFVAR_LISP ("timer-idle-list", &Vtimer_idle_list, + DEFVAR_LISP ("timer-idle-list", Vtimer_idle_list, doc: /* List of active idle-time timers in order of increasing time. */); Vtimer_idle_list = Qnil; - DEFVAR_LISP ("input-method-function", &Vinput_method_function, + DEFVAR_LISP ("input-method-function", Vinput_method_function, doc: /* If non-nil, the function that implements the current input method. It's called with one argument, a printing character that was just read. \(That means a character with code 040...0176.) @@ -12324,18 +12108,18 @@ Vinput_method_function = Qnil; DEFVAR_LISP ("input-method-previous-message", - &Vinput_method_previous_message, + Vinput_method_previous_message, doc: /* When `input-method-function' is called, hold the previous echo area message. This variable exists because `read-event' clears the echo area before running the input method. It is nil if there was no message. */); Vinput_method_previous_message = Qnil; - DEFVAR_LISP ("show-help-function", &Vshow_help_function, + DEFVAR_LISP ("show-help-function", Vshow_help_function, doc: /* If non-nil, the function that implements the display of help. It's called with one argument, the help string to display. */); Vshow_help_function = Qnil; - DEFVAR_LISP ("disable-point-adjustment", &Vdisable_point_adjustment, + DEFVAR_LISP ("disable-point-adjustment", Vdisable_point_adjustment, doc: /* If non-nil, suppress point adjustment after executing a command. After a command is executed, if point is moved into a region that has @@ -12348,7 +12132,7 @@ Vdisable_point_adjustment = Qnil; DEFVAR_LISP ("global-disable-point-adjustment", - &Vglobal_disable_point_adjustment, + Vglobal_disable_point_adjustment, doc: /* *If non-nil, always suppress point adjustment. The default value is nil, in which case, point adjustment are @@ -12356,18 +12140,18 @@ `disable-point-adjustment' (which see) to non-nil. */); Vglobal_disable_point_adjustment = Qnil; - DEFVAR_LISP ("minibuffer-message-timeout", &Vminibuffer_message_timeout, + DEFVAR_LISP ("minibuffer-message-timeout", Vminibuffer_message_timeout, doc: /* *How long to display an echo-area message when the minibuffer is active. If the value is not a number, such messages don't time out. */); Vminibuffer_message_timeout = make_number (2); - DEFVAR_LISP ("throw-on-input", &Vthrow_on_input, + DEFVAR_LISP ("throw-on-input", Vthrow_on_input, doc: /* If non-nil, any keyboard input throws to this symbol. The value of that variable is passed to `quit-flag' and later causes a peculiar kind of quitting. */); Vthrow_on_input = Qnil; - DEFVAR_LISP ("command-error-function", &Vcommand_error_function, + DEFVAR_LISP ("command-error-function", Vcommand_error_function, doc: /* If non-nil, function to output error messages. The arguments are the error data, a list of the form (SIGNALED-CONDITIONS . SIGNAL-DATA) @@ -12377,7 +12161,7 @@ Vcommand_error_function = Qnil; DEFVAR_LISP ("enable-disabled-menus-and-buttons", - &Venable_disabled_menus_and_buttons, + Venable_disabled_menus_and_buttons, doc: /* If non-nil, don't ignore events produced by disabled menu items and tool-bar. Help functions bind this to allow help on disabled menu items @@ -12385,7 +12169,7 @@ Venable_disabled_menus_and_buttons = Qnil; DEFVAR_LISP ("select-active-regions", - &Vselect_active_regions, + Vselect_active_regions, doc: /* If non-nil, an active region automatically sets the primary selection. If the value is `only', only temporarily active regions (usually made by mouse-dragging or shift-selection) set the window selection. @@ -12394,7 +12178,7 @@ Vselect_active_regions = Qt; DEFVAR_LISP ("saved-region-selection", - &Vsaved_region_selection, + Vsaved_region_selection, doc: /* Contents of active region prior to buffer modification. If `select-active-regions' is non-nil, Emacs sets this to the text in the region before modifying the buffer. The next
--- a/src/keyboard.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/keyboard.h Wed Jan 19 13:54:19 2011 -0800 @@ -191,9 +191,6 @@ /* Total number of times read_char has returned. */ extern int num_input_events; -/* Total number of times read_char has returned, outside of macros. */ -extern EMACS_INT num_nonmacro_input_events; - /* Nonzero means polling for input is temporarily suppressed. */ extern int poll_suppress_count; @@ -211,9 +208,6 @@ generated by the next character. */ extern Lisp_Object internal_last_event_frame; -/* Menu items. */ - -extern Lisp_Object Vlucid_menu_bar_dirty_flag; extern Lisp_Object Qrecompute_lucid_menubar, Qactivate_menubar_hook; /* This holds a Lisp vector that holds the properties of a single @@ -404,8 +398,6 @@ #define POSN_INBUFFER_P(posn) (NILP (POSN_STRING (posn))) #define POSN_BUFFER_POSN(posn) (Fnth (make_number (5), (posn))) -extern Lisp_Object do_mouse_tracking; - /* Some of the event heads. */ extern Lisp_Object Qswitch_frame; @@ -438,8 +430,6 @@ extern int ignore_mouse_drag_p; -extern Lisp_Object Vdouble_click_time; - /* The primary selection. */ extern Lisp_Object QPRIMARY; @@ -453,28 +443,13 @@ extern int parse_solitary_modifier (Lisp_Object symbol); -/* Parent keymap of terminal-local function-key-map instances. */ -extern Lisp_Object Vfunction_key_map; - -/* Keymap of key translations that can override keymaps. */ -extern Lisp_Object Vkey_translation_map; - /* This is like Vthis_command, except that commands never set it. */ extern Lisp_Object real_this_command; -/* If the lookup of the command returns a binding, the original - command is stored in this-original-command. It is nil otherwise. */ -extern Lisp_Object Vthis_original_command; - /* Non-nil disable property on a command means do not execute it; call disabled-command-function's value instead. */ extern Lisp_Object QCbutton, QCtoggle, QCradio, QClabel; -/* A mask of extra modifier bits to put into every keyboard char. */ -extern EMACS_INT extra_keyboard_modifiers; - -/* If non-nil, this implements the current input method. */ -extern Lisp_Object Vinput_method_function; extern Lisp_Object Qinput_method_function; /* An event header symbol HEAD may have a property named
--- a/src/keymap.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/keymap.c Wed Jan 19 13:54:19 2011 -0800 @@ -51,49 +51,16 @@ Lisp_Object control_x_map; /* The keymap used for globally bound C-x-prefixed default commands */ -/* was MinibufLocalMap */ -Lisp_Object Vminibuffer_local_map; /* The keymap used by the minibuf for local bindings when spaces are allowed in the minibuf */ -/* was MinibufLocalNSMap */ -Lisp_Object Vminibuffer_local_ns_map; /* The keymap used by the minibuf for local bindings when spaces are not encouraged in the minibuf */ /* keymap used for minibuffers when doing completion */ -/* was MinibufLocalCompletionMap */ -Lisp_Object Vminibuffer_local_completion_map; - -/* keymap used for minibuffers when doing completion in filenames */ -Lisp_Object Vminibuffer_local_filename_completion_map; - -/* keymap used for minibuffers when doing completion in filenames - with require-match*/ -Lisp_Object Vminibuffer_local_filename_must_match_map; - /* keymap used for minibuffers when doing completion and require a match */ -/* was MinibufLocalMustMatchMap */ -Lisp_Object Vminibuffer_local_must_match_map; - -/* Alist of minor mode variables and keymaps. */ -Lisp_Object Vminor_mode_map_alist; - -/* Alist of major-mode-specific overrides for - minor mode variables and keymaps. */ -Lisp_Object Vminor_mode_overriding_map_alist; - -/* List of emulation mode keymap alists. */ -Lisp_Object Vemulation_mode_map_alists; - -/* A list of all commands given new bindings since a certain time - when nil was stored here. - This is used to speed up recomputation of menu key equivalents - when Emacs starts up. t means don't record anything here. */ -Lisp_Object Vdefine_key_rebound_commands; - Lisp_Object Qkeymapp, Qkeymap, Qnon_ascii, Qmenu_item, Qremap; Lisp_Object QCadvertised_binding; @@ -2710,8 +2677,6 @@ return data.sequences; } -static Lisp_Object Vwhere_is_preferred_modifier; - /* This function can GC if Flookup_key autoloads any keymaps. */ DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0, @@ -3857,48 +3822,48 @@ Qnil))))); staticpro (&exclude_keys); - DEFVAR_LISP ("define-key-rebound-commands", &Vdefine_key_rebound_commands, + DEFVAR_LISP ("define-key-rebound-commands", Vdefine_key_rebound_commands, doc: /* List of commands given new key bindings recently. This is used for internal purposes during Emacs startup; don't alter it yourself. */); Vdefine_key_rebound_commands = Qt; - DEFVAR_LISP ("minibuffer-local-map", &Vminibuffer_local_map, + DEFVAR_LISP ("minibuffer-local-map", Vminibuffer_local_map, doc: /* Default keymap to use when reading from the minibuffer. */); Vminibuffer_local_map = Fmake_sparse_keymap (Qnil); - DEFVAR_LISP ("minibuffer-local-ns-map", &Vminibuffer_local_ns_map, + DEFVAR_LISP ("minibuffer-local-ns-map", Vminibuffer_local_ns_map, doc: /* Local keymap for the minibuffer when spaces are not allowed. */); Vminibuffer_local_ns_map = Fmake_sparse_keymap (Qnil); Fset_keymap_parent (Vminibuffer_local_ns_map, Vminibuffer_local_map); - DEFVAR_LISP ("minibuffer-local-completion-map", &Vminibuffer_local_completion_map, + DEFVAR_LISP ("minibuffer-local-completion-map", Vminibuffer_local_completion_map, doc: /* Local keymap for minibuffer input with completion. */); Vminibuffer_local_completion_map = Fmake_sparse_keymap (Qnil); Fset_keymap_parent (Vminibuffer_local_completion_map, Vminibuffer_local_map); DEFVAR_LISP ("minibuffer-local-filename-completion-map", - &Vminibuffer_local_filename_completion_map, + Vminibuffer_local_filename_completion_map, doc: /* Local keymap for minibuffer input with completion for filenames. */); Vminibuffer_local_filename_completion_map = Fmake_sparse_keymap (Qnil); Fset_keymap_parent (Vminibuffer_local_filename_completion_map, Vminibuffer_local_completion_map); - DEFVAR_LISP ("minibuffer-local-must-match-map", &Vminibuffer_local_must_match_map, + DEFVAR_LISP ("minibuffer-local-must-match-map", Vminibuffer_local_must_match_map, doc: /* Local keymap for minibuffer input with completion, for exact match. */); Vminibuffer_local_must_match_map = Fmake_sparse_keymap (Qnil); Fset_keymap_parent (Vminibuffer_local_must_match_map, Vminibuffer_local_completion_map); DEFVAR_LISP ("minibuffer-local-filename-must-match-map", - &Vminibuffer_local_filename_must_match_map, + Vminibuffer_local_filename_must_match_map, doc: /* Local keymap for minibuffer input with completion for filenames with exact match. */); Vminibuffer_local_filename_must_match_map = Fmake_sparse_keymap (Qnil); Fset_keymap_parent (Vminibuffer_local_filename_must_match_map, Vminibuffer_local_must_match_map); - DEFVAR_LISP ("minor-mode-map-alist", &Vminor_mode_map_alist, + DEFVAR_LISP ("minor-mode-map-alist", Vminor_mode_map_alist, doc: /* Alist of keymaps to use for minor modes. Each element looks like (VARIABLE . KEYMAP); KEYMAP is used to read key sequences and look up bindings if VARIABLE's value is non-nil. @@ -3906,14 +3871,14 @@ in the list takes precedence. */); Vminor_mode_map_alist = Qnil; - DEFVAR_LISP ("minor-mode-overriding-map-alist", &Vminor_mode_overriding_map_alist, + DEFVAR_LISP ("minor-mode-overriding-map-alist", Vminor_mode_overriding_map_alist, doc: /* Alist of keymaps to use for minor modes, in current major mode. This variable is an alist just like `minor-mode-map-alist', and it is used the same way (and before `minor-mode-map-alist'); however, it is provided for major modes to bind locally. */); Vminor_mode_overriding_map_alist = Qnil; - DEFVAR_LISP ("emulation-mode-map-alists", &Vemulation_mode_map_alists, + DEFVAR_LISP ("emulation-mode-map-alists", Vemulation_mode_map_alists, doc: /* List of keymap alists to use for emulations modes. It is intended for modes or packages using multiple minor-mode keymaps. Each element is a keymap alist just like `minor-mode-map-alist', or a @@ -3922,7 +3887,7 @@ `minor-mode-map-alist' and `minor-mode-overriding-map-alist'. */); Vemulation_mode_map_alists = Qnil; - DEFVAR_LISP ("where-is-preferred-modifier", &Vwhere_is_preferred_modifier, + DEFVAR_LISP ("where-is-preferred-modifier", Vwhere_is_preferred_modifier, doc: /* Preferred modifier to use for `where-is'. When a single binding is requested, `where-is' will return one that uses this modifier if possible. If nil, or if no such binding exists,
--- a/src/keymap.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/keymap.h Wed Jan 19 13:54:19 2011 -0800 @@ -24,9 +24,6 @@ extern Lisp_Object Qkeymap, Qmenu_bar; extern Lisp_Object Qremap; extern Lisp_Object Qmenu_item; -extern Lisp_Object meta_prefix_char; -extern Lisp_Object Voverriding_local_map; -extern Lisp_Object Voverriding_local_map_menu_flag; extern Lisp_Object current_global_map; EXFUN (Fmake_sparse_keymap, 1); EXFUN (Fkeymap_prompt, 1);
--- a/src/lisp.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/lisp.h Wed Jan 19 13:54:19 2011 -0800 @@ -122,16 +122,18 @@ TYPEBITS-aligned. */ #ifndef NO_DECL_ALIGN # ifndef DECL_ALIGN -/* What compiler directive should we use for non-gcc compilers? -stef */ -# if defined (__GNUC__) +# if HAVE_ATTRIBUTE_ALIGNED # define DECL_ALIGN(type, var) \ type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var +# else + /* What directives do other compilers use? */ # endif # endif #endif /* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8. */ -#if defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ || defined DARWIN_OS +#if (defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ \ + || defined DARWIN_OS || defined __sun) /* We also need to be able to specify mult-of-8 alignment on static vars. */ # if defined DECL_ALIGN # define USE_LSB_TAG @@ -1841,27 +1843,47 @@ extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, const char *, int); /* Macros we use to define forwarded Lisp variables. - These are used in the syms_of_FILENAME functions. */ + These are used in the syms_of_FILENAME functions. + + An ordinary (not in buffer_defaults, per-buffer, or per-keyboard) + lisp variable is actually a field in `struct emacs_globals'. The + field's name begins with "f_", which is a convention enforced by + these macros. Each such global has a corresponding #define in + globals.h; the plain name should be used in the code. + + E.g., the global "cons_cells_consed" is declared as "int + f_cons_cells_consed" in globals.h, but there is a define: + + #define cons_cells_consed globals.f_cons_cells_consed + + All C code uses the `cons_cells_consed' name. This is all done + this way to support indirection for multi-threaded Emacs. */ #define DEFVAR_LISP(lname, vname, doc) \ do { \ static struct Lisp_Objfwd o_fwd; \ - defvar_lisp (&o_fwd, lname, vname); \ + defvar_lisp (&o_fwd, lname, &globals.f_ ## vname); \ } while (0) #define DEFVAR_LISP_NOPRO(lname, vname, doc) \ do { \ static struct Lisp_Objfwd o_fwd; \ - defvar_lisp_nopro (&o_fwd, lname, vname); \ + defvar_lisp_nopro (&o_fwd, lname, &globals.f_ ## vname); \ } while (0) #define DEFVAR_BOOL(lname, vname, doc) \ do { \ static struct Lisp_Boolfwd b_fwd; \ - defvar_bool (&b_fwd, lname, vname); \ + defvar_bool (&b_fwd, lname, &globals.f_ ## vname); \ } while (0) #define DEFVAR_INT(lname, vname, doc) \ do { \ static struct Lisp_Intfwd i_fwd; \ - defvar_int (&i_fwd, lname, vname); \ + defvar_int (&i_fwd, lname, &globals.f_ ## vname); \ + } while (0) + +#define DEFVAR_BUFFER_DEFAULTS(lname, vname, doc) \ + do { \ + static struct Lisp_Objfwd o_fwd; \ + defvar_lisp_nopro (&o_fwd, lname, &buffer_defaults.vname); \ } while (0) #define DEFVAR_KBOARD(lname, vname, doc) \ @@ -1908,8 +1930,6 @@ extern struct specbinding *specpdl_ptr; extern EMACS_INT specpdl_size; -extern EMACS_INT max_specpdl_size; - #define SPECPDL_INDEX() ((int) (specpdl_ptr - specpdl)) /* Everything needed to describe an active condition case. */ @@ -2073,10 +2093,6 @@ extern int consing_since_gc; -/* Thresholds for doing another gc. */ - -extern EMACS_INT gc_cons_threshold; - extern EMACS_INT gc_relative_threshold; extern EMACS_INT memory_full_cons_threshold; @@ -2431,14 +2447,11 @@ /* Defined in fns.c */ extern Lisp_Object QCrehash_size, QCrehash_threshold; -extern int use_dialog_box; -extern int use_file_dialog; extern int next_almost_prime (int); extern Lisp_Object larger_vector (Lisp_Object, int, Lisp_Object); extern void sweep_weak_hash_tables (void); extern Lisp_Object Qcursor_in_echo_area; extern Lisp_Object Qstring_lessp; -extern Lisp_Object Vfeatures; extern Lisp_Object QCsize, QCtest, QCweakness, Qequal, Qeq, Qeql; unsigned sxhash (Lisp_Object, int); Lisp_Object make_hash_table (Lisp_Object, Lisp_Object, Lisp_Object, @@ -2585,8 +2598,6 @@ /* Defined in dispnew.c */ extern Lisp_Object selected_frame; -extern Lisp_Object Vwindow_system_version; -extern EMACS_INT baud_rate; EXFUN (Fding, 1); EXFUN (Fredraw_frame, 1); EXFUN (Fsleep_for, 2); @@ -2601,24 +2612,21 @@ extern Lisp_Object Qinhibit_eval_during_redisplay; extern Lisp_Object Qmessage_truncate_lines; extern Lisp_Object Qmenu_bar_update_hook; -extern Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions; +extern Lisp_Object Qwindow_scroll_functions; extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; extern Lisp_Object Qimage, Qtext, Qboth, Qboth_horiz, Qtext_image_horiz; extern Lisp_Object Qspace, Qcenter, QCalign_to; extern Lisp_Object Qbar, Qhbar, Qbox, Qhollow; extern Lisp_Object Qleft_margin, Qright_margin; extern Lisp_Object Qglyphless_char; -extern Lisp_Object Vmessage_log_max; extern Lisp_Object QCdata, QCfile; extern Lisp_Object QCmap; extern Lisp_Object Qrisky_local_variable; -extern Lisp_Object Vinhibit_redisplay; extern struct frame *last_glyphless_glyph_frame; extern unsigned last_glyphless_glyph_face_id; extern int last_glyphless_glyph_merged_face_id; extern int message_enable_multibyte; extern int noninteractive_need_newline; -extern EMACS_INT scroll_margin; extern Lisp_Object echo_area_buffer[2]; extern void add_to_log (const char *, Lisp_Object, Lisp_Object); extern void check_message_stack (void); @@ -2675,8 +2683,6 @@ extern void mark_object (Lisp_Object); extern void refill_memory_reserve (void); extern const char *pending_malloc_warning; -extern Lisp_Object Vpurify_flag; -extern Lisp_Object Vmemory_full; extern Lisp_Object *stack_base; EXFUN (Fcons, 2); extern Lisp_Object list1 (Lisp_Object); @@ -2764,7 +2770,6 @@ /* Defined in print.c */ extern Lisp_Object Vprin1_to_string_buffer; -extern Lisp_Object Vprint_level, Vprint_length; extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; extern void safe_debug_print (Lisp_Object) EXTERNALLY_VISIBLE; EXFUN (Fprin1, 2); @@ -2773,28 +2778,26 @@ EXFUN (Fterpri, 1); EXFUN (Fprint, 2); EXFUN (Ferror_message_string, 1); -extern Lisp_Object Vstandard_output, Qstandard_output; +extern Lisp_Object Qstandard_output; extern Lisp_Object Qexternal_debugging_output; extern void temp_output_buffer_setup (const char *); -extern int print_level, print_escape_newlines; +extern int print_level; extern Lisp_Object Qprint_escape_newlines; extern void write_string (const char *, int); extern void print_error_message (Lisp_Object, Lisp_Object, const char *, Lisp_Object); extern Lisp_Object internal_with_output_to_temp_buffer (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object); +#define FLOAT_TO_STRING_BUFSIZE 350 extern void float_to_string (unsigned char *, double); extern void syms_of_print (void); /* Defined in doprnt.c */ extern EMACS_INT doprnt (char *, int, const char *, const char *, va_list); -/* Defined in lread.c */ -extern Lisp_Object Vafter_load_alist; extern Lisp_Object Qvariable_documentation, Qstandard_input; extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; -extern Lisp_Object Vobarray, initial_obarray, Vstandard_input; -extern int load_in_progress; +extern Lisp_Object initial_obarray; EXFUN (Fread, 1); EXFUN (Fread_from_string, 3); EXFUN (Fintern, 2); @@ -2813,8 +2816,6 @@ do { \ if (initialized) Vcurrent_load_list = Fcons (x, Vcurrent_load_list); \ } while (0) -extern Lisp_Object Vcurrent_load_list; -extern Lisp_Object Vload_history, Vload_suffixes, Vload_file_rep_suffixes; extern int openp (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object *, Lisp_Object); extern int isfloat_string (const char *, int); @@ -2828,13 +2829,10 @@ /* Defined in eval.c */ extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro; -extern Lisp_Object Vinhibit_quit, Qinhibit_quit, Vquit_flag; +extern Lisp_Object Qinhibit_quit; extern Lisp_Object Vautoload_queue; -extern Lisp_Object Vdebug_on_error; extern Lisp_Object Vsignaling_function; extern int handling_signal; -extern int debug_on_next_call; - /* To run a normal hook, use the appropriate function from the list below. The calling convention: @@ -2893,12 +2891,7 @@ extern void init_eval (void); extern void syms_of_eval (void); -/* Defined in editfns.c */ -extern Lisp_Object last_nonmenu_event; extern Lisp_Object Qfield; -extern Lisp_Object Vinhibit_field_text_motion; -extern Lisp_Object Vsystem_name; -extern Lisp_Object Vuser_login_name; EXFUN (Fcurrent_message, 0); EXFUN (Fgoto_char, 1); EXFUN (Fpoint_max_marker, 0); @@ -2954,7 +2947,7 @@ extern void report_overlay_modification (Lisp_Object, Lisp_Object, int, Lisp_Object, Lisp_Object, Lisp_Object); extern int overlay_touches_p (EMACS_INT); -extern Lisp_Object Vbuffer_alist, Vinhibit_read_only; +extern Lisp_Object Vbuffer_alist; EXFUN (Fget_buffer, 1); EXFUN (Fget_buffer_create, 1); EXFUN (Fgenerate_new_buffer_name, 2); @@ -3007,7 +3000,6 @@ extern Lisp_Object Qfile_exists_p; extern Lisp_Object Qfile_directory_p; extern Lisp_Object Qinsert_file_contents; -extern Lisp_Object Vauto_save_list_file_name; EXFUN (Ffind_file_name_handler, 2); EXFUN (Ffile_name_as_directory, 1); EXFUN (Fexpand_file_name, 2); @@ -3067,13 +3059,8 @@ /* Defined in minibuf.c */ extern Lisp_Object Qcompletion_ignore_case; -extern Lisp_Object Vcompletion_regexp_list; -extern Lisp_Object Vhistory_length; extern Lisp_Object Vminibuffer_list; extern Lisp_Object last_minibuf_string; -extern int completion_ignore_case; -extern int history_delete_duplicates; -extern int minibuffer_auto_raise; extern void choose_minibuf_frame (void); EXFUN (Fcompleting_read, 8); EXFUN (Fread_from_minibuffer, 7); @@ -3089,10 +3076,8 @@ /* Defined in callint.c */ -extern Lisp_Object Qminus, Qplus, Vcurrent_prefix_arg; +extern Lisp_Object Qminus, Qplus; extern Lisp_Object Qwhen; -extern Lisp_Object Vcommand_history; -extern Lisp_Object Vmark_even_if_inactive; extern Lisp_Object Qcall_interactively, Qmouse_leave_buffer_hook; EXFUN (Fprefix_numeric_value, 1); extern void syms_of_callint (void); @@ -3125,10 +3110,6 @@ extern Lisp_Object Qabove_handle, Qhandle, Qbelow_handle; extern Lisp_Object Qup, Qdown, Qbottom, Qend_scroll; extern Lisp_Object Qtop, Qratio; -extern Lisp_Object Vsaved_region_selection; -extern Lisp_Object Vselect_active_regions; -extern Lisp_Object Vtty_erase_char, Vhelp_form, Vtop_level; -extern Lisp_Object Vthrow_on_input; extern int input_pending; EXFUN (Fdiscard_input, 0); EXFUN (Frecursive_edit, 0); @@ -3168,8 +3149,6 @@ /* Defined in frame.c */ #ifdef HAVE_WINDOW_SYSTEM -extern Lisp_Object Vx_resource_name; -extern Lisp_Object Vx_resource_class; #endif /* HAVE_WINDOW_SYSTEM */ extern Lisp_Object Qonly; extern Lisp_Object Qvisible; @@ -3202,12 +3181,8 @@ extern int display_arg; #endif extern Lisp_Object decode_env_path (const char *, const char *); -extern Lisp_Object Vinvocation_name, Vinvocation_directory; -extern Lisp_Object Vbefore_init_time, Vafter_init_time; -extern Lisp_Object Vinstallation_directory; extern Lisp_Object empty_unibyte_string, empty_multibyte_string; extern Lisp_Object Qfile_name_handler_alist; -extern Lisp_Object Vdynamic_library_alist; extern void (*fatal_error_signal_hook) (void); EXFUN (Fkill_emacs, 1) NO_RETURN; #if HAVE_SETLOCALE @@ -3224,9 +3199,6 @@ /* Nonzero means don't do interactive redisplay and don't change tty modes. */ extern int noninteractive; -/* Nonzero means don't load X resources or Windows Registry settings. */ -extern int inhibit_x_resources; - /* Nonzero means remove site-lisp directories from load-path. */ extern int no_site_lisp; @@ -3262,11 +3234,6 @@ extern void syms_of_process (void); extern void setup_process_coding_systems (Lisp_Object); -/* Defined in callproc.c */ -extern Lisp_Object Vexec_path, Vexec_suffixes, - Vexec_directory, Vdata_directory; -extern Lisp_Object Vdoc_directory; -extern Lisp_Object Vshell_file_name; EXFUN (Fcall_process, MANY); extern int child_setup (int, int, int, char **, int, Lisp_Object); extern void init_callproc_1 (void); @@ -3276,7 +3243,6 @@ /* Defined in doc.c */ extern Lisp_Object Qfunction_documentation; -extern Lisp_Object Vdoc_file_name; EXFUN (Fsubstitute_command_keys, 1); EXFUN (Fdocumentation_property, 3); extern Lisp_Object read_doc_string (Lisp_Object); @@ -3313,8 +3279,6 @@ Lisp_Object, Lisp_Object, Lisp_Object); extern void syms_of_undo (void); -extern Lisp_Object Vundo_outer_limit; - /* Defined in textprop.c */ extern Lisp_Object Qfont, Qmouse_face; extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks; @@ -3380,8 +3344,6 @@ extern int memcmp (void *, void *, size_t); #endif -/* Defined in filelock.c */ -extern Lisp_Object Vtemporary_file_directory; EXFUN (Funlock_buffer, 0); extern void unlock_all_files (void); extern void lock_file (Lisp_Object); @@ -3429,7 +3391,6 @@ /* Defined in xfns.c, w32fns.c, or macfns.c */ extern Lisp_Object Qfont_param; -extern Lisp_Object Vx_no_window_manager; EXFUN (Fxw_display_color_p, 1); EXFUN (Fx_focus_frame, 1); #endif @@ -3443,10 +3404,7 @@ extern Lisp_Object QCfamily, QCweight, QCslant; extern Lisp_Object QCheight, QCname, QCwidth, QCforeground, QCbackground; extern Lisp_Object Vface_alternative_font_family_alist; -extern Lisp_Object Vface_font_rescale_alist; -extern Lisp_Object Vface_ignored_fonts; extern Lisp_Object Vface_alternative_font_registry_alist; -extern Lisp_Object Vscalable_fonts_allowed; EXFUN (Fclear_face_cache, 1); EXFUN (Fx_load_color_file, 1); extern void syms_of_xfaces (void); @@ -3671,4 +3629,6 @@ } while (0) +#include "globals.h" + #endif /* EMACS_LISP_H */
--- a/src/lread.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/lread.c Wed Jan 19 13:54:19 2011 -0800 @@ -45,10 +45,7 @@ #include "msdos.h" #endif -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif - #include <math.h> #ifdef HAVE_SETLOCALE @@ -73,11 +70,11 @@ Lisp_Object Qrehash_threshold; Lisp_Object Qread_char, Qget_file_char, Qstandard_input, Qcurrent_load_list; -Lisp_Object Qvariable_documentation, Vvalues, Vstandard_input, Vafter_load_alist; +Lisp_Object Qvariable_documentation; Lisp_Object Qascii_character, Qload, Qload_file_name; Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; Lisp_Object Qinhibit_file_name_operation; -Lisp_Object Qeval_buffer_list, Veval_buffer_list; +Lisp_Object Qeval_buffer_list; Lisp_Object Qfile_truename, Qdo_after_load_evaluation; /* ACM 2006/5/16 */ /* Used instead of Qget_file_char while loading *.elc files compiled @@ -86,69 +83,19 @@ static Lisp_Object Qload_force_doc_strings; -/* non-zero if inside `load' */ -int load_in_progress; static Lisp_Object Qload_in_progress; -/* Directory in which the sources were found. */ -Lisp_Object Vsource_directory; - -/* Search path and suffixes for files to be loaded. */ -Lisp_Object Vload_path, Vload_suffixes, Vload_file_rep_suffixes; - -/* File name of user's init file. */ -Lisp_Object Vuser_init_file; - -/* This is the user-visible association list that maps features to - lists of defs in their load files. */ -Lisp_Object Vload_history; - -/* This is used to build the load history. */ -Lisp_Object Vcurrent_load_list; - -/* List of files that were preloaded. */ -Lisp_Object Vpreloaded_file_list; - -/* Name of file actually being read by `load'. */ -Lisp_Object Vload_file_name; - -/* Function to use for reading, in `load' and friends. */ -Lisp_Object Vload_read_function; - -/* Non-nil means read recursive structures using #n= and #n# syntax. */ -Lisp_Object Vread_circle; - /* The association list of objects read with the #n=object form. Each member of the list has the form (n . object), and is used to look up the object for the corresponding #n# construct. It must be set to nil before all top-level calls to read0. */ Lisp_Object read_objects; -/* Nonzero means load should forcibly load all dynamic doc strings. */ -static int load_force_doc_strings; - -/* Nonzero means read should convert strings to unibyte. */ -static int load_convert_to_unibyte; - /* Nonzero means READCHAR should read bytes one by one (not character) when READCHARFUN is Qget_file_char or Qget_emacs_mule_file_char. This is set to 1 by read1 temporarily while handling #@NUMBER. */ static int load_each_byte; -/* Function to use for loading an Emacs Lisp source file (not - compiled) instead of readevalloop. */ -Lisp_Object Vload_source_file_function; - -/* List of all DEFVAR_BOOL variables. Used by the byte optimizer. */ -Lisp_Object Vbyte_boolean_vars; - -/* Whether or not to add a `read-positions' property to symbols - read. */ -Lisp_Object Vread_with_symbol_positions; - -/* List of (SYMBOL . POSITION) accumulated so far. */ -Lisp_Object Vread_symbol_positions_list; - /* List of descriptors now open for Fload. */ static Lisp_Object load_descriptor_list; @@ -192,25 +139,13 @@ Fread initializes this to zero, so we need not specbind it or worry about what happens to it when there is an error. */ static int new_backquote_flag; -static Lisp_Object Vold_style_backquotes, Qold_style_backquotes; +static Lisp_Object Qold_style_backquotes; /* A list of file names for files being loaded in Fload. Used to check for recursive loads. */ static Lisp_Object Vloads_in_progress; -/* Non-zero means load dangerous compiled Lisp files. */ - -int load_dangerous_libraries; - -/* Non-zero means force printing messages when loading Lisp files. */ - -int force_load_messages; - -/* A regular expression used to detect files compiled with Emacs. */ - -static Lisp_Object Vbytecomp_version_regexp; - static int read_emacs_mule_char (int, int (*) (int, Lisp_Object), Lisp_Object); @@ -3503,7 +3438,6 @@ } } -Lisp_Object Vobarray; Lisp_Object initial_obarray; /* oblookup stores the bucket number here, for the sake of Funintern. */ @@ -4185,22 +4119,22 @@ defsubr (&Smapatoms); defsubr (&Slocate_file_internal); - DEFVAR_LISP ("obarray", &Vobarray, + DEFVAR_LISP ("obarray", Vobarray, doc: /* Symbol table for use by `intern' and `read'. It is a vector whose length ought to be prime for best results. The vector's contents don't make sense if examined from Lisp programs; to find all the symbols in an obarray, use `mapatoms'. */); - DEFVAR_LISP ("values", &Vvalues, + DEFVAR_LISP ("values", Vvalues, doc: /* List of values of all expressions which were read, evaluated and printed. Order is reverse chronological. */); - DEFVAR_LISP ("standard-input", &Vstandard_input, + DEFVAR_LISP ("standard-input", Vstandard_input, doc: /* Stream for read to get input from. See documentation of `read' for possible values. */); Vstandard_input = Qt; - DEFVAR_LISP ("read-with-symbol-positions", &Vread_with_symbol_positions, + DEFVAR_LISP ("read-with-symbol-positions", Vread_with_symbol_positions, doc: /* If non-nil, add position of read symbols to `read-symbol-positions-list'. If this variable is a buffer, then only forms read from that buffer @@ -4214,7 +4148,7 @@ the toplevel; bind it instead. */); Vread_with_symbol_positions = Qnil; - DEFVAR_LISP ("read-symbol-positions-list", &Vread_symbol_positions_list, + DEFVAR_LISP ("read-symbol-positions-list", Vread_symbol_positions_list, doc: /* A list mapping read symbols to their positions. This variable is modified during calls to `read' or `read-from-string', but only when `read-with-symbol-positions' is @@ -4229,24 +4163,24 @@ were read in. */); Vread_symbol_positions_list = Qnil; - DEFVAR_LISP ("read-circle", &Vread_circle, + DEFVAR_LISP ("read-circle", Vread_circle, doc: /* Non-nil means read recursive structures using #N= and #N# syntax. */); Vread_circle = Qt; - DEFVAR_LISP ("load-path", &Vload_path, + DEFVAR_LISP ("load-path", Vload_path, doc: /* *List of directories to search for files to load. Each element is a string (directory name) or nil (try default directory). Initialized based on EMACSLOADPATH environment variable, if any, otherwise to default specified by file `epaths.h' when Emacs was built. */); - DEFVAR_LISP ("load-suffixes", &Vload_suffixes, + DEFVAR_LISP ("load-suffixes", Vload_suffixes, doc: /* List of suffixes for (compiled or source) Emacs Lisp files. This list should not include the empty string. `load' and related functions try to append these suffixes, in order, to the specified file name if a Lisp suffix is allowed or required. */); Vload_suffixes = Fcons (make_pure_c_string (".elc"), Fcons (make_pure_c_string (".el"), Qnil)); - DEFVAR_LISP ("load-file-rep-suffixes", &Vload_file_rep_suffixes, + DEFVAR_LISP ("load-file-rep-suffixes", Vload_file_rep_suffixes, doc: /* List of suffixes that indicate representations of \ the same file. This list should normally start with the empty string. @@ -4261,12 +4195,12 @@ customize `jka-compr-load-suffixes' rather than the present variable. */); Vload_file_rep_suffixes = Fcons (empty_unibyte_string, Qnil); - DEFVAR_BOOL ("load-in-progress", &load_in_progress, + DEFVAR_BOOL ("load-in-progress", load_in_progress, doc: /* Non-nil if inside of `load'. */); Qload_in_progress = intern_c_string ("load-in-progress"); staticpro (&Qload_in_progress); - DEFVAR_LISP ("after-load-alist", &Vafter_load_alist, + DEFVAR_LISP ("after-load-alist", Vafter_load_alist, doc: /* An alist of expressions to be evalled when particular files are loaded. Each element looks like (REGEXP-OR-FEATURE FORMS...). @@ -4281,7 +4215,7 @@ the rest of the FORMS. */); Vafter_load_alist = Qnil; - DEFVAR_LISP ("load-history", &Vload_history, + DEFVAR_LISP ("load-history", Vload_history, doc: /* Alist mapping loaded file names to symbols and features. Each alist element should be a list (FILE-NAME ENTRIES...), where FILE-NAME is the name of a file that has been loaded into Emacs. @@ -4301,11 +4235,11 @@ directory. These file names are converted to absolute at startup. */); Vload_history = Qnil; - DEFVAR_LISP ("load-file-name", &Vload_file_name, + DEFVAR_LISP ("load-file-name", Vload_file_name, doc: /* Full name of file being loaded by `load'. */); Vload_file_name = Qnil; - DEFVAR_LISP ("user-init-file", &Vuser_init_file, + DEFVAR_LISP ("user-init-file", Vuser_init_file, doc: /* File name, including directory, of user's initialization file. If the file loaded had extension `.elc', and the corresponding source file exists, this variable contains the name of source file, suitable for use @@ -4314,16 +4248,16 @@ of the file, regardless of whether or not it has the `.elc' extension. */); Vuser_init_file = Qnil; - DEFVAR_LISP ("current-load-list", &Vcurrent_load_list, + DEFVAR_LISP ("current-load-list", Vcurrent_load_list, doc: /* Used for internal purposes by `load'. */); Vcurrent_load_list = Qnil; - DEFVAR_LISP ("load-read-function", &Vload_read_function, + DEFVAR_LISP ("load-read-function", Vload_read_function, doc: /* Function used by `load' and `eval-region' for reading expressions. The default is nil, which means use the function `read'. */); Vload_read_function = Qnil; - DEFVAR_LISP ("load-source-file-function", &Vload_source_file_function, + DEFVAR_LISP ("load-source-file-function", Vload_source_file_function, doc: /* Function called in `load' for loading an Emacs Lisp source file. This function is for doing code conversion before reading the source file. If nil, loading is done without any code conversion. @@ -4332,45 +4266,45 @@ See `load' for the meaning of the remaining arguments. */); Vload_source_file_function = Qnil; - DEFVAR_BOOL ("load-force-doc-strings", &load_force_doc_strings, + DEFVAR_BOOL ("load-force-doc-strings", load_force_doc_strings, doc: /* Non-nil means `load' should force-load all dynamic doc strings. This is useful when the file being loaded is a temporary copy. */); load_force_doc_strings = 0; - DEFVAR_BOOL ("load-convert-to-unibyte", &load_convert_to_unibyte, + DEFVAR_BOOL ("load-convert-to-unibyte", load_convert_to_unibyte, doc: /* Non-nil means `read' converts strings to unibyte whenever possible. This is normally bound by `load' and `eval-buffer' to control `read', and is not meant for users to change. */); load_convert_to_unibyte = 0; - DEFVAR_LISP ("source-directory", &Vsource_directory, + DEFVAR_LISP ("source-directory", Vsource_directory, doc: /* Directory in which Emacs sources were found when Emacs was built. You cannot count on them to still be there! */); Vsource_directory = Fexpand_file_name (build_string ("../"), Fcar (decode_env_path (0, PATH_DUMPLOADSEARCH))); - DEFVAR_LISP ("preloaded-file-list", &Vpreloaded_file_list, + DEFVAR_LISP ("preloaded-file-list", Vpreloaded_file_list, doc: /* List of files that were preloaded (when dumping Emacs). */); Vpreloaded_file_list = Qnil; - DEFVAR_LISP ("byte-boolean-vars", &Vbyte_boolean_vars, + DEFVAR_LISP ("byte-boolean-vars", Vbyte_boolean_vars, doc: /* List of all DEFVAR_BOOL variables, used by the byte code optimizer. */); Vbyte_boolean_vars = Qnil; - DEFVAR_BOOL ("load-dangerous-libraries", &load_dangerous_libraries, + DEFVAR_BOOL ("load-dangerous-libraries", load_dangerous_libraries, doc: /* Non-nil means load dangerous compiled Lisp files. Some versions of XEmacs use different byte codes than Emacs. These incompatible byte codes can make Emacs crash when it tries to execute them. */); load_dangerous_libraries = 0; - DEFVAR_BOOL ("force-load-messages", &force_load_messages, + DEFVAR_BOOL ("force-load-messages", force_load_messages, doc: /* Non-nil means force printing messages when loading Lisp files. This overrides the value of the NOMESSAGE argument to `load'. */); force_load_messages = 0; - DEFVAR_LISP ("bytecomp-version-regexp", &Vbytecomp_version_regexp, + DEFVAR_LISP ("bytecomp-version-regexp", Vbytecomp_version_regexp, doc: /* Regular expression matching safe to load compiled Lisp files. When Emacs loads a compiled Lisp file, it reads the first 512 bytes from the file, and matches them against this regular expression. @@ -4379,11 +4313,11 @@ Vbytecomp_version_regexp = make_pure_c_string ("^;;;.\\(in Emacs version\\|bytecomp version FSF\\)"); - DEFVAR_LISP ("eval-buffer-list", &Veval_buffer_list, + DEFVAR_LISP ("eval-buffer-list", Veval_buffer_list, doc: /* List of buffers being read from by calls to `eval-buffer' and `eval-region'. */); Veval_buffer_list = Qnil; - DEFVAR_LISP ("old-style-backquotes", &Vold_style_backquotes, + DEFVAR_LISP ("old-style-backquotes", Vold_style_backquotes, doc: /* Set to non-nil when `read' encounters an old-style backquote. */); Vold_style_backquotes = Qnil; Qold_style_backquotes = intern_c_string ("old-style-backquotes");
--- a/src/macros.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/macros.c Wed Jan 19 13:54:19 2011 -0800 @@ -29,14 +29,6 @@ Lisp_Object Qexecute_kbd_macro, Qkbd_macro_termination_hook; -/* Kbd macro currently being executed (a string or vector). */ - -Lisp_Object Vexecuting_kbd_macro; - -/* Index of next character to fetch from that macro. */ - -EMACS_INT executing_kbd_macro_index; - /* Number of successful iterations so far for innermost keyboard macro. This is not bound at each level, @@ -384,11 +376,11 @@ The value is the symbol `append' while appending to the definition of an existing macro. */); - DEFVAR_LISP ("executing-kbd-macro", &Vexecuting_kbd_macro, + DEFVAR_LISP ("executing-kbd-macro", Vexecuting_kbd_macro, doc: /* Currently executing keyboard macro (string or vector). This is nil when not executing a keyboard macro. */); - DEFVAR_INT ("executing-kbd-macro-index", &executing_kbd_macro_index, + DEFVAR_INT ("executing-kbd-macro-index", executing_kbd_macro_index, doc: /* Index in currently executing keyboard macro; undefined if none executing. */); DEFVAR_KBOARD ("last-kbd-macro", Vlast_kbd_macro,
--- a/src/macros.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/macros.h Wed Jan 19 13:54:19 2011 -0800 @@ -18,14 +18,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ -/* Kbd macro currently being executed (a string or vector). */ - -extern Lisp_Object Vexecuting_kbd_macro; - -/* Index of next character to fetch from that macro. */ - -extern EMACS_INT executing_kbd_macro_index; - /* Number of successful iterations so far for innermost keyboard macro. This is not bound at each level,
--- a/src/marker.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/marker.c Wed Jan 19 13:54:19 2011 -0800 @@ -34,10 +34,6 @@ static void byte_char_debug_check (struct buffer *, EMACS_INT, EMACS_INT); -/* Nonzero means enable debugging checks on byte/char correspondences. */ - -static int byte_debug_flag; - void clear_charpos_cache (struct buffer *b) { @@ -897,7 +893,7 @@ defsubr (&Sset_marker_insertion_type); defsubr (&Sbuffer_has_markers_at); - DEFVAR_BOOL ("byte-debug-flag", &byte_debug_flag, + DEFVAR_BOOL ("byte-debug-flag", byte_debug_flag, doc: /* Non-nil enables debugging checks in byte/char position conversions. */); byte_debug_flag = 0; }
--- a/src/menu.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/menu.h Wed Jan 19 13:54:19 2011 -0800 @@ -19,8 +19,6 @@ #ifndef MENU_H #define MENU_H -extern Lisp_Object Vmenu_updating_frame; - extern void x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval);
--- a/src/minibuf.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/minibuf.c Wed Jan 19 13:54:19 2011 -0800 @@ -54,83 +54,25 @@ /* The maximum length of a minibuffer history. */ -Lisp_Object Qhistory_length, Vhistory_length; - -/* No duplicates in history. */ - -int history_delete_duplicates; - -/* Non-nil means add new input to history. */ - -Lisp_Object Vhistory_add_new_input; +Lisp_Object Qhistory_length; /* Fread_minibuffer leaves the input here as a string. */ Lisp_Object last_minibuf_string; -/* Nonzero means let functions called when within a minibuffer - invoke recursive minibuffers (to read arguments, or whatever) */ - -int enable_recursive_minibuffers; - -/* Nonzero means don't ignore text properties - in Fread_from_minibuffer. */ - -int minibuffer_allow_text_properties; - -/* help-form is bound to this while in the minibuffer. */ - -Lisp_Object Vminibuffer_help_form; - -/* Variable which is the history list to add minibuffer values to. */ - -Lisp_Object Vminibuffer_history_variable; - -/* Current position in the history list (adjusted by M-n and M-p). */ - -Lisp_Object Vminibuffer_history_position; - -/* Text properties that are added to minibuffer prompts. - These are in addition to the basic `field' property, and stickiness - properties. */ - -Lisp_Object Vminibuffer_prompt_properties; - Lisp_Object Qminibuffer_history, Qbuffer_name_history; Lisp_Object Qread_file_name_internal; /* Normal hooks for entry to and exit from minibuffer. */ -Lisp_Object Qminibuffer_setup_hook, Vminibuffer_setup_hook; -Lisp_Object Qminibuffer_exit_hook, Vminibuffer_exit_hook; - -/* Function to call to read a buffer name. */ -Lisp_Object Vread_buffer_function; - -/* Nonzero means completion ignores case. */ - -int completion_ignore_case; -Lisp_Object Qcompletion_ignore_case; -int read_buffer_completion_ignore_case; - -/* List of regexps that should restrict possible completions. */ +Lisp_Object Qminibuffer_setup_hook; +Lisp_Object Qminibuffer_exit_hook; -Lisp_Object Vcompletion_regexp_list; - -/* Nonzero means raise the minibuffer frame when the minibuffer - is entered. */ - -int minibuffer_auto_raise; - -/* Keymap for reading expressions. */ -Lisp_Object Vread_expression_map; - -Lisp_Object Vminibuffer_completion_table, Qminibuffer_completion_table; -Lisp_Object Vminibuffer_completion_predicate, Qminibuffer_completion_predicate; -Lisp_Object Vminibuffer_completion_confirm, Qminibuffer_completion_confirm; -Lisp_Object Vminibuffer_completing_file_name; - +Lisp_Object Qcompletion_ignore_case; +Lisp_Object Qminibuffer_completion_table; +Lisp_Object Qminibuffer_completion_predicate; +Lisp_Object Qminibuffer_completion_confirm; Lisp_Object Quser_variable_p; Lisp_Object Qminibuffer_default; @@ -2077,45 +2019,45 @@ Qread_expression_history = intern_c_string ("read-expression-history"); staticpro (&Qread_expression_history); - DEFVAR_LISP ("read-buffer-function", &Vread_buffer_function, + DEFVAR_LISP ("read-buffer-function", Vread_buffer_function, doc: /* If this is non-nil, `read-buffer' does its work by calling this function. The function is called with the arguments passed to `read-buffer'. */); Vread_buffer_function = Qnil; DEFVAR_BOOL ("read-buffer-completion-ignore-case", - &read_buffer_completion_ignore_case, + read_buffer_completion_ignore_case, doc: /* *Non-nil means completion ignores case when reading a buffer name. */); read_buffer_completion_ignore_case = 0; - DEFVAR_LISP ("minibuffer-setup-hook", &Vminibuffer_setup_hook, + DEFVAR_LISP ("minibuffer-setup-hook", Vminibuffer_setup_hook, doc: /* Normal hook run just after entry to minibuffer. */); Vminibuffer_setup_hook = Qnil; - DEFVAR_LISP ("minibuffer-exit-hook", &Vminibuffer_exit_hook, + DEFVAR_LISP ("minibuffer-exit-hook", Vminibuffer_exit_hook, doc: /* Normal hook run just after exit from minibuffer. */); Vminibuffer_exit_hook = Qnil; - DEFVAR_LISP ("history-length", &Vhistory_length, + DEFVAR_LISP ("history-length", Vhistory_length, doc: /* *Maximum length for history lists before truncation takes place. A number means that length; t means infinite. Truncation takes place just after a new element is inserted. Setting the `history-length' property of a history variable overrides this default. */); XSETFASTINT (Vhistory_length, 30); - DEFVAR_BOOL ("history-delete-duplicates", &history_delete_duplicates, + DEFVAR_BOOL ("history-delete-duplicates", history_delete_duplicates, doc: /* *Non-nil means to delete duplicates in history. If set to t when adding a new history element, all previous identical elements are deleted from the history list. */); history_delete_duplicates = 0; - DEFVAR_LISP ("history-add-new-input", &Vhistory_add_new_input, + DEFVAR_LISP ("history-add-new-input", Vhistory_add_new_input, doc: /* *Non-nil means to add new elements in history. If set to nil, minibuffer reading functions don't add new elements to the history list, so it is possible to do this afterwards by calling `add-to-history' explicitly. */); Vhistory_add_new_input = Qt; - DEFVAR_BOOL ("completion-ignore-case", &completion_ignore_case, + DEFVAR_BOOL ("completion-ignore-case", completion_ignore_case, doc: /* Non-nil means don't consider case significant in completion. For file-name completion, `read-file-name-completion-ignore-case' controls the behavior, rather than this variable. @@ -2123,12 +2065,12 @@ controls the behavior, rather than this variable. */); completion_ignore_case = 0; - DEFVAR_BOOL ("enable-recursive-minibuffers", &enable_recursive_minibuffers, + DEFVAR_BOOL ("enable-recursive-minibuffers", enable_recursive_minibuffers, doc: /* *Non-nil means to allow minibuffer commands while in the minibuffer. This variable makes a difference whenever the minibuffer window is active. */); enable_recursive_minibuffers = 0; - DEFVAR_LISP ("minibuffer-completion-table", &Vminibuffer_completion_table, + DEFVAR_LISP ("minibuffer-completion-table", Vminibuffer_completion_table, doc: /* Alist or obarray used for completion in the minibuffer. This becomes the ALIST argument to `try-completion' and `all-completions'. The value can also be a list of strings or a hash table. @@ -2143,11 +2085,11 @@ lambda -- return t if STRING is a valid completion as it stands. */); Vminibuffer_completion_table = Qnil; - DEFVAR_LISP ("minibuffer-completion-predicate", &Vminibuffer_completion_predicate, + DEFVAR_LISP ("minibuffer-completion-predicate", Vminibuffer_completion_predicate, doc: /* Within call to `completing-read', this holds the PREDICATE argument. */); Vminibuffer_completion_predicate = Qnil; - DEFVAR_LISP ("minibuffer-completion-confirm", &Vminibuffer_completion_confirm, + DEFVAR_LISP ("minibuffer-completion-confirm", Vminibuffer_completion_confirm, doc: /* Whether to demand confirmation of completion before exiting minibuffer. If nil, confirmation is not required. If the value is `confirm', the user may exit with an input that is not @@ -2159,15 +2101,15 @@ Vminibuffer_completion_confirm = Qnil; DEFVAR_LISP ("minibuffer-completing-file-name", - &Vminibuffer_completing_file_name, + Vminibuffer_completing_file_name, doc: /* Non-nil means completing file names. */); Vminibuffer_completing_file_name = Qnil; - DEFVAR_LISP ("minibuffer-help-form", &Vminibuffer_help_form, + DEFVAR_LISP ("minibuffer-help-form", Vminibuffer_help_form, doc: /* Value that `help-form' takes on inside the minibuffer. */); Vminibuffer_help_form = Qnil; - DEFVAR_LISP ("minibuffer-history-variable", &Vminibuffer_history_variable, + DEFVAR_LISP ("minibuffer-history-variable", Vminibuffer_history_variable, doc: /* History list symbol to add minibuffer values to. Each string of minibuffer input, as it appears on exit from the minibuffer, is added with @@ -2175,16 +2117,16 @@ (cons STRING (symbol-value minibuffer-history-variable))) */); XSETFASTINT (Vminibuffer_history_variable, 0); - DEFVAR_LISP ("minibuffer-history-position", &Vminibuffer_history_position, + DEFVAR_LISP ("minibuffer-history-position", Vminibuffer_history_position, doc: /* Current position of redoing in the history list. */); Vminibuffer_history_position = Qnil; - DEFVAR_BOOL ("minibuffer-auto-raise", &minibuffer_auto_raise, + DEFVAR_BOOL ("minibuffer-auto-raise", minibuffer_auto_raise, doc: /* *Non-nil means entering the minibuffer raises the minibuffer's frame. Some uses of the echo area also raise that frame (since they use it too). */); minibuffer_auto_raise = 0; - DEFVAR_LISP ("completion-regexp-list", &Vcompletion_regexp_list, + DEFVAR_LISP ("completion-regexp-list", Vcompletion_regexp_list, doc: /* List of regexps that should restrict possible completions. The basic completion functions only consider a completion acceptable if it matches all regular expressions in this list, with @@ -2194,14 +2136,14 @@ Vcompletion_regexp_list = Qnil; DEFVAR_BOOL ("minibuffer-allow-text-properties", - &minibuffer_allow_text_properties, + minibuffer_allow_text_properties, doc: /* Non-nil means `read-from-minibuffer' should not discard text properties. This also affects `read-string', but it does not affect `read-minibuffer', `read-no-blanks-input', or any of the functions that do minibuffer input with completion; they always discard text properties. */); minibuffer_allow_text_properties = 0; - DEFVAR_LISP ("minibuffer-prompt-properties", &Vminibuffer_prompt_properties, + DEFVAR_LISP ("minibuffer-prompt-properties", Vminibuffer_prompt_properties, doc: /* Text properties that are added to minibuffer prompts. These are in addition to the basic `field' property, and stickiness properties. */); @@ -2210,7 +2152,7 @@ Vminibuffer_prompt_properties = Fcons (intern_c_string ("read-only"), Fcons (Qt, Qnil)); - DEFVAR_LISP ("read-expression-map", &Vread_expression_map, + DEFVAR_LISP ("read-expression-map", Vread_expression_map, doc: /* Minibuffer keymap used for reading Lisp expressions. */); Vread_expression_map = Qnil;
--- a/src/mktime.c Sun Jan 16 23:45:28 2011 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,544 +0,0 @@ -/* Convert a `struct tm' to a time_t value. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, - 2004, 2005, 2006, 2007 Free Software Foundation, Inc. - Contributed by Paul Eggert (eggert@twinsun.com). - - NOTE: The canonical source of this file is maintained with the GNU C Library. - Bugs can be reported to bug-glibc@gnu.org. - - 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 this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ - -/* Define this to have a standalone program to test this implementation of - mktime. */ -/* #define DEBUG 1 */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#ifdef _LIBC -# define HAVE_LIMITS_H 1 -# define STDC_HEADERS 1 -#endif - -/* Assume that leap seconds are possible, unless told otherwise. - If the host has a `zic' command with a `-L leapsecondfilename' option, - then it supports leap seconds; otherwise it probably doesn't. */ -#ifndef LEAP_SECONDS_POSSIBLE -# define LEAP_SECONDS_POSSIBLE 1 -#endif - -#include <sys/types.h> /* Some systems define `time_t' here. */ -#include <time.h> - -#if HAVE_LIMITS_H -# include <limits.h> -#endif - -#if DEBUG -# include <stdio.h> -# if STDC_HEADERS -# include <stdlib.h> -# endif -/* Make it work even if the system's libc has its own mktime routine. */ -# define mktime my_mktime -#endif /* DEBUG */ - -#ifndef CHAR_BIT -# define CHAR_BIT 8 -#endif - -/* The extra casts work around common compiler bugs. */ -#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) -/* The outer cast is needed to work around a bug in Cray C 5.0.3.0. - It is necessary at least when t == time_t. */ -#define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \ - ? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)) -#define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t))) - -#ifndef INT_MIN -# define INT_MIN TYPE_MINIMUM (int) -#endif -#ifndef INT_MAX -# define INT_MAX TYPE_MAXIMUM (int) -#endif - -#ifndef TIME_T_MIN -# define TIME_T_MIN TYPE_MINIMUM (time_t) -#endif -#ifndef TIME_T_MAX -# define TIME_T_MAX TYPE_MAXIMUM (time_t) -#endif - -#define TM_YEAR_BASE 1900 -#define EPOCH_YEAR 1970 - -#ifndef __isleap -/* Nonzero if YEAR is a leap year (every 4 years, - except every 100th isn't, and every 400th is). */ -# define __isleap(year) \ - ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) -#endif - -/* How many days come before each month (0-12). */ -const unsigned short int __mon_yday[2][13] = - { - /* Normal years. */ - { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, - /* Leap years. */ - { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } - }; - - -#ifdef _LIBC -# define my_mktime_localtime_r __localtime_r -#else -/* If we're a mktime substitute in a GNU program, then prefer - localtime to localtime_r, since many localtime_r implementations - are buggy. */ -static struct tm * -my_mktime_localtime_r (const time_t *t, struct tm *tp) -{ - struct tm *l = localtime (t); - if (! l) - return 0; - *tp = *l; - return tp; -} -#endif /* ! _LIBC */ - - -/* Yield the difference between (YEAR-YDAY HOUR:MIN:SEC) and (*TP), - measured in seconds, ignoring leap seconds. - YEAR uses the same numbering as TM->tm_year. - All values are in range, except possibly YEAR. - If TP is null, return a nonzero value. - If overflow occurs, yield the low order bits of the correct answer. */ -static time_t -ydhms_tm_diff (int year, int yday, int hour, int min, int sec, const struct tm *tp) -{ - if (!tp) - return 1; - else - { - /* Compute intervening leap days correctly even if year is negative. - Take care to avoid int overflow. time_t overflow is OK, since - only the low order bits of the correct time_t answer are needed. - Don't convert to time_t until after all divisions are done, since - time_t might be unsigned. */ - int a4 = (year >> 2) + (TM_YEAR_BASE >> 2) - ! (year & 3); - int b4 = (tp->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (tp->tm_year & 3); - int a100 = a4 / 25 - (a4 % 25 < 0); - int b100 = b4 / 25 - (b4 % 25 < 0); - int a400 = a100 >> 2; - int b400 = b100 >> 2; - int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); - time_t years = year - (time_t) tp->tm_year; - time_t days = (365 * years + intervening_leap_days - + (yday - tp->tm_yday)); - return (60 * (60 * (24 * days + (hour - tp->tm_hour)) - + (min - tp->tm_min)) - + (sec - tp->tm_sec)); - } -} - -/* Use CONVERT to convert *T to a broken down time in *TP. - If *T is out of range for conversion, adjust it so that - it is the nearest in-range value and then convert that. */ -static struct tm * -ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), - time_t *t, struct tm *tp) -{ - struct tm *r; - - if (! (r = (*convert) (t, tp)) && *t) - { - time_t bad = *t; - time_t ok = 0; - struct tm tm; - - /* BAD is a known unconvertible time_t, and OK is a known good one. - Use binary search to narrow the range between BAD and OK until - they differ by 1. */ - while (bad != ok + (bad < 0 ? -1 : 1)) - { - time_t mid = *t = (bad < 0 - ? bad + ((ok - bad) >> 1) - : ok + ((bad - ok) >> 1)); - if ((r = (*convert) (t, tp))) - { - tm = *r; - ok = mid; - } - else - bad = mid; - } - - if (!r && ok) - { - /* The last conversion attempt failed; - revert to the most recent successful attempt. */ - *t = ok; - *tp = tm; - r = tp; - } - } - - return r; -} - - -/* Convert *TP to a time_t value, inverting - the monotonic and mostly-unit-linear conversion function CONVERT. - Use *OFFSET to keep track of a guess at the offset of the result, - compared to what the result would be for UTC without leap seconds. - If *OFFSET's guess is correct, only one CONVERT call is needed. */ -time_t -__mktime_internal (struct tm *tp, struct tm *(*convert) (const time_t *, struct tm *), - time_t *offset) -{ - time_t t, dt, t0, t1, t2; - struct tm tm; - - /* The maximum number of probes (calls to CONVERT) should be enough - to handle any combinations of time zone rule changes, solar time, - leap seconds, and oscillations around a spring-forward gap. - POSIX.1 prohibits leap seconds, but some hosts have them anyway. */ - int remaining_probes = 6; - - /* Time requested. Copy it in case CONVERT modifies *TP; this can - occur if TP is localtime's returned value and CONVERT is localtime. */ - int sec = tp->tm_sec; - int min = tp->tm_min; - int hour = tp->tm_hour; - int mday = tp->tm_mday; - int mon = tp->tm_mon; - int year_requested = tp->tm_year; - int isdst = tp->tm_isdst; - - /* 1 if the previous probe was DST. */ - int dst2; - - /* Ensure that mon is in range, and set year accordingly. */ - int mon_remainder = mon % 12; - int negative_mon_remainder = mon_remainder < 0; - int mon_years = mon / 12 - negative_mon_remainder; - int year = year_requested + mon_years; - - /* The other values need not be in range: - the remaining code handles minor overflows correctly, - assuming int and time_t arithmetic wraps around. - Major overflows are caught at the end. */ - - /* Calculate day of year from year, month, and day of month. - The result need not be in range. */ - int yday = ((__mon_yday[__isleap (year + TM_YEAR_BASE)] - [mon_remainder + 12 * negative_mon_remainder]) - + mday - 1); - - int sec_requested = sec; - - /* Only years after 1970 are defined. - If year is 69, it might still be representable due to - timezone differences. */ - if (year < 69) - return -1; - -#if LEAP_SECONDS_POSSIBLE - /* Handle out-of-range seconds specially, - since ydhms_tm_diff assumes every minute has 60 seconds. */ - if (sec < 0) - sec = 0; - if (59 < sec) - sec = 59; -#endif - - /* Invert CONVERT by probing. First assume the same offset as last time. - Then repeatedly use the error to improve the guess. */ - - tm.tm_year = EPOCH_YEAR - TM_YEAR_BASE; - tm.tm_yday = tm.tm_hour = tm.tm_min = tm.tm_sec = 0; - t0 = ydhms_tm_diff (year, yday, hour, min, sec, &tm); - - for (t = t1 = t2 = t0 + *offset, dst2 = 0; - (dt = ydhms_tm_diff (year, yday, hour, min, sec, - ranged_convert (convert, &t, &tm))); - t1 = t2, t2 = t, t += dt, dst2 = tm.tm_isdst != 0) - if (t == t1 && t != t2 - && (tm.tm_isdst < 0 - || (isdst < 0 - ? dst2 <= (tm.tm_isdst != 0) - : (isdst != 0) != (tm.tm_isdst != 0)))) - /* We can't possibly find a match, as we are oscillating - between two values. The requested time probably falls - within a spring-forward gap of size DT. Follow the common - practice in this case, which is to return a time that is DT - away from the requested time, preferring a time whose - tm_isdst differs from the requested value. (If no tm_isdst - was requested and only one of the two values has a nonzero - tm_isdst, prefer that value.) In practice, this is more - useful than returning -1. */ - break; - else if (--remaining_probes == 0) - return -1; - - /* If we have a match, check whether tm.tm_isdst has the requested - value, if any. */ - if (dt == 0 && isdst != tm.tm_isdst && 0 <= isdst && 0 <= tm.tm_isdst) - { - /* tm.tm_isdst has the wrong value. Look for a neighboring - time with the right value, and use its UTC offset. - Heuristic: probe the previous three calendar quarters (approximately), - looking for the desired isdst. This isn't perfect, - but it's good enough in practice. */ - int quarter = 7889238; /* seconds per average 1/4 Gregorian year */ - int i; - - /* If we're too close to the time_t limit, look in future quarters. */ - if (t < TIME_T_MIN + 3 * quarter) - quarter = -quarter; - - for (i = 1; i <= 3; i++) - { - time_t ot = t - i * quarter; - struct tm otm; - ranged_convert (convert, &ot, &otm); - if (otm.tm_isdst == isdst) - { - /* We found the desired tm_isdst. - Extrapolate back to the desired time. */ - t = ot + ydhms_tm_diff (year, yday, hour, min, sec, &otm); - ranged_convert (convert, &t, &tm); - break; - } - } - } - - *offset = t - t0; - -#if LEAP_SECONDS_POSSIBLE - if (sec_requested != tm.tm_sec) - { - /* Adjust time to reflect the tm_sec requested, not the normalized value. - Also, repair any damage from a false match due to a leap second. */ - t += sec_requested - sec + (sec == 0 && tm.tm_sec == 60); - if (! (*convert) (&t, &tm)) - return -1; - } -#endif - - if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3) - { - /* time_t isn't large enough to rule out overflows in ydhms_tm_diff, - so check for major overflows. A gross check suffices, - since if t has overflowed, it is off by a multiple of - TIME_T_MAX - TIME_T_MIN + 1. So ignore any component of - the difference that is bounded by a small value. */ - - double dyear = (double) year_requested + mon_years - tm.tm_year; - double dday = 366 * dyear + mday; - double dsec = 60 * (60 * (24 * dday + hour) + min) + sec_requested; - - /* On Irix4.0.5 cc, dividing TIME_T_MIN by 3 does not produce - correct results, ie., it erroneously gives a positive value - of 715827882. Setting a variable first then doing math on it - seems to work. (ghazi@caip.rutgers.edu) */ - - const time_t time_t_max = TIME_T_MAX; - const time_t time_t_min = TIME_T_MIN; - - if (time_t_max / 3 - time_t_min / 3 < (dsec < 0 ? - dsec : dsec)) - return -1; - } - - if (year == 69) - { - /* If year was 69, need to check whether the time was representable - or not. */ - if (t < 0 || t > 2 * 24 * 60 * 60) - return -1; - } - - *tp = tm; - return t; -} - - -static time_t localtime_offset; - -/* Convert *TP to a time_t value. */ -time_t -mktime (tp) - struct tm *tp; -{ -#ifdef _LIBC - /* POSIX.1 8.1.1 requires that whenever mktime() is called, the - time zone names contained in the external variable `tzname' shall - be set as if the tzset() function had been called. */ - __tzset (); -#endif - - return __mktime_internal (tp, my_mktime_localtime_r, &localtime_offset); -} - -#ifdef weak_alias -weak_alias (mktime, timelocal) -#endif - -#if DEBUG - -static int -not_equal_tm (a, b) - struct tm *a; - struct tm *b; -{ - return ((a->tm_sec ^ b->tm_sec) - | (a->tm_min ^ b->tm_min) - | (a->tm_hour ^ b->tm_hour) - | (a->tm_mday ^ b->tm_mday) - | (a->tm_mon ^ b->tm_mon) - | (a->tm_year ^ b->tm_year) - | (a->tm_mday ^ b->tm_mday) - | (a->tm_yday ^ b->tm_yday) - | (a->tm_isdst ^ b->tm_isdst)); -} - -static void -print_tm (tp) - struct tm *tp; -{ - if (tp) - printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d", - tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday, - tp->tm_hour, tp->tm_min, tp->tm_sec, - tp->tm_yday, tp->tm_wday, tp->tm_isdst); - else - printf ("0"); -} - -static int -check_result (tk, tmk, tl, lt) - time_t tk; - struct tm tmk; - time_t tl; - struct tm *lt; -{ - if (tk != tl || !lt || not_equal_tm (&tmk, lt)) - { - printf ("mktime ("); - print_tm (&tmk); - printf (")\nyields ("); - print_tm (lt); - printf (") == %ld, should be %ld\n", (long) tl, (long) tk); - return 1; - } - - return 0; -} - -int -main (argc, argv) - int argc; - char **argv; -{ - int status = 0; - struct tm tm, tmk, tml; - struct tm *lt; - time_t tk, tl; - char trailer; - - if ((argc == 3 || argc == 4) - && (sscanf (argv[1], "%d-%d-%d%c", - &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer) - == 3) - && (sscanf (argv[2], "%d:%d:%d%c", - &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer) - == 3)) - { - tm.tm_year -= TM_YEAR_BASE; - tm.tm_mon--; - tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]); - tmk = tm; - tl = mktime (&tmk); - lt = localtime (&tl); - if (lt) - { - tml = *lt; - lt = &tml; - } - printf ("mktime returns %ld == ", (long) tl); - print_tm (&tmk); - printf ("\n"); - status = check_result (tl, tmk, tl, lt); - } - else if (argc == 4 || (argc == 5 && strcmp (argv[4], "-") == 0)) - { - time_t from = atol (argv[1]); - time_t by = atol (argv[2]); - time_t to = atol (argv[3]); - - if (argc == 4) - for (tl = from; tl <= to; tl += by) - { - lt = localtime (&tl); - if (lt) - { - tmk = tml = *lt; - tk = mktime (&tmk); - status |= check_result (tk, tmk, tl, tml); - } - else - { - printf ("localtime (%ld) yields 0\n", (long) tl); - status = 1; - } - } - else - for (tl = from; tl <= to; tl += by) - { - /* Null benchmark. */ - lt = localtime (&tl); - if (lt) - { - tmk = tml = *lt; - tk = tl; - status |= check_result (tk, tmk, tl, tml); - } - else - { - printf ("localtime (%ld) yields 0\n", (long) tl); - status = 1; - } - } - } - else - printf ("Usage:\ -\t%s YYYY-MM-DD HH:MM:SS [ISDST] # Test given time.\n\ -\t%s FROM BY TO # Test values FROM, FROM+BY, ..., TO.\n\ -\t%s FROM BY TO - # Do not test those values (for benchmark).\n", - argv[0], argv[0], argv[0]); - - return status; -} - -#endif /* DEBUG */ - -/* -Local Variables: -compile-command: "gcc -DDEBUG -DHAVE_LIMITS_H -DSTDC_HEADERS -Wall -W -O -g mktime.c -o mktime" -End: -*/ -
--- a/src/msdos.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/msdos.c Wed Jan 19 13:54:19 2011 -0800 @@ -404,9 +404,6 @@ /* Segment and offset of the virtual screen. If 0, DOS/V is NOT loaded. */ static unsigned short screen_virtual_segment = 0; static unsigned short screen_virtual_offset = 0; -/* A flag to control how to display unibyte 8-bit characters. */ -extern int unibyte_display_via_language_environment; - extern Lisp_Object Qcursor_type; extern Lisp_Object Qbar, Qhbar; @@ -846,7 +843,6 @@ accomodate the screen attribute byte. */ #define MAX_SCREEN_BUF 160*2 -Lisp_Object Vdos_unsupported_char_glyph; extern unsigned char *encode_terminal_code (struct glyph *, int, struct coding_system *); static void @@ -4226,7 +4222,7 @@ Qreverse = intern_c_string ("reverse"); staticpro (&Qreverse); - DEFVAR_LISP ("dos-unsupported-char-glyph", &Vdos_unsupported_char_glyph, + DEFVAR_LISP ("dos-unsupported-char-glyph", Vdos_unsupported_char_glyph, doc: /* *Glyph to display instead of chars not supported by current codepage. This variable is used only by MS-DOS terminals. */); Vdos_unsupported_char_glyph = make_number ('\177');
--- a/src/print.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/print.c Wed Jan 19 13:54:19 2011 -0800 @@ -37,49 +37,25 @@ #include "termhooks.h" /* For struct terminal. */ #include "font.h" -Lisp_Object Vstandard_output, Qstandard_output; +Lisp_Object Qstandard_output; Lisp_Object Qtemp_buffer_setup_hook; /* These are used to print like we read. */ -Lisp_Object Vfloat_output_format, Qfloat_output_format; +Lisp_Object Qfloat_output_format; #include <math.h> #if STDC_HEADERS #include <float.h> #endif +#include <ftoastr.h> /* Default to values appropriate for IEEE floating point. */ -#ifndef FLT_RADIX -#define FLT_RADIX 2 -#endif -#ifndef DBL_MANT_DIG -#define DBL_MANT_DIG 53 -#endif #ifndef DBL_DIG #define DBL_DIG 15 #endif -#ifndef DBL_MIN -#define DBL_MIN 2.2250738585072014e-308 -#endif - -#ifdef DBL_MIN_REPLACEMENT -#undef DBL_MIN -#define DBL_MIN DBL_MIN_REPLACEMENT -#endif - -/* Define DOUBLE_DIGITS_BOUND, an upper bound on the number of decimal digits - needed to express a float without losing information. - The general-case formula is valid for the usual case, IEEE floating point, - but many compilers can't optimize the formula to an integer constant, - so make a special case for it. */ -#if FLT_RADIX == 2 && DBL_MANT_DIG == 53 -#define DOUBLE_DIGITS_BOUND 17 /* IEEE floating point */ -#else -#define DOUBLE_DIGITS_BOUND ((int) ceil (log10 (pow (FLT_RADIX, DBL_MANT_DIG)))) -#endif /* Avoid actual stack overflow in print. */ int print_depth; @@ -102,49 +78,9 @@ /* Bytes stored in print_buffer. */ EMACS_INT print_buffer_pos_byte; -/* Maximum length of list to print in full; noninteger means - effectively infinity */ - -Lisp_Object Vprint_length; - -/* Maximum depth of list to print in full; noninteger means - effectively infinity. */ - -Lisp_Object Vprint_level; - -/* Nonzero means print newlines in strings as \n. */ - -int print_escape_newlines; - -/* Nonzero means to print single-byte non-ascii characters in strings as - octal escapes. */ - -int print_escape_nonascii; - -/* Nonzero means to print multibyte characters in strings as hex escapes. */ - -int print_escape_multibyte; - Lisp_Object Qprint_escape_newlines; Lisp_Object Qprint_escape_multibyte, Qprint_escape_nonascii; -/* Nonzero means print (quote foo) forms as 'foo, etc. */ - -int print_quoted; - -/* Non-nil means print #: before uninterned symbols. */ - -Lisp_Object Vprint_gensym; - -/* Non-nil means print recursive structures using #n= and #n# syntax. */ - -Lisp_Object Vprint_circle; - -/* Non-nil means keep continuous number for #n= and #n# syntax - between several print functions. */ - -Lisp_Object Vprint_continuous_numbering; - /* Vprint_number_table is a table, that keeps objects that are going to be printed, to allow use of #n= and #n# to express sharing. For any given object, the table can give the following values: @@ -154,8 +90,6 @@ print_number_index holds the largest N already used. N has to be striclty larger than 0 since we need to distinguish -N. */ int print_number_index; -Lisp_Object Vprint_number_table; - void print_interval (INTERVAL interval, Lisp_Object printcharfun); /* GDB resets this to zero on W32 to disable OutputDebugString calls. */ @@ -1078,6 +1012,7 @@ * case of -1e307 in 20d float_output_format. What is one to do (short of * re-writing _doprnt to be more sane)? * -wsr + * Given the above, the buffer must be least FLOAT_TO_STRING_BUFSIZE bytes. */ void @@ -1124,20 +1059,8 @@ lose: { /* Generate the fewest number of digits that represent the - floating point value without losing information. - The following method is simple but a bit slow. - For ideas about speeding things up, please see: - - Guy L Steele Jr & Jon L White, How to print floating-point numbers - accurately. SIGPLAN notices 25, 6 (June 1990), 112-126. - - Robert G Burger & R Kent Dybvig, Printing floating point numbers - quickly and accurately, SIGPLAN notices 31, 5 (May 1996), 108-116. */ - - width = fabs (data) < DBL_MIN ? 1 : DBL_DIG; - do - sprintf (buf, "%.*g", width, data); - while (width++ < DOUBLE_DIGITS_BOUND && atof (buf) != data); + floating point value without losing information. */ + dtoastr (buf, FLOAT_TO_STRING_BUFSIZE, 0, 0, data); } else /* oink oink */ { @@ -1371,10 +1294,6 @@ print_preprocess (interval->plist); } -/* A flag to control printing of `charset' text property. - The default value is Qdefault. */ -Lisp_Object Vprint_charset_text_property; - static void print_check_string_charset_prop (INTERVAL interval, Lisp_Object string); #define PRINT_STRING_NON_CHARSET_FOUND 1 @@ -1528,7 +1447,7 @@ case Lisp_Float: { - char pigbuf[350]; /* see comments in float_to_string */ + char pigbuf[FLOAT_TO_STRING_BUFSIZE]; float_to_string (pigbuf, XFLOAT_DATA (obj)); strout (pigbuf, -1, -1, printcharfun, 0); @@ -2242,7 +2161,7 @@ Qtemp_buffer_setup_hook = intern_c_string ("temp-buffer-setup-hook"); staticpro (&Qtemp_buffer_setup_hook); - DEFVAR_LISP ("standard-output", &Vstandard_output, + DEFVAR_LISP ("standard-output", Vstandard_output, doc: /* Output stream `print' uses by default for outputting a character. This may be any function of one argument. It may also be a buffer (output is inserted before point) @@ -2252,7 +2171,7 @@ Qstandard_output = intern_c_string ("standard-output"); staticpro (&Qstandard_output); - DEFVAR_LISP ("float-output-format", &Vfloat_output_format, + DEFVAR_LISP ("float-output-format", Vfloat_output_format, doc: /* The format descriptor string used to print floats. This is a %-spec like those accepted by `printf' in C, but with some restrictions. It must start with the two characters `%.'. @@ -2272,22 +2191,22 @@ Qfloat_output_format = intern_c_string ("float-output-format"); staticpro (&Qfloat_output_format); - DEFVAR_LISP ("print-length", &Vprint_length, + DEFVAR_LISP ("print-length", Vprint_length, doc: /* Maximum length of list to print before abbreviating. A value of nil means no limit. See also `eval-expression-print-length'. */); Vprint_length = Qnil; - DEFVAR_LISP ("print-level", &Vprint_level, + DEFVAR_LISP ("print-level", Vprint_level, doc: /* Maximum depth of list nesting to print before abbreviating. A value of nil means no limit. See also `eval-expression-print-level'. */); Vprint_level = Qnil; - DEFVAR_BOOL ("print-escape-newlines", &print_escape_newlines, + DEFVAR_BOOL ("print-escape-newlines", print_escape_newlines, doc: /* Non-nil means print newlines in strings as `\\n'. Also print formfeeds as `\\f'. */); print_escape_newlines = 0; - DEFVAR_BOOL ("print-escape-nonascii", &print_escape_nonascii, + DEFVAR_BOOL ("print-escape-nonascii", print_escape_nonascii, doc: /* Non-nil means print unibyte non-ASCII chars in strings as \\OOO. \(OOO is the octal representation of the character code.) Only single-byte characters are affected, and only in `prin1'. @@ -2295,18 +2214,18 @@ enabled regardless of the value of the variable. */); print_escape_nonascii = 0; - DEFVAR_BOOL ("print-escape-multibyte", &print_escape_multibyte, + DEFVAR_BOOL ("print-escape-multibyte", print_escape_multibyte, doc: /* Non-nil means print multibyte characters in strings as \\xXXXX. \(XXXX is the hex representation of the character code.) This affects only `prin1'. */); print_escape_multibyte = 0; - DEFVAR_BOOL ("print-quoted", &print_quoted, + DEFVAR_BOOL ("print-quoted", print_quoted, doc: /* Non-nil means print quoted forms with reader syntax. I.e., (quote foo) prints as 'foo, (function foo) as #'foo. */); print_quoted = 0; - DEFVAR_LISP ("print-gensym", &Vprint_gensym, + DEFVAR_LISP ("print-gensym", Vprint_gensym, doc: /* Non-nil means print uninterned symbols so they will read as uninterned. I.e., the value of (make-symbol \"foobar\") prints as #:foobar. When the uninterned symbol appears within a recursive data structure, @@ -2315,7 +2234,7 @@ shared once again when the text is read back. */); Vprint_gensym = Qnil; - DEFVAR_LISP ("print-circle", &Vprint_circle, + DEFVAR_LISP ("print-circle", Vprint_circle, doc: /* *Non-nil means print recursive structures using #N= and #N# syntax. If nil, printing proceeds recursively and may lead to `max-lisp-eval-depth' being exceeded or an error may occur: @@ -2327,14 +2246,14 @@ where N is a positive decimal integer. */); Vprint_circle = Qnil; - DEFVAR_LISP ("print-continuous-numbering", &Vprint_continuous_numbering, + DEFVAR_LISP ("print-continuous-numbering", Vprint_continuous_numbering, doc: /* *Non-nil means number continuously across print calls. This affects the numbers printed for #N= labels and #M# references. See also `print-circle', `print-gensym', and `print-number-table'. This variable should not be set with `setq'; bind it with a `let' instead. */); Vprint_continuous_numbering = Qnil; - DEFVAR_LISP ("print-number-table", &Vprint_number_table, + DEFVAR_LISP ("print-number-table", Vprint_number_table, doc: /* A vector used internally to produce `#N=' labels and `#N#' references. The Lisp printer uses this vector to detect Lisp objects referenced more than once. @@ -2347,7 +2266,7 @@ that need to be recorded in the table. */); Vprint_number_table = Qnil; - DEFVAR_LISP ("print-charset-text-property", &Vprint_charset_text_property, + DEFVAR_LISP ("print-charset-text-property", Vprint_charset_text_property, doc: /* A flag to control printing of `charset' text property on printing a string. The value must be nil, t, or `default'.
--- a/src/process.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/process.c Wed Jan 19 13:54:19 2011 -0800 @@ -32,9 +32,7 @@ #include <inttypes.h> #endif -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #include <fcntl.h> /* Only MS-DOS does not define `subprocesses'. */ @@ -123,9 +121,6 @@ static int kbd_is_on_hold; -/* Nonzero means delete a process right away if it exits. */ -static int delete_exited_processes; - /* Nonzero means don't run process sentinels. This is used when exiting. */ int inhibit_sentinels; @@ -177,10 +172,6 @@ extern int h_errno; #endif -/* t means use pty, nil means use a pipe, - maybe other values to come. */ -static Lisp_Object Vprocess_connection_type; - /* These next two vars are non-static since sysdep.c uses them in the emulation of `select'. */ /* Number of events of change of status of a process. */ @@ -249,11 +240,6 @@ static int process_output_skip; -/* Non-nil means to delay reading process output to improve buffering. - A value of t means that delay is reset after each send, any other - non-nil value does not reset the delay. A value of nil disables - adaptive read buffering completely. */ -static Lisp_Object Vprocess_adaptive_read_buffering; #else #define process_output_delay_count 0 #endif @@ -7644,14 +7630,14 @@ Qargs = intern_c_string ("args"); staticpro (&Qargs); - DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes, + DEFVAR_BOOL ("delete-exited-processes", delete_exited_processes, doc: /* *Non-nil means delete processes immediately when they exit. A value of nil means don't delete them until `list-processes' is run. */); delete_exited_processes = 1; #ifdef subprocesses - DEFVAR_LISP ("process-connection-type", &Vprocess_connection_type, + DEFVAR_LISP ("process-connection-type", Vprocess_connection_type, doc: /* Control type of device used to communicate with subprocesses. Values are nil to use a pipe, or t or `pty' to use a pty. The value has no effect if the system has no ptys or if all ptys are busy: @@ -7660,7 +7646,7 @@ Vprocess_connection_type = Qt; #ifdef ADAPTIVE_READ_BUFFERING - DEFVAR_LISP ("process-adaptive-read-buffering", &Vprocess_adaptive_read_buffering, + DEFVAR_LISP ("process-adaptive-read-buffering", Vprocess_adaptive_read_buffering, doc: /* If non-nil, improve receive buffering by delaying after short reads. On some systems, when Emacs reads the output from a subprocess, the output data is read in very small blocks, potentially resulting in very poor performance.
--- a/src/process.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/process.h Wed Jan 19 13:54:19 2011 -0800 @@ -20,9 +20,8 @@ #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif -#ifdef HAVE_UNISTD_H + #include <unistd.h> -#endif #ifdef HAVE_GNUTLS #include "gnutls.h"
--- a/src/ralloc.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/ralloc.c Wed Jan 19 13:54:19 2011 -0800 @@ -30,9 +30,7 @@ #include "lisp.h" /* Needed for VALBITS. */ #include "blockinput.h" -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif typedef POINTER_TYPE *POINTER; typedef size_t SIZE;
--- a/src/regex.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/regex.c Wed Jan 19 13:54:19 2011 -0800 @@ -196,9 +196,7 @@ even if config.h says that we can. */ # undef REL_ALLOC -# ifdef HAVE_UNISTD_H -# include <unistd.h> -# endif +# include <unistd.h> /* When used in Emacs's lib-src, we need xmalloc and xrealloc. */
--- a/src/search.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/search.c Wed Jan 19 13:54:19 2011 -0800 @@ -91,13 +91,6 @@ /* Error condition used for failing searches */ Lisp_Object Qsearch_failed; -Lisp_Object Vsearch_spaces_regexp; - -/* If non-nil, the match data will not be changed during call to - searching or matching functions. This variable is for internal use - only. */ -Lisp_Object Vinhibit_changing_match_data; - static void set_search_regs (EMACS_INT, EMACS_INT); static void save_search_regs (void); static EMACS_INT simple_search (EMACS_INT, unsigned char *, EMACS_INT, @@ -3224,7 +3217,7 @@ saved_last_thing_searched = Qnil; staticpro (&saved_last_thing_searched); - DEFVAR_LISP ("search-spaces-regexp", &Vsearch_spaces_regexp, + DEFVAR_LISP ("search-spaces-regexp", Vsearch_spaces_regexp, doc: /* Regexp to substitute for bunches of spaces in regexp search. Some commands use this for user-specified regexps. Spaces that occur inside character classes or repetition operators @@ -3232,7 +3225,7 @@ A value of nil (which is the normal value) means treat spaces literally. */); Vsearch_spaces_regexp = Qnil; - DEFVAR_LISP ("inhibit-changing-match-data", &Vinhibit_changing_match_data, + DEFVAR_LISP ("inhibit-changing-match-data", Vinhibit_changing_match_data, doc: /* Internal use only. If non-nil, the primitive searching and matching functions such as `looking-at', `string-match', `re-search-forward', etc.,
--- a/src/syntax.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/syntax.c Wed Jan 19 13:54:19 2011 -0800 @@ -98,23 +98,11 @@ Lisp_Object Qsyntax_table_p, Qsyntax_table, Qscan_error; -int words_include_escapes; -int parse_sexp_lookup_properties; - -/* Nonzero means `scan-sexps' treat all multibyte characters as symbol. */ -int multibyte_syntax_as_symbol; - /* Used as a temporary in SYNTAX_ENTRY and other macros in syntax.h, if not compiled with GCC. No need to mark it, since it is used only very temporarily. */ Lisp_Object syntax_temp; -/* Non-zero means an open parenthesis in column 0 is always considered - to be the start of a defun. Zero means an open parenthesis in - column 0 has no special meaning. */ - -int open_paren_in_column_0_is_defun_start; - /* This is the internal form of the parse state used in parse-partial-sexp. */ struct lisp_parse_state @@ -1220,12 +1208,6 @@ return syntax; } -int parse_sexp_ignore_comments; - -/* Char-table of functions that find the next or previous word - boundary. */ -Lisp_Object Vfind_word_boundary_function_table; - /* Return the position across COUNT words from FROM. If that many words cannot be found before the end of the buffer, return 0. COUNT negative means scan backward and stop at word beginning. */ @@ -3482,31 +3464,31 @@ Fput (Qscan_error, Qerror_message, make_pure_c_string ("Scan error")); - DEFVAR_BOOL ("parse-sexp-ignore-comments", &parse_sexp_ignore_comments, + DEFVAR_BOOL ("parse-sexp-ignore-comments", parse_sexp_ignore_comments, doc: /* Non-nil means `forward-sexp', etc., should treat comments as whitespace. */); - DEFVAR_BOOL ("parse-sexp-lookup-properties", &parse_sexp_lookup_properties, + DEFVAR_BOOL ("parse-sexp-lookup-properties", parse_sexp_lookup_properties, doc: /* Non-nil means `forward-sexp', etc., obey `syntax-table' property. Otherwise, that text property is simply ignored. See the info node `(elisp)Syntax Properties' for a description of the `syntax-table' property. */); words_include_escapes = 0; - DEFVAR_BOOL ("words-include-escapes", &words_include_escapes, + DEFVAR_BOOL ("words-include-escapes", words_include_escapes, doc: /* Non-nil means `forward-word', etc., should treat escape chars part of words. */); - DEFVAR_BOOL ("multibyte-syntax-as-symbol", &multibyte_syntax_as_symbol, + DEFVAR_BOOL ("multibyte-syntax-as-symbol", multibyte_syntax_as_symbol, doc: /* Non-nil means `scan-sexps' treats all multibyte characters as symbol. */); multibyte_syntax_as_symbol = 0; DEFVAR_BOOL ("open-paren-in-column-0-is-defun-start", - &open_paren_in_column_0_is_defun_start, + open_paren_in_column_0_is_defun_start, doc: /* *Non-nil means an open paren in column 0 denotes the start of a defun. */); open_paren_in_column_0_is_defun_start = 1; DEFVAR_LISP ("find-word-boundary-function-table", - &Vfind_word_boundary_function_table, + Vfind_word_boundary_function_table, doc: /* Char table of functions to search for the word boundary. Each function is called with two arguments; POS and LIMIT.
--- a/src/syntax.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/syntax.h Wed Jan 19 13:54:19 2011 -0800 @@ -298,7 +298,5 @@ }; extern struct gl_state_s gl_state; -extern int parse_sexp_lookup_properties; - extern EMACS_INT scan_words (EMACS_INT, EMACS_INT);
--- a/src/sysdep.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/sysdep.c Wed Jan 19 13:54:19 2011 -0800 @@ -30,9 +30,7 @@ #ifdef HAVE_LIMITS_H #include <limits.h> #endif /* HAVE_LIMITS_H */ -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #include "lisp.h" #include "sysselect.h" @@ -1307,11 +1305,6 @@ } #endif /* HAVE_PTYS */ -/* init_system_name sets up the string for the Lisp function - system-name to return. */ - -extern Lisp_Object Vsystem_name; - #ifdef HAVE_SOCKETS #include <sys/socket.h> #include <netdb.h>
--- a/src/systty.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/systty.h Wed Jan 19 13:54:19 2011 -0800 @@ -37,9 +37,7 @@ #include <sys/pty.h> #endif /* AIX */ -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif /* Special cases - inhibiting the use of certain features. */
--- a/src/term.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/term.c Wed Jan 19 13:54:19 2011 -0800 @@ -25,11 +25,7 @@ #include <ctype.h> #include <errno.h> #include <sys/file.h> - -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif - #include <signal.h> #include <stdarg.h> #include <setjmp.h> @@ -125,27 +121,11 @@ #define OUTPUT1_IF(tty, a) do { if (a) emacs_tputs ((tty), a, 1, cmputc); } while (0) -/* If true, use "vs", otherwise use "ve" to make the cursor visible. */ - -static int visible_cursor; - /* Display space properties */ -/* Functions to call after suspending a tty. */ -Lisp_Object Vsuspend_tty_functions; - -/* Functions to call after resuming a tty. */ -Lisp_Object Vresume_tty_functions; - /* Chain of all tty device parameters. */ struct tty_display_info *tty_list; -/* Nonzero means no need to redraw the entire frame on resuming a - suspended Emacs. This is useful on terminals with multiple - pages, where one page is used for Emacs and another for all - else. */ -int no_redraw_on_reenter; - /* Meaning of bits in no_color_video. Each bit set means that the corresponding attribute cannot be combined with colors. */ @@ -176,10 +156,6 @@ should not open a frame on stdout. */ static int no_controlling_tty; -/* Provided for lisp packages. */ - -static int system_uses_terminfo; - #ifdef HAVE_GPM @@ -3774,7 +3750,7 @@ void syms_of_term (void) { - DEFVAR_BOOL ("system-uses-terminfo", &system_uses_terminfo, + DEFVAR_BOOL ("system-uses-terminfo", system_uses_terminfo, doc: /* Non-nil means the system uses terminfo rather than termcap. This variable can be used by terminal emulator packages. */); #ifdef TERMINFO @@ -3783,20 +3759,20 @@ system_uses_terminfo = 0; #endif - DEFVAR_LISP ("suspend-tty-functions", &Vsuspend_tty_functions, + DEFVAR_LISP ("suspend-tty-functions", Vsuspend_tty_functions, doc: /* Functions to be run after suspending a tty. The functions are run with one argument, the terminal object to be suspended. See `suspend-tty'. */); Vsuspend_tty_functions = Qnil; - DEFVAR_LISP ("resume-tty-functions", &Vresume_tty_functions, + DEFVAR_LISP ("resume-tty-functions", Vresume_tty_functions, doc: /* Functions to be run after resuming a tty. The functions are run with one argument, the terminal object that was revived. See `resume-tty'. */); Vresume_tty_functions = Qnil; - DEFVAR_BOOL ("visible-cursor", &visible_cursor, + DEFVAR_BOOL ("visible-cursor", visible_cursor, doc: /* Non-nil means to make the cursor very visible. This only has an effect when running in a text terminal. What means \"very visible\" is up to your terminal. It may make the cursor
--- a/src/termcap.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/termcap.c Wed Jan 19 13:54:19 2011 -0800 @@ -22,9 +22,7 @@ #include <setjmp.h> #include <sys/file.h> #include <fcntl.h> -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #include "lisp.h"
--- a/src/terminal.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/terminal.c Wed Jan 19 13:54:19 2011 -0800 @@ -37,9 +37,6 @@ /* The initial terminal device, created by initial_term_init. */ struct terminal *initial_terminal; -/* Function to use to ring the bell. */ -Lisp_Object Vring_bell_function; - static void delete_initial_terminal (struct terminal *); @@ -291,8 +288,6 @@ Lisp_Object Qrun_hook_with_args; static Lisp_Object Qdelete_terminal_functions; -static Lisp_Object Vdelete_terminal_functions; - DEFUN ("delete-terminal", Fdelete_terminal, Sdelete_terminal, 0, 2, 0, doc: /* Delete TERMINAL by deleting all frames on it and closing the terminal. TERMINAL may be a terminal object, a frame, or nil (meaning the @@ -530,12 +525,12 @@ syms_of_terminal (void) { - DEFVAR_LISP ("ring-bell-function", &Vring_bell_function, + DEFVAR_LISP ("ring-bell-function", Vring_bell_function, doc: /* Non-nil means call this function to ring the bell. The function should accept no arguments. */); Vring_bell_function = Qnil; - DEFVAR_LISP ("delete-terminal-functions", &Vdelete_terminal_functions, + DEFVAR_LISP ("delete-terminal-functions", Vdelete_terminal_functions, doc: /* Special hook run when a terminal is deleted. Each function is called with argument, the terminal. This may be called just before actually deleting the terminal,
--- a/src/termopts.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/termopts.h Wed Jan 19 13:54:19 2011 -0800 @@ -18,12 +18,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ -/* Nonzero means flash the screen instead of ringing the bell. */ -extern int visible_bell; - -/* Nonzero means invert white and black for the entire screen. */ -extern int inverse_video; - /* Nonzero means use ^S/^Q as cretinous flow control. */ extern int flow_control; @@ -36,11 +30,3 @@ /* Terminal has meta key */ extern int meta_key; -/* Defined in xdisp.c */ -extern Lisp_Object Vtruncate_partial_width_windows; - -/* Nonzero means no need to redraw the entire frame on resuming a suspended - Emacs. This is useful on terminals with multiple pages, where one page is - used for Emacs and another for all else. */ -extern int no_redraw_on_reenter; -
--- a/src/textprop.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/textprop.c Wed Jan 19 13:54:19 2011 -0800 @@ -68,11 +68,6 @@ traversing plists. */ #define PLIST_ELT_P(o1, o2) (CONSP (o1) && ((o2)=XCDR (o1), CONSP (o2))) -Lisp_Object Vinhibit_point_motion_hooks; -Lisp_Object Vdefault_text_properties; -Lisp_Object Vchar_property_alias_alist; -Lisp_Object Vtext_property_default_nonsticky; - /* verify_interval_modification saves insertion hooks here to be run later by report_interval_modification. */ Lisp_Object interval_insert_behind_hooks; @@ -2234,13 +2229,13 @@ void syms_of_textprop (void) { - DEFVAR_LISP ("default-text-properties", &Vdefault_text_properties, + DEFVAR_LISP ("default-text-properties", Vdefault_text_properties, doc: /* Property-list used as default values. The value of a property in this list is seen as the value for every character that does not have its own value for that property. */); Vdefault_text_properties = Qnil; - DEFVAR_LISP ("char-property-alias-alist", &Vchar_property_alias_alist, + DEFVAR_LISP ("char-property-alias-alist", Vchar_property_alias_alist, doc: /* Alist of alternative properties for properties without a value. Each element should look like (PROPERTY ALTERNATIVE1 ALTERNATIVE2...). If a piece of text has no direct value for a particular property, then @@ -2249,13 +2244,13 @@ returned. */); Vchar_property_alias_alist = Qnil; - DEFVAR_LISP ("inhibit-point-motion-hooks", &Vinhibit_point_motion_hooks, + DEFVAR_LISP ("inhibit-point-motion-hooks", Vinhibit_point_motion_hooks, doc: /* If non-nil, don't run `point-left' and `point-entered' text properties. This also inhibits the use of the `intangible' text property. */); Vinhibit_point_motion_hooks = Qnil; DEFVAR_LISP ("text-property-default-nonsticky", - &Vtext_property_default_nonsticky, + Vtext_property_default_nonsticky, doc: /* Alist of properties vs the corresponding non-stickinesses. Each element has the form (PROPERTY . NONSTICKINESS).
--- a/src/undo.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/undo.c Wed Jan 19 13:54:19 2011 -0800 @@ -25,17 +25,6 @@ #include "commands.h" #include "window.h" -/* Limits controlling how much undo information to keep. */ - -EMACS_INT undo_limit; -EMACS_INT undo_strong_limit; - -Lisp_Object Vundo_outer_limit; - -/* Function to call when undo_outer_limit is exceeded. */ - -Lisp_Object Vundo_outer_limit_function; - /* Last buffer for which undo information was recorded. */ /* BEWARE: This is not traced by the GC, so never dereference it! */ struct buffer *last_undo_buffer; @@ -57,10 +46,6 @@ an undo-boundary. */ Lisp_Object pending_boundary; -/* Nonzero means do not record point in record_point. */ - -int undo_inhibit_record_point; - /* Record point as it was at beginning of this command (if necessary) and prepare the undo info for recording a change. PT is the position of point that will naturally occur as a result of the @@ -673,7 +658,7 @@ defsubr (&Sprimitive_undo); defsubr (&Sundo_boundary); - DEFVAR_INT ("undo-limit", &undo_limit, + DEFVAR_INT ("undo-limit", undo_limit, doc: /* Keep no more undo information once it exceeds this size. This limit is applied when garbage collection happens. When a previous command increases the total undo list size past this @@ -683,7 +668,7 @@ which includes both saved text and other data. */); undo_limit = 80000; - DEFVAR_INT ("undo-strong-limit", &undo_strong_limit, + DEFVAR_INT ("undo-strong-limit", undo_strong_limit, doc: /* Don't keep more than this much size of undo information. This limit is applied when garbage collection happens. When a previous command increases the total undo list size past this @@ -695,7 +680,7 @@ which includes both saved text and other data. */); undo_strong_limit = 120000; - DEFVAR_LISP ("undo-outer-limit", &Vundo_outer_limit, + DEFVAR_LISP ("undo-outer-limit", Vundo_outer_limit, doc: /* Outer limit on size of undo information for one command. At garbage collection time, if the current command has produced more than this much undo information, it discards the info and displays @@ -712,7 +697,7 @@ that variable usually specifies. */); Vundo_outer_limit = make_number (12000000); - DEFVAR_LISP ("undo-outer-limit-function", &Vundo_outer_limit_function, + DEFVAR_LISP ("undo-outer-limit-function", Vundo_outer_limit_function, doc: /* Function to call when an undo list exceeds `undo-outer-limit'. This function is called with one argument, the current undo list size for the most recent command (since the last undo boundary). @@ -723,7 +708,7 @@ so it must make sure not to do a lot of consing. */); Vundo_outer_limit_function = Qnil; - DEFVAR_BOOL ("undo-inhibit-record-point", &undo_inhibit_record_point, + DEFVAR_BOOL ("undo-inhibit-record-point", undo_inhibit_record_point, doc: /* Non-nil means do not record `point' in `buffer-undo-list'. */); undo_inhibit_record_point = 0; }
--- a/src/w16select.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/w16select.c Wed Jan 19 13:54:19 2011 -0800 @@ -69,13 +69,6 @@ Lisp_Object QCLIPBOARD, QPRIMARY; -/* Coding system for communicating with other Windows programs via the - clipboard. */ -static Lisp_Object Vselection_coding_system; - -/* Coding system for the next communicating with other Windows programs. */ -static Lisp_Object Vnext_selection_coding_system; - /* The segment address and the size of the buffer in low memory used to move data between us and WinOldAp module. */ static struct { @@ -693,7 +686,7 @@ defsubr (&Sw16_get_clipboard_data); defsubr (&Sx_selection_exists_p); - DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system, + DEFVAR_LISP ("selection-coding-system", Vselection_coding_system, doc: /* Coding system for communicating with other programs. For MS-Windows and MS-DOS: @@ -725,7 +718,7 @@ The default value is nil. */); Vselection_coding_system = intern ("iso-latin-1-dos"); - DEFVAR_LISP ("next-selection-coding-system", &Vnext_selection_coding_system, + DEFVAR_LISP ("next-selection-coding-system", Vnext_selection_coding_system, doc: /* Coding system for the next communication with other programs. Usually, `selection-coding-system' is used for communicating with other programs (X Windows clients or MS Windows programs). But, if this
--- a/src/w32.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/w32.c Wed Jan 19 13:54:19 2011 -0800 @@ -148,14 +148,9 @@ void globals_of_w32 (void); static DWORD get_rid (PSID); -extern Lisp_Object Vw32_downcase_file_names; -extern Lisp_Object Vw32_generate_fake_inodes; -extern Lisp_Object Vw32_get_true_file_attributes; /* Defined in process.c for its own purpose. */ extern Lisp_Object Qlocal; -extern int w32_num_mouse_buttons; - /* Initialization states. @@ -1514,8 +1509,6 @@ } char *get_emacs_configuration (void); -extern Lisp_Object Vsystem_configuration; - void init_environment (char ** argv) { @@ -5184,9 +5177,6 @@ return rc; } -/* From ntproc.c */ -extern int w32_pipe_read_delay; - /* Function to do blocking read of one byte, needed to implement select. It is only allowed on sockets and pipes. */ int @@ -5666,7 +5656,6 @@ if (!noninteractive && !inhibit_window_system) { - extern Lisp_Object Vwindow_system, Vload_path, Qfile_exists_p; Lisp_Object objs[2]; Lisp_Object full_load_path; Lisp_Object init_file;
--- a/src/w32console.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/w32console.c Wed Jan 19 13:54:19 2011 -0800 @@ -72,13 +72,6 @@ static CONSOLE_CURSOR_INFO prev_console_cursor; #endif -extern Lisp_Object Vtty_defined_color_alist; - -/* Determine whether to make frame dimensions match the screen buffer, - or the current window size. The former is desirable when running - over telnet, while the latter is more useful when working directly at - the console with a large scroll-back buffer. */ -int w32_use_full_screen_buffer; HANDLE keyboard_handle; @@ -747,7 +740,7 @@ syms_of_ntterm (void) { DEFVAR_BOOL ("w32-use-full-screen-buffer", - &w32_use_full_screen_buffer, + w32_use_full_screen_buffer, doc: /* Non-nil means make terminal frames use the full screen buffer dimensions. This is desirable when running Emacs over telnet. A value of nil means use the current console window dimensions; this
--- a/src/w32fns.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/w32fns.c Wed Jan 19 13:54:19 2011 -0800 @@ -84,117 +84,19 @@ extern const char *const lispy_function_keys[]; -/* The colormap for converting color names to RGB values */ -Lisp_Object Vw32_color_map; - -/* Non nil if alt key presses are passed on to Windows. */ -Lisp_Object Vw32_pass_alt_to_system; - -/* Non nil if alt key is translated to meta_modifier, nil if it is translated - to alt_modifier. */ -Lisp_Object Vw32_alt_is_meta; - -/* If non-zero, the windows virtual key code for an alternative quit key. */ -int w32_quit_key; - -/* Non nil if left window key events are passed on to Windows (this only - affects whether "tapping" the key opens the Start menu). */ -Lisp_Object Vw32_pass_lwindow_to_system; - -/* Non nil if right window key events are passed on to Windows (this - only affects whether "tapping" the key opens the Start menu). */ -Lisp_Object Vw32_pass_rwindow_to_system; - -/* Virtual key code used to generate "phantom" key presses in order - to stop system from acting on Windows key events. */ -Lisp_Object Vw32_phantom_key_code; - -/* Modifier associated with the left "Windows" key, or nil to act as a - normal key. */ -Lisp_Object Vw32_lwindow_modifier; - -/* Modifier associated with the right "Windows" key, or nil to act as a - normal key. */ -Lisp_Object Vw32_rwindow_modifier; - -/* Modifier associated with the "Apps" key, or nil to act as a normal - key. */ -Lisp_Object Vw32_apps_modifier; - -/* Value is nil if Num Lock acts as a function key. */ -Lisp_Object Vw32_enable_num_lock; - -/* Value is nil if Caps Lock acts as a function key. */ -Lisp_Object Vw32_enable_caps_lock; - -/* Modifier associated with Scroll Lock, or nil to act as a normal key. */ -Lisp_Object Vw32_scroll_lock_modifier; - -/* Switch to control whether we inhibit requests for synthesized bold - and italic versions of fonts. */ -int w32_enable_synthesized_fonts; - -/* Enable palette management. */ -Lisp_Object Vw32_enable_palette; - -/* Control how close left/right button down events must be to - be converted to a middle button down event. */ -int w32_mouse_button_tolerance; - -/* Minimum interval between mouse movement (and scroll bar drag) - events that are passed on to the event loop. */ -int w32_mouse_move_interval; - -/* Flag to indicate if XBUTTON events should be passed on to Windows. */ -static int w32_pass_extra_mouse_buttons_to_system; - -/* Flag to indicate if media keys should be passed on to Windows. */ -static int w32_pass_multimedia_buttons_to_system; - -/* Non nil if no window manager is in use. */ -Lisp_Object Vx_no_window_manager; - /* If non-zero, a w32 timer that, when it expires, displays an hourglass cursor on all frames. */ static unsigned hourglass_timer = 0; static HWND hourglass_hwnd = NULL; -#if 0 /* TODO: Mouse cursor customization. */ -/* The background and shape of the mouse pointer, and shape when not - over text or in the modeline. */ -Lisp_Object Vx_pointer_shape, Vx_nontext_pointer_shape, Vx_mode_pointer_shape; -Lisp_Object Vx_hourglass_pointer_shape, Vx_window_horizontal_drag_shape; - -/* The shape when over mouse-sensitive text. */ - -Lisp_Object Vx_sensitive_text_pointer_shape; -#endif - #ifndef IDC_HAND #define IDC_HAND MAKEINTRESOURCE(32649) #endif -/* Color of chars displayed in cursor box. */ -Lisp_Object Vx_cursor_fore_pixel; - /* Nonzero if using Windows. */ static int w32_in_use; -/* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */ - -Lisp_Object Vx_pixel_size_width_font_regexp; - -/* Alist of bdf fonts and the files that define them. */ -Lisp_Object Vw32_bdf_filename_alist; - -/* A flag to control whether fonts are matched strictly or not. */ -static int w32_strict_fontnames; - -/* A flag to control whether we should only repaint if GetUpdateRect - indicates there is an update region. */ -static int w32_strict_painting; - Lisp_Object Qnone; Lisp_Object Qsuppress_icon; Lisp_Object Qundefined_color; @@ -209,9 +111,6 @@ Lisp_Object Qshift; -/* The ANSI codepage. */ -int w32_ansi_code_page; - /* Prefix for system colors. */ #define SYSTEM_COLOR_PREFIX "System" #define SYSTEM_COLOR_PREFIX_LEN (sizeof (SYSTEM_COLOR_PREFIX) - 1) @@ -288,14 +187,6 @@ #define MENU_FREE_DELAY 1000 static unsigned menu_free_timer = 0; -/* In dispnew.c */ - -extern Lisp_Object Vwindow_system_version; - -/* The below are defined in frame.c. */ - -extern Lisp_Object Vmenu_bar_mode, Vtool_bar_mode; -extern Lisp_Object Vwindow_system_version; extern Lisp_Object Qtooltip; #ifdef GLYPH_DEBUG @@ -303,17 +194,11 @@ #endif -/* From w32term.c. */ -extern int w32_num_mouse_buttons; -extern Lisp_Object Vw32_recognize_altgr; - extern HWND w32_system_caret_hwnd; extern int w32_system_caret_height; extern int w32_system_caret_x; extern int w32_system_caret_y; -extern int w32_use_visible_system_caret; - static HWND w32_visible_system_caret_hwnd; /* From w32menu.c */ @@ -5138,8 +5023,6 @@ cursor. Duplicated from xdisp.c, but cannot use the version there due to lack of atimers on w32. */ #define DEFAULT_HOURGLASS_DELAY 1 -extern Lisp_Object Vhourglass_delay; - /* Return non-zero if houglass timer has been started or hourglass is shown. */ /* PENDING: if W32 can use atimers (atimer.[hc]) then the common impl in xdisp.c could be used. */ @@ -5271,10 +5154,6 @@ Lisp_Object last_show_tip_args; -/* Maximum size for tooltips; a cons (COLUMNS . ROWS). */ - -Lisp_Object Vx_max_tooltip_size; - static Lisp_Object unwind_create_tip_frame (Lisp_Object frame) @@ -6931,28 +6810,28 @@ staticpro (&w32_grabbed_keys); w32_grabbed_keys = Qnil; - DEFVAR_LISP ("w32-color-map", &Vw32_color_map, + DEFVAR_LISP ("w32-color-map", Vw32_color_map, doc: /* An array of color name mappings for Windows. */); Vw32_color_map = Qnil; - DEFVAR_LISP ("w32-pass-alt-to-system", &Vw32_pass_alt_to_system, + DEFVAR_LISP ("w32-pass-alt-to-system", Vw32_pass_alt_to_system, doc: /* Non-nil if Alt key presses are passed on to Windows. When non-nil, for example, Alt pressed and released and then space will open the System menu. When nil, Emacs processes the Alt key events, and then silently swallows them. */); Vw32_pass_alt_to_system = Qnil; - DEFVAR_LISP ("w32-alt-is-meta", &Vw32_alt_is_meta, + DEFVAR_LISP ("w32-alt-is-meta", Vw32_alt_is_meta, doc: /* Non-nil if the Alt key is to be considered the same as the META key. When nil, Emacs will translate the Alt key to the ALT modifier, not to META. */); Vw32_alt_is_meta = Qt; - DEFVAR_INT ("w32-quit-key", &w32_quit_key, + DEFVAR_INT ("w32-quit-key", w32_quit_key, doc: /* If non-zero, the virtual key code for an alternative quit key. */); w32_quit_key = 0; DEFVAR_LISP ("w32-pass-lwindow-to-system", - &Vw32_pass_lwindow_to_system, + Vw32_pass_lwindow_to_system, doc: /* If non-nil, the left \"Windows\" key is passed on to Windows. When non-nil, the Start menu is opened by tapping the key. @@ -6967,7 +6846,7 @@ Vw32_pass_lwindow_to_system = Qt; DEFVAR_LISP ("w32-pass-rwindow-to-system", - &Vw32_pass_rwindow_to_system, + Vw32_pass_rwindow_to_system, doc: /* If non-nil, the right \"Windows\" key is passed on to Windows. When non-nil, the Start menu is opened by tapping the key. @@ -6982,7 +6861,7 @@ Vw32_pass_rwindow_to_system = Qt; DEFVAR_LISP ("w32-phantom-key-code", - &Vw32_phantom_key_code, + Vw32_phantom_key_code, doc: /* Virtual key code used to generate \"phantom\" key presses. Value is a number between 0 and 255. @@ -6994,19 +6873,19 @@ XSETINT (Vw32_phantom_key_code, 255); DEFVAR_LISP ("w32-enable-num-lock", - &Vw32_enable_num_lock, + Vw32_enable_num_lock, doc: /* If non-nil, the Num Lock key acts normally. Set to nil to handle Num Lock as the `kp-numlock' key. */); Vw32_enable_num_lock = Qt; DEFVAR_LISP ("w32-enable-caps-lock", - &Vw32_enable_caps_lock, + Vw32_enable_caps_lock, doc: /* If non-nil, the Caps Lock key acts normally. Set to nil to handle Caps Lock as the `capslock' key. */); Vw32_enable_caps_lock = Qt; DEFVAR_LISP ("w32-scroll-lock-modifier", - &Vw32_scroll_lock_modifier, + Vw32_scroll_lock_modifier, doc: /* Modifier to use for the Scroll Lock ON state. The value can be hyper, super, meta, alt, control or shift for the respective modifier, or nil to handle Scroll Lock as the `scroll' key. @@ -7014,7 +6893,7 @@ Vw32_scroll_lock_modifier = Qnil; DEFVAR_LISP ("w32-lwindow-modifier", - &Vw32_lwindow_modifier, + Vw32_lwindow_modifier, doc: /* Modifier to use for the left \"Windows\" key. The value can be hyper, super, meta, alt, control or shift for the respective modifier, or nil to appear as the `lwindow' key. @@ -7022,7 +6901,7 @@ Vw32_lwindow_modifier = Qnil; DEFVAR_LISP ("w32-rwindow-modifier", - &Vw32_rwindow_modifier, + Vw32_rwindow_modifier, doc: /* Modifier to use for the right \"Windows\" key. The value can be hyper, super, meta, alt, control or shift for the respective modifier, or nil to appear as the `rwindow' key. @@ -7030,23 +6909,23 @@ Vw32_rwindow_modifier = Qnil; DEFVAR_LISP ("w32-apps-modifier", - &Vw32_apps_modifier, + Vw32_apps_modifier, doc: /* Modifier to use for the \"Apps\" key. The value can be hyper, super, meta, alt, control or shift for the respective modifier, or nil to appear as the `apps' key. Any other value will cause the key to be ignored. */); Vw32_apps_modifier = Qnil; - DEFVAR_BOOL ("w32-enable-synthesized-fonts", &w32_enable_synthesized_fonts, + DEFVAR_BOOL ("w32-enable-synthesized-fonts", w32_enable_synthesized_fonts, doc: /* Non-nil enables selection of artificially italicized and bold fonts. */); w32_enable_synthesized_fonts = 0; - DEFVAR_LISP ("w32-enable-palette", &Vw32_enable_palette, + DEFVAR_LISP ("w32-enable-palette", Vw32_enable_palette, doc: /* Non-nil enables Windows palette management to map colors exactly. */); Vw32_enable_palette = Qt; DEFVAR_INT ("w32-mouse-button-tolerance", - &w32_mouse_button_tolerance, + w32_mouse_button_tolerance, doc: /* Analogue of double click interval for faking middle mouse events. The value is the minimum time in milliseconds that must elapse between left and right button down events before they are considered distinct events. @@ -7055,7 +6934,7 @@ w32_mouse_button_tolerance = GetDoubleClickTime () / 2; DEFVAR_INT ("w32-mouse-move-interval", - &w32_mouse_move_interval, + w32_mouse_move_interval, doc: /* Minimum interval between mouse move events. The value is the minimum time in milliseconds that must elapse between successive mouse move (or scroll bar drag) events before they are @@ -7063,7 +6942,7 @@ w32_mouse_move_interval = 0; DEFVAR_BOOL ("w32-pass-extra-mouse-buttons-to-system", - &w32_pass_extra_mouse_buttons_to_system, + w32_pass_extra_mouse_buttons_to_system, doc: /* If non-nil, the fourth and fifth mouse buttons are passed to Windows. Recent versions of Windows support mice with up to five buttons. Since most applications don't support these extra buttons, most mouse @@ -7073,7 +6952,7 @@ w32_pass_extra_mouse_buttons_to_system = 0; DEFVAR_BOOL ("w32-pass-multimedia-buttons-to-system", - &w32_pass_multimedia_buttons_to_system, + w32_pass_multimedia_buttons_to_system, doc: /* If non-nil, media buttons are passed to Windows. Some modern keyboards contain buttons for controlling media players, web browsers and other applications. Generally these buttons are handled on a @@ -7096,7 +6975,7 @@ w32_pass_multimedia_buttons_to_system = 1; #if 0 /* TODO: Mouse cursor customization. */ - DEFVAR_LISP ("x-pointer-shape", &Vx_pointer_shape, + DEFVAR_LISP ("x-pointer-shape", Vx_pointer_shape, doc: /* The shape of the pointer when over text. Changing the value does not affect existing frames unless you set the mouse color. */); @@ -7106,37 +6985,37 @@ Vx_mode_pointer_shape = Qnil; - DEFVAR_LISP ("x-hourglass-pointer-shape", &Vx_hourglass_pointer_shape, + DEFVAR_LISP ("x-hourglass-pointer-shape", Vx_hourglass_pointer_shape, doc: /* The shape of the pointer when Emacs is busy. This variable takes effect when you create a new frame or when you set the mouse color. */); Vx_hourglass_pointer_shape = Qnil; DEFVAR_LISP ("x-sensitive-text-pointer-shape", - &Vx_sensitive_text_pointer_shape, + Vx_sensitive_text_pointer_shape, doc: /* The shape of the pointer when over mouse-sensitive text. This variable takes effect when you create a new frame or when you set the mouse color. */); Vx_sensitive_text_pointer_shape = Qnil; DEFVAR_LISP ("x-window-horizontal-drag-cursor", - &Vx_window_horizontal_drag_shape, + Vx_window_horizontal_drag_shape, doc: /* Pointer shape to use for indicating a window can be dragged horizontally. This variable takes effect when you create a new frame or when you set the mouse color. */); Vx_window_horizontal_drag_shape = Qnil; #endif - DEFVAR_LISP ("x-cursor-fore-pixel", &Vx_cursor_fore_pixel, + DEFVAR_LISP ("x-cursor-fore-pixel", Vx_cursor_fore_pixel, doc: /* A string indicating the foreground color of the cursor box. */); Vx_cursor_fore_pixel = Qnil; - DEFVAR_LISP ("x-max-tooltip-size", &Vx_max_tooltip_size, + DEFVAR_LISP ("x-max-tooltip-size", Vx_max_tooltip_size, doc: /* Maximum size for tooltips. Value is a pair (COLUMNS . ROWS). Text larger than this is clipped. */); Vx_max_tooltip_size = Fcons (make_number (80), make_number (40)); - DEFVAR_LISP ("x-no-window-manager", &Vx_no_window_manager, + DEFVAR_LISP ("x-no-window-manager", Vx_no_window_manager, doc: /* Non-nil if no window manager is in use. Emacs doesn't try to figure this out; this is always nil unless you set it to something else. */); @@ -7145,7 +7024,7 @@ Vx_no_window_manager = Qnil; DEFVAR_LISP ("x-pixel-size-width-font-regexp", - &Vx_pixel_size_width_font_regexp, + Vx_pixel_size_width_font_regexp, doc: /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. Since Emacs gets width of a font matching with this regexp from @@ -7155,12 +7034,12 @@ Vx_pixel_size_width_font_regexp = Qnil; DEFVAR_LISP ("w32-bdf-filename-alist", - &Vw32_bdf_filename_alist, + Vw32_bdf_filename_alist, doc: /* List of bdf fonts and their corresponding filenames. */); Vw32_bdf_filename_alist = Qnil; DEFVAR_BOOL ("w32-strict-fontnames", - &w32_strict_fontnames, + w32_strict_fontnames, doc: /* Non-nil means only use fonts that are exact matches for those requested. Default is nil, which allows old fontnames that are not XLFD compliant, and allows third-party CJK display to work by specifying false charset @@ -7170,7 +7049,7 @@ w32_strict_fontnames = 0; DEFVAR_BOOL ("w32-strict-painting", - &w32_strict_painting, + w32_strict_painting, doc: /* Non-nil means use strict rules for repainting frames. Set this to nil to get the old behavior for repainting; this should only be necessary if the default setting causes problems. */); @@ -7279,7 +7158,7 @@ GetProcAddress (imm32_lib, "ImmSetCompositionWindow"); } DEFVAR_INT ("w32-ansi-code-page", - &w32_ansi_code_page, + w32_ansi_code_page, doc: /* The ANSI code page used by the system. */); w32_ansi_code_page = GetACP ();
--- a/src/w32font.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/w32font.c Wed Jan 19 13:54:19 2011 -0800 @@ -100,9 +100,6 @@ static Lisp_Object Qw32_charset_hebrew, Qw32_charset_vietnamese; static Lisp_Object Qw32_charset_thai, Qw32_charset_johab, Qw32_charset_mac; -/* Associative list linking character set strings to Windows codepages. */ -static Lisp_Object Vw32_charset_info_alist; - /* Font spacing symbols - defined in font.c. */ extern Lisp_Object Qc, Qp, Qm; @@ -2535,7 +2532,7 @@ /* W32 font encodings. */ DEFVAR_LISP ("w32-charset-info-alist", - &Vw32_charset_info_alist, + Vw32_charset_info_alist, doc: /* Alist linking Emacs character sets to Windows fonts and codepages. Each entry should be of the form:
--- a/src/w32inevt.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/w32inevt.c Wed Jan 19 13:54:19 2011 -0800 @@ -51,25 +51,8 @@ /* from keyboard.c */ extern void reinvoke_input_signal (void); -/* from w32console.c */ -extern int w32_use_full_screen_buffer; - -/* from w32fns.c */ -extern Lisp_Object Vw32_alt_is_meta; extern unsigned int map_keypad_keys (unsigned int, unsigned int); -/* from w32term */ -extern Lisp_Object Vw32_capslock_is_shiftlock; -extern Lisp_Object Vw32_enable_caps_lock; -extern Lisp_Object Vw32_enable_num_lock; -extern Lisp_Object Vw32_recognize_altgr; -extern Lisp_Object Vw32_pass_lwindow_to_system; -extern Lisp_Object Vw32_pass_rwindow_to_system; -extern Lisp_Object Vw32_phantom_key_code; -extern Lisp_Object Vw32_lwindow_modifier; -extern Lisp_Object Vw32_rwindow_modifier; -extern Lisp_Object Vw32_apps_modifier; -extern Lisp_Object Vw32_scroll_lock_modifier; extern unsigned int w32_key_to_modifier (int key); /* Event queue */
--- a/src/w32menu.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/w32menu.c Wed Jan 19 13:54:19 2011 -0800 @@ -89,9 +89,6 @@ extern Lisp_Object QCtoggle, QCradio; -extern Lisp_Object Voverriding_local_map; -extern Lisp_Object Voverriding_local_map_menu_flag; - extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; extern Lisp_Object Qmenu_bar_update_hook;
--- a/src/w32proc.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/w32proc.c Wed Jan 19 13:54:19 2011 -0800 @@ -68,47 +68,6 @@ + ((DWORD)(var) - (section)->VirtualAddress) \ + (filedata).file_base)) -/* Control whether spawnve quotes arguments as necessary to ensure - correct parsing by child process. Because not all uses of spawnve - are careful about constructing argv arrays, we make this behavior - conditional (off by default). */ -Lisp_Object Vw32_quote_process_args; - -/* Control whether create_child causes the process' window to be - hidden. The default is nil. */ -Lisp_Object Vw32_start_process_show_window; - -/* Control whether create_child causes the process to inherit Emacs' - console window, or be given a new one of its own. The default is - nil, to allow multiple DOS programs to run on Win95. Having separate - consoles also allows Emacs to cleanly terminate process groups. */ -Lisp_Object Vw32_start_process_share_console; - -/* Control whether create_child cause the process to inherit Emacs' - error mode setting. The default is t, to minimize the possibility of - subprocesses blocking when accessing unmounted drives. */ -Lisp_Object Vw32_start_process_inherit_error_mode; - -/* Time to sleep before reading from a subprocess output pipe - this - avoids the inefficiency of frequently reading small amounts of data. - This is primarily necessary for handling DOS processes on Windows 95, - but is useful for W32 processes on both Windows 95 and NT as well. */ -int w32_pipe_read_delay; - -/* Control conversion of upper case file names to lower case. - nil means no, t means yes. */ -Lisp_Object Vw32_downcase_file_names; - -/* Control whether stat() attempts to generate fake but hopefully - "accurate" inode values, by hashing the absolute truenames of files. - This should detect aliasing between long and short names, but still - allows the possibility of hash collisions. */ -Lisp_Object Vw32_generate_fake_inodes; - -/* Control whether stat() attempts to determine file type and link count - exactly, at the expense of slower operation. Since true hard links - are supported on NTFS volumes, this is only relevant on NT. */ -Lisp_Object Vw32_get_true_file_attributes; extern Lisp_Object Qlocal; Lisp_Object Qhigh, Qlow; @@ -1707,8 +1666,6 @@ extern BOOL term_winsock (void); extern BOOL init_winsock (int load_now); -extern Lisp_Object Vsystem_name; - DEFUN ("w32-has-winsock", Fw32_has_winsock, Sw32_has_winsock, 0, 1, 0, doc: /* Test for presence of the Windows socket library `winsock'. Returns non-nil if winsock support is present, nil otherwise. @@ -2284,7 +2241,7 @@ defsubr (&Sw32_get_keyboard_layout); defsubr (&Sw32_set_keyboard_layout); - DEFVAR_LISP ("w32-quote-process-args", &Vw32_quote_process_args, + DEFVAR_LISP ("w32-quote-process-args", Vw32_quote_process_args, doc: /* Non-nil enables quoting of process arguments to ensure correct parsing. Because Windows does not directly pass argv arrays to child processes, programs have to reconstruct the argv array by parsing the command @@ -2297,14 +2254,14 @@ Vw32_quote_process_args = Qt; DEFVAR_LISP ("w32-start-process-show-window", - &Vw32_start_process_show_window, + Vw32_start_process_show_window, doc: /* When nil, new child processes hide their windows. When non-nil, they show their window in the method of their choice. This variable doesn't affect GUI applications, which will never be hidden. */); Vw32_start_process_show_window = Qnil; DEFVAR_LISP ("w32-start-process-share-console", - &Vw32_start_process_share_console, + Vw32_start_process_share_console, doc: /* When nil, new child processes are given a new console. When non-nil, they share the Emacs console; this has the limitation of allowing only one DOS subprocess to run at a time (whether started directly @@ -2314,13 +2271,13 @@ Vw32_start_process_share_console = Qnil; DEFVAR_LISP ("w32-start-process-inherit-error-mode", - &Vw32_start_process_inherit_error_mode, + Vw32_start_process_inherit_error_mode, doc: /* When nil, new child processes revert to the default error mode. When non-nil, they inherit their error mode setting from Emacs, which stops them blocking when trying to access unmounted drives etc. */); Vw32_start_process_inherit_error_mode = Qt; - DEFVAR_INT ("w32-pipe-read-delay", &w32_pipe_read_delay, + DEFVAR_INT ("w32-pipe-read-delay", w32_pipe_read_delay, doc: /* Forced delay before reading subprocess output. This is done to improve the buffering of subprocess output, by avoiding the inefficiency of frequently reading small amounts of data. @@ -2331,7 +2288,7 @@ process temporarily). A value of zero disables waiting entirely. */); w32_pipe_read_delay = 50; - DEFVAR_LISP ("w32-downcase-file-names", &Vw32_downcase_file_names, + DEFVAR_LISP ("w32-downcase-file-names", Vw32_downcase_file_names, doc: /* Non-nil means convert all-upper case file names to lower case. This applies when performing completions and file name expansion. Note that the value of this setting also affects remote file names, @@ -2340,7 +2297,7 @@ Vw32_downcase_file_names = Qnil; #if 0 - DEFVAR_LISP ("w32-generate-fake-inodes", &Vw32_generate_fake_inodes, + DEFVAR_LISP ("w32-generate-fake-inodes", Vw32_generate_fake_inodes, doc: /* Non-nil means attempt to fake realistic inode values. This works by hashing the truename of files, and should detect aliasing between long and short (8.3 DOS) names, but can have @@ -2349,7 +2306,7 @@ Vw32_generate_fake_inodes = Qnil; #endif - DEFVAR_LISP ("w32-get-true-file-attributes", &Vw32_get_true_file_attributes, + DEFVAR_LISP ("w32-get-true-file-attributes", Vw32_get_true_file_attributes, doc: /* Non-nil means determine accurate file attributes in `file-attributes'. This option controls whether to issue additional system calls to determine accurate link counts, file type, and ownership information. It is more
--- a/src/w32select.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/w32select.c Wed Jan 19 13:54:19 2011 -0800 @@ -111,13 +111,6 @@ PRIMARY and SECONDARY. */ Lisp_Object QCLIPBOARD; -/* Coding system for communicating with other programs via the - clipboard. */ -static Lisp_Object Vselection_coding_system; - -/* Coding system for the next communication with other programs. */ -static Lisp_Object Vnext_selection_coding_system; - /* Internal pseudo-constants, initialized in globals_of_w32select() based on current system parameters. */ static LCID DEFAULT_LCID; @@ -1068,7 +1061,7 @@ defsubr (&Sw32_get_clipboard_data); defsubr (&Sx_selection_exists_p); - DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system, + DEFVAR_LISP ("selection-coding-system", Vselection_coding_system, doc: /* Coding system for communicating with other programs. For MS-Windows and MS-DOS: @@ -1102,7 +1095,7 @@ below. */ Vselection_coding_system = Qnil; - DEFVAR_LISP ("next-selection-coding-system", &Vnext_selection_coding_system, + DEFVAR_LISP ("next-selection-coding-system", Vnext_selection_coding_system, doc: /* Coding system for the next communication with other programs. Usually, `selection-coding-system' is used for communicating with other programs (X Windows clients or MS Windows programs). But, if this
--- a/src/w32term.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/w32term.c Wed Jan 19 13:54:19 2011 -0800 @@ -65,10 +65,6 @@ static int max_fringe_bmp = 0; static HBITMAP *fringe_bmp = 0; -/* Non-nil means Emacs uses toolkit scroll bars. */ - -Lisp_Object Vx_toolkit_scroll_bars; - /* Temporary variables for w32_read_socket. */ static int last_mousemove_x = 0; @@ -87,13 +83,6 @@ /* Last window where we saw the mouse. Used by mouse-autoselect-window. */ static Lisp_Object last_window; -/* Non-zero means make use of UNDERLINE_POSITION font properties. */ -int x_use_underline_position_properties; - -/* Non-zero means to draw the underline at the same place as the descent line. */ - -int x_underline_at_descent_line; - extern unsigned int msh_mousewheel; extern void free_frame_menubar (struct frame *); @@ -166,8 +155,6 @@ int w32_system_caret_height; int w32_system_caret_x; int w32_system_caret_y; -int w32_use_visible_system_caret; - DWORD dwWindowsThreadId = 0; HANDLE hWindowsThread = NULL; DWORD dwMainThreadId = 0; @@ -186,19 +173,6 @@ static FRAME_PTR last_mouse_glyph_frame; static Lisp_Object last_mouse_press_frame; -int w32_num_mouse_buttons; - -Lisp_Object Vw32_swap_mouse_buttons; - -/* Control whether x_raise_frame also sets input focus. */ -Lisp_Object Vw32_grab_focus_on_raise; - -/* Control whether Caps Lock affects non-ascii characters. */ -Lisp_Object Vw32_capslock_is_shiftlock; - -/* Control whether right-alt and left-ctrl should be recognized as AltGr. */ -Lisp_Object Vw32_recognize_altgr; - /* The scroll bar in which the last motion event occurred. If the last motion event occurred in a scroll bar, we set this @@ -226,11 +200,6 @@ static int input_signal_count; #endif -extern Lisp_Object Vcommand_line_args, Vsystem_name; - -/* A mask of extra modifier bits to put into every keyboard char. */ -extern EMACS_INT extra_keyboard_modifiers; - /* Keyboard code page - may be changed by language-change events. */ static int keyboard_codepage; @@ -6383,18 +6352,18 @@ DEFSYM (Qvendor_specific_keysyms, "vendor-specific-keysyms"); DEFVAR_INT ("w32-num-mouse-buttons", - &w32_num_mouse_buttons, + w32_num_mouse_buttons, doc: /* Number of physical mouse buttons. */); w32_num_mouse_buttons = 2; DEFVAR_LISP ("w32-swap-mouse-buttons", - &Vw32_swap_mouse_buttons, + Vw32_swap_mouse_buttons, doc: /* Swap the mapping of middle and right mouse buttons. When nil, middle button is mouse-2 and right button is mouse-3. */); Vw32_swap_mouse_buttons = Qnil; DEFVAR_LISP ("w32-grab-focus-on-raise", - &Vw32_grab_focus_on_raise, + Vw32_grab_focus_on_raise, doc: /* Raised frame grabs input focus. When t, `raise-frame' grabs input focus as well. This fits well with the normal Windows click-to-focus policy, but might not be @@ -6402,20 +6371,20 @@ Vw32_grab_focus_on_raise = Qt; DEFVAR_LISP ("w32-capslock-is-shiftlock", - &Vw32_capslock_is_shiftlock, + Vw32_capslock_is_shiftlock, doc: /* Apply CapsLock state to non character input keys. When nil, CapsLock only affects normal character input keys. */); Vw32_capslock_is_shiftlock = Qnil; DEFVAR_LISP ("w32-recognize-altgr", - &Vw32_recognize_altgr, + Vw32_recognize_altgr, doc: /* Recognize right-alt and left-ctrl as AltGr. When nil, the right-alt and left-ctrl key combination is interpreted normally. */); Vw32_recognize_altgr = Qt; DEFVAR_BOOL ("w32-use-visible-system-caret", - &w32_use_visible_system_caret, + w32_use_visible_system_caret, doc: /* Flag to make the system caret visible. When this is non-nil, Emacs will indicate the position of point by using the system caret instead of drawing its own cursor. Some screen @@ -6432,7 +6401,7 @@ /* We don't yet support this, but defining this here avoids whining from cus-start.el and other places, like "M-x set-variable". */ DEFVAR_BOOL ("x-use-underline-position-properties", - &x_use_underline_position_properties, + x_use_underline_position_properties, doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. A value of nil means ignore them. If you encounter fonts with bogus UNDERLINE_POSITION font properties, for example 7x13 on XFree prior @@ -6442,14 +6411,14 @@ x_use_underline_position_properties = 0; DEFVAR_BOOL ("x-underline-at-descent-line", - &x_underline_at_descent_line, + x_underline_at_descent_line, doc: /* *Non-nil means to draw the underline at the same place as the descent line. A value of nil means to draw the underline according to the value of the variable `x-use-underline-position-properties', which is usually at the baseline level. The default value is nil. */); x_underline_at_descent_line = 0; - DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, + DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, doc: /* Which toolkit scroll bars Emacs uses, if any. A value of nil means Emacs doesn't use toolkit scroll bars. With the X Window system, the value is a symbol describing the
--- a/src/w32term.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/w32term.h Wed Jan 19 13:54:19 2011 -0800 @@ -61,12 +61,6 @@ int height, width, depth; }; -/* Palette book-keeping stuff for mapping requested colors into the - system palette. Keep a ref-counted list of requested colors and - regenerate the app palette whenever the requested list changes. */ - -extern Lisp_Object Vw32_enable_palette; - struct w32_palette_entry { struct w32_palette_entry * next; PALETTEENTRY entry; @@ -194,9 +188,6 @@ FONT-LIST-CACHE records previous values returned by x-list-fonts. */ extern Lisp_Object w32_display_name_list; -/* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */ -extern Lisp_Object Vx_pixel_size_width_font_regexp; - extern struct frame *x_window_to_frame (struct w32_display_info *, HWND); struct w32_display_info *x_display_info_for_name (Lisp_Object);
--- a/src/window.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/window.c Wed Jan 19 13:54:19 2011 -0800 @@ -114,42 +114,10 @@ Lisp_Object minibuf_selected_window; -/* Non-nil means it is the window for C-M-v to scroll - when the mini-buffer is selected. */ - -Lisp_Object Vminibuf_scroll_window; - -/* Non-nil means this is the buffer whose window C-M-v should scroll. */ - -Lisp_Object Vother_window_scroll_buffer; - -/* Non-nil means it's function to call to display temp buffers. */ - -Lisp_Object Vtemp_buffer_show_function; - -/* Non-zero means line and page scrolling on tall lines (with images) - does partial scrolling by modifying window-vscroll. */ - -int auto_window_vscroll_p; - -/* Non-zero means to use mode-line-inactive face in all windows but the - selected-window and the minibuffer-scroll-window when the - minibuffer is active. */ -int mode_line_in_non_selected_windows; - -/* If a window gets smaller than either of these, it is removed. */ - -EMACS_INT window_min_height; -EMACS_INT window_min_width; - /* Hook run at end of temp_output_buffer_show. */ Lisp_Object Qtemp_buffer_show_hook; -/* Number of lines of continuity in scrolling by screenfuls. */ - -EMACS_INT next_screen_context_lines; - /* Incremented for each window created. */ static int sequence_number; @@ -166,17 +134,6 @@ /* Hook to run when window config changes. */ static Lisp_Object Qwindow_configuration_change_hook; -static Lisp_Object Vwindow_configuration_change_hook; - -/* Non-nil means scroll commands try to put point - at the same screen height as previously. */ - -Lisp_Object Vscroll_preserve_screen_position; - -/* Non-nil means that text is inserted before window's markers. */ - -Lisp_Object Vwindow_point_insertion_type; - /* Incremented by 1 whenever a window is deleted. */ int window_deletion_count; @@ -194,17 +151,7 @@ #if 0 /* This isn't used anywhere. */ /* Nonzero means we can split a frame even if it is "unsplittable". */ static int inhibit_frame_unsplittable; -#endif /* 0 */ - -extern EMACS_INT scroll_margin; - -extern Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions; - -/* If non-nil, then the `recenter' command with a nil argument - the entire frame to be redrawn; the special value `tty' causes the - frame to be redrawn only if it is a tty frame. */ - -static Lisp_Object Vrecenter_redisplay; +#endif DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0, @@ -7101,7 +7048,7 @@ inhibit_point_swap = 0; - DEFVAR_LISP ("temp-buffer-show-function", &Vtemp_buffer_show_function, + DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function, doc: /* Non-nil means call as function to display a help buffer. The function is called with one argument, the buffer to be displayed. Used by `with-output-to-temp-buffer'. @@ -7109,29 +7056,29 @@ the buffer; `temp-buffer-show-hook' is not run unless this function runs it. */); Vtemp_buffer_show_function = Qnil; - DEFVAR_LISP ("minibuffer-scroll-window", &Vminibuf_scroll_window, + DEFVAR_LISP ("minibuffer-scroll-window", Vminibuf_scroll_window, doc: /* Non-nil means it is the window that C-M-v in minibuffer should scroll. */); Vminibuf_scroll_window = Qnil; - DEFVAR_BOOL ("mode-line-in-non-selected-windows", &mode_line_in_non_selected_windows, + DEFVAR_BOOL ("mode-line-in-non-selected-windows", mode_line_in_non_selected_windows, doc: /* Non-nil means to use `mode-line-inactive' face in non-selected windows. If the minibuffer is active, the `minibuffer-scroll-window' mode line is displayed in the `mode-line' face. */); mode_line_in_non_selected_windows = 1; - DEFVAR_LISP ("other-window-scroll-buffer", &Vother_window_scroll_buffer, + DEFVAR_LISP ("other-window-scroll-buffer", Vother_window_scroll_buffer, doc: /* If non-nil, this is a buffer and \\[scroll-other-window] should scroll its window. */); Vother_window_scroll_buffer = Qnil; - DEFVAR_BOOL ("auto-window-vscroll", &auto_window_vscroll_p, + DEFVAR_BOOL ("auto-window-vscroll", auto_window_vscroll_p, doc: /* *Non-nil means to automatically adjust `window-vscroll' to view tall lines. */); auto_window_vscroll_p = 1; - DEFVAR_INT ("next-screen-context-lines", &next_screen_context_lines, + DEFVAR_INT ("next-screen-context-lines", next_screen_context_lines, doc: /* *Number of lines of continuity when scrolling by screenfuls. */); next_screen_context_lines = 2; - DEFVAR_INT ("window-min-height", &window_min_height, + DEFVAR_INT ("window-min-height", window_min_height, doc: /* Allow deleting windows less than this tall. The value is measured in line units. If a window wants a modeline it is counted as one line. @@ -7140,7 +7087,7 @@ windows vertically. A value less than 1 is invalid. */); window_min_height = 4; - DEFVAR_INT ("window-min-width", &window_min_width, + DEFVAR_INT ("window-min-width", window_min_width, doc: /* Allow deleting windows less than this wide. The value is measured in characters and includes any fringes or the scrollbar. @@ -7150,7 +7097,7 @@ window_min_width = 10; DEFVAR_LISP ("scroll-preserve-screen-position", - &Vscroll_preserve_screen_position, + Vscroll_preserve_screen_position, doc: /* *Controls if scroll commands move point to keep its screen position unchanged. A value of nil means point does not keep its screen position except at the scroll margin or window boundary respectively. @@ -7162,19 +7109,19 @@ on their symbols to be controlled by this variable. */); Vscroll_preserve_screen_position = Qnil; - DEFVAR_LISP ("window-point-insertion-type", &Vwindow_point_insertion_type, + DEFVAR_LISP ("window-point-insertion-type", Vwindow_point_insertion_type, doc: /* Type of marker to use for `window-point'. */); Vwindow_point_insertion_type = Qnil; DEFVAR_LISP ("window-configuration-change-hook", - &Vwindow_configuration_change_hook, + Vwindow_configuration_change_hook, doc: /* Functions to call when window configuration changes. The buffer-local part is run once per window, with the relevant window selected; while the global part is run only once for the modified frame, with the relevant frame selected. */); Vwindow_configuration_change_hook = Qnil; - DEFVAR_LISP ("recenter-redisplay", &Vrecenter_redisplay, + DEFVAR_LISP ("recenter-redisplay", Vrecenter_redisplay, doc: /* If non-nil, then the `recenter' command with a nil argument will redraw the entire frame; the special value `tty' causes the frame to be redrawn only if it is a tty frame. */);
--- a/src/window.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/window.h Wed Jan 19 13:54:19 2011 -0800 @@ -753,20 +753,6 @@ extern Lisp_Object minibuf_selected_window; -/* Non-nil => window to for C-M-v to scroll when the minibuffer is - selected. */ - -extern Lisp_Object Vminibuf_scroll_window; - -/* Nil or a symbol naming the window system under which emacs is - running ('x is the only current possibility) */ - -extern Lisp_Object Vinitial_window_system; - -/* Version number of X windows: 10, 11 or nil. */ - -extern Lisp_Object Vwindow_system_version; - /* Window that the mouse is over (nil if no mouse support). */ extern Lisp_Object Vmouse_window;
--- a/src/xdisp.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/xdisp.c Wed Jan 19 13:54:19 2011 -0800 @@ -319,9 +319,9 @@ #define INFINITY 10000000 Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; -Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions; -Lisp_Object Qwindow_text_change_functions, Vwindow_text_change_functions; -Lisp_Object Qredisplay_end_trigger_functions, Vredisplay_end_trigger_functions; +Lisp_Object Qwindow_scroll_functions; +Lisp_Object Qwindow_text_change_functions; +Lisp_Object Qredisplay_end_trigger_functions; Lisp_Object Qinhibit_point_motion_hooks; Lisp_Object QCeval, QCfile, QCdata, QCpropertize; Lisp_Object Qfontified; @@ -339,77 +339,19 @@ /* Holds the list (error). */ Lisp_Object list_of_error; -/* Functions called to fontify regions of text. */ - -Lisp_Object Vfontification_functions; Lisp_Object Qfontification_functions; -/* Non-nil means automatically select any window when the mouse - cursor moves into it. */ -Lisp_Object Vmouse_autoselect_window; - -Lisp_Object Vwrap_prefix, Qwrap_prefix; -Lisp_Object Vline_prefix, Qline_prefix; - -/* Non-zero means draw tool bar buttons raised when the mouse moves - over them. */ - -int auto_raise_tool_bar_buttons_p; - -/* Non-zero means to reposition window if cursor line is only partially visible. */ - -int make_cursor_line_fully_visible_p; - -/* Margin below tool bar in pixels. 0 or nil means no margin. - If value is `internal-border-width' or `border-width', - the corresponding frame parameter is used. */ - -Lisp_Object Vtool_bar_border; - -/* Margin around tool bar buttons in pixels. */ - -Lisp_Object Vtool_bar_button_margin; - -/* Thickness of shadow to draw around tool bar buttons. */ - -EMACS_INT tool_bar_button_relief; - -/* Non-nil means automatically resize tool-bars so that all tool-bar - items are visible, and no blank lines remain. - - If value is `grow-only', only make tool-bar bigger. */ - -Lisp_Object Vauto_resize_tool_bars; - -/* Type of tool bar. Can be symbols image, text, both or both-hroiz. */ - -Lisp_Object Vtool_bar_style; - -/* Maximum number of characters a label can have to be shown. */ - -EMACS_INT tool_bar_max_label_size; - -/* Non-zero means draw block and hollow cursor as wide as the glyph - under it. For example, if a block cursor is over a tab, it will be - drawn as wide as that tab on the display. */ - -int x_stretch_cursor_p; +Lisp_Object Qwrap_prefix; +Lisp_Object Qline_prefix; /* Non-nil means don't actually do any redisplay. */ -Lisp_Object Vinhibit_redisplay, Qinhibit_redisplay; - -/* Non-zero means Lisp evaluation during redisplay is inhibited. */ - -int inhibit_eval_during_redisplay; +Lisp_Object Qinhibit_redisplay; /* Names of text properties relevant for redisplay. */ Lisp_Object Qdisplay; -/* Symbols used in text property values. */ - -Lisp_Object Vdisplay_pixels_per_inch; Lisp_Object Qspace, QCalign_to, QCrelative_width, QCrelative_height; Lisp_Object Qleft_margin, Qright_margin, Qspace_width, Qraise; Lisp_Object Qslice; @@ -417,14 +359,6 @@ Lisp_Object Qmargin, Qpointer; Lisp_Object Qline_height; -/* Non-nil means highlight trailing whitespace. */ - -Lisp_Object Vshow_trailing_whitespace; - -/* Non-nil means escape non-break space and hyphens. */ - -Lisp_Object Vnobreak_char_display; - #ifdef HAVE_WINDOW_SYSTEM /* Test if overflow newline into fringe. Called with iterator IT @@ -449,12 +383,6 @@ #define IT_DISPLAYING_WHITESPACE(it) \ (it->what == IT_CHARACTER && (it->c == ' ' || it->c == '\t')) -/* Non-nil means show the text cursor in void text areas - i.e. in blank areas after eol and eob. This used to be - the default in 21.3. */ - -Lisp_Object Vvoid_text_area_pointer; - /* Name of the face used to highlight trailing whitespace. */ Lisp_Object Qtrailing_whitespace; @@ -522,37 +450,6 @@ static struct buffer *this_line_buffer; -/* Nonzero means truncate lines in all windows less wide than the - frame. */ - -Lisp_Object Vtruncate_partial_width_windows; - -/* A flag to control how to display unibyte 8-bit character. */ - -int unibyte_display_via_language_environment; - -/* Nonzero means we have more than one non-mini-buffer-only frame. - Not guaranteed to be accurate except while parsing - frame-title-format. */ - -int multiple_frames; - -Lisp_Object Vglobal_mode_string; - - -/* List of variables (symbols) which hold markers for overlay arrows. - The symbols on this list are examined during redisplay to determine - where to display overlay arrows. */ - -Lisp_Object Voverlay_arrow_variable_list; - -/* Marker for where to display an arrow on top of the buffer text. */ - -Lisp_Object Voverlay_arrow_position; - -/* String to display for the arrow. Only used on terminal frames. */ - -Lisp_Object Voverlay_arrow_string; /* Values of those variables at last redisplay are stored as properties on `overlay-arrow-position' symbol. However, if @@ -566,47 +463,12 @@ Lisp_Object Qoverlay_arrow_string, Qoverlay_arrow_bitmap; -/* Like mode-line-format, but for the title bar on a visible frame. */ - -Lisp_Object Vframe_title_format; - -/* Like mode-line-format, but for the title bar on an iconified frame. */ - -Lisp_Object Vicon_title_format; - -/* List of functions to call when a window's size changes. These - functions get one arg, a frame on which one or more windows' sizes - have changed. */ - -static Lisp_Object Vwindow_size_change_functions; - -Lisp_Object Qmenu_bar_update_hook, Vmenu_bar_update_hook; +Lisp_Object Qmenu_bar_update_hook; /* Nonzero if an overlay arrow has been displayed in this window. */ static int overlay_arrow_seen; -/* Nonzero means highlight the region even in nonselected windows. */ - -int highlight_nonselected_windows; - -/* If cursor motion alone moves point off frame, try scrolling this - many lines up or down if that will bring it back. */ - -static EMACS_INT scroll_step; - -/* Nonzero means scroll just far enough to bring point back on the - screen, when appropriate. */ - -static EMACS_INT scroll_conservatively; - -/* Recenter the window whenever point gets within this many lines of - the top or bottom of the window. This value is translated into a - pixel value by multiplying it with FRAME_LINE_HEIGHT, which means - that there is really a fixed pixel height scroll margin. */ - -EMACS_INT scroll_margin; - /* Number of windows showing the buffer of the selected window (or another buffer with the same base buffer). keyboard.c refers to this. */ @@ -617,14 +479,6 @@ static Lisp_Object default_invis_vector[3]; -/* Zero means display the mode-line/header-line/menu-bar in the default face - (this slightly odd definition is for compatibility with previous versions - of emacs), non-zero means display them using their respective faces. - - This variable is deprecated. */ - -int mode_line_inverse_video; - /* Prompt to display in front of the mini-buffer contents. */ Lisp_Object minibuf_prompt; @@ -670,19 +524,6 @@ int line_number_displayed; -/* Maximum buffer size for which to display line numbers. */ - -Lisp_Object Vline_number_display_limit; - -/* Line width to consider when repositioning for line number display. */ - -static EMACS_INT line_number_display_limit_width; - -/* Number of lines to keep in the message log buffer. t means - infinite. nil means don't log at all. */ - -Lisp_Object Vmessage_log_max; - /* The name of the *Messages* buffer, a string. */ static Lisp_Object Vmessages_buffer_name; @@ -713,23 +554,6 @@ /* The symbol `inhibit-menubar-update' and its DEFVAR_BOOL variable. */ Lisp_Object Qinhibit_menubar_update; -int inhibit_menubar_update; - -/* When evaluating expressions from menu bar items (enable conditions, - for instance), this is the frame they are being processed for. */ - -Lisp_Object Vmenu_updating_frame; - -/* Maximum height for resizing mini-windows. Either a float - specifying a fraction of the available height, or an integer - specifying a number of lines. */ - -Lisp_Object Vmax_mini_window_height; - -/* Non-zero means messages should be displayed with truncated - lines instead of being continued. */ - -int message_truncate_lines; Lisp_Object Qmessage_truncate_lines; /* Set to 1 in clear_message to make redisplay_internal aware @@ -737,9 +561,6 @@ static int message_cleared_p; -/* How to blink the default frame cursor off. */ -Lisp_Object Vblink_cursor_alist; - /* A scratch glyph row with contents used for generating truncation glyphs. Also used in direct_output_for_insert. */ @@ -771,11 +592,6 @@ #if GLYPH_DEBUG -/* Variables to turn off display optimizations from Lisp. */ - -int inhibit_try_window_id, inhibit_try_window_reusing; -int inhibit_try_cursor_movement; - /* Non-zero means print traces of redisplay if compiled with GLYPH_DEBUG != 0. */ @@ -792,40 +608,12 @@ #define TRACE_MOVE(x) (void) 0 #endif -/* Non-zero means automatically scroll windows horizontally to make - point visible. */ - -int automatic_hscrolling_p; Lisp_Object Qauto_hscroll_mode; -/* How close to the margin can point get before the window is scrolled - horizontally. */ -EMACS_INT hscroll_margin; - -/* How much to scroll horizontally when point is inside the above margin. */ -Lisp_Object Vhscroll_step; - -/* The variable `resize-mini-windows'. If nil, don't resize - mini-windows. If t, always resize them to fit the text they - display. If `grow-only', let mini-windows grow only until they - become empty. */ - -Lisp_Object Vresize_mini_windows; - /* Buffer being redisplayed -- for redisplay_window_error. */ struct buffer *displayed_buffer; -/* Space between overline and text. */ - -EMACS_INT overline_margin; - -/* Require underline to be at least this many screen pixels below baseline - This to avoid underline "merging" with the base of letters at small - font sizes, particularly when x_use_underline_position_properties is on. */ - -EMACS_INT underline_minimum_offset; - /* Value returned from text property handlers (see below). */ enum prop_handled @@ -925,11 +713,6 @@ int redisplaying_p; -/* Non-zero means don't free realized faces. Bound while freeing - realized faces is dangerous because glyph matrices might still - reference them. */ - -int inhibit_free_realized_faces; Lisp_Object Qinhibit_free_realized_faces; /* If a string, XTread_socket generates an event to display that string. @@ -946,9 +729,6 @@ /* Platform-independent portion of hourglass implementation. */ -/* Non-zero means we're allowed to display a hourglass pointer. */ -int display_hourglass_p; - /* Non-zero means an hourglass cursor is currently shown. */ int hourglass_shown_p; @@ -956,15 +736,9 @@ an hourglass cursor on all frames. */ struct atimer *hourglass_atimer; -/* Number of seconds to wait before displaying an hourglass cursor. */ -Lisp_Object Vhourglass_delay; - /* Name of the face used to display glyphless characters. */ Lisp_Object Qglyphless_char; -/* Char-table to control the display of glyphless characters. */ -Lisp_Object Vglyphless_char_display; - /* Symbol for the purpose of Vglyphless_char_display. */ Lisp_Object Qglyphless_char_display; @@ -11228,7 +11002,7 @@ /* Values of window_end_pos and window_end_vpos at the end of try_window_id. */ -EMACS_INT debug_end_pos, debug_end_vpos; +EMACS_INT debug_end_vpos; /* Append a string to W->desired_matrix->method. FMT is a printf format string. A1...A9 are a supplement for a variable-length @@ -13166,7 +12940,7 @@ /* Try scrolling PT into view in window WINDOW. JUST_THIS_ONE_P non-zero means only WINDOW is redisplayed in redisplay_internal. - TEMP_SCROLL_STEP has the same meaning as scroll_step, and is used + TEMP_SCROLL_STEP has the same meaning as emacs_scroll_step, and is used in redisplay_window to bring a partially visible line into view in the case that only the cursor has moved. @@ -13191,7 +12965,7 @@ static int try_scrolling (Lisp_Object window, int just_this_one_p, - EMACS_INT scroll_conservatively, EMACS_INT scroll_step, + EMACS_INT arg_scroll_conservatively, EMACS_INT scroll_step, int temp_scroll_step, int last_line_misfit) { struct window *w = XWINDOW (window); @@ -13218,20 +12992,20 @@ else this_scroll_margin = 0; - /* Force scroll_conservatively to have a reasonable value, to avoid + /* Force arg_scroll_conservatively to have a reasonable value, to avoid overflow while computing how much to scroll. Note that the user can supply scroll-conservatively equal to `most-positive-fixnum', which can be larger than INT_MAX. */ - if (scroll_conservatively > scroll_limit) - { - scroll_conservatively = scroll_limit; + if (arg_scroll_conservatively > scroll_limit) + { + arg_scroll_conservatively = scroll_limit; scroll_max = INT_MAX; } - else if (scroll_step || scroll_conservatively || temp_scroll_step) + else if (scroll_step || arg_scroll_conservatively || temp_scroll_step) /* Compute how much we should try to scroll maximally to bring point into view. */ scroll_max = (max (scroll_step, - max (scroll_conservatively, temp_scroll_step)) + max (arg_scroll_conservatively, temp_scroll_step)) * FRAME_LINE_HEIGHT (f)); else if (NUMBERP (current_buffer->scroll_down_aggressively) || NUMBERP (current_buffer->scroll_up_aggressively)) @@ -13262,7 +13036,7 @@ /* Compute how many pixels below window bottom to stop searching for PT. This avoids costly search for PT that is far away if the user limited scrolling by a small number of lines, but - always finds PT if scroll_conservatively is set to a large + always finds PT if arg_scroll_conservatively is set to a large number, such as most-positive-fixnum. */ int slack = max (scroll_max, 10 * FRAME_LINE_HEIGHT (f)); int y_to_move = @@ -13291,10 +13065,10 @@ window start down. If scrolling conservatively, move it just enough down to make point visible. If scroll_step is set, move it down by scroll_step. */ - if (scroll_conservatively) + if (arg_scroll_conservatively) amount_to_scroll = min (max (dy, FRAME_LINE_HEIGHT (f)), - FRAME_LINE_HEIGHT (f) * scroll_conservatively); + FRAME_LINE_HEIGHT (f) * arg_scroll_conservatively); else if (scroll_step || temp_scroll_step) amount_to_scroll = scroll_max; else @@ -13375,7 +13149,7 @@ /* Compute new window start. */ start_display (&it, w, startp); - if (scroll_conservatively) + if (arg_scroll_conservatively) amount_to_scroll = max (dy, FRAME_LINE_HEIGHT (f) * max (scroll_step, temp_scroll_step)); else if (scroll_step || temp_scroll_step) @@ -14359,7 +14133,7 @@ /* Try to scroll by specified few lines. */ if ((scroll_conservatively - || scroll_step + || emacs_scroll_step || temp_scroll_step || NUMBERP (current_buffer->scroll_up_aggressively) || NUMBERP (current_buffer->scroll_down_aggressively)) @@ -14371,7 +14145,7 @@ successful, 0 if not successful. */ int rc = try_scrolling (window, just_this_one_p, scroll_conservatively, - scroll_step, + emacs_scroll_step, temp_scroll_step, last_line_misfit); switch (rc) { @@ -26635,19 +26409,19 @@ staticpro (&Qleft_to_right); #ifdef HAVE_WINDOW_SYSTEM - DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p, + DEFVAR_BOOL ("x-stretch-cursor", x_stretch_cursor_p, doc: /* *Non-nil means draw block cursor as wide as the glyph under it. For example, if a block cursor is over a tab, it will be drawn as wide as that tab on the display. */); x_stretch_cursor_p = 0; #endif - DEFVAR_LISP ("show-trailing-whitespace", &Vshow_trailing_whitespace, + DEFVAR_LISP ("show-trailing-whitespace", Vshow_trailing_whitespace, doc: /* *Non-nil means highlight trailing whitespace. The face used for trailing whitespace is `trailing-whitespace'. */); Vshow_trailing_whitespace = Qnil; - DEFVAR_LISP ("nobreak-char-display", &Vnobreak_char_display, + DEFVAR_LISP ("nobreak-char-display", Vnobreak_char_display, doc: /* *Control highlighting of nobreak space and soft hyphen. A value of t means highlight the character itself (for nobreak space, use face `nobreak-space'). @@ -26656,47 +26430,47 @@ space or ordinary hyphen. */); Vnobreak_char_display = Qt; - DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, + DEFVAR_LISP ("void-text-area-pointer", Vvoid_text_area_pointer, doc: /* *The pointer shape to show in void text areas. A value of nil means to show the text pointer. Other options are `arrow', `text', `hand', `vdrag', `hdrag', `modeline', and `hourglass'. */); Vvoid_text_area_pointer = Qarrow; - DEFVAR_LISP ("inhibit-redisplay", &Vinhibit_redisplay, + DEFVAR_LISP ("inhibit-redisplay", Vinhibit_redisplay, doc: /* Non-nil means don't actually do any redisplay. This is used for internal purposes. */); Vinhibit_redisplay = Qnil; - DEFVAR_LISP ("global-mode-string", &Vglobal_mode_string, + DEFVAR_LISP ("global-mode-string", Vglobal_mode_string, doc: /* String (or mode line construct) included (normally) in `mode-line-format'. */); Vglobal_mode_string = Qnil; - DEFVAR_LISP ("overlay-arrow-position", &Voverlay_arrow_position, + DEFVAR_LISP ("overlay-arrow-position", Voverlay_arrow_position, doc: /* Marker for where to display an arrow on top of the buffer text. This must be the beginning of a line in order to work. See also `overlay-arrow-string'. */); Voverlay_arrow_position = Qnil; - DEFVAR_LISP ("overlay-arrow-string", &Voverlay_arrow_string, + DEFVAR_LISP ("overlay-arrow-string", Voverlay_arrow_string, doc: /* String to display as an arrow in non-window frames. See also `overlay-arrow-position'. */); Voverlay_arrow_string = make_pure_c_string ("=>"); - DEFVAR_LISP ("overlay-arrow-variable-list", &Voverlay_arrow_variable_list, + DEFVAR_LISP ("overlay-arrow-variable-list", Voverlay_arrow_variable_list, doc: /* List of variables (symbols) which hold markers for overlay arrows. The symbols on this list are examined during redisplay to determine where to display overlay arrows. */); Voverlay_arrow_variable_list = Fcons (intern_c_string ("overlay-arrow-position"), Qnil); - DEFVAR_INT ("scroll-step", &scroll_step, + DEFVAR_INT ("scroll-step", emacs_scroll_step, doc: /* *The number of lines to try scrolling a window by when point moves out. If that fails to bring point back on frame, point is centered instead. If this is zero, point is always centered after it moves off frame. If you want scrolling to always be a line at a time, you should set `scroll-conservatively' to a large value rather than set this to 1. */); - DEFVAR_INT ("scroll-conservatively", &scroll_conservatively, + DEFVAR_INT ("scroll-conservatively", scroll_conservatively, doc: /* *Scroll up to this many lines, to bring point back on screen. If point moves off-screen, redisplay will scroll by up to `scroll-conservatively' lines in order to bring point just barely @@ -26706,23 +26480,23 @@ A value of zero means always recenter point if it moves off screen. */); scroll_conservatively = 0; - DEFVAR_INT ("scroll-margin", &scroll_margin, + DEFVAR_INT ("scroll-margin", scroll_margin, doc: /* *Number of lines of margin at the top and bottom of a window. Recenter the window whenever point gets within this many lines of the top or bottom of the window. */); scroll_margin = 0; - DEFVAR_LISP ("display-pixels-per-inch", &Vdisplay_pixels_per_inch, + DEFVAR_LISP ("display-pixels-per-inch", Vdisplay_pixels_per_inch, doc: /* Pixels per inch value for non-window system displays. Value is a number or a cons (WIDTH-DPI . HEIGHT-DPI). */); Vdisplay_pixels_per_inch = make_float (72.0); #if GLYPH_DEBUG - DEFVAR_INT ("debug-end-pos", &debug_end_pos, doc: /* Don't ask. */); + DEFVAR_INT ("debug-end-pos", debug_end_pos, doc: /* Don't ask. */); #endif DEFVAR_LISP ("truncate-partial-width-windows", - &Vtruncate_partial_width_windows, + Vtruncate_partial_width_windows, doc: /* Non-nil means truncate lines in windows narrower than the frame. For an integer value, truncate lines in each window narrower than the full frame width, provided the window width is less than that integer; @@ -26736,36 +26510,36 @@ If `word-wrap' is enabled, you might want to reduce this. */); Vtruncate_partial_width_windows = make_number (50); - DEFVAR_BOOL ("mode-line-inverse-video", &mode_line_inverse_video, + DEFVAR_BOOL ("mode-line-inverse-video", mode_line_inverse_video, doc: /* When nil, display the mode-line/header-line/menu-bar in the default face. Any other value means to use the appropriate face, `mode-line', `header-line', or `menu' respectively. */); mode_line_inverse_video = 1; - DEFVAR_LISP ("line-number-display-limit", &Vline_number_display_limit, + DEFVAR_LISP ("line-number-display-limit", Vline_number_display_limit, doc: /* *Maximum buffer size for which line number should be displayed. If the buffer is bigger than this, the line number does not appear in the mode line. A value of nil means no limit. */); Vline_number_display_limit = Qnil; DEFVAR_INT ("line-number-display-limit-width", - &line_number_display_limit_width, + line_number_display_limit_width, doc: /* *Maximum line width (in characters) for line number display. If the average length of the lines near point is bigger than this, then the line number may be omitted from the mode line. */); line_number_display_limit_width = 200; - DEFVAR_BOOL ("highlight-nonselected-windows", &highlight_nonselected_windows, + DEFVAR_BOOL ("highlight-nonselected-windows", highlight_nonselected_windows, doc: /* *Non-nil means highlight region even in nonselected windows. */); highlight_nonselected_windows = 0; - DEFVAR_BOOL ("multiple-frames", &multiple_frames, + DEFVAR_BOOL ("multiple-frames", multiple_frames, doc: /* Non-nil if more than one frame is visible on this display. Minibuffer-only frames don't count, but iconified frames do. This variable is not guaranteed to be accurate except while processing `frame-title-format' and `icon-title-format'. */); - DEFVAR_LISP ("frame-title-format", &Vframe_title_format, + DEFVAR_LISP ("frame-title-format", Vframe_title_format, doc: /* Template for displaying the title bar of visible frames. \(Assuming the window manager supports this feature.) @@ -26773,7 +26547,7 @@ the %c and %l constructs are ignored. It is used only on frames for which no explicit name has been set \(see `modify-frame-parameters'). */); - DEFVAR_LISP ("icon-title-format", &Vicon_title_format, + DEFVAR_LISP ("icon-title-format", Vicon_title_format, doc: /* Template for displaying the title bar of an iconified frame. \(Assuming the window manager supports this feature.) This variable has the same structure as `mode-line-format' (which see), @@ -26790,13 +26564,13 @@ Qnil)))), Qnil))); - DEFVAR_LISP ("message-log-max", &Vmessage_log_max, + DEFVAR_LISP ("message-log-max", Vmessage_log_max, doc: /* Maximum number of lines to keep in the message log buffer. If nil, disable message logging. If t, log messages but don't truncate the buffer when it becomes large. */); Vmessage_log_max = make_number (100); - DEFVAR_LISP ("window-size-change-functions", &Vwindow_size_change_functions, + DEFVAR_LISP ("window-size-change-functions", Vwindow_size_change_functions, doc: /* Functions called before redisplay, if window sizes have changed. The value should be a list of functions that take one argument. Just before redisplay, for each frame, if any of its windows have changed @@ -26804,7 +26578,7 @@ all the functions in the list are called, with the frame as argument. */); Vwindow_size_change_functions = Qnil; - DEFVAR_LISP ("window-scroll-functions", &Vwindow_scroll_functions, + DEFVAR_LISP ("window-scroll-functions", Vwindow_scroll_functions, doc: /* List of functions to call before redisplaying a window with scrolling. Each function is called with two arguments, the window and its new display-start position. Note that these functions are also called by @@ -26813,17 +26587,17 @@ Vwindow_scroll_functions = Qnil; DEFVAR_LISP ("window-text-change-functions", - &Vwindow_text_change_functions, + Vwindow_text_change_functions, doc: /* Functions to call in redisplay when text in the window might change. */); Vwindow_text_change_functions = Qnil; - DEFVAR_LISP ("redisplay-end-trigger-functions", &Vredisplay_end_trigger_functions, + DEFVAR_LISP ("redisplay-end-trigger-functions", Vredisplay_end_trigger_functions, doc: /* Functions called when redisplay of a window reaches the end trigger. Each function is called with two arguments, the window and the end trigger value. See `set-window-redisplay-end-trigger'. */); Vredisplay_end_trigger_functions = Qnil; - DEFVAR_LISP ("mouse-autoselect-window", &Vmouse_autoselect_window, + DEFVAR_LISP ("mouse-autoselect-window", Vmouse_autoselect_window, doc: /* *Non-nil means autoselect window with mouse pointer. If nil, do not autoselect windows. A positive number means delay autoselection by that many seconds: a @@ -26843,7 +26617,7 @@ `focus-follows-mouse' matches the behavior of your window manager. */); Vmouse_autoselect_window = Qnil; - DEFVAR_LISP ("auto-resize-tool-bars", &Vauto_resize_tool_bars, + DEFVAR_LISP ("auto-resize-tool-bars", Vauto_resize_tool_bars, doc: /* *Non-nil means automatically resize tool-bars. This dynamically changes the tool-bar's height to the minimum height that is needed to make all tool-bar items visible. @@ -26851,15 +26625,15 @@ automatically; to decrease the tool-bar height, use \\[recenter]. */); Vauto_resize_tool_bars = Qt; - DEFVAR_BOOL ("auto-raise-tool-bar-buttons", &auto_raise_tool_bar_buttons_p, + DEFVAR_BOOL ("auto-raise-tool-bar-buttons", auto_raise_tool_bar_buttons_p, doc: /* *Non-nil means raise tool-bar buttons when the mouse moves over them. */); auto_raise_tool_bar_buttons_p = 1; - DEFVAR_BOOL ("make-cursor-line-fully-visible", &make_cursor_line_fully_visible_p, + DEFVAR_BOOL ("make-cursor-line-fully-visible", make_cursor_line_fully_visible_p, doc: /* *Non-nil means to scroll (recenter) cursor line if it is not fully visible. */); make_cursor_line_fully_visible_p = 1; - DEFVAR_LISP ("tool-bar-border", &Vtool_bar_border, + DEFVAR_LISP ("tool-bar-border", Vtool_bar_border, doc: /* *Border below tool-bar in pixels. If an integer, use it as the height of the border. If it is one of `internal-border-width' or `border-width', use the @@ -26867,7 +26641,7 @@ Otherwise, no border is added below the tool-bar. */); Vtool_bar_border = Qinternal_border_width; - DEFVAR_LISP ("tool-bar-button-margin", &Vtool_bar_button_margin, + DEFVAR_LISP ("tool-bar-button-margin", Vtool_bar_button_margin, doc: /* *Margin around tool-bar buttons in pixels. If an integer, use that for both horizontal and vertical margins. Otherwise, value should be a pair of integers `(HORZ . VERT)' with @@ -26875,11 +26649,11 @@ vertical margin. */); Vtool_bar_button_margin = make_number (DEFAULT_TOOL_BAR_BUTTON_MARGIN); - DEFVAR_INT ("tool-bar-button-relief", &tool_bar_button_relief, + DEFVAR_INT ("tool-bar-button-relief", tool_bar_button_relief, doc: /* *Relief thickness of tool-bar buttons. */); tool_bar_button_relief = DEFAULT_TOOL_BAR_BUTTON_RELIEF; - DEFVAR_LISP ("tool-bar-style", &Vtool_bar_style, + DEFVAR_LISP ("tool-bar-style", Vtool_bar_style, doc: /* Tool bar style to use. It can be one of image - show images only @@ -26890,13 +26664,13 @@ any other - use system default or image if no system default. */); Vtool_bar_style = Qnil; - DEFVAR_INT ("tool-bar-max-label-size", &tool_bar_max_label_size, + DEFVAR_INT ("tool-bar-max-label-size", tool_bar_max_label_size, doc: /* *Maximum number of characters a label can have to be shown. The tool bar style must also show labels for this to have any effect, see `tool-bar-style'. */); tool_bar_max_label_size = DEFAULT_TOOL_BAR_LABEL_SIZE; - DEFVAR_LISP ("fontification-functions", &Vfontification_functions, + DEFVAR_LISP ("fontification-functions", Vfontification_functions, doc: /* List of functions to call to fontify regions of text. Each function is called with one argument POS. Functions must fontify a region starting at POS in the current buffer, and give @@ -26905,7 +26679,7 @@ Fmake_variable_buffer_local (Qfontification_functions); DEFVAR_BOOL ("unibyte-display-via-language-environment", - &unibyte_display_via_language_environment, + unibyte_display_via_language_environment, doc: /* *Non-nil means display unibyte text according to language environment. Specifically, this means that raw bytes in the range 160-255 decimal are displayed by converting them to the equivalent multibyte characters @@ -26916,13 +26690,13 @@ but does not change the fact they are interpreted as raw bytes. */); unibyte_display_via_language_environment = 0; - DEFVAR_LISP ("max-mini-window-height", &Vmax_mini_window_height, + DEFVAR_LISP ("max-mini-window-height", Vmax_mini_window_height, doc: /* *Maximum height for resizing mini-windows. If a float, it specifies a fraction of the mini-window frame's height. If an integer, it specifies a number of lines. */); Vmax_mini_window_height = make_float (0.25); - DEFVAR_LISP ("resize-mini-windows", &Vresize_mini_windows, + DEFVAR_LISP ("resize-mini-windows", Vresize_mini_windows, doc: /* *How to resize mini-windows. A value of nil means don't automatically resize mini-windows. A value of t means resize them to fit the text displayed in them. @@ -26931,7 +26705,7 @@ go back to their normal size. */); Vresize_mini_windows = Qgrow_only; - DEFVAR_LISP ("blink-cursor-alist", &Vblink_cursor_alist, + DEFVAR_LISP ("blink-cursor-alist", Vblink_cursor_alist, doc: /* Alist specifying how to blink the cursor off. Each element has the form (ON-STATE . OFF-STATE). Whenever the `cursor-type' frame-parameter or variable equals ON-STATE, @@ -26943,7 +26717,7 @@ the frame's other specifications determine how to blink the cursor off. */); Vblink_cursor_alist = Qnil; - DEFVAR_BOOL ("auto-hscroll-mode", &automatic_hscrolling_p, + DEFVAR_BOOL ("auto-hscroll-mode", automatic_hscrolling_p, doc: /* Allow or disallow automatic horizontal scrolling of windows. If non-nil, windows are automatically scrolled horizontally to make point visible. */); @@ -26951,12 +26725,12 @@ Qauto_hscroll_mode = intern_c_string ("auto-hscroll-mode"); staticpro (&Qauto_hscroll_mode); - DEFVAR_INT ("hscroll-margin", &hscroll_margin, + DEFVAR_INT ("hscroll-margin", hscroll_margin, doc: /* *How many columns away from the window edge point is allowed to get before automatic hscrolling will horizontally scroll the window. */); hscroll_margin = 5; - DEFVAR_LISP ("hscroll-step", &Vhscroll_step, + DEFVAR_LISP ("hscroll-step", Vhscroll_step, doc: /* *How many columns to scroll the window when point gets too close to the edge. When point is less than `hscroll-margin' columns from the window edge, automatic hscrolling will scroll the window by the amount of columns @@ -26974,28 +26748,28 @@ and `scroll-right' overrides this variable's effect. */); Vhscroll_step = make_number (0); - DEFVAR_BOOL ("message-truncate-lines", &message_truncate_lines, + DEFVAR_BOOL ("message-truncate-lines", message_truncate_lines, doc: /* If non-nil, messages are truncated instead of resizing the echo area. Bind this around calls to `message' to let it take effect. */); message_truncate_lines = 0; - DEFVAR_LISP ("menu-bar-update-hook", &Vmenu_bar_update_hook, + DEFVAR_LISP ("menu-bar-update-hook", Vmenu_bar_update_hook, doc: /* Normal hook run to update the menu bar definitions. Redisplay runs this hook before it redisplays the menu bar. This is used to update submenus such as Buffers, whose contents depend on various data. */); Vmenu_bar_update_hook = Qnil; - DEFVAR_LISP ("menu-updating-frame", &Vmenu_updating_frame, + DEFVAR_LISP ("menu-updating-frame", Vmenu_updating_frame, doc: /* Frame for which we are updating a menu. The enable predicate for a menu binding should check this variable. */); Vmenu_updating_frame = Qnil; - DEFVAR_BOOL ("inhibit-menubar-update", &inhibit_menubar_update, + DEFVAR_BOOL ("inhibit-menubar-update", inhibit_menubar_update, doc: /* Non-nil means don't update menu bars. Internal use only. */); inhibit_menubar_update = 0; - DEFVAR_LISP ("wrap-prefix", &Vwrap_prefix, + DEFVAR_LISP ("wrap-prefix", Vwrap_prefix, doc: /* Prefix prepended to all continuation lines at display time. The value may be a string, an image, or a stretch-glyph; it is interpreted in the same way as the value of a `display' text property. @@ -27009,7 +26783,7 @@ Qwrap_prefix = intern_c_string ("wrap-prefix"); Fmake_variable_buffer_local (Qwrap_prefix); - DEFVAR_LISP ("line-prefix", &Vline_prefix, + DEFVAR_LISP ("line-prefix", Vline_prefix, doc: /* Prefix prepended to all non-continuation lines at display time. The value may be a string, an image, or a stretch-glyph; it is interpreted in the same way as the value of a `display' text property. @@ -27023,36 +26797,36 @@ Qline_prefix = intern_c_string ("line-prefix"); Fmake_variable_buffer_local (Qline_prefix); - DEFVAR_BOOL ("inhibit-eval-during-redisplay", &inhibit_eval_during_redisplay, + DEFVAR_BOOL ("inhibit-eval-during-redisplay", inhibit_eval_during_redisplay, doc: /* Non-nil means don't eval Lisp during redisplay. */); inhibit_eval_during_redisplay = 0; - DEFVAR_BOOL ("inhibit-free-realized-faces", &inhibit_free_realized_faces, + DEFVAR_BOOL ("inhibit-free-realized-faces", inhibit_free_realized_faces, doc: /* Non-nil means don't free realized faces. Internal use only. */); inhibit_free_realized_faces = 0; #if GLYPH_DEBUG - DEFVAR_BOOL ("inhibit-try-window-id", &inhibit_try_window_id, + DEFVAR_BOOL ("inhibit-try-window-id", inhibit_try_window_id, doc: /* Inhibit try_window_id display optimization. */); inhibit_try_window_id = 0; - DEFVAR_BOOL ("inhibit-try-window-reusing", &inhibit_try_window_reusing, + DEFVAR_BOOL ("inhibit-try-window-reusing", inhibit_try_window_reusing, doc: /* Inhibit try_window_reusing display optimization. */); inhibit_try_window_reusing = 0; - DEFVAR_BOOL ("inhibit-try-cursor-movement", &inhibit_try_cursor_movement, + DEFVAR_BOOL ("inhibit-try-cursor-movement", inhibit_try_cursor_movement, doc: /* Inhibit try_cursor_movement display optimization. */); inhibit_try_cursor_movement = 0; #endif /* GLYPH_DEBUG */ - DEFVAR_INT ("overline-margin", &overline_margin, + DEFVAR_INT ("overline-margin", overline_margin, doc: /* *Space between overline and text, in pixels. The default value is 2: the height of the overline (1 pixel) plus 1 pixel margin to the caracter height. */); overline_margin = 2; DEFVAR_INT ("underline-minimum-offset", - &underline_minimum_offset, + underline_minimum_offset, doc: /* Minimum distance between baseline and underline. This can improve legibility of underlined text at small font sizes, particularly when using variable `x-use-underline-position-properties' @@ -27060,13 +26834,13 @@ baseline. The default value is 1. */); underline_minimum_offset = 1; - DEFVAR_BOOL ("display-hourglass", &display_hourglass_p, + DEFVAR_BOOL ("display-hourglass", display_hourglass_p, doc: /* Non-nil means show an hourglass pointer, when Emacs is busy. This feature only works when on a window system that can change cursor shapes. */); display_hourglass_p = 1; - DEFVAR_LISP ("hourglass-delay", &Vhourglass_delay, + DEFVAR_LISP ("hourglass-delay", Vhourglass_delay, doc: /* *Seconds to wait before displaying an hourglass pointer when Emacs is busy. */); Vhourglass_delay = make_number (DEFAULT_HOURGLASS_DELAY); @@ -27086,7 +26860,7 @@ Qchar_table_extra_slots = intern_c_string ("char-table-extra-slots"); Fput (Qglyphless_char_display, Qchar_table_extra_slots, make_number (1)); - DEFVAR_LISP ("glyphless-char-display", &Vglyphless_char_display, + DEFVAR_LISP ("glyphless-char-display", Vglyphless_char_display, doc: /* Char-table to control displaying of glyphless characters. Each element, if non-nil, is an ASCII acronym string (displayed in a box) or one of these symbols:
--- a/src/xfaces.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/xfaces.c Wed Jan 19 13:54:19 2011 -0800 @@ -355,13 +355,6 @@ Lisp_Object Qface_alias; -/* Default stipple pattern used on monochrome displays. This stipple - pattern is used on monochrome displays instead of shades of gray - for a face background color. See `set-face-stipple' for possible - values for this variable. */ - -Lisp_Object Vface_default_stipple; - /* Alist of alternative font families. Each element is of the form (FAMILY FAMILY1 FAMILY2 ...). If fonts of FAMILY can't be loaded, try FAMILY1, then FAMILY2, ... */ @@ -380,20 +373,8 @@ font may be scaled if its name matches a regular expression in the list. */ -Lisp_Object Vscalable_fonts_allowed, Qscalable_fonts_allowed; - -/* List of regular expressions that matches names of fonts to ignore. */ - -Lisp_Object Vface_ignored_fonts; - -/* Alist of font name patterns vs the rescaling factor. */ - -Lisp_Object Vface_font_rescale_alist; - -/* Maximum number of fonts to consider in font_list. If not an - integer > 0, DEFAULT_FONT_LIST_LIMIT is used instead. */ - -Lisp_Object Vfont_list_limit; +Lisp_Object Qscalable_fonts_allowed; + #define DEFAULT_FONT_LIST_LIMIT 100 /* The symbols `foreground-color' and `background-color' which can be @@ -414,30 +395,6 @@ Lisp_Object Qbitmap_spec_p; -/* Alist of global face definitions. Each element is of the form - (FACE . LFACE) where FACE is a symbol naming a face and LFACE - is a Lisp vector of face attributes. These faces are used - to initialize faces for new frames. */ - -Lisp_Object Vface_new_frame_defaults; - -/* Alist of face remappings. Each element is of the form: - (FACE REPLACEMENT...) which causes display of the face FACE to use - REPLACEMENT... instead. REPLACEMENT... is interpreted the same way - the value of a `face' text property is: it may be (1) A face name, - (2) A list of face names, (3) A property-list of face attribute/value - pairs, or (4) A list of face names intermixed with lists containing - face attribute/value pairs. - - Multiple entries in REPLACEMENT... are merged together to form the final - result, with faces or attributes earlier in the list taking precedence - over those that are later. - - Face-name remapping cycles are suppressed; recursive references use - the underlying face instead of the remapped face. */ - -Lisp_Object Vface_remapping_alist; - /* The next ID to assign to Lisp faces. */ static int next_lface_id; @@ -455,10 +412,6 @@ Lisp_Object Qtty_color_alist; -/* An alist of defined terminal colors and their RGB values. */ - -Lisp_Object Vtty_defined_color_alist; - /* Counter for calls to clear_face_cache. If this counter reaches CLEAR_FONT_TABLE_COUNT, and a frame has more than CLEAR_FONT_TABLE_NFONTS load, unused fonts are freed. */ @@ -6715,29 +6668,29 @@ defsubr (&Sdump_colors); #endif - DEFVAR_LISP ("font-list-limit", &Vfont_list_limit, + DEFVAR_LISP ("font-list-limit", Vfont_list_limit, doc: /* *Limit for font matching. If an integer > 0, font matching functions won't load more than that number of fonts when searching for a matching font. */); Vfont_list_limit = make_number (DEFAULT_FONT_LIST_LIMIT); - DEFVAR_LISP ("face-new-frame-defaults", &Vface_new_frame_defaults, + DEFVAR_LISP ("face-new-frame-defaults", Vface_new_frame_defaults, doc: /* List of global face definitions (for internal use only.) */); Vface_new_frame_defaults = Qnil; - DEFVAR_LISP ("face-default-stipple", &Vface_default_stipple, + DEFVAR_LISP ("face-default-stipple", Vface_default_stipple, doc: /* *Default stipple pattern used on monochrome displays. This stipple pattern is used on monochrome displays instead of shades of gray for a face background color. See `set-face-stipple' for possible values for this variable. */); Vface_default_stipple = make_pure_c_string ("gray3"); - DEFVAR_LISP ("tty-defined-color-alist", &Vtty_defined_color_alist, + DEFVAR_LISP ("tty-defined-color-alist", Vtty_defined_color_alist, doc: /* An alist of defined terminal colors and their RGB values. See the docstring of `tty-color-alist' for the details. */); Vtty_defined_color_alist = Qnil; - DEFVAR_LISP ("scalable-fonts-allowed", &Vscalable_fonts_allowed, + DEFVAR_LISP ("scalable-fonts-allowed", Vscalable_fonts_allowed, doc: /* Allowed scalable fonts. A value of nil means don't allow any scalable fonts. A value of t means allow any scalable font. @@ -6747,13 +6700,13 @@ other font of the appropriate family and registry is available. */); Vscalable_fonts_allowed = Qnil; - DEFVAR_LISP ("face-ignored-fonts", &Vface_ignored_fonts, + DEFVAR_LISP ("face-ignored-fonts", Vface_ignored_fonts, doc: /* List of ignored fonts. Each element is a regular expression that matches names of fonts to ignore. */); Vface_ignored_fonts = Qnil; - DEFVAR_LISP ("face-remapping-alist", &Vface_remapping_alist, + DEFVAR_LISP ("face-remapping-alist", Vface_remapping_alist, doc: /* Alist of face remappings. Each element is of the form: @@ -6794,7 +6747,7 @@ changing this variable for it to take effect. */); Vface_remapping_alist = Qnil; - DEFVAR_LISP ("face-font-rescale-alist", &Vface_font_rescale_alist, + DEFVAR_LISP ("face-font-rescale-alist", Vface_font_rescale_alist, doc: /* Alist of fonts vs the rescaling factors. Each element is a cons (FONT-PATTERN . RESCALE-RATIO), where FONT-PATTERN is a font-spec or a regular expression matching a font name, and
--- a/src/xfns.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/xfns.c Wed Jan 19 13:54:19 2011 -0800 @@ -24,10 +24,7 @@ #include <math.h> #include <setjmp.h> #include <ctype.h> - -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif /* This makes the fields of a Display accessible, in Xlib header files. */ @@ -122,20 +119,12 @@ #ifdef USE_MOTIF -/* LessTif/Motif version info. */ - -static Lisp_Object Vmotif_version_string; - #endif /* USE_MOTIF */ #endif /* USE_X_TOOLKIT */ #ifdef USE_GTK -/* GTK+ version info */ - -static Lisp_Object Vgtk_version_string; - #endif /* USE_GTK */ #define MAXREQUEST(dpy) (XMaxRequestSize (dpy)) @@ -148,57 +137,10 @@ int gray_bitmap_height = gray_height; char *gray_bitmap_bits = gray_bits; -/* Non-zero means prompt with the old GTK file selection dialog. */ - -int x_gtk_use_old_file_dialog; - -/* If non-zero, by default show hidden files in the GTK file chooser. */ - -int x_gtk_show_hidden_files; - -/* If non-zero, don't show additional help text in the GTK file chooser. */ - -int x_gtk_file_dialog_help_text; - -/* If non-zero, don't collapse to tool bar when it is detached. */ - -int x_gtk_whole_detached_tool_bar; - -/* If non-zero, use Gtk+ tooltips. */ - -static int x_gtk_use_system_tooltips; - -/* The background and shape of the mouse pointer, and shape when not - over text or in the modeline. */ - -Lisp_Object Vx_pointer_shape, Vx_nontext_pointer_shape, Vx_mode_pointer_shape; -Lisp_Object Vx_hourglass_pointer_shape; - -/* The shape when over mouse-sensitive text. */ - -Lisp_Object Vx_sensitive_text_pointer_shape; - -/* If non-nil, the pointer shape to indicate that windows can be - dragged horizontally. */ - -Lisp_Object Vx_window_horizontal_drag_shape; - -/* Color of chars displayed in cursor box. */ - -Lisp_Object Vx_cursor_fore_pixel; - /* Nonzero if using X. */ static int x_in_use; -/* Non nil if no window manager is in use. */ - -Lisp_Object Vx_no_window_manager; - -/* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */ - -Lisp_Object Vx_pixel_size_width_font_regexp; - Lisp_Object Qnone; Lisp_Object Qsuppress_icon; Lisp_Object Qundefined_color; @@ -4605,10 +4547,6 @@ Lisp_Object last_show_tip_args; -/* Maximum size for tooltips; a cons (COLUMNS . ROWS). */ - -Lisp_Object Vx_max_tooltip_size; - static Lisp_Object unwind_create_tip_frame (Lisp_Object frame) @@ -5915,28 +5853,28 @@ Fput (Qundefined_color, Qerror_message, make_pure_c_string ("Undefined color")); - DEFVAR_LISP ("x-pointer-shape", &Vx_pointer_shape, + DEFVAR_LISP ("x-pointer-shape", Vx_pointer_shape, doc: /* The shape of the pointer when over text. Changing the value does not affect existing frames unless you set the mouse color. */); Vx_pointer_shape = Qnil; #if 0 /* This doesn't really do anything. */ - DEFVAR_LISP ("x-nontext-pointer-shape", &Vx_nontext_pointer_shape, + DEFVAR_LISP ("x-nontext-pointer-shape", Vx_nontext_pointer_shape, doc: /* The shape of the pointer when not over text. This variable takes effect when you create a new frame or when you set the mouse color. */); #endif Vx_nontext_pointer_shape = Qnil; - DEFVAR_LISP ("x-hourglass-pointer-shape", &Vx_hourglass_pointer_shape, + DEFVAR_LISP ("x-hourglass-pointer-shape", Vx_hourglass_pointer_shape, doc: /* The shape of the pointer when Emacs is busy. This variable takes effect when you create a new frame or when you set the mouse color. */); Vx_hourglass_pointer_shape = Qnil; #if 0 /* This doesn't really do anything. */ - DEFVAR_LISP ("x-mode-pointer-shape", &Vx_mode_pointer_shape, + DEFVAR_LISP ("x-mode-pointer-shape", Vx_mode_pointer_shape, doc: /* The shape of the pointer when over the mode line. This variable takes effect when you create a new frame or when you set the mouse color. */); @@ -5944,29 +5882,29 @@ Vx_mode_pointer_shape = Qnil; DEFVAR_LISP ("x-sensitive-text-pointer-shape", - &Vx_sensitive_text_pointer_shape, + Vx_sensitive_text_pointer_shape, doc: /* The shape of the pointer when over mouse-sensitive text. This variable takes effect when you create a new frame or when you set the mouse color. */); Vx_sensitive_text_pointer_shape = Qnil; DEFVAR_LISP ("x-window-horizontal-drag-cursor", - &Vx_window_horizontal_drag_shape, + Vx_window_horizontal_drag_shape, doc: /* Pointer shape to use for indicating a window can be dragged horizontally. This variable takes effect when you create a new frame or when you set the mouse color. */); Vx_window_horizontal_drag_shape = Qnil; - DEFVAR_LISP ("x-cursor-fore-pixel", &Vx_cursor_fore_pixel, + DEFVAR_LISP ("x-cursor-fore-pixel", Vx_cursor_fore_pixel, doc: /* A string indicating the foreground color of the cursor box. */); Vx_cursor_fore_pixel = Qnil; - DEFVAR_LISP ("x-max-tooltip-size", &Vx_max_tooltip_size, + DEFVAR_LISP ("x-max-tooltip-size", Vx_max_tooltip_size, doc: /* Maximum size for tooltips. Value is a pair (COLUMNS . ROWS). Text larger than this is clipped. */); Vx_max_tooltip_size = Fcons (make_number (80), make_number (40)); - DEFVAR_LISP ("x-no-window-manager", &Vx_no_window_manager, + DEFVAR_LISP ("x-no-window-manager", Vx_no_window_manager, doc: /* Non-nil if no X window manager is in use. Emacs doesn't try to figure this out; this is always nil unless you set it to something else. */); @@ -5975,7 +5913,7 @@ Vx_no_window_manager = Qnil; DEFVAR_LISP ("x-pixel-size-width-font-regexp", - &Vx_pixel_size_width_font_regexp, + Vx_pixel_size_width_font_regexp, doc: /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. Since Emacs gets width of a font matching with this regexp from @@ -5985,32 +5923,32 @@ Vx_pixel_size_width_font_regexp = Qnil; /* This is not ifdef:ed, so other builds than GTK can customize it. */ - DEFVAR_BOOL ("x-gtk-use-old-file-dialog", &x_gtk_use_old_file_dialog, + DEFVAR_BOOL ("x-gtk-use-old-file-dialog", x_gtk_use_old_file_dialog, doc: /* *Non-nil means prompt with the old GTK file selection dialog. If nil or if the file selection dialog is not available, the new GTK file chooser is used instead. To turn off all file dialogs set the variable `use-file-dialog'. */); x_gtk_use_old_file_dialog = 0; - DEFVAR_BOOL ("x-gtk-show-hidden-files", &x_gtk_show_hidden_files, + DEFVAR_BOOL ("x-gtk-show-hidden-files", x_gtk_show_hidden_files, doc: /* *If non-nil, the GTK file chooser will by default show hidden files. Note that this is just the default, there is a toggle button on the file chooser to show or not show hidden files on a case by case basis. */); x_gtk_show_hidden_files = 0; - DEFVAR_BOOL ("x-gtk-file-dialog-help-text", &x_gtk_file_dialog_help_text, + DEFVAR_BOOL ("x-gtk-file-dialog-help-text", x_gtk_file_dialog_help_text, doc: /* *If non-nil, the GTK file chooser will show additional help text. If more space for files in the file chooser dialog is wanted, set this to nil to turn the additional text off. */); x_gtk_file_dialog_help_text = 1; - DEFVAR_BOOL ("x-gtk-whole-detached-tool-bar", &x_gtk_whole_detached_tool_bar, + DEFVAR_BOOL ("x-gtk-whole-detached-tool-bar", x_gtk_whole_detached_tool_bar, doc: /* *If non-nil, a detached tool bar is shown in full. The default is to just show an arrow and pressing on that arrow shows the tool bar buttons. */); x_gtk_whole_detached_tool_bar = 0; - DEFVAR_BOOL ("x-gtk-use-system-tooltips", &x_gtk_use_system_tooltips, + DEFVAR_BOOL ("x-gtk-use-system-tooltips", x_gtk_use_system_tooltips, doc: /* *If non-nil with a Gtk+ built Emacs, the Gtk+ toolip is used. Otherwise use Emacs own tooltip implementation. When using Gtk+ tooltips, the tooltip face is not used. */); @@ -6023,7 +5961,7 @@ #ifdef USE_MOTIF Fprovide (intern_c_string ("motif"), Qnil); - DEFVAR_LISP ("motif-version-string", &Vmotif_version_string, + DEFVAR_LISP ("motif-version-string", Vmotif_version_string, doc: /* Version info for LessTif/Motif. */); Vmotif_version_string = build_string (XmVERSION_STRING); #endif /* USE_MOTIF */ @@ -6038,7 +5976,7 @@ Fprovide (intern_c_string ("gtk"), Qnil); Fprovide (intern_c_string ("move-toolbar"), Qnil); - DEFVAR_LISP ("gtk-version-string", &Vgtk_version_string, + DEFVAR_LISP ("gtk-version-string", Vgtk_version_string, doc: /* Version info for GTK+. */); { char gtk_version[40];
--- a/src/xrdb.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/xrdb.c Wed Jan 19 13:54:19 2011 -0800 @@ -22,10 +22,7 @@ #include <config.h> -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif - #include <errno.h> #include <epaths.h>
--- a/src/xselect.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/xselect.c Wed Jan 19 13:54:19 2011 -0800 @@ -27,9 +27,8 @@ #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif -#ifdef HAVE_UNISTD_H + #include <unistd.h> -#endif #include "lisp.h" #include "xterm.h" /* for all of the X includes */ @@ -112,8 +111,6 @@ Lisp_Object Qcompound_text_with_extensions; -static Lisp_Object Vx_lost_selection_functions; -static Lisp_Object Vx_sent_selection_functions; static Lisp_Object Qforeign_selection; /* If this is a smaller number than the max-request-size of the display, @@ -144,17 +141,6 @@ selection-values. */ static Lisp_Object Vselection_alist; -/* This is an alist whose CARs are selection-types (whose names are the same - as the names of X Atoms) and whose CDRs are the names of Lisp functions to - call to convert the given Emacs selection value to a string representing - the given selection type. This is for Lisp-level extension of the emacs - selection handling. */ -static Lisp_Object Vselection_converter_alist; - -/* If the selection owner takes too long to reply to a selection request, - we give up on it. This is in milliseconds (0 = no timeout.) */ -static EMACS_INT x_selection_timeout; - /* Define a queue to save up SELECTION_REQUEST_EVENT events for later @@ -2647,7 +2633,7 @@ Vselection_alist = Qnil; staticpro (&Vselection_alist); - DEFVAR_LISP ("selection-converter-alist", &Vselection_converter_alist, + DEFVAR_LISP ("selection-converter-alist", Vselection_converter_alist, doc: /* An alist associating X Windows selection-types with functions. These functions are called to convert the selection, with three args: the name of the selection (typically `PRIMARY', `SECONDARY', or `CLIPBOARD'); @@ -2662,7 +2648,7 @@ and there is no meaningful selection value. */); Vselection_converter_alist = Qnil; - DEFVAR_LISP ("x-lost-selection-functions", &Vx_lost_selection_functions, + DEFVAR_LISP ("x-lost-selection-functions", Vx_lost_selection_functions, doc: /* A list of functions to be called when Emacs loses an X selection. \(This happens when some other X client makes its own selection or when a Lisp program explicitly clears the selection.) @@ -2670,7 +2656,7 @@ \(a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'). */); Vx_lost_selection_functions = Qnil; - DEFVAR_LISP ("x-sent-selection-functions", &Vx_sent_selection_functions, + DEFVAR_LISP ("x-sent-selection-functions", Vx_sent_selection_functions, doc: /* A list of functions to be called when Emacs answers a selection request. The functions are called with four arguments: - the selection name (typically `PRIMARY', `SECONDARY', or `CLIPBOARD'); @@ -2684,7 +2670,7 @@ it merely informs you that they have happened. */); Vx_sent_selection_functions = Qnil; - DEFVAR_INT ("x-selection-timeout", &x_selection_timeout, + DEFVAR_INT ("x-selection-timeout", x_selection_timeout, doc: /* Number of milliseconds to wait for a selection reply. If the selection owner doesn't reply in this time, we give up. A value of 0 means wait as long as necessary. This is initialized from the
--- a/src/xsettings.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/xsettings.c Wed Jan 19 13:54:19 2011 -0800 @@ -44,8 +44,6 @@ static struct x_display_info *first_dpyinfo; static Lisp_Object Qmonospace_font_name, Qfont_name, Qfont_render, Qtool_bar_style; -static int use_system_font; -static Lisp_Object Vxft_settings; static Lisp_Object current_tool_bar_style; #ifdef HAVE_GCONF @@ -751,14 +749,14 @@ defsubr (&Sfont_get_system_font); defsubr (&Sfont_get_system_normal_font); - DEFVAR_BOOL ("font-use-system-font", &use_system_font, + DEFVAR_BOOL ("font-use-system-font", use_system_font, doc: /* *Non-nil means to apply the system defined font dynamically. When this is non-nil and the system defined fixed width font changes, we update frames dynamically. If this variable is nil, Emacs ignores system font changes. */); use_system_font = 0; - DEFVAR_LISP ("xft-settings", &Vxft_settings, + DEFVAR_LISP ("xft-settings", Vxft_settings, doc: /* Font settings applied to Xft. */); Vxft_settings = make_string ("", 0);
--- a/src/xsmfns.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/xsmfns.c Wed Jan 19 13:54:19 2011 -0800 @@ -26,10 +26,7 @@ #include <X11/Xlib.h> #include <X11/Xutil.h> -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif - #include <sys/param.h> #include <stdio.h> #include <setjmp.h> @@ -69,15 +66,6 @@ static char *emacs_program; -/* The client session id for this session as a lisp object. */ - -Lisp_Object Vx_session_id; - -/* The id we had the previous session. This is only available if we - have been started by the session manager with SMID_OPT. */ - -Lisp_Object Vx_session_previous_id; - /* The option we tell the session manager to start Emacs with when restarting Emacs. The client_id is appended. */ @@ -561,7 +549,7 @@ void syms_of_xsmfns (void) { - DEFVAR_LISP ("x-session-id", &Vx_session_id, + DEFVAR_LISP ("x-session-id", Vx_session_id, doc: /* The session id Emacs got from the session manager for this session. Changing the value does not change the session id used by Emacs. The value is nil if no session manager is running. @@ -569,7 +557,7 @@ `emacs-session-save' and `emacs-session-restore'." */); Vx_session_id = Qnil; - DEFVAR_LISP ("x-session-previous-id", &Vx_session_previous_id, + DEFVAR_LISP ("x-session-previous-id", Vx_session_previous_id, doc: /* The previous session id Emacs got from session manager. If Emacs is running on a window system that has a session manager, the session manager gives Emacs a session id. It is feasible for Emacs Lisp
--- a/src/xterm.c Sun Jan 16 23:45:28 2011 -0800 +++ b/src/xterm.c Wed Jan 19 13:54:19 2011 -0800 @@ -90,9 +90,8 @@ #ifdef HAVE_SYS_TIME_H #include <sys/time.h> #endif -#ifdef HAVE_UNISTD_H + #include <unistd.h> -#endif #ifdef USE_GTK #include "gtkutil.h" @@ -148,10 +147,6 @@ -/* Non-nil means Emacs uses toolkit scroll bars. */ - -Lisp_Object Vx_toolkit_scroll_bars; - /* Non-zero means that a HELP_EVENT has been generated since Emacs start. */ @@ -160,14 +155,6 @@ /* Last window where we saw the mouse. Used by mouse-autoselect-window. */ static Lisp_Object last_window; -/* Non-zero means make use of UNDERLINE_POSITION font properties. */ - -int x_use_underline_position_properties; - -/* Non-zero means to draw the underline at the same place as the descent line. */ - -int x_underline_at_descent_line; - /* This is a chain of structures for all the X displays currently in use. */ @@ -208,11 +195,6 @@ static int toolkit_scroll_bar_interaction; -/* Non-zero means to not move point as a result of clicking on a - frame to focus it (when focus-follows-mouse is nil). */ - -int x_mouse_click_focus_ignore_position; - /* Non-zero timeout value means ignore next mouse click if it arrives before that timeout elapses (i.e. as part of the same sequence of events resulting from clicking on a frame to select it). */ @@ -283,10 +265,6 @@ static int x_noop_count; -/* The keysyms to use for the various modifiers. */ - -Lisp_Object Vx_alt_keysym, Vx_hyper_keysym, Vx_meta_keysym, Vx_super_keysym; -Lisp_Object Vx_keysym_table; static Lisp_Object Qalt, Qhyper, Qmeta, Qsuper, Qmodifier_value; static Lisp_Object Qvendor_specific_keysyms; @@ -10774,7 +10752,7 @@ #endif DEFVAR_BOOL ("x-use-underline-position-properties", - &x_use_underline_position_properties, + x_use_underline_position_properties, doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. A value of nil means ignore them. If you encounter fonts with bogus UNDERLINE_POSITION font properties, for example 7x13 on XFree prior @@ -10784,7 +10762,7 @@ x_use_underline_position_properties = 1; DEFVAR_BOOL ("x-underline-at-descent-line", - &x_underline_at_descent_line, + x_underline_at_descent_line, doc: /* *Non-nil means to draw the underline at the same place as the descent line. A value of nil means to draw the underline according to the value of the variable `x-use-underline-position-properties', which is usually at the @@ -10792,7 +10770,7 @@ x_underline_at_descent_line = 0; DEFVAR_BOOL ("x-mouse-click-focus-ignore-position", - &x_mouse_click_focus_ignore_position, + x_mouse_click_focus_ignore_position, doc: /* Non-nil means that a mouse click to focus a frame does not move point. This variable is only used when the window manager requires that you click on a frame to select it (give it focus). In that case, a value @@ -10801,7 +10779,7 @@ selected window or cursor position is preserved. */); x_mouse_click_focus_ignore_position = 0; - DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, + DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, doc: /* Which toolkit scroll bars Emacs uses, if any. A value of nil means Emacs doesn't use toolkit scroll bars. With the X Window system, the value is a symbol describing the @@ -10834,35 +10812,35 @@ Qsuper = intern_c_string ("super"); Fput (Qsuper, Qmodifier_value, make_number (super_modifier)); - DEFVAR_LISP ("x-alt-keysym", &Vx_alt_keysym, + DEFVAR_LISP ("x-alt-keysym", Vx_alt_keysym, doc: /* Which keys Emacs uses for the alt modifier. This should be one of the symbols `alt', `hyper', `meta', `super'. For example, `alt' means use the Alt_L and Alt_R keysyms. The default is nil, which is the same as `alt'. */); Vx_alt_keysym = Qnil; - DEFVAR_LISP ("x-hyper-keysym", &Vx_hyper_keysym, + DEFVAR_LISP ("x-hyper-keysym", Vx_hyper_keysym, doc: /* Which keys Emacs uses for the hyper modifier. This should be one of the symbols `alt', `hyper', `meta', `super'. For example, `hyper' means use the Hyper_L and Hyper_R keysyms. The default is nil, which is the same as `hyper'. */); Vx_hyper_keysym = Qnil; - DEFVAR_LISP ("x-meta-keysym", &Vx_meta_keysym, + DEFVAR_LISP ("x-meta-keysym", Vx_meta_keysym, doc: /* Which keys Emacs uses for the meta modifier. This should be one of the symbols `alt', `hyper', `meta', `super'. For example, `meta' means use the Meta_L and Meta_R keysyms. The default is nil, which is the same as `meta'. */); Vx_meta_keysym = Qnil; - DEFVAR_LISP ("x-super-keysym", &Vx_super_keysym, + DEFVAR_LISP ("x-super-keysym", Vx_super_keysym, doc: /* Which keys Emacs uses for the super modifier. This should be one of the symbols `alt', `hyper', `meta', `super'. For example, `super' means use the Super_L and Super_R keysyms. The default is nil, which is the same as `super'. */); Vx_super_keysym = Qnil; - DEFVAR_LISP ("x-keysym-table", &Vx_keysym_table, + DEFVAR_LISP ("x-keysym-table", Vx_keysym_table, doc: /* Hash table of character codes indexed by X keysym codes. */); Vx_keysym_table = make_hash_table (Qeql, make_number (900), make_float (DEFAULT_REHASH_SIZE),
--- a/src/xterm.h Sun Jan 16 23:45:28 2011 -0800 +++ b/src/xterm.h Wed Jan 19 13:54:19 2011 -0800 @@ -388,9 +388,6 @@ FONT-LIST-CACHE records previous values returned by x-list-fonts. */ extern Lisp_Object x_display_name_list; -/* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */ -extern Lisp_Object Vx_pixel_size_width_font_regexp; - extern struct x_display_info *x_display_info_for_display (Display *); extern struct x_display_info *x_display_info_for_name (Lisp_Object); extern void x_set_frame_alpha (struct frame *);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/warn-on-use.h Wed Jan 19 13:54:19 2011 -0800 @@ -0,0 +1,109 @@ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2011 Free Software Foundation, Inc. + + 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 3 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + This macro is useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. However, one of the reasons that a function is a + portability trap is if it has the wrong signature. Declaring + FUNCTION with a different signature in C is a compilation error, so + this macro must use the same type as any existing declaration so + that programs that avoid the problematic FUNCTION do not fail to + compile merely because they included a header that poisoned the + function. But this implies that _GL_WARN_ON_USE is only safe to + use if FUNCTION is known to already have a declaration. Use of + this macro implies that there must not be any other macro hiding + the declaration of FUNCTION; but undefining FUNCTION first is part + of the poisoning process anyway (although for symbols that are + provided only via a macro, the result is a compilation error rather + than a warning containing "literal string"). Also note that in + C++, it is only safe to use if FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system <stdio.h>: + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static inline char ***rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +extern __typeof__ (function) function +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") + is like _GL_WARN_ON_USE (function, "string"), except that the function is + declared with the given prototype, consisting of return type, parameters, + and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +extern rettype function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +extern rettype function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif