diff options
| author | Paul Eggert | 2012-07-10 17:01:21 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-07-10 17:01:21 -0700 |
| commit | 22ffb97351d1081558c070a3c134d2be99993df6 (patch) | |
| tree | 16bda44878b33d2ef8ff039ffcb5cc8d407da977 | |
| parent | e9a9ae0350689d352c2bdfa3af0eb722f587b966 (diff) | |
| download | emacs-22ffb97351d1081558c070a3c134d2be99993df6.tar.gz emacs-22ffb97351d1081558c070a3c134d2be99993df6.zip | |
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.
* src/s/aix4-2.h (unix): Remove; no longer needed.
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | lib/getloadavg.c | 28 | ||||
| -rw-r--r-- | m4/getloadavg.m4 | 2 | ||||
| -rw-r--r-- | m4/getopt.m4 | 15 | ||||
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/s/aix4-2.h | 3 |
6 files changed, 19 insertions, 39 deletions
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-07-10 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Remove "#define unix" that is no longer needed (Bug#11905). | ||
| 4 | Merge from gnulib to make "#define unix" unnecessary, incorporating: | ||
| 5 | 2012-07-10 getloadavg: clean out old Emacs and Autoconf cruft | ||
| 6 | 2012-07-09 getopt: Simplify after Emacs changed. | ||
| 7 | |||
| 1 | 2012-07-10 Glenn Morris <rgm@gnu.org> | 8 | 2012-07-10 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * configure.ac (DATA_START, DATA_SEG_BITS, PENDING_OUTPUT_COUNT): | 10 | * configure.ac (DATA_START, DATA_SEG_BITS, PENDING_OUTPUT_COUNT): |
diff --git a/lib/getloadavg.c b/lib/getloadavg.c index 79ea71787ac..a8ffefee33f 100644 --- a/lib/getloadavg.c +++ b/lib/getloadavg.c | |||
| @@ -80,45 +80,23 @@ | |||
| 80 | We also #define LDAV_PRIVILEGED if a program will require | 80 | We also #define LDAV_PRIVILEGED if a program will require |
| 81 | special installation to be able to call getloadavg. */ | 81 | special installation to be able to call getloadavg. */ |
| 82 | 82 | ||
| 83 | /* "configure" defines CONFIGURING_GETLOADAVG to sidestep problems | 83 | #include <config.h> |
| 84 | with partially-configured source directories. */ | ||
| 85 | |||
| 86 | #ifndef CONFIGURING_GETLOADAVG | ||
| 87 | # include <config.h> | ||
| 88 | # include <stdbool.h> | ||
| 89 | #endif | ||
| 90 | 84 | ||
| 91 | /* Specification. */ | 85 | /* Specification. */ |
| 92 | #include <stdlib.h> | 86 | #include <stdlib.h> |
| 93 | 87 | ||
| 94 | #include <errno.h> | 88 | #include <errno.h> |
| 89 | #include <stdbool.h> | ||
| 95 | #include <stdio.h> | 90 | #include <stdio.h> |
| 96 | 91 | ||
| 97 | # include <sys/types.h> | 92 | # include <sys/types.h> |
| 98 | 93 | ||
| 99 | /* Both the Emacs and non-Emacs sections want this. Some | 94 | # if HAVE_SYS_PARAM_H |
| 100 | configuration files' definitions for the LOAD_AVE_CVT macro (like | ||
| 101 | sparc.h's) use macros like FSCALE, defined here. */ | ||
| 102 | # if defined (unix) || defined (__unix) | ||
| 103 | # include <sys/param.h> | 95 | # include <sys/param.h> |
| 104 | # endif | 96 | # endif |
| 105 | 97 | ||
| 106 | # include "intprops.h" | 98 | # include "intprops.h" |
| 107 | 99 | ||
| 108 | /* The existing Emacs configuration files define a macro called | ||
| 109 | LOAD_AVE_CVT, which accepts a value of type LOAD_AVE_TYPE, and | ||
| 110 | returns the load average multiplied by 100. What we actually want | ||
| 111 | is a macro called LDAV_CVT, which returns the load average as an | ||
| 112 | unmultiplied double. | ||
| 113 | |||
| 114 | For backwards compatibility, we'll define LDAV_CVT in terms of | ||
| 115 | LOAD_AVE_CVT, but future machine config files should just define | ||
| 116 | LDAV_CVT directly. */ | ||
| 117 | |||
| 118 | # if !defined (LDAV_CVT) && defined (LOAD_AVE_CVT) | ||
| 119 | # define LDAV_CVT(n) (LOAD_AVE_CVT (n) / 100.0) | ||
| 120 | # endif | ||
| 121 | |||
| 122 | # if !defined (BSD) && defined (ultrix) | 100 | # if !defined (BSD) && defined (ultrix) |
| 123 | /* Ultrix behaves like BSD on Vaxen. */ | 101 | /* Ultrix behaves like BSD on Vaxen. */ |
| 124 | # define BSD | 102 | # define BSD |
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 index 029da44b497..7738d2f8669 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 | |||
| @@ -105,6 +105,8 @@ AC_DEFUN([gl_PREREQ_GETLOADAVG], | |||
| 105 | [ | 105 | [ |
| 106 | # Figure out what our getloadavg.c needs. | 106 | # Figure out what our getloadavg.c needs. |
| 107 | 107 | ||
| 108 | AC_CHECK_HEADERS_ONCE([sys/param.h]) | ||
| 109 | |||
| 108 | # On HPUX9, an unprivileged user can get load averages this way. | 110 | # On HPUX9, an unprivileged user can get load averages this way. |
| 109 | if test $gl_func_getloadavg_done = no; then | 111 | if test $gl_func_getloadavg_done = no; then |
| 110 | AC_CHECK_FUNCS([pstat_getdynamic], [gl_func_getloadavg_done=yes]) | 112 | AC_CHECK_FUNCS([pstat_getdynamic], [gl_func_getloadavg_done=yes]) |
diff --git a/m4/getopt.m4 b/m4/getopt.m4 index 155edb235ff..f6902b58591 100644 --- a/m4/getopt.m4 +++ b/m4/getopt.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # getopt.m4 serial 43 | 1 | # getopt.m4 serial 44 |
| 2 | dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -9,18 +9,17 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX], | |||
| 9 | [ | 9 | [ |
| 10 | m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX]) | 10 | m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX]) |
| 11 | AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) | 11 | AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) |
| 12 | AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) | ||
| 12 | dnl Other modules can request the gnulib implementation of the getopt | 13 | dnl Other modules can request the gnulib implementation of the getopt |
| 13 | dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS. | 14 | dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS. |
| 14 | dnl argp.m4 does this. | 15 | dnl argp.m4 does this. |
| 15 | m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [ | 16 | m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [ |
| 16 | gl_GETOPT_IFELSE([], []) | ||
| 17 | REPLACE_GETOPT=1 | 17 | REPLACE_GETOPT=1 |
| 18 | ], [ | 18 | ], [ |
| 19 | REPLACE_GETOPT=0 | 19 | REPLACE_GETOPT=0 |
| 20 | gl_GETOPT_IFELSE([ | 20 | if test -n "$gl_replace_getopt"; then |
| 21 | REPLACE_GETOPT=1 | 21 | REPLACE_GETOPT=1 |
| 22 | ], | 22 | fi |
| 23 | []) | ||
| 24 | ]) | 23 | ]) |
| 25 | if test $REPLACE_GETOPT = 1; then | 24 | if test $REPLACE_GETOPT = 1; then |
| 26 | dnl Arrange for getopt.h to be created. | 25 | dnl Arrange for getopt.h to be created. |
| @@ -38,12 +37,6 @@ AC_DEFUN([gl_FUNC_GETOPT_GNU], | |||
| 38 | AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) | 37 | AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) |
| 39 | ]) | 38 | ]) |
| 40 | 39 | ||
| 41 | AC_DEFUN([gl_GETOPT_IFELSE], | ||
| 42 | [ | ||
| 43 | AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) | ||
| 44 | AS_IF([test -n "$gl_replace_getopt"], [$1], [$2]) | ||
| 45 | ]) | ||
| 46 | |||
| 47 | # Determine whether to replace the entire getopt facility. | 40 | # Determine whether to replace the entire getopt facility. |
| 48 | AC_DEFUN([gl_GETOPT_CHECK_HEADERS], | 41 | AC_DEFUN([gl_GETOPT_CHECK_HEADERS], |
| 49 | [ | 42 | [ |
diff --git a/src/ChangeLog b/src/ChangeLog index de56d4160a7..0c98c0b356d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-07-10 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2012-07-10 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Remove "#define unix" that is no longer needed (Bug#11905). | ||
| 4 | * s/aix4-2.h (unix): Remove; no longer needed. | ||
| 5 | |||
| 3 | EMACS_TIME simplification (Bug#11875). | 6 | EMACS_TIME simplification (Bug#11875). |
| 4 | This replaces macros (which typically do not work in GDB) | 7 | This replaces macros (which typically do not work in GDB) |
| 5 | with functions, typedefs and enums, making the code easier to debug. | 8 | with functions, typedefs and enums, making the code easier to debug. |
diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h index 51ac9748f27..b7bdc8739a7 100644 --- a/src/s/aix4-2.h +++ b/src/s/aix4-2.h | |||
| @@ -40,9 +40,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 40 | 40 | ||
| 41 | /* Special items needed to make Emacs run on this system. */ | 41 | /* Special items needed to make Emacs run on this system. */ |
| 42 | 42 | ||
| 43 | /* AIX doesn't define this. */ | ||
| 44 | #define unix 1 | ||
| 45 | |||
| 46 | /* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */ | 43 | /* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */ |
| 47 | #define SIGNALS_VIA_CHARACTERS | 44 | #define SIGNALS_VIA_CHARACTERS |
| 48 | #define CLASH_DETECTION | 45 | #define CLASH_DETECTION |