emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109044: Move more things from src/s


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109044: Move more things from src/s to configure
Date: Wed, 11 Jul 2012 22:14:29 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109044
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2012-07-11 22:14:29 -0400
message:
  Move more things from src/s to configure
  
  * configure.ac (BROKEN_GET_CURRENT_DIR_NAME, BROKEN_PTY_READ_AFTER_EAGAIN)
  (G_SLICE_ALWAYS_MALLOC): Move here from src/s.
  
  * src/s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
  * src/s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
  * src/s/aix4-2.h (BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
modified:
  ChangeLog
  configure.ac
  src/ChangeLog
  src/s/aix4-2.h
  src/s/cygwin.h
  src/s/freebsd.h
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-07-12 01:49:28 +0000
+++ b/ChangeLog 2012-07-12 02:14:29 +0000
@@ -3,9 +3,10 @@
        * configure.ac (NO_MATHERR): Unconditionally define for Darwin;
        as src/s/darwin.h used to.
 
-       * configure.ac (NARROWPROTO, NO_ABORT, BROKEN_FIONREAD, BROKEN_SIGAIO)
-       (BROKEN_SIGPOLL, BROKEN_SIGPTY, PREFER_VSUSP, RUN_TIME_REMAP)
-       (SETPGRP_RELEASES_CTTY, TAB3, TABDLY, RUN_TIME_REMAP
+       * 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)
+       (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  <address@hidden>

=== modified file 'configure.ac'
--- a/configure.ac      2012-07-12 01:49:28 +0000
+++ b/configure.ac      2012-07-12 02:14:29 +0000
@@ -2722,11 +2722,14 @@
 touchlock \
 cfmakeraw cfsetspeed copysign __executable_start)
 
+dnl FIXME Fragile: something else may test for getwd as a dependency.
+dnl Change to defining BROKEN_xxx ?
 dnl getwd appears to be buggy on SVR4.2, so we don't use it.
 if test $opsys != unixware; then
   AC_CHECK_FUNCS(getwd)
 fi
 
+dnl FIXME Fragile: see above.
 ## Eric Backus <address@hidden> says, HP-UX 9.x on HP 700 machines
 ## has a broken `rint' in some library versions including math library
 ## version number A.09.05.
@@ -3171,6 +3174,47 @@
     AC_DEFINE(BROKEN_SIGAIO, 1, [Define if SIGAIO should not be used.])
     AC_DEFINE(BROKEN_SIGPOLL,1, [Define if SIGPOLL should not be used.])
     AC_DEFINE(BROKEN_SIGPTY, 1, [Define if SIGPTY should not be used.])
+
+    dnl On AIX Emacs uses the gmalloc.c malloc implementation.  But given
+    dnl the way this system works, libc functions that return malloced
+    dnl memory use the libc malloc implementation. Calling xfree or
+    dnl xrealloc on the results of such functions results in a crash.
+    dnl
+    dnl One solution for this could be to define SYSTEM_MALLOC in configure,
+    dnl but that does not currently work on this system.
+    dnl
+    dnl It is possible to completely override the malloc implementation on
+    dnl AIX, but that involves putting the malloc functions in a shared
+    dnl library and setting the MALLOCTYPE environment variable to point to
+    dnl that shared library.
+    dnl
+    dnl Emacs currently calls xrealloc on the results of get_current_dir name,
+    dnl to avoid a crash just use the Emacs implementation for that function.
+    dnl
+    dnl FIXME We could change the AC_CHECK_FUNCS call near the start
+    dnl of this file, so that we do not check for get_current_dir_name
+    dnl on AIX.  But that might be fragile if something else ends
+    dnl up testing for get_current_dir_name as a dependency.
+    AC_DEFINE(BROKEN_GET_CURRENT_DIR_NAME, 1, [Define if
+      get_current_dir_name should not be used.])
+    ;;
+
+  freebsd)
+    dnl Circumvent a bug in FreeBSD.  In the following sequence of
+    dnl writes/reads on a PTY, read(2) returns bogus data:
+    dnl
+    dnl write(2)  1022 bytes
+    dnl write(2)   954 bytes, get EAGAIN
+    dnl read(2)   1024 bytes in process_read_output
+    dnl read(2)     11 bytes in process_read_output
+    dnl
+    dnl That is, read(2) returns more bytes than have ever been written
+    dnl successfully.  The 1033 bytes read are the 1022 bytes written
+    dnl successfully after processing (for example with CRs added if the
+    dnl terminal is set up that way which it is here).  The same bytes will
+    dnl be seen again in a later read(2), without the CRs.
+    AC_DEFINE(BROKEN_PTY_READ_AFTER_EAGAIN, 1, [Define on FreeBSD to
+      work around an issue when reading from a PTY.])
     ;;
 
   dnl Define the following so emacs symbols will not conflict with those
