Now on revision 109067. ------------------------------------------------------------ revno: 109067 committer: Paul Eggert branch nick: trunk timestamp: Thu 2012-07-12 20:50:58 -0700 message: * xdisp.c (produce_special_glyphs): Now static. * dispextern.h (produce_special_glyphs): Remove decl. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-13 02:38:30 +0000 +++ src/ChangeLog 2012-07-13 03:50:58 +0000 @@ -1,3 +1,8 @@ +2012-07-13 Paul Eggert + + * xdisp.c (produce_special_glyphs): Now static. + * dispextern.h (produce_special_glyphs): Remove decl. + 2012-07-13 Glenn Morris * s/bsd-common, s/cygwin.h: Remove empty files. === modified file 'src/dispextern.h' --- src/dispextern.h 2012-07-08 16:38:43 +0000 +++ src/dispextern.h 2012-07-13 03:50:58 +0000 @@ -3065,7 +3065,6 @@ extern ptrdiff_t compute_display_string_end (ptrdiff_t, struct bidi_string_data *); extern void produce_stretch_glyph (struct it *); -extern void produce_special_glyphs (struct it *, enum display_element_type); #ifdef HAVE_WINDOW_SYSTEM === modified file 'src/xdisp.c' --- src/xdisp.c 2012-07-12 19:55:01 +0000 +++ src/xdisp.c 2012-07-13 03:50:58 +0000 @@ -951,6 +951,7 @@ #endif /* HAVE_WINDOW_SYSTEM */ +static void produce_special_glyphs (struct it *, enum display_element_type); static void show_mouse_face (Mouse_HLInfo *, enum draw_glyphs_face); static int coords_in_mouse_face_p (struct window *, int, int); @@ -24179,7 +24180,7 @@ non-null glyph_row member. This function ensures that fields like face_id, c, len of IT are left untouched. */ -void +static void produce_special_glyphs (struct it *it, enum display_element_type what) { struct it temp_it; ------------------------------------------------------------ revno: 109066 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 19:38:30 -0700 message: Remove some src/s files that are now empty * configure.ac (opsysfile): Set to empty on gnu, cygwin. * src/s/bsd-common, src/s/cygwin.h: Remove empty files. * src/s/freebsd.h, src/s/netbsd.h: Do not include bsd-common.h. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-13 02:34:05 +0000 +++ ChangeLog 2012-07-13 02:38:30 +0000 @@ -1,5 +1,7 @@ 2012-07-13 Glenn Morris + * configure.ac (opsysfile): Set to empty on gnu, cygwin. + * configure.ac (BSD4_2, BSD_SYSTEM, USG, USG5, _AIX, CYGWIN) (DARWIN_OS, GNU_LINUX, HPUX, IRIX6_5, SOLARIS2): Move "system type" macros here from src/s. === modified file 'configure.ac' --- configure.ac 2012-07-13 02:34:05 +0000 +++ configure.ac 2012-07-13 02:38:30 +0000 @@ -3615,6 +3615,7 @@ ;; cygwin) + opsysfile= AC_DEFINE(CYGWIN, 1, [Define if the system is Cygwin.]) ;; @@ -3687,7 +3688,7 @@ using GTK.]) ;; - gnu) opsysfile="s/bsd-common.h" ;; + gnu) opsysfile= ;; gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;; === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-13 02:34:05 +0000 +++ src/ChangeLog 2012-07-13 02:38:30 +0000 @@ -1,5 +1,8 @@ 2012-07-13 Glenn Morris + * s/bsd-common, s/cygwin.h: Remove empty files. + * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h. + * s/usg5-4-common.h (USG, USG5): * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM): * s/sol2-6.h (SOLARIS2): === removed file 'src/s/bsd-common.h' --- src/s/bsd-common.h 2012-07-13 02:34:05 +0000 +++ src/s/bsd-common.h 1970-01-01 00:00:00 +0000 @@ -1,20 +0,0 @@ -/* Definitions file for GNU Emacs running on bsd 4.3 - -Copyright (C) 1985-1986, 2001-2012 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 . */ - - === removed file 'src/s/cygwin.h' --- src/s/cygwin.h 2012-07-13 02:34:05 +0000 +++ src/s/cygwin.h 1970-01-01 00:00:00 +0000 @@ -1,20 +0,0 @@ -/* System description header file for Cygwin. - -Copyright (C) 1985-1986, 1992, 1999, 2002-2012 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 . */ - - === modified file 'src/s/freebsd.h' --- src/s/freebsd.h 2012-07-13 02:34:05 +0000 +++ src/s/freebsd.h 2012-07-13 02:38:30 +0000 @@ -20,9 +20,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* Get most of the stuff from bsd-common */ -#include "bsd-common.h" - /* Tell that garbage collector that setjmp is known to save all registers relevant for conservative garbage collection in the jmp_buf. */ #define GC_SETJMP_WORKS 1 === modified file 'src/s/netbsd.h' --- src/s/netbsd.h 2012-07-11 02:29:13 +0000 +++ src/s/netbsd.h 2012-07-13 02:38:30 +0000 @@ -17,10 +17,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ - -/* Get most of the stuff from bsd-common. */ -#include "bsd-common.h" - /* Greg A. Woods says we must include signal.h before syssignal.h is included, to work around interface conflicts that are handled with CPP __RENAME() macro in signal.h. */ ------------------------------------------------------------ revno: 109065 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 19:34:05 -0700 message: Move "system type" macros from src/s to configure * configure.ac (BSD4_2, BSD_SYSTEM, USG, USG5, _AIX, CYGWIN) (DARWIN_OS, GNU_LINUX, HPUX, IRIX6_5, SOLARIS2): Move "system type" macros here from src/s. (BSD_SYSTEM_AHB): New hack macro. (AH_BOTTOM): Set BSD_SYSTEM, using BSD_SYSTEM_AHB. * src/s/usg5-4-common.h (USG, USG5): * src/s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM): * src/s/sol2-6.h (SOLARIS2): * src/s/irix6-5.h (IRIX6_5): * src/s/hpux10-20.h (USG, USG5, HPUX): * src/s/gnu-linux.h (USG, GNU_LINUX): * src/s/freebsd.h (BSD_SYSTEM): * src/s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS): * src/s/cygwin.h (CYGWIN): * src/s/bsd-common.h (BSD_SYSTEM, BSD4_2): * src/s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-13 01:19:06 +0000 +++ ChangeLog 2012-07-13 02:34:05 +0000 @@ -1,5 +1,11 @@ 2012-07-13 Glenn Morris + * configure.ac (BSD4_2, BSD_SYSTEM, USG, USG5, _AIX, CYGWIN) + (DARWIN_OS, GNU_LINUX, HPUX, IRIX6_5, SOLARIS2): + Move "system type" macros here from src/s. + (BSD_SYSTEM_AHB): New hack macro. + (AH_BOTTOM): Set BSD_SYSTEM, using BSD_SYSTEM_AHB. + * configure.ac (NSIG_MINIMUM, ULIMIT_BREAK_VALUE): Move here from src/s. === modified file 'configure.ac' --- configure.ac 2012-07-13 01:19:06 +0000 +++ configure.ac 2012-07-13 02:34:05 +0000 @@ -3481,7 +3481,7 @@ 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 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 @@ -3595,6 +3595,87 @@ esac +dnl Define symbols to identify the version of Unix this is. +dnl Define all the symbols that apply correctly. +AH_TEMPLATE(BSD4_2, [Define if the system is compatible with BSD 4.2.]) +AH_TEMPLATE(BSD_SYSTEM, [Define if the system is compatible with BSD 4.2.]) +AH_TEMPLATE(USG, [Define if the system is compatible with System III.]) +AH_TEMPLATE(USG5, [Define if the system is compatible with System V.]) + +case $opsys in + aix4-2) + AC_DEFINE(USG, []) + AC_DEFINE(USG5, []) + dnl This symbol should be defined on AIX Version 3 ??????? + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ +#ifndef _AIX +# error "_AIX not defined" +#endif + ]], [[]])], [], AC_DEFINE(_AIX, [], [Define if the system is AIX.])) + ;; + + cygwin) + AC_DEFINE(CYGWIN, 1, [Define if the system is Cygwin.]) + ;; + + darwin) + dnl BSD4_3 and BSD4_4 are already defined in sys/param.h. + AC_DEFINE(BSD4_2, []) + AC_DEFINE(BSD_SYSTEM, []) + dnl More specific than the above two. We cannot use __APPLE__ as this + dnl may not be defined on non-OSX Darwin, and we cannot define DARWIN + dnl here because Panther and lower CoreFoundation.h uses DARWIN to + dnl distinguish OS X from pure Darwin. + AC_DEFINE(DARWIN_OS, [], [Define if the system is Darwin.]) + ;; + + freebsd) + AC_DEFINE(BSD4_2, []) + dnl Hack to avoid calling AC_PREPROC_IFELSE multiple times. + dnl Would not be needed with autoconf >= 2.67, where the + dnl preprocessed output is accessible in "conftest.i". + AC_DEFINE(BSD_SYSTEM_AHB, 1, [Define if AH_BOTTOM should change BSD_SYSTEM.]) + ;; + + gnu | netbsd | openbsd ) + AC_DEFINE(BSD4_2, []) + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ +#ifndef BSD_SYSTEM +# error "BSD_SYSTEM not defined" +#endif + ]], [[]])], [], AC_DEFINE(BSD_SYSTEM, 43) ) + ;; + + gnu-linux | gnu-kfreebsd ) + AC_DEFINE(USG, []) + AC_DEFINE(GNU_LINUX, [], [Define if ths system is compatible with GNU/Linux.]) + ;; + + hpux*) + AC_DEFINE(USG, []) + AC_DEFINE(USG5, []) + AC_DEFINE(HPUX, [], [Define if the system is HPUX.]) + ;; + + irix6-5) + AC_DEFINE(USG, []) + AC_DEFINE(USG5, []) + AC_DEFINE(IRIX6_5, [], [Define if the system is IRIX.]) + ;; + + sol2*) + AC_DEFINE(USG, []) + AC_DEFINE(USG5, []) + AC_DEFINE(SOLARIS2, [], [Define if the system is Solaris.]) + ;; + + unixware) + AC_DEFINE(USG, []) + AC_DEFINE(USG5, []) + ;; +esac + + case $opsys in dnl Emacs supplies its own malloc, but glib (part of Gtk+) calls dnl memalign and on Cygwin, that becomes the Cygwin-supplied memalign. @@ -4035,6 +4116,19 @@ # error "alloca not available on this machine" #endif +/* This silences a few compilation warnings on FreeBSD. */ +#ifdef BSD_SYSTEM_AHB +#undef BSD_SYSTEM_AHB +#undef BSD_SYSTEM +#if __FreeBSD__ == 1 +#define BSD_SYSTEM 199103 +#elif __FreeBSD__ == 2 +#define BSD_SYSTEM 199306 +#elif __FreeBSD__ >= 3 +#define BSD_SYSTEM 199506 +#endif +#endif + /* Define AMPERSAND_FULL_NAME if you use the convention that & in the full name stands for the login id. */ /* Turned on June 1996 supposing nobody will mind it. */ === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-13 02:23:57 +0000 +++ src/ChangeLog 2012-07-13 02:34:05 +0000 @@ -1,3 +1,17 @@ +2012-07-13 Glenn Morris + + * s/usg5-4-common.h (USG, USG5): + * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM): + * s/sol2-6.h (SOLARIS2): + * s/irix6-5.h (IRIX6_5): + * s/hpux10-20.h (USG, USG5, HPUX): + * s/gnu-linux.h (USG, GNU_LINUX): + * s/freebsd.h (BSD_SYSTEM): + * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS): + * s/cygwin.h (CYGWIN): + * s/bsd-common.h (BSD_SYSTEM, BSD4_2): + * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure. + 2012-07-13 BT Templeton (tiny change) * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853). === modified file 'src/s/aix4-2.h' --- src/s/aix4-2.h 2012-07-12 21:14:13 +0000 +++ src/s/aix4-2.h 2012-07-13 02:34:05 +0000 @@ -16,19 +16,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* Define symbols to identify the version of Unix this is. - Define all the symbols that apply correctly. */ -#define USG /* System III, System V, etc */ -#define USG5 - -/* This symbol should be defined on AIX Version 3 ??????? */ -#ifndef _AIX -#define _AIX -#endif - - -/* Special items needed to make Emacs run on this system. */ - /* Perry Smith says these are correct. */ #undef sigmask === modified file 'src/s/bsd-common.h' --- src/s/bsd-common.h 2012-07-12 06:34:40 +0000 +++ src/s/bsd-common.h 2012-07-13 02:34:05 +0000 @@ -18,21 +18,3 @@ along with GNU Emacs. If not, see . */ -/* Define symbols to identify the version of Unix this is. - Define all the symbols that apply correctly. */ - -/* We give these symbols the numeric values found in to - avoid warnings about redefined macros. */ - -/* Nothing in Emacs uses this any more. - ifndef BSD4_3 - define BSD4_3 1 - endif -*/ - -#ifndef BSD_SYSTEM -#define BSD_SYSTEM 43 -#endif /* BSD_SYSTEM */ - -/* For mem-limits.h. */ -#define BSD4_2 === modified file 'src/s/cygwin.h' --- src/s/cygwin.h 2012-07-12 07:43:05 +0000 +++ src/s/cygwin.h 2012-07-13 02:34:05 +0000 @@ -17,5 +17,4 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* Used in various places to enable cygwin-specific code changes. */ -#define CYGWIN 1 + === modified file 'src/s/darwin.h' --- src/s/darwin.h 2012-07-13 00:07:29 +0000 +++ src/s/darwin.h 2012-07-13 02:34:05 +0000 @@ -17,19 +17,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ - -/* Define symbols to identify the version of Unix this is. - Define all the symbols that apply correctly. */ -#define BSD4_2 -/* BSD4_3 and BSD4_4 are already defined in sys/param.h */ -#define BSD_SYSTEM - -/* More specific than the above two. We cannot use __APPLE__ as this - may not be defined on non-OSX Darwin, and we cannot define DARWIN - here because Panther and lower CoreFoundation.h uses DARWIN to - distinguish OS X from pure Darwin. */ -#define DARWIN_OS - /* Definitions for how to compile & link. */ #ifdef emacs #define malloc unexec_malloc === modified file 'src/s/freebsd.h' --- src/s/freebsd.h 2012-07-12 02:14:29 +0000 +++ src/s/freebsd.h 2012-07-13 02:34:05 +0000 @@ -23,16 +23,6 @@ /* Get most of the stuff from bsd-common */ #include "bsd-common.h" -/* This silences a few compilation warnings. */ -#undef BSD_SYSTEM -#if __FreeBSD__ == 1 -#define BSD_SYSTEM 199103 -#elif __FreeBSD__ == 2 -#define BSD_SYSTEM 199306 -#elif __FreeBSD__ >= 3 -#define BSD_SYSTEM 199506 -#endif - /* Tell that garbage collector that setjmp is known to save all registers relevant for conservative garbage collection in the jmp_buf. */ #define GC_SETJMP_WORKS 1 === modified file 'src/s/gnu-linux.h' --- src/s/gnu-linux.h 2012-07-13 00:19:10 +0000 +++ src/s/gnu-linux.h 2012-07-13 02:34:05 +0000 @@ -20,18 +20,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* Define symbols to identify the version of Unix this is. - Define all the symbols that apply correctly. */ -#define USG -#define GNU_LINUX - -/* Here, on a separate page, add any special hacks needed - to make Emacs work on this system. For example, - you might define certain system call names that don't - exist on your system, or that do different things on - your system and must be used only through an encapsulation - (Which you should place, by convention, in sysdep.c). */ - #ifdef __ia64__ #define GC_MARK_SECONDARY_STACK() \ do { \ === modified file 'src/s/hpux10-20.h' --- src/s/hpux10-20.h 2012-07-12 21:14:13 +0000 +++ src/s/hpux10-20.h 2012-07-13 02:34:05 +0000 @@ -17,15 +17,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ - -/* Define symbols to identify the version of Unix this is. - Define all the symbols that apply correctly. */ -#define USG /* System III, System V, etc */ -#define USG5 -#define HPUX - -/* Special hacks needed to make Emacs run on this system. */ - /* We have to go this route, rather than hpux9's approach of renaming the functions via macros. The system's stdlib.h has fully prototyped declarations, which yields a conflicting definition of srand48; it === modified file 'src/s/irix6-5.h' --- src/s/irix6-5.h 2012-07-13 00:19:10 +0000 +++ src/s/irix6-5.h 2012-07-13 02:34:05 +0000 @@ -17,8 +17,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ - -#define IRIX6_5 /* used in m/iris4d */ #include "usg5-4-common.h" #undef _longjmp /* use system versions, not conservative aliases */ === modified file 'src/s/sol2-6.h' --- src/s/sol2-6.h 2012-07-12 07:43:05 +0000 +++ src/s/sol2-6.h 2012-07-13 02:34:05 +0000 @@ -19,6 +19,4 @@ #include "usg5-4-common.h" -#define SOLARIS2 - #define GC_SETJMP_WORKS 1 === modified file 'src/s/template.h' --- src/s/template.h 2012-07-12 06:34:40 +0000 +++ src/s/template.h 2012-07-13 02:34:05 +0000 @@ -19,16 +19,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ - -/* Define symbols to identify the version of Unix this is. - Define all the symbols that apply correctly. */ - -/* #define USG5 */ -/* #define USG */ -/* #define HPUX */ -/* #define BSD4_2 */ -/* #define BSD_SYSTEM */ - /* subprocesses should be undefined if you do NOT want to have code for asynchronous subprocesses (as used in M-x compile and M-x shell). === modified file 'src/s/usg5-4-common.h' --- src/s/usg5-4-common.h 2012-07-13 01:19:06 +0000 +++ src/s/usg5-4-common.h 2012-07-13 02:34:05 +0000 @@ -20,13 +20,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* Use the SysVr3 file for at least base configuration. */ -#define USG /* System III, System V, etc */ - -#define USG5 -/* Nothing in Emacs use this any more. */ -/* #define USG5_4 */ - /* setjmp and longjmp can safely replace _setjmp and _longjmp, but they will run slower. */ #define _setjmp setjmp ------------------------------------------------------------ revno: 109064 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 19:23:57 -0700 message: ChangeLog fix diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-13 01:37:11 +0000 +++ src/ChangeLog 2012-07-13 02:23:57 +0000 @@ -1,7 +1,6 @@ -2012-07-13 Paul Eggert +2012-07-13 BT Templeton (tiny change) * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853). - Report and trivial fix by BT Templeton. 2012-07-13 Glenn Morris ------------------------------------------------------------ revno: 109063 fixes bug(s): http://debbugs.gnu.org/11853 committer: Paul Eggert branch nick: trunk timestamp: Thu 2012-07-12 18:37:11 -0700 message: * nsfont.m (ns_charset_covers): Don't abort if no bitmap. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-13 01:19:06 +0000 +++ src/ChangeLog 2012-07-13 01:37:11 +0000 @@ -1,3 +1,8 @@ +2012-07-13 Paul Eggert + + * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853). + Report and trivial fix by BT Templeton. + 2012-07-13 Glenn Morris * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it. === modified file 'src/nsfont.m' --- src/nsfont.m 2012-07-05 18:35:48 +0000 +++ src/nsfont.m 2012-07-13 01:37:11 +0000 @@ -271,6 +271,11 @@ const unsigned short *bytes2 = [[set2 bitmapRepresentation] bytes]; int i, off = 0, tot = 0; + /* Work around what appears to be a GNUstep bug. + See . */ + if (! (bytes1 && bytes2)) + return NO; + for (i=0; i<4096; i++, bytes1++, bytes2++) if (*bytes2) { ------------------------------------------------------------ revno: 109062 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 21:19:06 -0400 message: Move NSIG_MINIMUM from src/s to configure * configure.ac (NSIG_MINIMUM): Move here from src/s. * src/s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-13 00:19:10 +0000 +++ ChangeLog 2012-07-13 01:19:06 +0000 @@ -1,6 +1,7 @@ 2012-07-13 Glenn Morris - * configure.ac (ULIMIT_BREAK_VALUE): Move here from src/s. + * configure.ac (NSIG_MINIMUM, ULIMIT_BREAK_VALUE): + Move here from src/s. 2012-07-12 Glenn Morris === modified file 'configure.ac' --- configure.ac 2012-07-13 00:19:10 +0000 +++ configure.ac 2012-07-13 01:19:06 +0000 @@ -3171,7 +3171,15 @@ case $opsys in darwin | gnu | hpux* | *bsd ) AC_DEFINE(NO_TERMIO, 1, [Define if termio.h should not be included.]) - ;; + ;; + + irix6-5 | sol2* | unixware ) + dnl Some SVr4s don't define NSIG in sys/signal.h for ANSI environments; + dnl instead, there's a system variable _sys_nsig. Unfortunately, we + dnl need the constant to dimension an array. So wire in the appropriate + dnl value here. + AC_DEFINE(NSIG_MINIMUM, 32, [Minimum value of NSIG.]) + ;; esac === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-13 00:19:10 +0000 +++ src/ChangeLog 2012-07-13 01:19:06 +0000 @@ -1,5 +1,7 @@ 2012-07-13 Glenn Morris + * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it. + * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE. * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION. === modified file 'src/s/usg5-4-common.h' --- src/s/usg5-4-common.h 2012-07-12 07:43:05 +0000 +++ src/s/usg5-4-common.h 2012-07-13 01:19:06 +0000 @@ -46,11 +46,6 @@ #include #endif -/* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments; - instead, there's a system variable _sys_nsig. Unfortunately, we need the - constant to dimension an array. So wire in the appropriate value here. */ -#define NSIG_MINIMUM 32 - /* It is possible to receive SIGCHLD when there are no children waiting, because a previous waitsys(2) cleaned up the carcass of child without clearing the SIGCHLD pending info. So, use a non-blocking === modified file 'src/syssignal.h' --- src/syssignal.h 2012-07-12 01:18:45 +0000 +++ src/syssignal.h 2012-07-13 01:19:06 +0000 @@ -98,6 +98,7 @@ #endif +/* FIXME? Emacs only defines NSIG_MINIMUM on some platforms? */ #if NSIG < NSIG_MINIMUM # ifdef NSIG # undef NSIG ------------------------------------------------------------ revno: 109061 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 20:19:10 -0400 message: Move ULIMIT_BREAK_VALUE from src/s to configure * configure.ac (ULIMIT_BREAK_VALUE): Move here from src/s. * src/s/gnu-linux.h, src/s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-13 00:00:23 +0000 +++ ChangeLog 2012-07-13 00:19:10 +0000 @@ -1,3 +1,7 @@ +2012-07-13 Glenn Morris + + * configure.ac (ULIMIT_BREAK_VALUE): Move here from src/s. + 2012-07-12 Glenn Morris * configure.ac (AH_BOTTOM) [DARWIN_OS]: Move SYSTEM_PURESIZE_EXTRA === modified file 'configure.ac' --- configure.ac 2012-07-13 00:00:23 +0000 +++ configure.ac 2012-07-13 00:19:10 +0000 @@ -3545,6 +3545,7 @@ esac +AH_TEMPLATE(ULIMIT_BREAK_VALUE, [Undocumented.]) AH_TEMPLATE(TAB3, [Undocumented.]) case $opsys in @@ -3555,10 +3556,25 @@ AC_DEFINE(TAB3, OXTABS) ;; + gnu-linux | gnu-kfreebsd ) + dnl libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared + dnl library, we cannot get the maximum address for brk. + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ +#ifndef __i386__ +# error "not i386" +#endif + ]], [[]])], AC_DEFINE(ULIMIT_BREAK_VALUE, [(32*1024*1024)]), []) + ;; + hpux*) AC_DEFINE(RUN_TIME_REMAP, 1, [Define if emacs.c needs to call run_time_remap; for HPUX.]) ;; + + irix6-5) + dnl Ulimit(UL_GMEMLIM) is busted... + AC_DEFINE(ULIMIT_BREAK_VALUE, [0x14000000]) + ;; esac === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-13 00:07:29 +0000 +++ src/ChangeLog 2012-07-13 00:19:10 +0000 @@ -1,5 +1,7 @@ 2012-07-13 Glenn Morris + * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE. + * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION. * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro. === modified file 'src/s/gnu-linux.h' --- src/s/gnu-linux.h 2012-07-12 20:53:41 +0000 +++ src/s/gnu-linux.h 2012-07-13 00:19:10 +0000 @@ -57,9 +57,3 @@ #else #define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE #endif - -#ifdef __i386__ -/* libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared library, */ -/* we cannot get the maximum address for brk */ -# define ULIMIT_BREAK_VALUE (32*1024*1024) -#endif === modified file 'src/s/irix6-5.h' --- src/s/irix6-5.h 2012-07-12 07:43:05 +0000 +++ src/s/irix6-5.h 2012-07-13 00:19:10 +0000 @@ -30,9 +30,6 @@ char *_getpty(); #endif -/* Ulimit(UL_GMEMLIM) is busted... */ -#define ULIMIT_BREAK_VALUE 0x14000000 - #undef SA_RESTART /* not the same as defining BROKEN_SA_RESTART */ #undef TIOCSIGSEND /* defined in usg5-4-common.h */ ------------------------------------------------------------ revno: 109060 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 20:07:29 -0400 message: Remove macro MIN_PTY_KERNEL_VERSION, only used in one place * src/process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION. * src/s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-13 00:00:23 +0000 +++ src/ChangeLog 2012-07-13 00:07:29 +0000 @@ -1,3 +1,8 @@ +2012-07-13 Glenn Morris + + * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION. + * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro. + 2012-07-12 Glenn Morris * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure. === modified file 'src/process.c' --- src/process.c 2012-07-12 23:56:39 +0000 +++ src/process.c 2012-07-13 00:07:29 +0000 @@ -7398,8 +7398,7 @@ char const *release = (STRINGP (Voperating_system_release) ? SSDATA (Voperating_system_release) : 0); - if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION - && release[1] == '.')) { + if (!release || !release[0] || (release[0] < '7' && release[1] == '.')) { Vprocess_connection_type = Qnil; } } === modified file 'src/s/darwin.h' --- src/s/darwin.h 2012-07-13 00:00:23 +0000 +++ src/s/darwin.h 2012-07-13 00:07:29 +0000 @@ -30,10 +30,6 @@ distinguish OS X from pure Darwin. */ #define DARWIN_OS -/* PTYs only work correctly on Darwin 7 or higher. So make the default - for process-connection-type dependent on the kernel version. */ -#define MIN_PTY_KERNEL_VERSION '7' - /* Definitions for how to compile & link. */ #ifdef emacs #define malloc unexec_malloc ------------------------------------------------------------ revno: 109059 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 20:00:23 -0400 message: Move darwin.h's SYSTEM_PURESIZE_EXTRA setting to configure * configure.ac (AH_BOTTOM) [DARWIN_OS]: Move SYSTEM_PURESIZE_EXTRA setting here from src/s/darwin.h. * src/s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-12 21:14:13 +0000 +++ ChangeLog 2012-07-13 00:00:23 +0000 @@ -1,5 +1,8 @@ 2012-07-12 Glenn Morris + * configure.ac (AH_BOTTOM) [DARWIN_OS]: Move SYSTEM_PURESIZE_EXTRA + setting here from src/s/darwin.h. + * configure.ac (NO_MATHERR): Unconditionally define for Darwin; as src/s/darwin.h used to. === modified file 'configure.ac' --- configure.ac 2012-07-12 21:14:13 +0000 +++ configure.ac 2012-07-13 00:00:23 +0000 @@ -4029,13 +4029,14 @@ # include config_opsysfile #endif -/* GNUstep needs a bit more pure memory. Of the existing knobs, - SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. - (There is probably a better place to do this, but right now the - Cocoa side does this in s/darwin.h and we cannot parallel this - exactly since GNUstep is multi-OS. */ -#if defined HAVE_NS && defined NS_IMPL_GNUSTEP +/* Mac OS X / GNUstep need a bit more pure memory. Of the existing knobs, + SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */ +#ifdef HAVE_NS +#if defined NS_IMPL_GNUSTEP # define SYSTEM_PURESIZE_EXTRA 30000 +#elif defined DARWIN_OS +# define SYSTEM_PURESIZE_EXTRA 200000 +#endif #endif #ifdef emacs /* Don't do this for lib-src. */ === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-12 23:56:39 +0000 +++ src/ChangeLog 2012-07-13 00:00:23 +0000 @@ -1,5 +1,6 @@ 2012-07-12 Glenn Morris + * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure. * process.c (init_process_emacs): Rename from init_process. The old name is also the name of a Mach system call. === modified file 'src/s/darwin.h' --- src/s/darwin.h 2012-07-12 23:56:39 +0000 +++ src/s/darwin.h 2012-07-13 00:00:23 +0000 @@ -35,10 +35,6 @@ #define MIN_PTY_KERNEL_VERSION '7' /* Definitions for how to compile & link. */ -#ifdef HAVE_NS -#define SYSTEM_PURESIZE_EXTRA 200000 -#endif - #ifdef emacs #define malloc unexec_malloc #define realloc unexec_realloc ------------------------------------------------------------ revno: 109058 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 19:56:39 -0400 message: Rename init_process rather than working around it on Darwin The old name is also the name of a Mach system call. * src/process.c (init_process_emacs): Rename from init_process. * src/lisp.h, src/emacs.c: Update for this name change. * src/nsgui.h, src/sysselect.h, src/s/darwin.h: Remove workaround that is no longer needed. diff: === modified file 'admin/notes/multi-tty' --- admin/notes/multi-tty 2012-01-19 07:21:25 +0000 +++ admin/notes/multi-tty 2012-07-12 23:56:39 +0000 @@ -906,7 +906,7 @@ read_avail_input. (Fixed. This was caused by unconditionally including stdin in - input_wait_mask in init_process. The select call in + input_wait_mask in init_process_emacs. The select call in wait_reading_process_input always returned immediately, indicating that there is pending input from stdin, which nobody read. === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-12 21:14:13 +0000 +++ src/ChangeLog 2012-07-12 23:56:39 +0000 @@ -1,3 +1,12 @@ +2012-07-12 Glenn Morris + + + * process.c (init_process_emacs): Rename from init_process. + The old name is also the name of a Mach system call. + * lisp.h, emacs.c: Update for this name change. + * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no + longer needed. + 2012-07-12 Eli Zaretskii * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in === modified file 'src/emacs.c' --- src/emacs.c 2012-07-10 01:04:28 +0000 +++ src/emacs.c 2012-07-12 23:56:39 +0000 @@ -1597,8 +1597,8 @@ init_charset (); - init_editfns (); /* init_process uses Voperating_system_release. */ - init_process (); /* init_display uses add_keyboard_wait_descriptor. */ + init_editfns (); /* init_process_emacs uses Voperating_system_release. */ + init_process_emacs (); /* init_display uses add_keyboard_wait_descriptor. */ init_keyboard (); /* This too must precede init_sys_modes. */ if (!noninteractive) init_display (); /* Determine terminal type. Calls init_sys_modes. */ === modified file 'src/lisp.h' --- src/lisp.h 2012-07-11 07:37:39 +0000 +++ src/lisp.h 2012-07-12 23:56:39 +0000 @@ -3060,7 +3060,7 @@ extern void delete_gpm_wait_descriptor (int); #endif extern void close_process_descs (void); -extern void init_process (void); +extern void init_process_emacs (void); extern void syms_of_process (void); extern void setup_process_coding_systems (Lisp_Object); === modified file 'src/nsgui.h' --- src/nsgui.h 2012-01-19 07:21:25 +0000 +++ src/nsgui.h 2012-07-12 23:56:39 +0000 @@ -27,7 +27,6 @@ #warning "Z is defined. If you get a later parse error in a header, check that buffer.h or other files #define-ing Z are not included." #endif /* Z */ #define Cursor FooFoo -#undef init_process #endif /* NS_IMPL_COCOA */ #undef verify @@ -36,7 +35,6 @@ #ifdef NS_IMPL_COCOA #undef Cursor -#define init_process emacs_init_process #endif /* NS_IMPL_COCOA */ #import === modified file 'src/process.c' --- src/process.c 2012-07-10 23:24:36 +0000 +++ src/process.c 2012-07-12 23:56:39 +0000 @@ -7298,8 +7298,10 @@ } +/* This is not called "init_process" because that is the name of a + Mach system call, so it would cause problems on Darwin systems. */ void -init_process (void) +init_process_emacs (void) { #ifdef subprocesses register int i; === modified file 'src/s/darwin.h' --- src/s/darwin.h 2012-07-12 07:43:05 +0000 +++ src/s/darwin.h 2012-07-12 23:56:39 +0000 @@ -34,10 +34,6 @@ for process-connection-type dependent on the kernel version. */ #define MIN_PTY_KERNEL_VERSION '7' -/* Avoid the use of the name init_process (process.c) because it is - also the name of a Mach system call. */ -#define init_process emacs_init_process - /* Definitions for how to compile & link. */ #ifdef HAVE_NS #define SYSTEM_PURESIZE_EXTRA 200000 === modified file 'src/sysselect.h' --- src/sysselect.h 2012-06-30 15:55:27 +0000 +++ src/sysselect.h 2012-07-12 23:56:39 +0000 @@ -16,15 +16,9 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -#if defined (DARWIN_OS) -#undef init_process -#endif #ifndef DOS_NT #include #endif -#if defined (DARWIN_OS) -#define init_process emacs_init_process -#endif /* The w32 build defines select stuff in w32.h, which is included where w32 needs it, but not where sysselect.h is included. The w32 ------------------------------------------------------------ revno: 109057 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 17:14:13 -0400 message: Move NO_EDITRES from src/s to configure * configure.ac (NO_EDITRES): Move here from src/s. * src/s/aix4-2.h, src/s/hpux10-20.h: Let configure set NO_EDITRES. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-12 19:48:21 +0000 +++ ChangeLog 2012-07-12 21:14:13 +0000 @@ -5,7 +5,7 @@ * configure.ac (NARROWPROTO, NO_ABORT, BROKEN_GET_CURRENT_DIR_NAME) (BROKEN_FIONREAD, BROKEN_PTY_READ_AFTER_EAGAIN, BROKEN_SIGAIO) - (BROKEN_SIGPOLL, BROKEN_SIGPTY, FIRST_PTY_LETTER) + (BROKEN_SIGPOLL, BROKEN_SIGPTY, FIRST_PTY_LETTER, NO_EDITRES) (G_SLICE_ALWAYS_MALLOC, PREFER_VSUSP, PTY_ITERATION, PTY_OPEN) (PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF, RUN_TIME_REMAP) (SETPGRP_RELEASES_CTTY, TAB3, TABDLY, RUN_TIME_REMAP, UNIX98_PTYS) === modified file 'configure.ac' --- configure.ac 2012-07-12 19:48:21 +0000 +++ configure.ac 2012-07-12 21:14:13 +0000 @@ -2137,6 +2137,7 @@ fi AC_CHECK_LIB(Xmu, XmuConvertStandardSelection) test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" + dnl ac_cv_lib_Xmu_XmuConvertStandardSelection is also referenced below. fi AC_SUBST(LIBXTR6) @@ -3149,6 +3150,24 @@ 4.2-compatible sockets.]) +AH_TEMPLATE(NO_EDITRES, [Define if XEditRes should not be used.]) + +case $opsys in + aix4-2) + dnl Unfortunately without libXmu we cannot support EditRes. + if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then + AC_DEFINE(NO_EDITRES, 1) + fi + ;; + + hpux*) + dnl Assar Westerlund says this is necessary for + dnl HP-UX 10.20, and that it works for HP-UX 0 as well. + AC_DEFINE(NO_EDITRES, 1) + ;; +esac + + case $opsys in darwin | gnu | hpux* | *bsd ) AC_DEFINE(NO_TERMIO, 1, [Define if termio.h should not be included.]) === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-12 20:53:41 +0000 +++ src/ChangeLog 2012-07-12 21:14:13 +0000 @@ -1,8 +1,3 @@ -2012-07-12 Glenn Morris - - * s/gnu-linux.h, s/hpux10-20.h: - Do not unconditionally define HAVE_XRMSETDATABASE. - 2012-07-12 Eli Zaretskii * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in @@ -19,6 +14,11 @@ 2012-07-12 Glenn Morris + * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES. + + * s/gnu-linux.h, s/hpux10-20.h: + Do not unconditionally define HAVE_XRMSETDATABASE. + * s/gnu-linux.h (UNIX98_PTYS): Let configure set it. 2012-07-12 Paul Eggert === modified file 'src/s/aix4-2.h' --- src/s/aix4-2.h 2012-07-12 07:43:05 +0000 +++ src/s/aix4-2.h 2012-07-12 21:14:13 +0000 @@ -32,11 +32,6 @@ /* Perry Smith says these are correct. */ #undef sigmask -#ifndef HAVE_LIBXMU -/* Unfortunately without libXmu we cannot support EditRes. */ -#define NO_EDITRES -#endif - /* Conservative garbage collection has not been tested, so for now play it safe and stick with the old-fashioned way of marking. */ #define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE === modified file 'src/s/hpux10-20.h' --- src/s/hpux10-20.h 2012-07-12 20:53:41 +0000 +++ src/s/hpux10-20.h 2012-07-12 21:14:13 +0000 @@ -26,10 +26,6 @@ /* Special hacks needed to make Emacs run on this system. */ -/* Assar Westerlund says this is necessary for - HP-UX 10.20, and that it works for HP-UX 0 as well. */ -#define NO_EDITRES - /* We have to go this route, rather than hpux9's approach of renaming the functions via macros. The system's stdlib.h has fully prototyped declarations, which yields a conflicting definition of srand48; it ------------------------------------------------------------ revno: 109056 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 16:53:41 -0400 message: Do not unconditionally define HAVE_XRMSETDATABASE on some systems * src/s/gnu-linux.h, src/s/hpux10-20.h: Do not unconditionally define HAVE_XRMSETDATABASE. Maybe there was a time when this made sense, but in the current tree it is totally illogical. This is only used in xterm.c. If it is set we call XrmSetDatabase, if not we do something else. Configure tests for XrmSetDatabase and sets HAVE_XRMSETDATABASE accordingly. The only possibility that is not totally nonsensical is that the system does in fact have XrmSetDatabase but configure failed to find it (I don't see how this could happen though...); in which case we should fix the configure test rather than force the results. But this is not what the (vague) comments say was happending. The gnu-linux piece dates from 1995, the hpux one from 2000. https://groups.google.com/forum/?fromgroups#!topic/gnu.emacs.bug/H24wEM8Vp9A From: rainer@displaytech.com (Rainer Malzbender) Subject: Compiling emacs 20.4 on HP-UX 10.20 with gcc Date: 2000/02/01 Newsgroups: gnu.emacs.bug diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-12 19:55:01 +0000 +++ src/ChangeLog 2012-07-12 20:53:41 +0000 @@ -1,3 +1,8 @@ +2012-07-12 Glenn Morris + + * s/gnu-linux.h, s/hpux10-20.h: + Do not unconditionally define HAVE_XRMSETDATABASE. + 2012-07-12 Eli Zaretskii * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in === modified file 'src/s/gnu-linux.h' --- src/s/gnu-linux.h 2012-07-12 19:48:21 +0000 +++ src/s/gnu-linux.h 2012-07-12 20:53:41 +0000 @@ -32,14 +32,6 @@ your system and must be used only through an encapsulation (Which you should place, by convention, in sysdep.c). */ - -/* This is to work around mysterious gcc failures in some system versions. - It is unlikely that Emacs changes will work around this problem; - therefore, this should remain permanently. */ -#ifndef HAVE_XRMSETDATABASE -#define HAVE_XRMSETDATABASE -#endif - #ifdef __ia64__ #define GC_MARK_SECONDARY_STACK() \ do { \ === modified file 'src/s/hpux10-20.h' --- src/s/hpux10-20.h 2012-07-12 07:43:05 +0000 +++ src/s/hpux10-20.h 2012-07-12 20:53:41 +0000 @@ -39,12 +39,6 @@ #undef srandom #undef random -/* Rainer Malzbender says defining - HAVE_XRMSETDATABASE allows Emacs to compile on HP-UX 10.20 using GCC. */ -#ifndef HAVE_XRMSETDATABASE -#define HAVE_XRMSETDATABASE -#endif - /* Conservative garbage collection has not been tested, so for now play it safe and stick with the old-fashioned way of marking. */ #define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE ------------------------------------------------------------ revno: 109055 fixes bug(s): http://debbugs.gnu.org/11832 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2012-07-12 22:55:01 +0300 message: Improve fix for bug #11832 with truncated/continued lines w/o margins. src/xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in memmove call that removes glyphs covered by the left truncation glyph. Improve commentary. (display_line): Fix display of continuation glyphs on GUI frames when the right fringe is turned off and variable-size fonts are used in the window. Move the code that appends a stretch glyph to produce_special_glyphs, so that it could be used for truncation and continuation glyphs alike. (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch glyph of a suitably computed width, to align the special glyphs at the window margin. Code moved from display_line. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-12 19:48:21 +0000 +++ src/ChangeLog 2012-07-12 19:55:01 +0000 @@ -1,3 +1,17 @@ +2012-07-12 Eli Zaretskii + + * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in + memmove call that removes glyphs covered by the left truncation + glyph. Improve commentary. + (display_line): Fix display of continuation glyphs on GUI frames + when the right fringe is turned off and variable-size fonts are + used in the window. Move the code that appends a stretch glyph to + produce_special_glyphs, so that it could be used for truncation + and continuation glyphs alike. + (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch + glyph of a suitably computed width, to align the special glyphs at + the window margin. Code moved from display_line. (Bug#11832) + 2012-07-12 Glenn Morris * s/gnu-linux.h (UNIX98_PTYS): Let configure set it. === modified file 'src/xdisp.c' --- src/xdisp.c 2012-07-10 23:24:36 +0000 +++ src/xdisp.c 2012-07-12 19:55:01 +0000 @@ -18257,13 +18257,12 @@ struct glyph *g = to; short used; - while (g < toend && it->glyph_row->x + w < 0) - { - w += g->pixel_width; - ++g; - } + /* The first glyph could be partially visible, in which case + it->glyph_row->x will be negative. But we want the left + truncation glyphs to be aligned at the left margin of the + window, so we override the x coordinate at which the row + will begin. */ it->glyph_row->x = 0; - w = 0; while (g < toend && w < it->truncation_pixel_width) { w += g->pixel_width; @@ -18271,7 +18270,7 @@ } if (g - to - tused > 0) { - memmove (to + tused, g, toend - g); + memmove (to + tused, g, (toend - g) * sizeof(*g)); it->glyph_row->used[TEXT_AREA] -= g - to - tused; } used = it->glyph_row->used[TEXT_AREA]; @@ -19616,6 +19615,8 @@ row->used[TEXT_AREA] = n_glyphs_before + i; /* Display continuation glyphs. */ + it->current_x = x_before; + it->continuation_lines_width += x; if (!FRAME_WINDOW_P (it->f) || (row->reversed_p ? WINDOW_LEFT_FRINGE_WIDTH (it->w) @@ -19623,8 +19624,6 @@ produce_special_glyphs (it, IT_CONTINUATION); row->continued_p = 1; - it->current_x = x_before; - it->continuation_lines_width += x; extend_face_to_end_of_line (it); if (nglyphs > 1 && i > 0) @@ -19768,38 +19767,11 @@ produce_special_glyphs (it, IT_TRUNCATION); } } -#ifdef HAVE_WINDOW_SYSTEM else { - /* On a GUI frame, when the right fringe (left - fringe for R2L rows) is turned off, we produce - truncation glyphs preceded by a stretch glyph - whose width is computed such that the truncation - glyphs are aligned at the window margin, even - when very different fonts are used in different - glyph rows. */ - int stretch_width = it->last_visible_x - it->current_x; - row->used[TEXT_AREA] = i; - if (stretch_width > 0) - { - struct face *face = FACE_FROM_ID (it->f, it->face_id); - struct font *font = - face->font ? face->font : FRAME_FONT (it->f); - int stretch_ascent = - (((it->ascent + it->descent) - * FONT_BASE (font)) / FONT_HEIGHT (font)); - struct text_pos saved_pos = it->position; - - memset (&it->position, 0, sizeof it->position); - append_stretch_glyph (it, make_number (0), stretch_width, - it->ascent + it->descent, - stretch_ascent); - it->position = saved_pos; - } produce_special_glyphs (it, IT_TRUNCATION); } -#endif } else if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) { @@ -24215,9 +24187,6 @@ GLYPH glyph; temp_it = *it; - temp_it.dp = NULL; - temp_it.what = IT_CHARACTER; - temp_it.len = 1; temp_it.object = make_number (0); memset (&temp_it.current, 0, sizeof temp_it.current); @@ -24251,6 +24220,46 @@ else abort (); +#ifdef HAVE_WINDOW_SYSTEM + /* On a GUI frame, when the right fringe (left fringe for R2L rows) + is turned off, we precede the truncation/continuation glyphs by a + stretch glyph whose width is computed such that these special + glyphs are aligned at the window margin, even when very different + fonts are used in different glyph rows. */ + if (FRAME_WINDOW_P (temp_it.f) + /* init_iterator calls this with it->glyph_row == NULL, and it + wants only the pixel width of the truncation/continuation + glyphs. */ + && temp_it.glyph_row + /* insert_left_trunc_glyphs calls us at the beginning of the + row, and it has its own calculation of the stretch glyph + width. */ + && temp_it.glyph_row->used[TEXT_AREA] > 0 + && (temp_it.glyph_row->reversed_p + ? WINDOW_LEFT_FRINGE_WIDTH (temp_it.w) + : WINDOW_RIGHT_FRINGE_WIDTH (temp_it.w)) == 0) + { + int stretch_width = temp_it.last_visible_x - temp_it.current_x; + + if (stretch_width > 0) + { + struct face *face = FACE_FROM_ID (temp_it.f, temp_it.face_id); + struct font *font = + face->font ? face->font : FRAME_FONT (temp_it.f); + int stretch_ascent = + (((temp_it.ascent + temp_it.descent) + * FONT_BASE (font)) / FONT_HEIGHT (font)); + + append_stretch_glyph (&temp_it, make_number (0), stretch_width, + temp_it.ascent + temp_it.descent, + stretch_ascent); + } + } +#endif + + temp_it.dp = NULL; + temp_it.what = IT_CHARACTER; + temp_it.len = 1; temp_it.c = temp_it.char_to_display = GLYPH_CHAR (glyph); temp_it.face_id = GLYPH_FACE (glyph); temp_it.len = CHAR_BYTES (temp_it.c); ------------------------------------------------------------ revno: 109054 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 15:48:21 -0400 message: Move UNIX98_PTYS from src/s to configure * configure.ac (UNIX98_PTYS): Move here from src/s. * src/s/gnu-linux.h (UNIX98_PTYS): Let configure set it. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-12 07:43:05 +0000 +++ ChangeLog 2012-07-12 19:48:21 +0000 @@ -8,7 +8,7 @@ (BROKEN_SIGPOLL, BROKEN_SIGPTY, FIRST_PTY_LETTER) (G_SLICE_ALWAYS_MALLOC, PREFER_VSUSP, PTY_ITERATION, PTY_OPEN) (PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF, RUN_TIME_REMAP) - (SETPGRP_RELEASES_CTTY, TAB3, TABDLY, RUN_TIME_REMAP) + (SETPGRP_RELEASES_CTTY, TAB3, TABDLY, RUN_TIME_REMAP, UNIX98_PTYS) (XOS_NEEDS_TIME_H): Move here from src/s. 2012-07-11 Glenn Morris === modified file 'configure.ac' --- configure.ac 2012-07-12 07:43:05 +0000 +++ configure.ac 2012-07-12 19:48:21 +0000 @@ -3340,6 +3340,7 @@ gnu-linux | gnu-kfreebsd ) dnl if HAVE_GRANTPT if test "x$ac_cv_func_grantpt" = xyes; then + AC_DEFINE(UNIX98_PTYS, 1, [Define if the system has Unix98 PTYs.]) AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)] ) dnl Note that grantpt and unlockpt may fork. We must block SIGCHLD dnl to prevent sigchld_handler from intercepting the child's death. === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-12 16:58:37 +0000 +++ src/ChangeLog 2012-07-12 19:48:21 +0000 @@ -1,3 +1,7 @@ +2012-07-12 Glenn Morris + + * s/gnu-linux.h (UNIX98_PTYS): Let configure set it. + 2012-07-12 Paul Eggert Fix typos that broke OS X build. === modified file 'src/s/gnu-linux.h' --- src/s/gnu-linux.h 2012-07-12 07:43:05 +0000 +++ src/s/gnu-linux.h 2012-07-12 19:48:21 +0000 @@ -25,10 +25,6 @@ #define USG #define GNU_LINUX -#if defined HAVE_GRANTPT -#define UNIX98_PTYS -#endif /* HAVE_GRANTPT */ - /* Here, on a separate page, add any special hacks needed to make Emacs work on this system. For example, you might define certain system call names that don't ------------------------------------------------------------ revno: 109053 committer: Paul Eggert branch nick: trunk timestamp: Thu 2012-07-12 09:58:37 -0700 message: Fix typos that broke OS X build. Reported by Randal L. Schwartz in . * nsterm.m (ns_timeout): Add missing local decl. (ns_get_color): snprintf -> sprintf, to fix typo. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-12 07:43:05 +0000 +++ src/ChangeLog 2012-07-12 16:58:37 +0000 @@ -1,3 +1,11 @@ +2012-07-12 Paul Eggert + + Fix typos that broke OS X build. + Reported by Randal L. Schwartz in + . + * nsterm.m (ns_timeout): Add missing local decl. + (ns_get_color): snprintf -> sprintf, to fix typo. + 2012-07-12 Glenn Morris * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h: === modified file 'src/nsterm.m' --- src/nsterm.m 2012-07-10 23:24:36 +0000 +++ src/nsterm.m 2012-07-12 16:58:37 +0000 @@ -416,7 +416,7 @@ /* Keep waiting until past the time wakeup. */ while (1) { - EMACS_TIME now = current_emacs_time (); + EMACS_TIME timeout, now = current_emacs_time (); if (EMACS_TIME_LE (wakeup, now)) break; timeout = sub_emacs_time (wakeup, now); @@ -1446,8 +1446,8 @@ int i; scaling = strlen(name+start) / 3; for (i = 0; i < 3; i++) - snprintf (hex + i * (scaling + 1), "%.*s/", scaling, - name + start + i * scaling); + sprintf (hex + i * (scaling + 1), "%.*s/", scaling, + name + start + i * scaling); hex[3 * (scaling + 1) - 1] = '\0'; } ------------------------------------------------------------ revno: 109052 committer: Paul Eggert branch nick: trunk timestamp: Thu 2012-07-12 08:20:39 -0700 message: * movemail.c: Add missing 'defined'. Suggested by Sven Joachim in . diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-07-11 22:44:07 +0000 +++ lib-src/ChangeLog 2012-07-12 15:20:39 +0000 @@ -1,3 +1,9 @@ +2012-07-12 Paul Eggert + + * movemail.c: Add missing 'defined'. + Suggested by Sven Joachim in + . + 2012-07-11 Paul Eggert Port 'movemail' again to Solaris and similar hosts. === modified file 'lib-src/movemail.c' --- lib-src/movemail.c 2012-07-11 22:44:07 +0000 +++ lib-src/movemail.c 2012-07-12 15:20:39 +0000 @@ -145,7 +145,7 @@ static int mbx_delimit_end (FILE *mbf); #endif -#if (MAIL_USE_MAILLOCK \ +#if (defined MAIL_USE_MAILLOCK \ || (!defined DISABLE_DIRECT_ACCESS && !defined MAIL_USE_MMDF \ && !defined MAIL_USE_SYSTEM_LOCK)) /* Like malloc but get fatal error if memory is exhausted. */ ------------------------------------------------------------ revno: 109051 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2012-07-12 14:33:55 +0300 message: Fix byte-recompile-directory. lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Use cl-incf, not incf. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-11 23:13:41 +0000 +++ lisp/ChangeLog 2012-07-12 11:33:55 +0000 @@ -1,3 +1,8 @@ +2012-07-12 Eli Zaretskii + + * emacs-lisp/bytecomp.el (byte-recompile-directory): Use cl-incf, + not incf. + 2012-07-11 Stefan Monnier More CL cleanups and reduction of use of cl.el. === modified file 'lisp/emacs-lisp/bytecomp.el' --- lisp/emacs-lisp/bytecomp.el 2012-07-10 11:51:54 +0000 +++ lisp/emacs-lisp/bytecomp.el 2012-07-12 11:33:55 +0000 @@ -1591,7 +1591,7 @@ (not (auto-save-file-name-p source)) (not (string-equal dir-locals-file (file-name-nondirectory source)))) - (progn (incf + (progn (cl-incf (pcase (byte-recompile-file source force arg) (`no-byte-compile skip-count) (`t file-count) ------------------------------------------------------------ revno: 109050 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 06:20:34 -0400 message: Auto-commit of loaddefs files. diff: === modified file 'lisp/emacs-lisp/cl-loaddefs.el' --- lisp/emacs-lisp/cl-loaddefs.el 2012-06-27 15:11:28 +0000 +++ lisp/emacs-lisp/cl-loaddefs.el 2012-07-12 10:20:34 +0000 @@ -7,11 +7,11 @@ ;;;;;; cl-getf cl-get cl-tailp cl-list-length cl-nreconc cl-revappend ;;;;;; cl-concatenate cl-subseq cl-float-limits cl-random-state-p ;;;;;; cl-make-random-state cl-random cl-signum cl-rem cl-mod cl-round -;;;;;; cl-truncate cl-ceiling cl-floor cl-isqrt cl-lcm cl-gcd cl--progv-before -;;;;;; cl--set-frame-visible-p cl--map-overlays cl--map-intervals -;;;;;; cl--map-keymap-recursively cl-notevery cl-notany cl-every -;;;;;; cl-some cl-mapcon cl-mapcan cl-mapl cl-maplist cl-map cl--mapcar-many -;;;;;; cl-equalp cl-coerce) "cl-extra" "cl-extra.el" "3656b89f2196d70e50ba9d7bb9519416") +;;;;;; cl-truncate cl-ceiling cl-floor cl-isqrt cl-lcm cl-gcd cl--set-frame-visible-p +;;;;;; cl--map-overlays cl--map-intervals cl--map-keymap-recursively +;;;;;; cl-notevery cl-notany cl-every cl-some cl-mapcon cl-mapcan +;;;;;; cl-mapl cl-maplist cl-map cl--mapcar-many cl-equalp cl-coerce) +;;;;;; "cl-extra" "cl-extra.el" "535a24c1cff55a16e3d51219498a7858") ;;; Generated autoloads from cl-extra.el (autoload 'cl-coerce "cl-extra" "\ @@ -102,11 +102,6 @@ \(fn FRAME VAL)" nil nil) -(autoload 'cl--progv-before "cl-extra" "\ - - -\(fn SYMS VALUES)" nil nil) - (autoload 'cl-gcd "cl-extra" "\ Return the greatest common divisor of the arguments. @@ -257,15 +252,15 @@ ;;;### (autoloads (cl--compiler-macro-cXXr cl--compiler-macro-list* ;;;;;; cl--compiler-macro-adjoin cl-defsubst cl-compiler-macroexpand ;;;;;; cl-define-compiler-macro cl-assert cl-check-type cl-typep -;;;;;; cl-deftype cl-defstruct cl-callf2 cl-callf cl-rotatef cl-shiftf -;;;;;; cl-remf cl-psetf cl-declare cl-the cl-locally cl-multiple-value-setq -;;;;;; cl-multiple-value-bind cl-symbol-macrolet cl-macrolet cl-labels -;;;;;; cl-flet* cl-flet cl-progv cl-psetq cl-do-all-symbols cl-do-symbols -;;;;;; cl-dotimes cl-dolist cl-do* cl-do cl-loop cl-return-from -;;;;;; cl-return cl-block cl-etypecase cl-typecase cl-ecase cl-case -;;;;;; cl-load-time-value cl-eval-when cl-destructuring-bind cl-function -;;;;;; cl-defmacro cl-defun cl-gentemp cl-gensym) "cl-macs" "cl-macs.el" -;;;;;; "e7bb76130254614df1603a1c1e89cb49") +;;;;;; cl-deftype cl-defstruct cl-callf2 cl-callf cl-letf* cl-letf +;;;;;; cl-rotatef cl-shiftf cl-remf cl-psetf cl-declare cl-the cl-locally +;;;;;; cl-multiple-value-setq cl-multiple-value-bind cl-symbol-macrolet +;;;;;; cl-macrolet cl-labels cl-flet* cl-flet cl-progv cl-psetq +;;;;;; cl-do-all-symbols cl-do-symbols cl-dotimes cl-dolist cl-do* +;;;;;; cl-do cl-loop cl-return-from cl-return cl-block cl-etypecase +;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when +;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp +;;;;;; cl-gensym) "cl-macs" "cl-macs.el" "a175c7714223c21a617b0460e130f1d8") ;;; Generated autoloads from cl-macs.el (autoload 'cl-gensym "cl-macs" "\ @@ -346,7 +341,7 @@ (put 'cl-case 'lisp-indent-function '1) (autoload 'cl-ecase "cl-macs" "\ -Like `cl-case', but error if no cl-case fits. +Like `cl-case', but error if no case fits. `otherwise'-clauses are not allowed. \(fn EXPR (KEYLIST BODY...)...)" nil t) @@ -441,6 +436,8 @@ \(fn (VAR LIST [RESULT]) BODY...)" nil t) +(put 'cl-dolist 'lisp-indent-function '1) + (autoload 'cl-dotimes "cl-macs" "\ Loop a certain number of times. Evaluate BODY with VAR bound to successive integers from 0, inclusive, @@ -449,6 +446,8 @@ \(fn (VAR COUNT [RESULT]) BODY...)" nil t) +(put 'cl-dotimes 'lisp-indent-function '1) + (autoload 'cl-do-symbols "cl-macs" "\ Loop over all symbols. Evaluate BODY with VAR bound to each interned symbol, or to each symbol @@ -502,7 +501,8 @@ (autoload 'cl-labels "cl-macs" "\ Make temporary function bindings. -The bindings can be recursive. Assumes the use of `lexical-binding'. +The bindings can be recursive and the scoping is lexical, but capturing them +in closures will only work if `lexical-binding' is in use. \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" nil t) @@ -599,6 +599,29 @@ \(fn PLACE...)" nil t) +(autoload 'cl-letf "cl-macs" "\ +Temporarily bind to PLACEs. +This is the analogue of `let', but with generalized variables (in the +sense of `setf') for the PLACEs. Each PLACE is set to the corresponding +VALUE, then the BODY forms are executed. On exit, either normally or +because of a `throw' or error, the PLACEs are set back to their original +values. Note that this macro is *not* available in Common Lisp. +As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)', +the PLACE is not modified before executing BODY. + +\(fn ((PLACE VALUE) ...) BODY...)" nil t) + +(put 'cl-letf 'lisp-indent-function '1) + +(autoload 'cl-letf* "cl-macs" "\ +Temporarily bind to PLACEs. +Like `cl-letf' but where the bindings are performed one at a time, +rather than all at the end (i.e. like `let*' rather than like `let'). + +\(fn BINDINGS &rest BODY)" nil t) + +(put 'cl-letf* 'lisp-indent-function '1) + (autoload 'cl-callf "cl-macs" "\ Set PLACE to (FUNC PLACE ARGS...). FUNC should be an unquoted function name. PLACE may be a symbol, ------------------------------------------------------------ revno: 109049 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 06:17:28 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/config.in' --- autogen/config.in 2012-07-11 10:17:32 +0000 +++ autogen/config.in 2012-07-12 10:17:28 +0000 @@ -46,12 +46,30 @@ /* Define to the number of bits in type 'wint_t'. */ #undef BITSIZEOF_WINT_T +/* Define if FIONREAD should not be used. */ +#undef BROKEN_FIONREAD + +/* Define if get_current_dir_name should not be used. */ +#undef BROKEN_GET_CURRENT_DIR_NAME + +/* Define on FreeBSD to work around an issue when reading from a PTY. */ +#undef BROKEN_PTY_READ_AFTER_EAGAIN + /* Define if SA_RESTART should only be used in batch mode. */ #undef BROKEN_SA_RESTART +/* Define if SIGAIO should not be used. */ +#undef BROKEN_SIGAIO + /* Define if SIGIO should not be used. */ #undef BROKEN_SIGIO +/* Define if SIGPOLL should not be used. */ +#undef BROKEN_SIGPOLL + +/* Define if SIGPTY should not be used. */ +#undef BROKEN_SIGPTY + /* Define if Emacs cannot be dumped on your system. */ #undef CANNOT_DUMP @@ -101,6 +119,10 @@ enabled. */ #undef ENABLE_CHECKING +/* Letter to use in finding device name of first PTY, if PTYs are supported. + */ +#undef FIRST_PTY_LETTER + /* Define to 1 if futimesat mishandles a NULL file name. */ #undef FUTIMESAT_NULL_BUG @@ -148,6 +170,10 @@ /* Define to 1 if you want to use the GNU memory allocator. */ #undef GNU_MALLOC +/* Define to set the G_SLICE environment variable to "always-malloc" at + startup, if using GTK. */ +#undef G_SLICE_ALWAYS_MALLOC + /* Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists. */ #undef HAVE_AIX_SMT_EXP @@ -671,6 +697,9 @@ /* Define to 1 if the pthread_sigmask function can be used (despite bugs). */ #undef HAVE_PTHREAD_SIGMASK +/* Define if the system supports pty devices. */ +#undef HAVE_PTYS + /* Define to 1 if you have the header file. */ #undef HAVE_PTY_H @@ -737,6 +766,9 @@ /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF +/* Define if the system supports 4.2-compatible sockets. */ +#undef HAVE_SOCKETS + /* Define to 1 if you have sound support. */ #undef HAVE_SOUND @@ -1023,6 +1055,9 @@ /* Define to support using a Hesiod database to find the POP server. */ #undef HESIOD +/* Define to read input using SIGIO. */ +#undef INTERRUPT_INPUT + /* Define to support Kerberos-authenticated POP mail retrieval. */ #undef KERBEROS @@ -1054,6 +1089,13 @@ /* Define to support POP mail retrieval. */ #undef MAIL_USE_POP +/* Define if system's imake configuration file defines `NeedWidePrototypes' as + `NO'. */ +#undef NARROWPROTO + +/* Do not define abort in emacs.c. */ +#undef NO_ABORT + /* Define to 1 if you don't have struct exception in math.h. */ #undef NO_MATHERR @@ -1107,6 +1149,9 @@ png_longjmp. */ #undef PNG_DEPSTRUCT +/* Define if process_send_signal should use VSUSP instead of VSWTCH. */ +#undef PREFER_VSUSP + /* Define to 1 if pthread_sigmask(), when it fails, returns -1 and sets errno. */ #undef PTHREAD_SIGMASK_FAILS_WITH_ERRNO @@ -1121,6 +1166,18 @@ 'ptrdiff_t'. */ #undef PTRDIFF_T_SUFFIX +/* How to iterate over PTYs. */ +#undef PTY_ITERATION + +/* How to get the device name of the control end of a PTY, if non-standard. */ +#undef PTY_NAME_SPRINTF + +/* How to open a PTY, if non-standard. */ +#undef PTY_OPEN + +/* How to get device name of the tty end of a PTY, if non-standard. */ +#undef PTY_TTY_NAME_SPRINTF + /* Define to 1 if readlink fails to recognize a trailing slash. */ #undef READLINK_TRAILING_SLASH_BUG @@ -1136,6 +1193,12 @@ slash */ #undef REPLACE_FUNC_STAT_FILE +/* Define if emacs.c needs to call run_time_remap; for HPUX. */ +#undef RUN_TIME_REMAP + +/* Define if process.c:child_setup should not call setpgrp. */ +#undef SETPGRP_RELEASES_CTTY + /* Make process_send_signal work by "typing" a signal character on the pty. */ #undef SIGNALS_VIA_CHARACTERS @@ -1173,6 +1236,12 @@ /* The type of system you are compiling for; sets `system-type'. */ #undef SYSTEM_TYPE +/* Undocumented. */ +#undef TAB3 + +/* Undocumented. */ +#undef TABDLY + /* Define to 1 if you use terminfo instead of termcap. */ #undef TERMINFO @@ -1247,6 +1316,9 @@ /* Define this to check for malloc buffer overrun. */ #undef XMALLOC_OVERRUN_CHECK +/* Compensate for a bug in Xos.h on some systems, where it requires time.h. */ +#undef XOS_NEEDS_TIME_H + /* Define to the type of the 6th arg of XRegisterIMInstantiateCallback, either XPointer or XPointer*. */ #undef XRegisterIMInstantiateCallback_arg6 === modified file 'autogen/configure' --- autogen/configure 2012-07-11 10:17:32 +0000 +++ autogen/configure 2012-07-12 10:17:28 +0000 @@ -16786,7 +16786,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5 $as_echo "$emacs_cv_struct_exception" >&6; } HAVE_EXCEPTION=$emacs_cv_struct_exception -if test $emacs_cv_struct_exception != yes; then +if test $emacs_cv_struct_exception != yes || test $opsys = darwin; then $as_echo "#define NO_MATHERR 1" >>confdefs.h @@ -22624,6 +22624,16 @@ $as_echo "#define CLASH_DETECTION 1" >>confdefs.h +## Note: PTYs are broken on darwin <6. Use at your own risk. + +$as_echo "#define HAVE_PTYS 1" >>confdefs.h + + + +$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h + + + case $opsys in darwin | gnu | hpux* | *bsd ) @@ -22632,12 +22642,44 @@ ;; esac + case $opsys in - hpux* | irix6-5 | openbsd | sol2* | unixware ) + hpux* | irix6-5 | openbsd | sol2* | unixware ) $as_echo "#define BROKEN_SIGIO 1" >>confdefs.h - ;; + ;; + + aix4-2) + +$as_echo "#define BROKEN_FIONREAD 1" >>confdefs.h + + +$as_echo "#define BROKEN_SIGAIO 1" >>confdefs.h + + +$as_echo "#define BROKEN_SIGPOLL 1" >>confdefs.h + + +$as_echo "#define BROKEN_SIGPTY 1" >>confdefs.h + + + +$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h + + ;; + + freebsd) + +$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h + + ;; + + darwin) + +$as_echo "#define NO_ABORT 1" >>confdefs.h + + ;; esac case $opsys in @@ -22668,6 +22710,132 @@ +case $opsys in + darwin | gnu-linux | gnu-kfreebsd ) + +$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h + + ;; +esac + + +case $opsys in + cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd) + +$as_echo "#define NARROWPROTO 1" >>confdefs.h + + ;; +esac + + + + + + + + +case $opsys in + aix4-2 ) + $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++) " >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\"); " >>confdefs.h + + $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd)); " >>confdefs.h + + ;; + + cygwin ) + $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h + + $as_echo "#define PTY_OPEN do { int dummy; SIGMASKTYPE mask; mask = sigblock (sigmask (SIGCHLD)); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; sigsetmask (mask); if (fd >= 0) emacs_close (dummy); } while (0) " >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h + + $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h + + ;; + + darwin ) + $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h + + $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h + + $as_echo "#define PTY_OPEN do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (0) " >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h + + $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h + + ;; + + gnu | freebsd | netbsd | openbsd ) + $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h + + ;; + + gnu-linux | gnu-kfreebsd ) + if test "x$ac_cv_func_grantpt" = xyes; then + $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h + + $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); sigunblock (sigmask (SIGCHLD)); } " >>confdefs.h + + if test "x$ac_cv_func_getpt" = xyes; then + $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h + + else + $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h + + fi + else + $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h + + fi + ;; + + hpux*) + $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i); " >>confdefs.h + + $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i); " >>confdefs.h + + ;; + + irix6-5 ) + $as_echo "#define PTY_ITERATION /**/" >>confdefs.h + + $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h + + $as_echo "#define PTY_OPEN { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); } " >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h + + $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h + + ;; + + sol2* ) + $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h + + $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h + + ;; + + unixware ) + $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h + + $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal(\"could not grant slave pty\"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h + + ;; +esac + + case $opsys in @@ -22825,12 +22993,50 @@ ;; esac -case $opsys in - gnu) opsysfile="s/bsd-common.h" ;; - - gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;; - - hpux11) + + + +case $opsys in + darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h + ;; + + gnu | freebsd | netbsd | openbsd ) + +$as_echo "#define TABDLY OXTABS" >>confdefs.h + + $as_echo "#define TAB3 OXTABS" >>confdefs.h + + ;; + + hpux*) + +$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h + + ;; +esac + + +case $opsys in + hpux* | sol2* ) + +$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h + + ;; +esac + + +case $opsys in + cygwin) + +$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h + + ;; + + gnu) opsysfile="s/bsd-common.h" ;; + + gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;; + + hpux11) $as_echo "#define BROKEN_SA_RESTART 1" >>confdefs.h @@ -22838,17 +23044,26 @@ $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h - opsysfile="s/hpux10-20.h" - ;; - - openbsd) opsysfile="s/netbsd.h" ;; - - sol2-10) + opsysfile="s/hpux10-20.h" + ;; + + irix6-5) + +$as_echo "#define PREFER_VSUSP 1" >>confdefs.h + + +$as_echo "#define SETPGRP_RELEASES_CTTY 1" >>confdefs.h + + ;; + + openbsd) opsysfile="s/netbsd.h" ;; + + sol2-10) $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h - opsysfile="s/sol2-6.h" - ;; + opsysfile="s/sol2-6.h" + ;; esac # Set up the CFLAGS for real compilation, so we can substitute it. ------------------------------------------------------------ revno: 109048 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 00:43:05 -0700 message: Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF from src/s to configure * configure.ac (PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF): Move here from src/s. * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h: * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h: * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h: Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-12 07:10:44 +0000 +++ ChangeLog 2012-07-12 07:43:05 +0000 @@ -7,7 +7,8 @@ (BROKEN_FIONREAD, BROKEN_PTY_READ_AFTER_EAGAIN, BROKEN_SIGAIO) (BROKEN_SIGPOLL, BROKEN_SIGPTY, FIRST_PTY_LETTER) (G_SLICE_ALWAYS_MALLOC, PREFER_VSUSP, PTY_ITERATION, PTY_OPEN) - (RUN_TIME_REMAP, SETPGRP_RELEASES_CTTY, TAB3, TABDLY, RUN_TIME_REMAP + (PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF, RUN_TIME_REMAP) + (SETPGRP_RELEASES_CTTY, TAB3, TABDLY, RUN_TIME_REMAP) (XOS_NEEDS_TIME_H): Move here from src/s. 2012-07-11 Glenn Morris === modified file 'configure.ac' --- configure.ac 2012-07-12 07:10:44 +0000 +++ configure.ac 2012-07-12 07:43:05 +0000 @@ -3299,16 +3299,26 @@ AH_TEMPLATE(FIRST_PTY_LETTER, [Letter to use in finding device name of first PTY, if PTYs are supported.]) AH_TEMPLATE(PTY_OPEN, [How to open a PTY, if non-standard.]) +AH_TEMPLATE(PTY_NAME_SPRINTF, [How to get the device name of the control + end of a PTY, if non-standard.]) +AH_TEMPLATE(PTY_TTY_NAME_SPRINTF, [How to get device name of the tty + end of a PTY, if non-standard.]) case $opsys in aix4-2 ) AC_DEFINE(PTY_ITERATION, [int c; for (c = 0; !c ; c++)] ) + dnl You allocate a pty by opening /dev/ptc to get the master side. + dnl To get the name of the slave side, you just ttyname() the master side. + AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptc");] ) + AC_DEFINE(PTY_TTY_NAME_SPRINTF, [strcpy (pty_name, ttyname (fd));] ) ;; cygwin ) AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)] ) dnl multi-line AC_DEFINEs are hard. :( AC_DEFINE(PTY_OPEN, [ do { int dummy; SIGMASKTYPE mask; mask = sigblock (sigmask (SIGCHLD)); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; sigsetmask (mask); if (fd >= 0) emacs_close (dummy); } while (0)] ) + AC_DEFINE(PTY_NAME_SPRINTF, [] ) + AC_DEFINE(PTY_TTY_NAME_SPRINTF, [] ) ;; darwin ) @@ -3319,9 +3329,11 @@ dnl But we don't have to block SIGCHLD because it is blocked in the dnl implementation of grantpt. AC_DEFINE(PTY_OPEN, [ do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (0)] ) + AC_DEFINE(PTY_NAME_SPRINTF, [] ) + AC_DEFINE(PTY_TTY_NAME_SPRINTF, [] ) ;; - gnu | hpux* | freebsd | netbsd | openbsd ) + gnu | freebsd | netbsd | openbsd ) AC_DEFINE(FIRST_PTY_LETTER, ['p']) ;; @@ -3329,15 +3341,27 @@ dnl if HAVE_GRANTPT if test "x$ac_cv_func_grantpt" = xyes; then AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)] ) + dnl Note that grantpt and unlockpt may fork. We must block SIGCHLD + dnl to prevent sigchld_handler from intercepting the child's death. + AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, "%s", ptyname); sigunblock (sigmask (SIGCHLD)); }] ) dnl if HAVE_GETPT if test "x$ac_cv_func_getpt" = xyes; then AC_DEFINE(PTY_OPEN, [fd = getpt ()]) + AC_DEFINE(PTY_NAME_SPRINTF, [] ) + else + AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");] ) fi else AC_DEFINE(FIRST_PTY_LETTER, ['p']) fi ;; + hpux*) + AC_DEFINE(FIRST_PTY_LETTER, ['p']) + AC_DEFINE(PTY_NAME_SPRINTF, [sprintf (pty_name, "/dev/ptym/pty%c%x", c, i);] ) + AC_DEFINE(PTY_TTY_NAME_SPRINTF, [sprintf (pty_name, "/dev/pty/tty%c%x", c, i);] ) + ;; + irix6-5 ) dnl It looks like this cannot be right, because it is not a loop. dnl However, process.c actually does this: @@ -3353,12 +3377,31 @@ dnl Not used, because PTY_ITERATION is defined. AC_DEFINE(FIRST_PTY_LETTER, ['q']) AC_DEFINE(PTY_OPEN, [ { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); }] ) + dnl No need to get the pty name at all. + AC_DEFINE(PTY_NAME_SPRINTF, [] ) + dnl No need to use sprintf to get the tty name--we get that from _getpty. + AC_DEFINE(PTY_TTY_NAME_SPRINTF, [] ) ;; - sol2* | unixware ) + sol2* ) dnl This change means that we don't loop through allocate_pty too dnl many times in the (rare) event of a failure. AC_DEFINE(FIRST_PTY_LETTER, ['z']) + AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");] ) + dnl Uses sigblock/sigunblock rather than sighold/sigrelse, + dnl which appear to be BSD4.1 specific. It may also be appropriate + dnl for SVR4.x (x<2) but I'm not sure. fnf@cygnus.com + dnl On SysVr4, grantpt(3) forks a subprocess, so keep sigchld_handler() + dnl from intercepting that death. If any child but grantpt's should die + dnl within, it should be caught after sigrelse(2). + AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, "%s", ptyname); }] ) + ;; + + dnl Comments are as per sol2*. + unixware ) + AC_DEFINE(FIRST_PTY_LETTER, ['z']) + AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");] ) + AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal("could not grant slave pty"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal("could not unlock slave pty"); if (!(ptyname = ptsname(fd))) fatal ("could not enable slave pty"); snprintf (pty_name, sizeof pty_name, "%s", ptyname); }] ) ;; esac === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-12 07:10:44 +0000 +++ src/ChangeLog 2012-07-12 07:43:05 +0000 @@ -1,5 +1,10 @@ 2012-07-12 Glenn Morris + * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h: + * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h: + * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h: + Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure. + * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h: Move PTY_OPEN to configure. === modified file 'src/s/aix4-2.h' --- src/s/aix4-2.h 2012-07-12 06:34:40 +0000 +++ src/s/aix4-2.h 2012-07-12 07:43:05 +0000 @@ -26,11 +26,6 @@ #define _AIX #endif -/* In AIX, you allocate a pty by opening /dev/ptc to get the master side. - To get the name of the slave side, you just ttyname() the master side. */ -#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptc"); -#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd)); - /* Special items needed to make Emacs run on this system. */ === modified file 'src/s/cygwin.h' --- src/s/cygwin.h 2012-07-12 07:10:44 +0000 +++ src/s/cygwin.h 2012-07-12 07:43:05 +0000 @@ -17,8 +17,5 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -#define PTY_NAME_SPRINTF /* none */ -#define PTY_TTY_NAME_SPRINTF /* none */ - /* Used in various places to enable cygwin-specific code changes. */ #define CYGWIN 1 === modified file 'src/s/darwin.h' --- src/s/darwin.h 2012-07-12 07:10:44 +0000 +++ src/s/darwin.h 2012-07-12 07:43:05 +0000 @@ -30,9 +30,6 @@ distinguish OS X from pure Darwin. */ #define DARWIN_OS -#define PTY_NAME_SPRINTF /* none */ -#define PTY_TTY_NAME_SPRINTF /* none */ - /* PTYs only work correctly on Darwin 7 or higher. So make the default for process-connection-type dependent on the kernel version. */ #define MIN_PTY_KERNEL_VERSION '7' === modified file 'src/s/gnu-linux.h' --- src/s/gnu-linux.h 2012-07-12 07:10:44 +0000 +++ src/s/gnu-linux.h 2012-07-12 07:43:05 +0000 @@ -27,31 +27,6 @@ #if defined HAVE_GRANTPT #define UNIX98_PTYS - -#ifdef HAVE_GETPT -#define PTY_NAME_SPRINTF -#else /* not HAVE_GETPT */ -#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); -#endif /* not HAVE_GETPT */ - -/* Note that grantpt and unlockpt may fork. We must block SIGCHLD to - prevent sigchld_handler from intercepting the child's death. */ -#define PTY_TTY_NAME_SPRINTF \ - { \ - char *ptyname; \ - \ - sigblock (sigmask (SIGCHLD)); \ - if (grantpt (fd) == -1 || unlockpt (fd) == -1 \ - || !(ptyname = ptsname(fd))) \ - { \ - sigunblock (sigmask (SIGCHLD)); \ - close (fd); \ - return -1; \ - } \ - snprintf (pty_name, sizeof pty_name, "%s", ptyname); \ - sigunblock (sigmask (SIGCHLD)); \ - } - #endif /* HAVE_GRANTPT */ /* Here, on a separate page, add any special hacks needed === modified file 'src/s/hpux10-20.h' --- src/s/hpux10-20.h 2012-07-12 06:34:40 +0000 +++ src/s/hpux10-20.h 2012-07-12 07:43:05 +0000 @@ -26,14 +26,6 @@ /* Special hacks needed to make Emacs run on this system. */ -/* This is how to get the device name of the tty end of a pty. */ -#define PTY_TTY_NAME_SPRINTF \ - sprintf (pty_name, "/dev/pty/tty%c%x", c, i); - -/* This is how to get the device name of the control end of a pty. */ -#define PTY_NAME_SPRINTF \ - sprintf (pty_name, "/dev/ptym/pty%c%x", c, i); - /* Assar Westerlund says this is necessary for HP-UX 10.20, and that it works for HP-UX 0 as well. */ #define NO_EDITRES === modified file 'src/s/irix6-5.h' --- src/s/irix6-5.h 2012-07-12 07:10:44 +0000 +++ src/s/irix6-5.h 2012-07-12 07:43:05 +0000 @@ -26,11 +26,6 @@ #undef SETUP_SLAVE_PTY -/* No need to use sprintf to get the tty name--we get that from _getpty. */ -#define PTY_TTY_NAME_SPRINTF -/* No need to get the pty name at all. */ -#undef PTY_NAME_SPRINTF -#define PTY_NAME_SPRINTF #ifdef emacs char *_getpty(); #endif === modified file 'src/s/sol2-6.h' --- src/s/sol2-6.h 2012-07-12 01:49:28 +0000 +++ src/s/sol2-6.h 2012-07-12 07:43:05 +0000 @@ -21,28 +21,4 @@ #define SOLARIS2 -/* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock - rather than sighold/sigrelse, which appear to be BSD4.1 specific. - It may also be appropriate for SVR4.x - (x<2) but I'm not sure. fnf@cygnus.com */ -/* This sets the name of the slave side of the PTY. On SysVr4, - grantpt(3) forks a subprocess, so keep sigchld_handler() from - intercepting that death. If any child but grantpt's should die - within, it should be caught after sigrelse(2). */ - -#define PTY_TTY_NAME_SPRINTF \ - { \ - char *ptsname (int), *ptyname; \ - \ - sigblock (sigmask (SIGCLD)); \ - if (grantpt (fd) == -1) \ - { emacs_close (fd); return -1; } \ - sigunblock (sigmask (SIGCLD)); \ - if (unlockpt (fd) == -1) \ - { emacs_close (fd); return -1; } \ - if (!(ptyname = ptsname (fd))) \ - { emacs_close (fd); return -1; } \ - snprintf (pty_name, sizeof pty_name, "%s", ptyname); \ - } - #define GC_SETJMP_WORKS 1 === modified file 'src/s/unixware.h' --- src/s/unixware.h 2012-07-10 21:48:34 +0000 +++ src/s/unixware.h 2012-07-12 07:43:05 +0000 @@ -20,29 +20,6 @@ #include "usg5-4-common.h" -/* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock - rather than sighold/sigrelse, which appear to be BSD4.1 specific. - It may also be appropriate for SVR4.x - (x<2) but I'm not sure. fnf@cygnus.com */ -/* This sets the name of the slave side of the PTY. On SysVr4, - grantpt(3) forks a subprocess, so keep sigchld_handler() from - intercepting that death. If any child but grantpt's should die - within, it should be caught after sigrelse(2). */ -#define PTY_TTY_NAME_SPRINTF \ - { \ - char *ptsname (int), *ptyname; \ - \ - sigblock(sigmask(SIGCLD)); \ - if (grantpt(fd) == -1) \ - fatal("could not grant slave pty"); \ - sigunblock(sigmask(SIGCLD)); \ - if (unlockpt(fd) == -1) \ - fatal("could not unlock slave pty"); \ - if (!(ptyname = ptsname(fd))) \ - fatal ("could not enable slave pty"); \ - snprintf (pty_name, sizeof pty_name, "%s", ptyname); \ - } - /* Conservative garbage collection has not been tested, so for now play it safe and stick with the old-fashioned way of marking. */ #define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE === modified file 'src/s/usg5-4-common.h' --- src/s/usg5-4-common.h 2012-07-12 06:34:40 +0000 +++ src/s/usg5-4-common.h 2012-07-12 07:43:05 +0000 @@ -64,9 +64,6 @@ this is all we need. */ #define TIOCSIGSEND TIOCSIGNAL -/* This sets the name of the master side of the PTY. */ -#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); - /* Push various streams modules onto a PTY channel. */ #define SETUP_SLAVE_PTY \ if (ioctl (xforkin, I_PUSH, "ptem") == -1) \ ------------------------------------------------------------ revno: 109047 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-07-12 00:10:44 -0700 message: Move PTY_OPEN from src/s to configure * configure.ac (PTY_OPEN) Move here from src/s. * src/s/cygwin.h, src/s/darwin.h, src/s/gnu-linux.h, src/s/irix6-5.h: Move PTY_OPEN to configure. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-12 06:34:40 +0000 +++ ChangeLog 2012-07-12 07:10:44 +0000 @@ -6,7 +6,7 @@ * configure.ac (NARROWPROTO, NO_ABORT, BROKEN_GET_CURRENT_DIR_NAME) (BROKEN_FIONREAD, BROKEN_PTY_READ_AFTER_EAGAIN, BROKEN_SIGAIO) (BROKEN_SIGPOLL, BROKEN_SIGPTY, FIRST_PTY_LETTER) - (G_SLICE_ALWAYS_MALLOC, PREFER_VSUSP, PTY_ITERATION) + (G_SLICE_ALWAYS_MALLOC, PREFER_VSUSP, PTY_ITERATION, PTY_OPEN) (RUN_TIME_REMAP, SETPGRP_RELEASES_CTTY, TAB3, TABDLY, RUN_TIME_REMAP (XOS_NEEDS_TIME_H): Move here from src/s. === modified file 'configure.ac' --- configure.ac 2012-07-12 06:34:40 +0000 +++ configure.ac 2012-07-12 07:10:44 +0000 @@ -3298,6 +3298,7 @@ dnl trying suffixes 0-16. AH_TEMPLATE(FIRST_PTY_LETTER, [Letter to use in finding device name of first PTY, if PTYs are supported.]) +AH_TEMPLATE(PTY_OPEN, [How to open a PTY, if non-standard.]) case $opsys in aix4-2 ) @@ -3306,12 +3307,18 @@ cygwin ) AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)] ) + dnl multi-line AC_DEFINEs are hard. :( + AC_DEFINE(PTY_OPEN, [ do { int dummy; SIGMASKTYPE mask; mask = sigblock (sigmask (SIGCHLD)); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; sigsetmask (mask); if (fd >= 0) emacs_close (dummy); } while (0)] ) ;; darwin ) AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)] ) dnl Not used, because PTY_ITERATION is defined. AC_DEFINE(FIRST_PTY_LETTER, ['p']) + dnl Note that openpty may fork via grantpt on Mac OS X 10.4/Darwin 8. + dnl But we don't have to block SIGCHLD because it is blocked in the + dnl implementation of grantpt. + AC_DEFINE(PTY_OPEN, [ do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (0)] ) ;; gnu | hpux* | freebsd | netbsd | openbsd ) @@ -3322,6 +3329,10 @@ dnl if HAVE_GRANTPT if test "x$ac_cv_func_grantpt" = xyes; then AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)] ) + dnl if HAVE_GETPT + if test "x$ac_cv_func_getpt" = xyes; then + AC_DEFINE(PTY_OPEN, [fd = getpt ()]) + fi else AC_DEFINE(FIRST_PTY_LETTER, ['p']) fi @@ -3341,6 +3352,7 @@ AC_DEFINE(PTY_ITERATION, []) dnl Not used, because PTY_ITERATION is defined. AC_DEFINE(FIRST_PTY_LETTER, ['q']) + AC_DEFINE(PTY_OPEN, [ { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); }] ) ;; sol2* | unixware ) === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-12 06:34:40 +0000 +++ src/ChangeLog 2012-07-12 07:10:44 +0000 @@ -1,5 +1,8 @@ 2012-07-12 Glenn Morris + * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h: + Move PTY_OPEN to configure. + * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h: * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h: * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure. === modified file 'src/s/cygwin.h' --- src/s/cygwin.h 2012-07-12 06:34:40 +0000 +++ src/s/cygwin.h 2012-07-12 07:10:44 +0000 @@ -19,19 +19,6 @@ #define PTY_NAME_SPRINTF /* none */ #define PTY_TTY_NAME_SPRINTF /* none */ -#define PTY_OPEN \ - do \ - { \ - int dummy; \ - SIGMASKTYPE mask; \ - mask = sigblock (sigmask (SIGCHLD)); \ - if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) \ - fd = -1; \ - sigsetmask (mask); \ - if (fd >= 0) \ - emacs_close (dummy); \ - } \ - while (0) /* Used in various places to enable cygwin-specific code changes. */ #define CYGWIN 1 === modified file 'src/s/darwin.h' --- src/s/darwin.h 2012-07-12 06:34:40 +0000 +++ src/s/darwin.h 2012-07-12 07:10:44 +0000 @@ -32,19 +32,6 @@ #define PTY_NAME_SPRINTF /* none */ #define PTY_TTY_NAME_SPRINTF /* none */ -/* Note that openpty may fork via grantpt on Mac OS X 10.4/Darwin 8. - But we don't have to block SIGCHLD because it is blocked in the - implementation of grantpt. */ -#define PTY_OPEN \ - do \ - { \ - int slave; \ - if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) \ - fd = -1; \ - else \ - emacs_close (slave); \ - } \ - while (0) /* PTYs only work correctly on Darwin 7 or higher. So make the default for process-connection-type dependent on the kernel version. */ === modified file 'src/s/gnu-linux.h' --- src/s/gnu-linux.h 2012-07-12 06:34:40 +0000 +++ src/s/gnu-linux.h 2012-07-12 07:10:44 +0000 @@ -30,7 +30,6 @@ #ifdef HAVE_GETPT #define PTY_NAME_SPRINTF -#define PTY_OPEN fd = getpt () #else /* not HAVE_GETPT */ #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); #endif /* not HAVE_GETPT */ === modified file 'src/s/irix6-5.h' --- src/s/irix6-5.h 2012-07-12 06:34:40 +0000 +++ src/s/irix6-5.h 2012-07-12 07:10:44 +0000 @@ -34,26 +34,6 @@ #ifdef emacs char *_getpty(); #endif -/* Here is how to do it. */ -#define PTY_OPEN \ -{ \ - struct sigaction ocstat, cstat; \ - struct stat stb; \ - char * name; \ - sigemptyset(&cstat.sa_mask); \ - cstat.sa_handler = SIG_DFL; \ - cstat.sa_flags = 0; \ - sigaction(SIGCLD, &cstat, &ocstat); \ - name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \ - sigaction(SIGCLD, &ocstat, (struct sigaction *)0); \ - if (name == 0) \ - return -1; \ - if (fd < 0) \ - return -1; \ - if (fstat (fd, &stb) < 0) \ - return -1; \ - strcpy (pty_name, name); \ -} /* Ulimit(UL_GMEMLIM) is busted... */ #define ULIMIT_BREAK_VALUE 0x14000000 ------------------------------------------------------------ revno: 109046 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-07-11 23:34:40 -0700 message: Move FIRST_PTY_LETTER, PTY_ITERATION from src/s to configure * configure.ac (FIRST_PTY_LETTER PTY_ITERATION): Move here from src/s. * src/s/aix4-2.h, src/s/bsd-common.h, src/s/cygwin.h, src/s/darwin.h: * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h, src/s/template.h: * src/s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-12 02:14:29 +0000 +++ ChangeLog 2012-07-12 06:34:40 +0000 @@ -5,7 +5,8 @@ * configure.ac (NARROWPROTO, NO_ABORT, BROKEN_GET_CURRENT_DIR_NAME) (BROKEN_FIONREAD, BROKEN_PTY_READ_AFTER_EAGAIN, BROKEN_SIGAIO) - (BROKEN_SIGPOLL, BROKEN_SIGPTY, G_SLICE_ALWAYS_MALLOC, PREFER_VSUSP) + (BROKEN_SIGPOLL, BROKEN_SIGPTY, FIRST_PTY_LETTER) + (G_SLICE_ALWAYS_MALLOC, PREFER_VSUSP, PTY_ITERATION) (RUN_TIME_REMAP, SETPGRP_RELEASES_CTTY, TAB3, TABDLY, RUN_TIME_REMAP (XOS_NEEDS_TIME_H): Move here from src/s. === modified file 'configure.ac' --- configure.ac 2012-07-12 02:14:29 +0000 +++ configure.ac 2012-07-12 06:34:40 +0000 @@ -3291,6 +3291,66 @@ esac +dnl Used in process.c, this must be a loop, even if it only runs once. +dnl (Except on SGI; see below. Take that, clarity and consistency!) +AH_TEMPLATE(PTY_ITERATION, [How to iterate over PTYs.]) +dnl Only used if !PTY_ITERATION. Iterate from FIRST_PTY_LETTER to z, +dnl trying suffixes 0-16. +AH_TEMPLATE(FIRST_PTY_LETTER, [Letter to use in finding device name of + first PTY, if PTYs are supported.]) + +case $opsys in + aix4-2 ) + AC_DEFINE(PTY_ITERATION, [int c; for (c = 0; !c ; c++)] ) + ;; + + cygwin ) + AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)] ) + ;; + + darwin ) + AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)] ) + dnl Not used, because PTY_ITERATION is defined. + AC_DEFINE(FIRST_PTY_LETTER, ['p']) + ;; + + gnu | hpux* | freebsd | netbsd | openbsd ) + AC_DEFINE(FIRST_PTY_LETTER, ['p']) + ;; + + gnu-linux | gnu-kfreebsd ) + dnl if HAVE_GRANTPT + if test "x$ac_cv_func_grantpt" = xyes; then + AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)] ) + else + AC_DEFINE(FIRST_PTY_LETTER, ['p']) + fi + ;; + + irix6-5 ) + dnl It looks like this cannot be right, because it is not a loop. + dnl However, process.c actually does this: + dnl # ifndef __sgi + dnl continue; + dnl # else + dnl return -1; + dnl # endif + dnl which presumably makes it OK, since irix == sgi (?). + dnl FIXME it seems like this special treatment is unnecessary? + dnl Why can't irix use a single-trip loop like eg cygwin? + AC_DEFINE(PTY_ITERATION, []) + dnl Not used, because PTY_ITERATION is defined. + AC_DEFINE(FIRST_PTY_LETTER, ['q']) + ;; + + sol2* | unixware ) + dnl This change means that we don't loop through allocate_pty too + dnl many times in the (rare) event of a failure. + AC_DEFINE(FIRST_PTY_LETTER, ['z']) + ;; +esac + + AH_TEMPLATE(SIGNALS_VIA_CHARACTERS, [Make process_send_signal work by "typing" a signal character on the pty.]) === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-12 03:45:46 +0000 +++ src/ChangeLog 2012-07-12 06:34:40 +0000 @@ -1,3 +1,9 @@ +2012-07-12 Glenn Morris + + * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h: + * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h: + * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure. + 2012-07-12 Dmitry Antipov Use empty_unibyte_string where applicable. === modified file 'src/s/aix4-2.h' --- src/s/aix4-2.h 2012-07-12 02:14:29 +0000 +++ src/s/aix4-2.h 2012-07-12 06:34:40 +0000 @@ -28,7 +28,6 @@ /* In AIX, you allocate a pty by opening /dev/ptc to get the master side. To get the name of the slave side, you just ttyname() the master side. */ -#define PTY_ITERATION int c; for (c = 0; !c ; c++) #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptc"); #define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd)); === modified file 'src/s/bsd-common.h' --- src/s/bsd-common.h 2012-07-12 01:49:28 +0000 +++ src/s/bsd-common.h 2012-07-12 06:34:40 +0000 @@ -36,6 +36,3 @@ /* For mem-limits.h. */ #define BSD4_2 - -/* First pty name is /dev/ptyp0. */ -#define FIRST_PTY_LETTER 'p' === modified file 'src/s/cygwin.h' --- src/s/cygwin.h 2012-07-12 02:14:29 +0000 +++ src/s/cygwin.h 2012-07-12 06:34:40 +0000 @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -#define PTY_ITERATION int i; for (i = 0; i < 1; i++) /* ick */ #define PTY_NAME_SPRINTF /* none */ #define PTY_TTY_NAME_SPRINTF /* none */ #define PTY_OPEN \ === modified file 'src/s/darwin.h' --- src/s/darwin.h 2012-07-12 01:49:28 +0000 +++ src/s/darwin.h 2012-07-12 06:34:40 +0000 @@ -30,12 +30,6 @@ distinguish OS X from pure Darwin. */ #define DARWIN_OS -/* Letter to use in finding device name of first pty, - if system supports pty's. 'a' means it is /dev/ptya0 */ -#define FIRST_PTY_LETTER 'p' - -/* Run only once. We need a `for'-loop because the code uses `continue'. */ -#define PTY_ITERATION int i; for (i = 0; i < 1; i++) #define PTY_NAME_SPRINTF /* none */ #define PTY_TTY_NAME_SPRINTF /* none */ /* Note that openpty may fork via grantpt on Mac OS X 10.4/Darwin 8. === modified file 'src/s/gnu-linux.h' --- src/s/gnu-linux.h 2012-07-12 00:49:24 +0000 +++ src/s/gnu-linux.h 2012-07-12 06:34:40 +0000 @@ -28,9 +28,6 @@ #if defined HAVE_GRANTPT #define UNIX98_PTYS -/* Run only once. We need a `for'-loop because the code uses `continue'. */ -#define PTY_ITERATION int i; for (i = 0; i < 1; i++) - #ifdef HAVE_GETPT #define PTY_NAME_SPRINTF #define PTY_OPEN fd = getpt () @@ -56,13 +53,7 @@ sigunblock (sigmask (SIGCHLD)); \ } -#else /* not HAVE_GRANTPT */ - -/* Letter to use in finding device name of first pty, - if system supports pty's. 'p' means it is /dev/ptyp0 */ -#define FIRST_PTY_LETTER 'p' - -#endif /* not HAVE_GRANTPT */ +#endif /* HAVE_GRANTPT */ /* Here, on a separate page, add any special hacks needed to make Emacs work on this system. For example, === modified file 'src/s/hpux10-20.h' --- src/s/hpux10-20.h 2012-07-12 01:49:28 +0000 +++ src/s/hpux10-20.h 2012-07-12 06:34:40 +0000 @@ -24,10 +24,6 @@ #define USG5 #define HPUX -/* Letter to use in finding device name of first pty, - if system supports pty's. 'p' means it is /dev/ptym/ptyp0 */ -#define FIRST_PTY_LETTER 'p' - /* Special hacks needed to make Emacs run on this system. */ /* This is how to get the device name of the tty end of a pty. */ === modified file 'src/s/irix6-5.h' --- src/s/irix6-5.h 2012-07-12 01:49:28 +0000 +++ src/s/irix6-5.h 2012-07-12 06:34:40 +0000 @@ -26,11 +26,6 @@ #undef SETUP_SLAVE_PTY -/* Letter to use in finding device name of first pty, - if system supports pty's. 'a' means it is /dev/ptya0 */ -#undef FIRST_PTY_LETTER -#define FIRST_PTY_LETTER 'q' - /* No need to use sprintf to get the tty name--we get that from _getpty. */ #define PTY_TTY_NAME_SPRINTF /* No need to get the pty name at all. */ @@ -39,8 +34,6 @@ #ifdef emacs char *_getpty(); #endif -/* We need only try once to open a pty. */ -#define PTY_ITERATION /* Here is how to do it. */ #define PTY_OPEN \ { \ === modified file 'src/s/template.h' --- src/s/template.h 2012-07-12 00:49:24 +0000 +++ src/s/template.h 2012-07-12 06:34:40 +0000 @@ -29,10 +29,6 @@ /* #define BSD4_2 */ /* #define BSD_SYSTEM */ -/* Letter to use in finding device name of first pty, - if system supports pty's. 'a' means it is /dev/ptya0. */ -#define FIRST_PTY_LETTER 'a' - /* subprocesses should be undefined if you do NOT want to have code for asynchronous subprocesses (as used in M-x compile and M-x shell). === modified file 'src/s/usg5-4-common.h' --- src/s/usg5-4-common.h 2012-07-11 23:40:59 +0000 +++ src/s/usg5-4-common.h 2012-07-12 06:34:40 +0000 @@ -64,10 +64,6 @@ this is all we need. */ #define TIOCSIGSEND TIOCSIGNAL -/* This change means that we don't loop through allocate_pty too many - times in the (rare) event of a failure. */ -#define FIRST_PTY_LETTER 'z' - /* This sets the name of the master side of the PTY. */ #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");