[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110800: Simplify by assuming __fpend
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110800: Simplify by assuming __fpending. |
Date: |
Sun, 04 Nov 2012 17:59:00 -0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110800
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sun 2012-11-04 17:59:00 -0800
message:
Simplify by assuming __fpending.
Now that Emacs is using the gnulib fpending module,
there's no need for Emacs to have a separate implementation.
* configure.ac (stdio_ext.h, __fpending): Remove now-duplicate checks.
(PENDING_OUTPUT_COUNT, DISPNEW_NEEDS_STDIO_EXT): Remove.
* admin/CPP-DEFINES (PENDING_OUTPUT_COUNT): Remove.
* src/dispnew.c: Include <fpending.h>, not <stdio_ext.h>.
(update_frame_1): Use __fpending, not PENDING_OUTPUT_COUNT.
Do not assume that __fpending's result fits in int.
modified:
ChangeLog
admin/CPP-DEFINES
admin/ChangeLog
configure.ac
src/ChangeLog
src/dispnew.c
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-11-03 20:48:03 +0000
+++ b/ChangeLog 2012-11-05 01:59:00 +0000
@@ -1,3 +1,11 @@
+2012-11-05 Paul Eggert <address@hidden>
+
+ Simplify by assuming __fpending.
+ Now that Emacs is using the gnulib fpending module,
+ there's no need for Emacs to have a separate implementation.
+ * configure.ac (stdio_ext.h, __fpending): Remove now-duplicate checks.
+ (PENDING_OUTPUT_COUNT, DISPNEW_NEEDS_STDIO_EXT): Remove.
+
2012-11-03 Eli Zaretskii <address@hidden>
* lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/fpending.$(O) and
=== modified file 'admin/CPP-DEFINES'
--- a/admin/CPP-DEFINES 2012-09-16 21:43:55 +0000
+++ b/admin/CPP-DEFINES 2012-11-05 01:59:00 +0000
@@ -425,7 +425,6 @@
O_RDONLY
O_RDWR
PAGESIZE
-PENDING_OUTPUT_COUNT
PREFER_VSUSP
PTY_ITERATION
PTY_NAME_SPRINTF
=== modified file 'admin/ChangeLog'
--- a/admin/ChangeLog 2012-11-03 19:19:05 +0000
+++ b/admin/ChangeLog 2012-11-05 01:59:00 +0000
@@ -1,3 +1,8 @@
+2012-11-05 Paul Eggert <address@hidden>
+
+ Simplify by assuming __fpending.
+ * CPP-DEFINES (PENDING_OUTPUT_COUNT): Remove.
+
2012-11-03 Glenn Morris <address@hidden>
* admin.el (set-copyright): Add msdos/sed2v2.inp.
=== modified file 'configure.ac'
--- a/configure.ac 2012-11-02 00:48:12 +0000
+++ b/configure.ac 2012-11-05 01:59:00 +0000
@@ -1266,7 +1266,7 @@
dnl checks for header files
AC_CHECK_HEADERS_ONCE(
linux/version.h sys/systeminfo.h
- stdio_ext.h fcntl.h coff.h pty.h
+ fcntl.h coff.h pty.h
sys/vlimit.h sys/resource.h
sys/utsname.h pwd.h utmp.h dirent.h util.h)
@@ -2874,7 +2874,7 @@
lrand48 setsid \
fpathconf select euidaccess getpagesize setlocale \
utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \
-__fpending strsignal setitimer \
+strsignal setitimer \
sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
gai_strerror mkstemp getline getdelim fsync sync \
difftime posix_memalign \
@@ -3650,100 +3650,6 @@
esac
-dnl Used in dispnew.c
-AH_TEMPLATE(PENDING_OUTPUT_COUNT, [Number of chars of output in the
- buffer of a stdio stream.])
-
-AC_MSG_CHECKING([whether we are using the GNU C library])
-AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
-#include <features.h>
-#ifndef __GNU_LIBRARY__
-# error "this is not the GNU C library"
-#endif
- ]], [[]])], emacs_glibc=yes, emacs_glibc=no)
-AC_MSG_RESULT([$emacs_glibc])
-
-if test $emacs_glibc = yes; then
-
- emacs_pending_output=unknown
-
- case $opsys in
- gnu | gnu-linux | gnu-kfreebsd )
- AC_MSG_CHECKING([for style of pending output formalism])
- dnl In autoconf 2.67 and later, we could use a single test
- dnl since the preprocessed output is accessible in "conftest.i".
- AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-#if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM)
-# error "stdio definitions not found"
-#endif
- ]], [[]])], emacs_pending_output=new, [])
-
- if test $emacs_pending_output = unknown; then
- case $opsys in
- gnu-linux | gnu-kfreebsd)
- AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-#ifndef __UCLIBC__
-# error "not using uclibc"
-#endif
- ]], [[]])], emacs_pending_output=uclibc, emacs_pending_output=old)
- ;;
- esac
- fi
-
- AC_MSG_RESULT([$emacs_pending_output])
-
- case $emacs_pending_output in
- new)
- dnl New C libio names.
- AC_DEFINE(PENDING_OUTPUT_COUNT(FILE),
- [((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)])
- ;;
- uclibc)
- dnl Using the uClibc library.
- AC_DEFINE(PENDING_OUTPUT_COUNT(FILE),
- [((FILE)->__bufpos - (FILE)->__bufstart)])
- ;;
- old)
- dnl Old C++ iostream names.
- AC_DEFINE(PENDING_OUTPUT_COUNT(FILE),
- [((FILE)->_pptr - (FILE)->_pbase)])
- ;;
- esac
- ;;
- esac dnl opsys
-
- if test $emacs_pending_output = unknown; then
- AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->__bufp -
(FILE)->__buffer)])
- fi
-
-else dnl !emacs_glibc
-
- case $opsys in
- cygwin | darwin | freebsd | netbsd | openbsd )
- AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->_p - (FILE)->_bf._base)])
- ;;
-
- unixware)
- AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->__ptr - (FILE)->__base)])
- ;;
-
- *)
- dnl HAVE_STDIO_EXT_H && HAVE___FPENDING
- if test x$ac_cv_header_stdio_ext_h = xyes && \
- test x$ac_cv_func___fpending = xyes; then
- AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [__fpending (FILE)])
- AC_DEFINE(DISPNEW_NEEDS_STDIO_EXT, 1,
- [Define if dispnew.c should include stdio_ext.h.])
- else
- AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->_ptr - (FILE)->_base)])
- fi
- ;;
- esac
-fi dnl emacs_glibc
-
-
dnl Used in vm-limit.c
AH_TEMPLATE(DATA_START, [Address of the start of the data segment.])
dnl Used in lisp.h, emacs.c, mem-limits.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-11-04 22:33:00 +0000
+++ b/src/ChangeLog 2012-11-05 01:59:00 +0000
@@ -1,3 +1,10 @@
+2012-11-05 Paul Eggert <address@hidden>
+
+ Simplify by assuming __fpending.
+ * dispnew.c: Include <fpending.h>, not <stdio_ext.h>.
+ (update_frame_1): Use __fpending, not PENDING_OUTPUT_COUNT.
+ Do not assume that __fpending's result fits in int.
+
2012-11-04 Paul Eggert <address@hidden>
Remove EMACS_OUTQSIZE+sleep hack.
=== modified file 'src/dispnew.c'
--- a/src/dispnew.c 2012-11-04 22:33:00 +0000
+++ b/src/dispnew.c 2012-11-05 01:59:00 +0000
@@ -53,9 +53,7 @@
#include "systime.h"
#include <errno.h>
-#ifdef DISPNEW_NEEDS_STDIO_EXT
-#include <stdio_ext.h>
-#endif
+#include <fpending.h>
#if defined (HAVE_TERM_H) && defined (GNU_LINUX)
#include <term.h> /* for tgetent */
@@ -4647,7 +4645,7 @@
FILE *display_output = FRAME_TTY (f)->output;
if (display_output)
{
- int outq = PENDING_OUTPUT_COUNT (display_output);
+ ptrdiff_t outq = __fpending (display_output);
if (outq > 900
|| (outq > 20 && ((i - 1) % preempt_count == 0)))
fflush (display_output);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110800: Simplify by assuming __fpending.,
Paul Eggert <=