diff options
| author | Glenn Morris | 2012-08-06 16:22:22 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-08-06 16:22:22 -0400 |
| commit | 1c6f11f42ac2afa209124ce06e64b7a0461d7bdd (patch) | |
| tree | 7932edfc1548795b2217cb737843c7781e3bf3a9 | |
| parent | ea3768613f759f3802a9dd9826b238c46b46ce67 (diff) | |
| download | emacs-1c6f11f42ac2afa209124ce06e64b7a0461d7bdd.tar.gz emacs-1c6f11f42ac2afa209124ce06e64b7a0461d7bdd.zip | |
Remove GNU_LIBRARY_PENDING_OUTPUT_COUNT
* configure.ac (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Remove.
(PENDING_OUTPUT_COUNT): Absorb GNU_LIBRARY_PENDING_OUTPUT_COUNT.
(DISPNEW_NEEDS_STDIO_EXT): New define.
* src/dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
Let configure handle it.
(stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
* nt/config.nt (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Remove.
(PENDING_OUTPUT_COUNT): Define it as dispnew.c used to.
* admin/CPP-DEFINES (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Remove.
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | admin/CPP-DEFINES | 1 | ||||
| -rw-r--r-- | configure.ac | 72 | ||||
| -rw-r--r-- | nt/ChangeLog | 5 | ||||
| -rw-r--r-- | nt/config.nt | 9 | ||||
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/dispnew.c | 25 |
7 files changed, 74 insertions, 50 deletions
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-08-06 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * configure.ac (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Remove. | ||
| 4 | (PENDING_OUTPUT_COUNT): Absorb GNU_LIBRARY_PENDING_OUTPUT_COUNT. | ||
| 5 | (DISPNEW_NEEDS_STDIO_EXT): New define. | ||
| 6 | |||
| 1 | 2012-08-05 Michael Albinus <michael.albinus@gmx.de> | 7 | 2012-08-05 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 8 | ||
| 3 | * INSTALL: Explain, how to disable D-Bus at all. (Bug#12112) | 9 | * INSTALL: Explain, how to disable D-Bus at all. (Bug#12112) |
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index 47453f50467..ce7005afc01 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES | |||
| @@ -112,7 +112,6 @@ GC_MARK_SECONDARY_STACK | |||
| 112 | GC_MARK_STACK | 112 | GC_MARK_STACK |
| 113 | GC_SETJMP_WORKS | 113 | GC_SETJMP_WORKS |
| 114 | GMALLOC_INHIBIT_VALLOC | 114 | GMALLOC_INHIBIT_VALLOC |
| 115 | GNU_LIBRARY_PENDING_OUTPUT_COUNT | ||
| 116 | GNU_MALLOC | 115 | GNU_MALLOC |
| 117 | HAVE_AIX_SMT_EXP | 116 | HAVE_AIX_SMT_EXP |
| 118 | HAVE_CBRT | 117 | HAVE_CBRT |
diff --git a/configure.ac b/configure.ac index 2a6291e8243..b4fe8bc0b9f 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -3506,31 +3506,32 @@ esac | |||
| 3506 | 3506 | ||
| 3507 | dnl Used in dispnew.c | 3507 | dnl Used in dispnew.c |
| 3508 | AH_TEMPLATE(PENDING_OUTPUT_COUNT, [Number of chars of output in the | 3508 | AH_TEMPLATE(PENDING_OUTPUT_COUNT, [Number of chars of output in the |
| 3509 | buffer of a stdio stream.]) | 3509 | buffer of a stdio stream.]) |
| 3510 | 3510 | ||
| 3511 | dnl FIXME just PENDING_OUTPUT_COUNT should suffice. | 3511 | AC_MSG_CHECKING([whether we are using the GNU C library]) |
| 3512 | AH_TEMPLATE(GNU_LIBRARY_PENDING_OUTPUT_COUNT, [Value of | 3512 | AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ |
| 3513 | PENDING_OUTPUT_COUNT if using the GNU C library.]) | 3513 | #include <features.h> |
| 3514 | #ifndef __GNU_LIBRARY__ | ||
| 3515 | # error "this is not the GNU C library" | ||
| 3516 | #endif | ||
| 3517 | ]], [[]])], emacs_glibc=yes, emacs_glibc=no) | ||
| 3518 | AC_MSG_RESULT([$emacs_glibc]) | ||
| 3514 | 3519 | ||
| 3515 | case $opsys in | 3520 | if test $emacs_glibc = yes; then |
| 3516 | cygwin | darwin | freebsd | netbsd | openbsd ) | ||
| 3517 | AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->_p - (FILE)->_bf._base)]) | ||
| 3518 | ;; | ||
| 3519 | 3521 | ||
| 3520 | unixware) | 3522 | emacs_pending_output=unknown |
| 3521 | AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->__ptr - (FILE)->__base)]) | ||
| 3522 | ;; | ||
| 3523 | 3523 | ||
| 3524 | gnu | gnu-linux | gnu-kfreebsd ) | 3524 | case $opsys in |
| 3525 | AC_MSG_CHECKING([for style of pending output formalism]) | 3525 | gnu | gnu-linux | gnu-kfreebsd ) |
| 3526 | dnl In autoconf 2.67 and later, we could use a single test | 3526 | AC_MSG_CHECKING([for style of pending output formalism]) |
| 3527 | dnl since the preprocessed output is accessible in "conftest.i". | 3527 | dnl In autoconf 2.67 and later, we could use a single test |
| 3528 | AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ | 3528 | dnl since the preprocessed output is accessible in "conftest.i". |
| 3529 | AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ | ||
| 3529 | #include <stdio.h> | 3530 | #include <stdio.h> |
| 3530 | #if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM) | 3531 | #if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM) |
| 3531 | # error "stdio definitions not found" | 3532 | # error "stdio definitions not found" |
| 3532 | #endif | 3533 | #endif |
| 3533 | ]], [[]])], emacs_pending_output=new, emacs_pending_output=unknown) | 3534 | ]], [[]])], emacs_pending_output=new, []) |
| 3534 | 3535 | ||
| 3535 | if test $emacs_pending_output = unknown; then | 3536 | if test $emacs_pending_output = unknown; then |
| 3536 | case $opsys in | 3537 | case $opsys in |
| @@ -3550,22 +3551,51 @@ case $opsys in | |||
| 3550 | case $emacs_pending_output in | 3551 | case $emacs_pending_output in |
| 3551 | new) | 3552 | new) |
| 3552 | dnl New C libio names. | 3553 | dnl New C libio names. |
| 3553 | AC_DEFINE(GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE), | 3554 | AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), |
| 3554 | [((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)]) | 3555 | [((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)]) |
| 3555 | ;; | 3556 | ;; |
| 3556 | uclibc) | 3557 | uclibc) |
| 3557 | dnl Using the uClibc library. | 3558 | dnl Using the uClibc library. |
| 3558 | AC_DEFINE(GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE), | 3559 | AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), |
| 3559 | [((FILE)->__bufpos - (FILE)->__bufstart)]) | 3560 | [((FILE)->__bufpos - (FILE)->__bufstart)]) |
| 3560 | ;; | 3561 | ;; |
| 3561 | old) | 3562 | old) |
| 3562 | dnl Old C++ iostream names. | 3563 | dnl Old C++ iostream names. |
| 3563 | AC_DEFINE(GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE), | 3564 | AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), |
| 3564 | [((FILE)->_pptr - (FILE)->_pbase)]) | 3565 | [((FILE)->_pptr - (FILE)->_pbase)]) |
| 3565 | ;; | 3566 | ;; |
| 3566 | esac | 3567 | esac |
| 3567 | ;; | 3568 | ;; |
| 3568 | esac | 3569 | esac dnl opsys |
| 3570 | |||
| 3571 | if test $emacs_pending_output = unknown; then | ||
| 3572 | AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->__bufp - (FILE)->__buffer)]) | ||
| 3573 | fi | ||
| 3574 | |||
| 3575 | else dnl !emacs_glibc | ||
| 3576 | |||
| 3577 | case $opsys in | ||
| 3578 | cygwin | darwin | freebsd | netbsd | openbsd ) | ||
| 3579 | AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->_p - (FILE)->_bf._base)]) | ||
| 3580 | ;; | ||
| 3581 | |||
| 3582 | unixware) | ||
| 3583 | AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->__ptr - (FILE)->__base)]) | ||
| 3584 | ;; | ||
| 3585 | |||
| 3586 | *) | ||
| 3587 | dnl HAVE_STDIO_EXT_H && HAVE___FPENDING | ||
| 3588 | if test x$ac_cv_header_stdio_ext_h = xyes && \ | ||
| 3589 | test x$ac_cv_func___fpending = xyes; then | ||
| 3590 | AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [__fpending (FILE)]) | ||
| 3591 | AC_DEFINE(DISPNEW_NEEDS_STDIO_EXT, 1, | ||
| 3592 | [Define if dispnew.c should include stdio_ext.h.]) | ||
| 3593 | else | ||
| 3594 | AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->_ptr - (FILE)->_base)]) | ||
| 3595 | fi | ||
| 3596 | ;; | ||
| 3597 | esac | ||
| 3598 | fi dnl emacs_glibc | ||
| 3569 | 3599 | ||
| 3570 | 3600 | ||
| 3571 | dnl Used in vm-limit.c | 3601 | dnl Used in vm-limit.c |
diff --git a/nt/ChangeLog b/nt/ChangeLog index ffdfb5dcab2..11d62250c20 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-08-06 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * config.nt (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Remove. | ||
| 4 | (PENDING_OUTPUT_COUNT): Define it as dispnew.c used to. | ||
| 5 | |||
| 1 | 2012-08-04 Eli Zaretskii <eliz@gnu.org> | 6 | 2012-08-04 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * paths.h (PATH_LOADSEARCH, PATH_SITELOADSEARCH, PATH_EXEC) | 8 | * paths.h (PATH_LOADSEARCH, PATH_SITELOADSEARCH, PATH_EXEC) |
diff --git a/nt/config.nt b/nt/config.nt index abc90687e3f..f0bcce7a285 100644 --- a/nt/config.nt +++ b/nt/config.nt | |||
| @@ -211,9 +211,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 211 | whether the gnulib module scanf shall be considered present. */ | 211 | whether the gnulib module scanf shall be considered present. */ |
| 212 | #undef GNULIB_SCANF | 212 | #undef GNULIB_SCANF |
| 213 | 213 | ||
| 214 | /* Value of PENDING_OUTPUT_COUNT if using the GNU C library. */ | ||
| 215 | #undef GNU_LIBRARY_PENDING_OUTPUT_COUNT | ||
| 216 | |||
| 217 | /* Define if ths system is compatible with GNU/Linux. */ | 214 | /* Define if ths system is compatible with GNU/Linux. */ |
| 218 | #undef GNU_LINUX | 215 | #undef GNU_LINUX |
| 219 | 216 | ||
| @@ -1229,7 +1226,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1229 | #undef PACKAGE_VERSION | 1226 | #undef PACKAGE_VERSION |
| 1230 | 1227 | ||
| 1231 | /* Number of chars of output in the buffer of a stdio stream. */ | 1228 | /* Number of chars of output in the buffer of a stdio stream. */ |
| 1232 | #undef PENDING_OUTPUT_COUNT | 1229 | #ifdef __GNU_LIBRARY__ |
| 1230 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufp - (FILE)->__buffer) | ||
| 1231 | #else | ||
| 1232 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base) | ||
| 1233 | #endif | ||
| 1233 | 1234 | ||
| 1234 | /* Define to empty to suppress deprecation warnings when building with | 1235 | /* Define to empty to suppress deprecation warnings when building with |
| 1235 | --enable-gcc-warnings and with libpng versions before 1.5, which lack | 1236 | --enable-gcc-warnings and with libpng versions before 1.5, which lack |
diff --git a/src/ChangeLog b/src/ChangeLog index d08802f5f56..ec3f08fc6a0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-08-06 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT): | ||
| 4 | Let configure handle it. | ||
| 5 | (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it. | ||
| 6 | |||
| 1 | 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru> | 7 | 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 8 | ||
| 3 | Use GCALIGNMENT where appropriate. | 9 | Use GCALIGNMENT where appropriate. |
diff --git a/src/dispnew.c b/src/dispnew.c index 10206ecd43b..d06ab594b2f 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -65,33 +65,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 65 | #include "systime.h" | 65 | #include "systime.h" |
| 66 | #include <errno.h> | 66 | #include <errno.h> |
| 67 | 67 | ||
| 68 | /* Get number of chars of output now in the buffer of a stdio stream. | 68 | #ifdef DISPNEW_NEEDS_STDIO_EXT |
| 69 | This ought to be built in stdio, but it isn't. Some s- files | ||
| 70 | override this because their stdio internals differ. */ | ||
| 71 | #ifdef __GNU_LIBRARY__ | ||
| 72 | |||
| 73 | /* The s- file might have overridden the definition with one that | ||
| 74 | works for the system's C library. But we are using the GNU C | ||
| 75 | library, so this is the right definition for every system. */ | ||
| 76 | #ifdef GNU_LIBRARY_PENDING_OUTPUT_COUNT | ||
| 77 | #define PENDING_OUTPUT_COUNT GNU_LIBRARY_PENDING_OUTPUT_COUNT | ||
| 78 | #else | ||
| 79 | #undef PENDING_OUTPUT_COUNT | ||
| 80 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufp - (FILE)->__buffer) | ||
| 81 | #endif | ||
| 82 | |||
| 83 | /* not __GNU_LIBRARY__ and no PENDING_OUTPUT_COUNT defined */ | ||
| 84 | #elif !defined (PENDING_OUTPUT_COUNT) | ||
| 85 | |||
| 86 | #if HAVE_STDIO_EXT_H && HAVE___FPENDING | ||
| 87 | #include <stdio_ext.h> | 69 | #include <stdio_ext.h> |
| 88 | #define PENDING_OUTPUT_COUNT(FILE) __fpending (FILE) | ||
| 89 | #else | ||
| 90 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base) | ||
| 91 | #endif | 70 | #endif |
| 92 | 71 | ||
| 93 | #endif /* not __GNU_LIBRARY__ and no PENDING_OUTPUT_COUNT defined */ | ||
| 94 | |||
| 95 | #if defined (HAVE_TERM_H) && defined (GNU_LINUX) | 72 | #if defined (HAVE_TERM_H) && defined (GNU_LINUX) |
| 96 | #include <term.h> /* for tgetent */ | 73 | #include <term.h> /* for tgetent */ |
| 97 | #endif | 74 | #endif |