1. 09 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Assume C89 or later for math functions. · f6196b87
      Paul Eggert authored
      This simplifies the code, and makes it a bit smaller and faster,
      and (most important) makes it easier to clean up signal handling
      since we can stop worring about floating-point exceptions in
      library code.  That was a problem before C89, but the problem
      went away many years ago on all practical Emacs targets.
      * configure.ac (frexp, fmod): Remove checks for these functions,
      as we now assume them.
      (FLOAT_CHECK_DOMAIN, HAVE_INVERSE_HYPERBOLIC, NO_MATHERR)
      (HAVE_EXCEPTION):
      Remove; no longer needed.
      * admin/CPP-DEFINES (HAVE_FMOD, HAVE_FREXP, FLOAT_CHECK_DOMAIN)
      (HAVE_INVERSE_HYPERBOLIC, NO_MATHERR): Remove.
      * src/data.c, src/image.c, src/lread.c, src/print.c:
      Don't include <math.h>; no longer needed.
      * src/data.c, src/floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
      might be autoconfigured, as that never happens.
      * src/data.c (fmod):
      * src/doprnt.c (DBL_MAX_10_EXP):
      * src/print.c (DBL_DIG):
      Remove.  C89 or later always defines these.
      * src/floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
      (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
      (arith_error, domain_error, domain_error2):
      Remove all this pre-C89 cruft.  Do not include <errno.h> as that's
      no longer needed -- we simply return what C returns.  All uses removed.
      (IN_FLOAT, IN_FLOAT2): Remove.  All uses replaced with
      the wrapped code.
      (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
      Remove.  All uses expanded, as these macros are no longer used
      more than once and are now more trouble than they're worth.
      (Ftan): Use tan, not sin / cos.
      (Flogb): Assume C89 frexp.
      (fmod_float): Assume C89 fmod.
      (matherr) [HAVE_MATHERR]: Remove; no longer needed.
      (init_floatfns): Remove.  All uses removed.
      f6196b87
  2. 07 Sep, 2012 2 commits
    • Paul Eggert's avatar
      More signal-handler cleanup. · 1a4f1e9b
      Paul Eggert authored
      * configure.ac (FLOAT_CHECK_DOMAIN): Comment fix (Bug#12327).
      * src/floatfns.c: Comment fix.
      * src/lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
      SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
      and anyway the declaration is harmless even if SIGDANGER is not defined.
      * src/syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
      defined BROKEN_FIONREAD).  systty.h formerly did this, but other
      source files not surprisingly expected syssignal.h to define, or
      not define, SIGIO, and it's cleaner to do it that way, for consistency.
      Include <sys/ioctl.h>, for FIONREAD.
      * src/systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
      This eliminates a problem whereby other files mysteriously had
      to include "syssignal.h" before including "systty.h" if they
      wanted to use "#ifdef SIGIO".
      1a4f1e9b
    • Paul Eggert's avatar
      Signal-handler cleanup. · 2fe28299
      Paul Eggert authored
      Emacs's signal handlers were written in the old 4.2BSD style with
      sigblock and sigmask and so forth, and this led to some
      inefficiencies and confusion.  Rewrite these to use
      pthread_sigmask etc. without copying signal sets around.  Also,
      get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
      'signal', and instead use functions that do not attempt to take
      over the system name space.  This patch causes Emacs's text
      segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
      * configure.ac (PTY_OPEN, PTY_TTY_NAME_SPRINTF):
      Adjust to syssignal.h changes.
      (SIGNAL_H_AB): Remove; no longer needed.
      * src/alloc.c, src/emacsgtkfixed.c, src/nsfns.m, src/widget.c, src/xmenu.c:
      Do not include <signal.h> or "syssignal.h", as these
      modules do not use signals.
      * src/atimer.c, src/callproc.c, src/data.c, src/dispnew.c, src/emacs.c:
      * src/floatfns.c, src/gtkutil.c, src/keyboard.c, src/process.c, src/sound.c:
      * src/sysdep.c, src/term.c, src/xterm.c:
      Do not include <signal.h>, as "syssignal.h" does that for us now.
      * src/atimer.c (sigmask_atimers): New function.
      (block_atimers, unblock_atimers): New functions,
      replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
      All uses replaced.
      * src/conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
      no longer needed here.
      * src/emacs.c (main): Inspect existing signal handler with sigaction,
      so that there's	no need to block and unblock SIGHUP.
      * src/sysdep.c (struct save_signal): New member 'action', replacing
      old member 'handler'.
      (save_signal_handlers, restore_signal_handlers):
      Use sigaction instead of 'signal' to save and restore.
      (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
      New function.  All users of 'signal' modified to use set_sighandler
      if they're writeonly, and to use sys_signal if they're read+write.
      (emacs_sigaction_init, forwarded_signal): New functions.
      (sys_signal): Remove.  All uses replaced by calls to sigaction
      and emacs_sigaction_init, or by direct calls to 'signal'.
      (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
      (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
      all uses replaced by pthread_sigmask etc. calls.
      * src/syssignal.h: Include <signal.h>.
      (emacs_sigaction_init, forwarded_signal): New decls.
      (SIGMASKTYPE): Remove.  All uses replaced by its definiens, sigset_t.
      (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
      (sigmask, sys_sigmask): Remove; no longer needed.
      (sigpause): Remove.  All uses replaced by its definiens, sigsuspend.
      (sigblock, sigunblock, sigfree):
      (sigsetmask) [!defined sigsetmask]:
      Remove.  All uses replaced by pthread_sigmask.
      (signal): Remove.  Its remaining uses (with SIG_DFL and SIG_IGN)
      no longer need to be replaced, and its typical old uses
      are now done via emacs_sigaction_init and sigaction.
      (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
      (sys_sigdel): Remove; unused.
      (NSIG): Remove a FIXME; the code's fine.  Remove an unnecessary ifdef.
      
      Fixes: debbugs:12327
      2fe28299
  3. 04 Sep, 2012 2 commits
    • Paul Eggert's avatar
      Simplify redefinition of 'abort' (Bug#12316). · 1088b922
      Paul Eggert authored
      Do not try to redefine the 'abort' function.  Instead, redo
      the code so that it calls 'emacs_abort' rather than 'abort'.
      This removes the need for the NO_ABORT configure-time macro
      and makes it easier to change the abort code to do a backtrace.
      * configure.ac (NO_ABRT): Remove.
      * admin/CPP-DEFINES (NO_ABORT): Remove.
      * nt/inc/ms-w32.h (w32_abort) [HAVE_NTGUI]: Remove.
      * src/.gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
      * src/emacs.c (abort) [!DOS_NT && !NO_ABORT]:
      Remove; sysdep.c's emacs_abort now takes its place.
      * src/lisp.h (emacs_abort): New decl.  All calls from Emacs code to
      'abort' changed to use 'emacs_abort'.
      * src/msdos.c (dos_abort) [defined abort]: Remove; not used.
      (abort) [!defined abort]: Rename to ...
      (emacs_abort): ... new name.
      * src/sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
      the place of the old 'abort' in emacs.c.
      * src/w32.c, src/w32fns.c (abort): Do not #undef.
      * src/w32.c (emacs_abort): Rename from w32_abort.
      1088b922
    • Paul Eggert's avatar
      * configure.ac (_setjmp, _longjmp): Check by compiling · 7b6c362e
      Paul Eggert authored
      instead of by guessing.  The guesses were wrong for
      recent versions of Solaris, such as Solaris 11.
      7b6c362e
  4. 03 Sep, 2012 2 commits
  5. 02 Sep, 2012 1 commit
  6. 01 Sep, 2012 2 commits
  7. 26 Aug, 2012 1 commit
  8. 25 Aug, 2012 3 commits
  9. 24 Aug, 2012 1 commit
  10. 22 Aug, 2012 1 commit
  11. 21 Aug, 2012 1 commit
  12. 20 Aug, 2012 1 commit
  13. 19 Aug, 2012 1 commit
    • Paul Eggert's avatar
      Merge from gnulib. · 562d4436
      Paul Eggert authored
      2012-08-19 ignore-value, stat-time, timespec: omit AC_C_INLINE
      2012-08-19 mktime, sys_select: avoid 'static inline'
      2012-08-19 gnulib-tool: Fix indentation.
      562d4436
  14. 18 Aug, 2012 1 commit
  15. 17 Aug, 2012 1 commit
  16. 15 Aug, 2012 1 commit
  17. 14 Aug, 2012 2 commits
  18. 10 Aug, 2012 2 commits
    • Juanma Barranquero's avatar
      * lib/makefile.w32-in (STAT_TIME_H): New macro. · 57239922
      Juanma Barranquero authored
      (FTOASTR_C, $(BLD)/stat-time.$(O), $(BLD)/timespec.$(O))
      ($(BLD)/u64.$(O)): Update dependencies.
      57239922
    • Glenn Morris's avatar
      Move DIRECTORY_SEP from lisp.h to config.h · 9374581a
      Glenn Morris authored
      * configure.ac (DIRECTORY_SEP): Move here from src/lisp.h.
      
      * src/lisp.h (DIRECTORY_SEP): Let configure set it.
      
      * nt/config.nt (DIRECTORY_SEP): Move here from src/lisp.h.
      
      * lib-src/movemail.c (DIRECTORY_SEP, IS_DIRECTORY_SEP):
      * lib-src/make-docfile.c (DIRECTORY_SEP, IS_DIRECTORY_SEP):
      * lib-src/emacsclient.c (DIRECTORY_SEP, IS_DIRECTORY_SEP, IS_DEVICE_SEP):
      Remove (they are in config.h now).
      9374581a
  19. 08 Aug, 2012 1 commit
  20. 07 Aug, 2012 2 commits
  21. 06 Aug, 2012 3 commits
    • Glenn Morris's avatar
      Grammar fixes · a4fe5376
      Glenn Morris authored
      a4fe5376
    • Glenn Morris's avatar
      Guard against potential configure bug wrt HAVE_GETWD · 1db4583a
      Glenn Morris authored
      * configure.ac (BROKEN_GETWD) [unixware]: New define.
      
      * src/sysdep.c: Respect BROKEN_GETWD.
      1db4583a
    • Glenn Morris's avatar
      Remove GNU_LIBRARY_PENDING_OUTPUT_COUNT · 1c6f11f4
      Glenn Morris authored
      * configure.ac (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Remove.
      (PENDING_OUTPUT_COUNT): Absorb GNU_LIBRARY_PENDING_OUTPUT_COUNT.
      (DISPNEW_NEEDS_STDIO_EXT): New define.
      
      * src/dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
      Let configure handle it.
      (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
      
      * nt/config.nt (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Remove.
      (PENDING_OUTPUT_COUNT): Define it as dispnew.c used to.
      
      * admin/CPP-DEFINES (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Remove.
      1c6f11f4
  22. 05 Aug, 2012 2 commits
  23. 03 Aug, 2012 3 commits
  24. 02 Aug, 2012 3 commits