@@ -3393,6 +3437,16 @@
 
 
 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.
+  dnl As malloc is not the Cygwin malloc, the Cygwin memalign always
+  dnl returns ENOSYS.  A workaround is to set G_SLICE=always-malloc. */
+  cygwin)
+    AC_DEFINE(G_SLICE_ALWAYS_MALLOC, 1, [Define to set the
+      G_SLICE environment variable to "always-malloc" at startup, if
+      using GTK.])
+    ;;
+
   gnu) opsysfile="s/bsd-common.h" ;;
 
   gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;;

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-07-12 01:49:28 +0000
+++ b/src/ChangeLog     2012-07-12 02:14:29 +0000
@@ -1,5 +1,7 @@
 2012-07-12  Glenn Morris  <address@hidden>
 
+       * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
+       * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
        * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
        * s/hpux10-20.h (RUN_TIME_REMAP):
        * s/bsd-common.h (TABDLY): Move to configure.
@@ -9,7 +11,7 @@
        * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
 
        * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
-       (BROKEN_SIGPOLL): Let configure set them.
+       (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
 
        * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
 

=== modified file 'src/s/aix4-2.h'
--- a/src/s/aix4-2.h    2012-07-12 01:18:45 +0000
+++ b/src/s/aix4-2.h    2012-07-12 02:14:29 +0000
@@ -43,23 +43,6 @@
 #define NO_EDITRES
 #endif
 
-/* On AIX Emacs uses the gmalloc.c malloc implementation.  But given
-   the way this system works, libc functions that return malloced
-   memory use the libc malloc implementation. Calling xfree or
-   xrealloc on the results of such functions results in a crash.
-
-   One solution for this could be to define SYSTEM_MALLOC in configure,
-   but that does not currently work on this system.
-
-   It is possible to completely override the malloc implementation on
-   AIX, but that involves putting the malloc functions in a shared
-   library and setting the MALLOCTYPE environment variable to point to
-   that shared library.
-
-   Emacs currently calls xrealloc on the results of get_current_dir name,
-   to avoid a crash just use the Emacs implementation for that function.  */
-#define BROKEN_GET_CURRENT_DIR_NAME 1
-
 /* 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/cygwin.h'
--- a/src/s/cygwin.h    2012-07-12 00:49:24 +0000
+++ b/src/s/cygwin.h    2012-07-12 02:14:29 +0000
@@ -36,9 +36,3 @@
 
 /* Used in various places to enable cygwin-specific code changes.  */
 #define CYGWIN 1
-
-/* Emacs supplies its own malloc, but glib (part of Gtk+) calls
-   memalign and on Cygwin, that becomes the Cygwin-supplied memalign.
-   As malloc is not the Cygwin malloc, the Cygwin memalign always
-   returns ENOSYS.  A workaround is to set G_SLICE=always-malloc. */
-#define G_SLICE_ALWAYS_MALLOC

=== modified file 'src/s/freebsd.h'
--- a/src/s/freebsd.h   2012-07-11 02:29:13 +0000
+++ b/src/s/freebsd.h   2012-07-12 02:14:29 +0000
@@ -33,21 +33,6 @@
 #define BSD_SYSTEM 199506
 #endif
 
-/* Circumvent a bug in FreeBSD.  In the following sequence of
-   writes/reads on a PTY, read(2) returns bogus data:
-
-   write(2)  1022 bytes
-   write(2)   954 bytes, get EAGAIN
-   read(2)   1024 bytes in process_read_output
-   read(2)     11 bytes in process_read_output
-
-   That is, read(2) returns more bytes than have ever been written
-   successfully.  The 1033 bytes read are the 1022 bytes written
-   successfully after processing (for example with CRs added if the
-   terminal is set up that way which it is here).  The same bytes will
-   be seen again in a later read(2), without the CRs.  */
-#define BROKEN_PTY_READ_AFTER_EAGAIN 1
-
 /* 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]