+2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove "#define unix" that is no longer needed (Bug#11905).
+ Merge from gnulib to make "#define unix" unnecessary, incorporating:
+ 2012-07-10 getloadavg: clean out old Emacs and Autoconf cruft
+ 2012-07-09 getopt: Simplify after Emacs changed.
+
2012-07-10 Glenn Morris <rgm@gnu.org>
* configure.ac (DATA_START, DATA_SEG_BITS, PENDING_OUTPUT_COUNT):
We also #define LDAV_PRIVILEGED if a program will require
special installation to be able to call getloadavg. */
-/* "configure" defines CONFIGURING_GETLOADAVG to sidestep problems
- with partially-configured source directories. */
-
-#ifndef CONFIGURING_GETLOADAVG
-# include <config.h>
-# include <stdbool.h>
-#endif
+#include <config.h>
/* Specification. */
#include <stdlib.h>
#include <errno.h>
+#include <stdbool.h>
#include <stdio.h>
# include <sys/types.h>
-/* Both the Emacs and non-Emacs sections want this. Some
- configuration files' definitions for the LOAD_AVE_CVT macro (like
- sparc.h's) use macros like FSCALE, defined here. */
-# if defined (unix) || defined (__unix)
+# if HAVE_SYS_PARAM_H
# include <sys/param.h>
# endif
# include "intprops.h"
-/* The existing Emacs configuration files define a macro called
- LOAD_AVE_CVT, which accepts a value of type LOAD_AVE_TYPE, and
- returns the load average multiplied by 100. What we actually want
- is a macro called LDAV_CVT, which returns the load average as an
- unmultiplied double.
-
- For backwards compatibility, we'll define LDAV_CVT in terms of
- LOAD_AVE_CVT, but future machine config files should just define
- LDAV_CVT directly. */
-
-# if !defined (LDAV_CVT) && defined (LOAD_AVE_CVT)
-# define LDAV_CVT(n) (LOAD_AVE_CVT (n) / 100.0)
-# endif
-
# if !defined (BSD) && defined (ultrix)
/* Ultrix behaves like BSD on Vaxen. */
# define BSD
[
# Figure out what our getloadavg.c needs.
+AC_CHECK_HEADERS_ONCE([sys/param.h])
+
# On HPUX9, an unprivileged user can get load averages this way.
if test $gl_func_getloadavg_done = no; then
AC_CHECK_FUNCS([pstat_getdynamic], [gl_func_getloadavg_done=yes])
-# getopt.m4 serial 43
+# getopt.m4 serial 44
dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[
m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX])
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
dnl Other modules can request the gnulib implementation of the getopt
dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS.
dnl argp.m4 does this.
m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [
- gl_GETOPT_IFELSE([], [])
REPLACE_GETOPT=1
], [
REPLACE_GETOPT=0
- gl_GETOPT_IFELSE([
+ if test -n "$gl_replace_getopt"; then
REPLACE_GETOPT=1
- ],
- [])
+ fi
])
if test $REPLACE_GETOPT = 1; then
dnl Arrange for getopt.h to be created.
AC_REQUIRE([gl_FUNC_GETOPT_POSIX])
])
-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],
[
2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
+ Remove "#define unix" that is no longer needed (Bug#11905).
+ * s/aix4-2.h (unix): Remove; no longer needed.
+
EMACS_TIME simplification (Bug#11875).
This replaces macros (which typically do not work in GDB)
with functions, typedefs and enums, making the code easier to debug.
\f
/* Special items needed to make Emacs run on this system. */
-/* AIX doesn't define this. */
-#define unix 1
-
/* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */
#define SIGNALS_VIA_CHARACTERS
#define CLASH_DETECTION