- 11 Sep, 2012 1 commit
-
-
Paul Eggert authored
The porting part of this patch fixes bugs on non-IEEE platforms with frexp, ldexp, logb. * admin/CPP-DEFINES (HAVE_CBRT, HAVE_LOGB, logb): Remove. * configure.ac (logb, cbrt): Do not check for these functions, as they are not being used. * doc/lispref/numbers.texi (Float Basics, Arithmetic Operations, Math Functions): Document that / and mod (with floating point arguments), along with asin, acos, log, log10, expt and sqrt, return special values instead of signaling exceptions. (Float Basics): Document that logb operates on the absolute value of its argument. (Math Functions): Document that (log ARG BASE) also returns NaN if BASE is negative. Document that (expt X Y) returns NaN if X is a finite negative number and Y a finite non-integer. * etc/NEWS: Document NaNs versus signaling-error change. * src/data.c, src/lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error): Now static. * src/floatfns.c: Simplify discussion of functions that Emacs doesn't support, by removing commented-out code and briefly listing the C89 functions excluded. The commented-out stuff was confusing maintenance, e.g., we thought we needed cbrt but it was commented out. (logb): Remove decl; no longer needed. (isfinite): New macro, if not already supplied. (isnan): Don't replace any existing macro. (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp are present on all C89 platforms. (Ffrexp): Do not special-case zero, as frexp does the right thing for that case. (Flogb): Do not use logb, as it doesn't have the desired meaning on hosts that use non-base-2 floating point. Instead, stick with frexp, which is C89 anyway. Do not pass an infinity or a NaN to frexp, to avoid getting an unspecified result.
-
- 09 Sep, 2012 1 commit
-
-
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.
-
- 07 Sep, 2012 2 commits
-
-
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".
-
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
-
- 04 Sep, 2012 2 commits
-
-
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.
-
Paul Eggert authored
instead of by guessing. The guesses were wrong for recent versions of Solaris, such as Solaris 11.
-
- 03 Sep, 2012 1 commit
-
-
Paul Eggert authored
It generates false alarms in doc.c, regex.c, xdisp.c. See <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00040.html>.
-
- 02 Sep, 2012 1 commit
-
-
Jan Djärv authored
Fixes: debbugs:12332
-
- 01 Sep, 2012 2 commits
-
-
Paul Eggert authored
This ports to glibc 2.15 or later, when configured with --enable-gcc-warnings. See Eric Blake in <http://lists.gnu.org/archive/html/bug-grep/2012-09/msg00000.html>.
-
Daniel Colascione authored
This change streamlines the window system selection code in configure.in and moves many common function declarations from window-specific headers to frame.h. It introduces a new TERM_HEADER macro in config.h: we set this macro to the right header to use for the window system for which we're compiling Emacs and have source files include it indirectly. This way, we don't have to teach every file about every window system.
-
- 26 Aug, 2012 1 commit
-
-
Paul Eggert authored
and if the user has not specified CFLAGS. -g3 simplifies debugging, since it makes macros visible to the debugger.
-
- 20 Aug, 2012 1 commit
-
-
Glenn Morris authored
* configure.ac (AC_PROG_LN_S): Test for ln. * Makefile.in (LN_S): New, set by configure. (install-arch-dep): Use $LN_S.
-
- 17 Aug, 2012 2 commits
-
-
Glenn Morris authored
-
Jan Beich authored
* configure.ac (PTY_OPEN): Try posix_openpt on gnu-linux, gnu-kfreebsd, freebsd, and netbsd. Fixes: debbugs:12040
-
- 15 Aug, 2012 1 commit
-
-
Chong Yidong authored
-
- 10 Aug, 2012 2 commits
-
-
Glenn Morris authored
-
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).
-
- 08 Aug, 2012 2 commits
-
-
Dmitry Antipov authored
* configure.ac (--disable-features): Rename to --without-all. (OPTION_DEFAULT_ON): Change to use with_features. * INSTALL: Fix description. * etc/NEWS: Mention --without-all and --enable-link-time-optimization.
-
Glenn Morris authored
-
- 07 Aug, 2012 2 commits
-
-
Dmitry Antipov authored
(OPTION_DEFAULT_ON): Change to use enable_features. * INSTALL: Explain --disable-features.
-
Glenn Morris authored
* configure.ac: Require automake 1.11 (fairly arbitrarily). * autogen.sh (automake_min): Get it from configure.ac.
-
- 06 Aug, 2012 2 commits
-
-
Glenn Morris authored
* configure.ac (BROKEN_GETWD) [unixware]: New define. * src/sysdep.c: Respect BROKEN_GETWD.
-
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.
-
- 05 Aug, 2012 1 commit
-
-
Ulrich Müller authored
Fixes: debbugs:11979
-
- 03 Aug, 2012 1 commit
-
-
Glenn Morris authored
(Avoids some trailing whitespace in generated config.h.)
-
- 02 Aug, 2012 1 commit
-
-
Paul Eggert authored
Without this change, 'configure' fails because the recently-added wait3 prototype in config.h messes up later 'configure' tests. Fix this problem by droping wait3 and WRETCODE, as they're no longer needed on hosts that are current porting targets. * configure.ac (wait3, WRETCODE): Remove, fixing a FIXME. All uses changed to waitpid and WEXITSTATUS. * src/syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
-
- 01 Aug, 2012 5 commits
-
-
Glenn Morris authored
-
Ulrich Müller authored
* configure.ac (LIB_STANDARD, START_FILES) [FreeBSD]: Don't include crtbegin.o and crtend.o. Fixes: debbugs:12047
-
Glenn Morris authored
-
Glenn Morris authored
-
Glenn Morris authored
* configure.ac (DEVICE_SEP, IS_DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP): Move here from src/lisp.h. * src/lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP): Move to configure.ac.
-
- 31 Jul, 2012 9 commits
-
-
Glenn Morris authored
* src/Makefile.in (S_FILE): No longer set by configure. * msdos/sed1v2.inp (S_FILE): Update for format change.
-
Glenn Morris authored
-
Glenn Morris authored
* src/editfns.c (USER_FULL_NAME): * src/emacs.c (SEPCHAR): * src/process.h (NULL_DEVICE): Let configure set them.
-
Glenn Morris authored
-
Glenn Morris authored
This is a belt-and-braces approach. * configure.ac: Related comment.
-
Glenn Morris authored
* configure.ac (AMPERSAND_FULL_NAME, subprocesses): Move here from conf_post.h. * src/conf_post.h (AMPERSAND_FULL_NAME, subprocesses): Move to configure.ac.
-
Dmitry Antipov authored
* configure.ac (MOTIF): Check for /usr/include/openmotif and /usr/(lib|lib64)/openmotif if --with-x-toolkit=motif. * lwlib/lwlib-Xm.c (make_menu_in_widget): Remove unused variable. * src/xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings. * src/xterm.c (x_frame_of_widget): Remove redundant prototype. Move under #ifdef USE_LUCID. (x_create_toolkit_scroll_bar): Adjust scroll_bar_name definition and usage to avoid warnings.
-
Glenn Morris authored
-
Glenn Morris authored
when removing src/s/sol2-6.h yesterday.
-