* configure.ac (--with-gnustep): Document this.
(NS_GNUSTEP_CONFIG): New variable, set if gnustep-config works.
If gnustep-config works, use 'gnustep-config --objc-flags' and
'gnustep-config --gui-libs' to compute GNUstep configuration
variables, instead of attempting to infer them individually.
* etc/NEWS: Document this.
* src/emacs.c [NS_IMPL_GNUSTEP]: Don't include <GNUstepBase/GSConfig.h>.
It doesn't appear to be needed, and the inclusion breaks on
Ubuntu 14.10 when 'configure' uses 'gnustep-config'.
Fixes: bug#19507
* configure.ac (gamegroup): New AC_SUBST.
(--with-gameuser): Allow to specify a group instead of a user.
In the default case, check at configure time if a 'games' user
exists.
* lib-src/update-game-score.c: Allow the program to run sgid
instead of suid, in order to match common practice for most games.
(main): Check if we are running sgid. Pass appropriate file
permission bits to 'write_scores'.
(write_scores): New 'mode' argument, instead of hardcoding 0644.
(get_prefix): Update error message.
* lib-src/Makefile.in (gamegroup): New variable, set by configure.
($(DESTDIR)${archlibdir}): Handle both suid or sgid when
installing the 'update-game-score' program.
* lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score):
Allow the 'update-game-score' helper program to run suid or sgid.
The attribute doesn't help performance significantly, and the
warning seems to be more trouble than it's worth. See the thread at:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00361.html
* configure.ac (WERROR_CFLAGS): Don't use -Wsuggest-attribute=const.
* lib-src/make-docfile.c (write_globals):
Remove special hack for Fnext_read_file_uses_dialog_p.
* src/decompress.c (Fzlib_available_p):
* src/gnutls.c (Fgnutls_available_p):
* src/gtkutil.h (xg_uses_old_file_dialog):
* src/xdisp.c (Ftool_bar_height):
* src/xmenu.c (popup_activated):
No longer const, since it's not const on at lest some
configurations, and we shouldn't lie to the compiler.
This greatly shortens the 'make' output, making it more readable
and useful. For example, on my platform it shortens a
4125-character line "gcc -std=gnu99 -c -Demacs -I. -I. -I../lib
... emacs.c" -- a line so long that it's hard to see what's going
on or where the diagnostics are -- to just "CC emacs.o".
* INSTALL: Document this.
* configure.ac: Add AM_SILENT_RULES([yes]).
(AM_DEFAULT_VERBOSITY): Remove now-unnecessary initialization.
* etc/NEWS: Document this.
Fixes: bug#19501
These are dates that admin/update-copyright did not update, or
updated incorrectly. Also, back out the copyright-date change to
doc/misc/texinfo.tex, as upstream hasn't updated that date yet.
... as per the compiler's target.
The value provided by MSYS2 `uname' is not correct when MSYS2 runs on
one architecture (x86_64) and the user is building for another (i686).
* configure.ac [mingw]: Set $canonical default value as per the
compiler's target.
* configure.ac (comma_version, comma_space_version) [mingw32]:
New output variables.
(nt/emacs.rc, nt/emacsclient.rc) [mingw32]: New output files.
* make-dist: Update nt/ for *.rc -> *.rc.in changes.
* nt/emacs.rc.in, nt/emacsclient.rc.in: Rename from nt/emacs.rc, emacsclient.rc.
Let configure generate the real files, and set the version numbers.
* lib-src/Makefile.in (emacsclient.res): Update deps for nt/emacsclient.rc
now being in the build directory, not the source directory.
* nt/Makefile.in (distclean): Delete *.rc.
(emacs.res): Update deps for nt/emacsclient.rc now being in the
build directory, not the source directory.
* admin/admin.el (set-version): No more need to update nt/*.rc.
* admin/authors.el (authors-renamed-files-alist): Add .rc.in files.
On platforms this old, building with _FORTIFY_SOURCE equal to 2
results in duplicate definitions of standard library functions.
Problem reported by Nelson H. F. Beebe.
* configure.ac (_FORTIFY_SOURCE): Sort after GNULIB_PORTCHECK.
By default, do not enable this unless GNULIB_PORTCHECK is defined.
This better matches the original intent, which as I recall was to
enable these extra checks only with --enable-gcc-warnings.
* configure.ac (doc/man/emacs.1): Generate it.
* Makefile.in (top_bootclean): Remove doc/man/emacs.1.
* make-dist: Do not distribute doc/man/emacs.1.
* admin/admin.el (set-version): No need to update doc/man/emacs.1.
* doc/man/emacs.1.in: Rename from emacs.1.
* .bzrignore: Add doc/man/emacs.1.
Do all putenv calls before Emacs creates any threads.
Use a safer way to modify the TZ environment variable in the
presence of multiple threads. For further thread-safety,
prefer localtime_r and gmtime_r to localtime and gmtime,
and prefer struct tm's tm_gmtoff (if available) to calling
both localtime_r and gmtime_r.
* configure.ac (LOCALTIME_CACHE): Remove.
We needn't worry about SunOS 4 any more; Sun dropped support in 2003.
All uses of LOCALTIME_CACHE removed. This simplifies the fix.
(tzalloc): Add check for this function.
* admin/merge-gnulib (GNULIB_MODULES): Add time_r, since Emacs now
calls localtime_r and gmtime_r directly.
* src/dbusbind.c (Fdbus__init_bus): Move xputenv call from here ...
(init_dbusbind): ... to this new function.
* src/emacs.c (main) [HAVE_DBUS]: Call it before creating threads.
* src/xterm.c (x_term_init): Move xputenv call from here ...
(init_xterm): ... to this new function.
* src/emacs.c (main) [USE_GTK]: Call it before creating threads.
* src/editfns.c (HAVE_TM_GMTOFF): Default to false.
(dump_tz_string): New constant.
(init_editfns): Use it. This centralizes the dump_tz stuff.
Call set_time_zone_rule here, so that its xputenv is done
before Emacs goes multithreaded.
(mktime_z) [!HAVE_TZALLOC]: New function, which is typically
thread-safe enough for Emacs.
(format_time_string, Fdecode_time, Fcurrent_time_string)
(Fcurrent_time_zone):
Prefer localtime_r and gmtime_r, which are more thread-safe, to
localtime and gmtime. Remove now-unnecessary calls to block_input.
(tm_gmtoff): New static function.
(Fdecode_time, Fcurrent_time_zone): Use it.
(Fencode_time): Use mktime_z, for better thread-safety.
(set_time_zone_rule): Now static. Rewrite to be mostly thread-safe,
i.e., not quite thread-safe but good enough for Emacs typical usage.
Do not reclaim storage that is in the environment; let it leak.
Always call tzset, since localtime_r does not.
* src/emacs.c (dump_tz, Fdump_emacs) [HAVE_TZSET]: Remove dump_tz stuff.
This is now done in init_editfns.
* src/systime.h (mktime_z, timezone_t, tzalloc, tzfree) [!HAVE_TZALLOC]:
New macros and declarations, for platforms lacking tzalloc & friends.
Fixes: debbugs:8705
README: Bump version to 25.0.50.
configure.ac (AC_INIT): Bump version to 25.0.50.
nt/makefile.w32-in (VERSION): Bump version to 25.0.50.
nt/emacsclient.rc: Bump version to 25.0.50.
nt/emacs.rc: Bump version to 25.0.50.
nt/config.nt (VERSION): Bump version to 25.0.50.
msdos/sed2v2.inp: Bump version to 25.0.50.
etc/refcards/ru-refcard.tex: Bump version to 25.0.50.
etc/refcards/emacsver.tex: Bump version to 25.0.50.
src/msdos.c (internal_terminal_init): Bump version to 25.
doc/man/emacs.1: Bump version to 25.0.50.
doc/emacs/emacsver.texi (EMACSVER): Bump to 20.0.50.
* configure.ac (HAVE_STATEMENT_EXPRESSIONS): Remove.
For USE_STACK_LISP_OBJECTS, we always assume __GNUC__.
* lisp.h (union Aligned_Cons) [!GCALIGNED]: Define as such.
(SCOPED_CONS_INITIALIZER): New macro.
(scoped_cons) [USE_STACK_LISP_OBJECTS]: Use it.
(USE_LOCAL_ALLOCA): Remove.
(local_cons, local_list1, local_list2, local_list3, local_list4):
Remove. Stack overflow checking makes them too slow.
(make_local_vector): Likewise. Also we just don't have enough
users for it.
(enum LISP_STRING_OVERHEAD): Remove.
(local_string_init, local_vector_init): Remove prototypes.
(make_local_string, build_local_string): Redesign to target short
compile-time string constants, fall back to regular string allocation
where appropriate.
(lisp_string_size): New function.
(verify_ascii) [ENABLE_CHECKING]: Add prototype.
* alloc.c (local_string_init, local_vector_init): Remove.
(verify_ascii) [ENABLE_CHECKING]: New function.
* buffer.c, charset.c, chartab.c, data.c, editfns.c, emacs.c, fileio.c:
* fns.c, font.c, fontset.c, frame.c, keyboard.c, keymap.c, lread.c:
* menu.c, minibuf.c, process.c, textprop.c, xdisp.c, xfns.c, xfont.c:
* xselect.c, xterm.c: All related users changed.
* configure.ac (HAVE_STRUCT_ATTRIBUTE_ALIGNED)
(HAVE_STATEMENT_EXPRESSIONS): New configure-time checks.
* src/alloc.c (local_string_init, local_vector_init):
New functions, defined if USE_LOCAL_ALLOCATORS.
Mostly, these are moved here from lisp.h, as it's not
clear it's worth making them inline.
* src/lisp.h (USE_STACK_LISP_OBJECTS): Default to false.
(GCALIGNED): Depend on HAVE_STRUCT_ATTRIBUTE_ALIGNED and
USE_STACK_LISP_OBJECTS, not on a laundry list.
(local_string_init, local_vector_init): New decls.
(union Aligned_Cons): New type.
(scoped_cons): Use it. Give up on the char trick, as it's a too
much of a maintenance hassle; if someone wants this speedup
they'll just need to convince their compiler to align properly.
Conversely, use the speedup if struct Lisp_Cons happens to
be aligned even without a directive. Better yet, help it along
by using union Aligned_Cons rather than struct Lisp_Cons.
(pointer_valid_for_lisp_object): Remove. This check is not
necessary, since make_lisp_ptr is already doing it. All uses removed.
(local_vector_init, local_string_init): Move to alloc.c.
(build_local_vector): Remove this awkward macro, replacing with ...
(make_local_vector): New macro, which acts more like a function.
Use statement expressions and use __COUNTER__ to avoid macro
capture. Fall back on functions if these features are not supported.
(build_local_string, make_local_string): Likewise.
* configure.ac (WERROR_CFLAGS): Don't disable -Wnested-externs.
While we're at it, don't disable -Wlogical-op either.
* src/bytecode.c: Include blockinput.h and keyboard.h rather
than rolling their APIs by hand.
* src/emacs.c: Include regex.h and rely on its and lisp.h's API
rather than rolling them by hand.
* src/lastfile.c: Include lisp.h, to check this file's API.
* src/lisp.h (lisp_eval_depth, my_edata, my_endbss, my_endbss_static):
New decls.
* src/regex.h (re_max_failures): New decl.
* src/unexcw.c, src/unexmacosx.c, src/unexw32.c:
Rely on lisp.h's API rather than rolling it by hand.
* src/vm-limit.c (__after_morecore_hook, __morecore, real_morecore):
Declare at top level, to pacify GCC -Wnested-externs.
It's not safe to call qsort or qsort_r, since they have undefined
behavior if the user-specified predicate is not a total order.
Also, watch out for garbage-collection while sorting vectors.
* admin/merge-gnulib (GNULIB_MODULES): Add vla.
* configure.ac (qsort_r): Remove, as we no longer use qsort-like
functions.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/vla.h, m4/vararrays.m4: New files, copied from gnulib.
* lib/stdlib.in.h, m4/stdlib_h.m4: Sync from gnulib, incorporating:
2014-08-29 qsort_r: new module, for GNU-style qsort_r
The previous two files' changes are boilerplate generated by
admin/merge-gnulib, and should not affect Emacs.
* src/fns.c: Include <vla.h>.
(sort_vector_predicate) [!HAVE_QSORT_R]: Remove.
(sort_vector_compare): Remove, replacing with ....
(inorder, merge_vectors, sort_vector_inplace, sort_vector_copy):
... these new functions.
(sort_vector): Rewrite to use the new functions.
GCPRO locals, since the predicate can invoke the GC.
Since it's in-place return void; caller changed.
(merge): Use 'inorder', for clarity.
Fixes: debbugs:18361
* configure.ac (AC_CHECK_FUNCS): Check for qsort_r.
* src/fns.c (sort_vector, sort_vector_compare): New functions.
(sort_list): Likewise, refactored out of ...
(Fsort): ... adjusted user. Mention vectors in docstring.
(sort_vector_predicate) [!HAVE_QSORT_R]: New variable.
* src/alloc.c (make_save_int_obj): New function.
* src/lisp.h (enum Lisp_Save_Type): New member SAVE_TYPE_INT_OBJ.
(make_save_int_obj): Add prototype.
* test/automated/fns-tests.el (fns-tests-sort): New test.
dumping and the system malloc after dumping. (Bug#18222)
* configure.ac (HYBRID_MALLOC): New macro; define to use gmalloc
before dumping and the system malloc after dumping. Define on Cygwin.
* src/conf_post.h (malloc, realloc, calloc, free) [HYBRID_MALLOC]:
Define as macros, expanding to hybrid_malloc, etc.
(HYBRID_GET_CURRENT_DIR_NAME): New macro.
(get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Define as
macro.
* src/gmalloc.c: Set up the infrastructure for HYBRID_MALLOC, with a
full implementation on Cygwin. Remove Cygwin-specific code that
is no longer needed.
(malloc, realloc, calloc, free, aligned_alloc) [HYBRID_MALLOC]:
Redefine as macros expanding to gmalloc, grealloc, etc.
(DUMPED, ALLOCATED_BEFORE_DUMPING) [CYGWIN]: New macros.
(get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Undefine.
(USE_PTHREAD, posix_memalign) [HYBRID_MALLOC]: Don't define.
(hybrid_malloc, hybrid_calloc, hybrid_free, hybrid_realloc)
[HYBRID_MALLOC]:
(hybrid_get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
(hybrid_aligned_alloc) [HYBRID_MALLOC && (HAVE_ALIGNED_ALLOC ||
HAVE_POSIX_MEMALIGN)]: New functions.
* src/alloc.c (aligned_alloc) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
HAVE_POSIX_MEMALIGN)]: Define as macro expanding to
hybrid_aligned_alloc; declare.
(USE_ALIGNED_ALLOC) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
HAVE_POSIX_MEMALIGN)]: Define.
(refill_memory_reserve) [HYBRID_MALLOC]: Do nothing.
* src/sysdep.c (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
Define as macro, expanding to gget_current_dir_name, and define
the latter.
* src/emacs.c (main) [HYBRID_MALLOC]: Don't call memory_warnings() or
malloc_enable_thread(). Don't initialize malloc.
* src/lisp.h (NONPOINTER_BITS) [CYGWIN]: Define (because GNU_MALLOC is
no longer defined on Cygwin).
(refill_memory_reserve) [HYBRID_MALLOC]: Don't declare.
* src/sheap.c (bss_sbrk_buffer_end): New variable.
* src/unexcw.c (__malloc_initialized): Remove variable.
* src/ralloc.c: Throughout, treat HYBRID_MALLOC the same as
SYSTEM_MALLOC.
* src/xdisp.c (decode_mode_spec) [HYBRID_MALLOC]: Don't check
Vmemory_full.
* configure.ac (newlocale): Check for this, not for uselocale.
* src/sysdep.c (LC_COLLATE, LC_COLLATE_MASK, freelocale, locale_t)
(newlocale, wcscoll_l): Define substitutes for platforms that
lack them, so as to simplify the mainline code.
(str_collate): Simplify the code by assuming the above definitions.
Use wcscoll_l, not uselocale, as uselocale is too fragile. For
example, the old version left the Emacs in the wrong locale if
wcscoll reported an error. Use 'int', not ptrdiff_t, for the int
result. Report an error if newlocale fails.
Fixes: debbugs:18051
* configure.ac: Check for sigaltstack and related sigaction
support. Unconditionally check for sigsetjmp and siglongjmp.
(HAVE_STACK_OVERFLOW_HANDLING): Define if we can support it.
* src/lisp.h (toplevel) [HAVE_STACK_OVERFLOW_HANDLING]: Declare
siglongjmp point to transfer control from SIGSEGV handler.
* src/keyboard.c (return_to_command_loop, recover_top_level_message)
[HAVE_STACK_OVERFLOW_HANDLING]: New variables.
(regular_top_level_message): New variable.
(command_loop) [HAVE_STACK_OVERFLOW_HANDLING]: Handle non-local
exit from SIGSEGV handler and adjust message displayed by Vtop_level
if appropriate.
(syms_of_keyboard): DEFVAR Vtop_level_message and initialize
new variables described above.
* src/sysdep.c [HAVE_SYS_RESOURCE_H]: Include sys/resource.h as such.
(stack_grows_down, sigsegv_stack, handle_sigsegv)
[HAVE_STACK_OVERFLOW_HANDLING]: New variables and function.
(init_sigsegv): New function.
(init_signals): Use it.
* lisp/startup.el (normal-top-level): Use top-level-message.
* configure.ac: Check also for the uselocale function.
* src/fns.c (Fstring_collate_lessp, Fstring_collate_equalp): New DEFUNs.
* src/sysdep.c (str_collate): New function. (Bug#18051)
configure.ac: Accept "*-mingw*", not just "*-mingw32", as
canonical name of a MinGW build, because using MSYS2 'uname'
produces "MINGW64".
src/Makefile.in (emacs$(EXEEXT)): Retry deletion of bootstrap-emacs
if the initial "rm -f" fails. This is for MinGW builds, where
MS-Windows will not allow deleting the executable file of a
running program.
This fix relies on having the 'fchdir' function, and on having
"." be searchable (or at least readable, on platforms lacking O_SEARCH),
but that's good enough to handle the vast majority of cases and the
remaining folks can just live with the annoyance of file systems
that occasionally can't be unmounted.
* configure.ac (fchdir): New function to check for.
* lib/save-cwd.c: Copy from gnulib, except omit the part that
allocates memory, since that can cause problems in Emacs.
* lib/save-cwd.h: Copy from gnulib.
Fixes: debbugs:18232
* configure.ac (HAVE_TIMERFD): Define only if TFD_CLOEXEC works,
since the code leaked file descriptors to children when !TFD_CLOEXEC.
(HAVE_TIMERFD_CLOEXEC): Remove; no longer used.
* m4/clock_time.m4 (gl_CLOCK_TIME): Don't check for clock_getres.
This reverts the previous change to this file, so it matches
gnulib again.
* src/atimer.c (TIMERFD_CREATE_FLAGS): Remove; we now assume TFD_CLOEXEC.
(alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
Fall back on timer_create if timerfd_create fails at runtime.
(resolution) [HAVE_CLOCK_GETRES]: Remove; we now rely on the
kernel primitives to do resolution. All uses removed.
(timerfd) [!HAVE_TIMERFD]: Define to be -1, for convenience.
(turn_on_atimers): Clear timer_create-based timers too,
for consistency.
* configure.ac (toplevel): Check whether GNU/Linux-specific
timerfd functions and macros are available.
* m4/clock_time.m4 (gl_CLOCK_TIME): Check for clock_getres as well.
* src/atimer.c (toplevel) [HAVE_TIMERFD]: Include sys/timerfd.h.
(toplevel): Rename alarm_timer_ok to special_timer_available.
[HAVE_TIMERFD]: Declare timerfd.
[HAVE_CLOCK_GETRES]: Declare resolution.
(start_atimer) [HAVE_CLOCK_GETRES]: Round up timestamp to
system timer resolution.
(set_alarm) [HAVE_TIMERFD]: Use timerfd_settime.
(timerfd_callback) [HAVE_TIMERFD]: New function.
(atimer_result, debug_timer_callback, Fdebug_timer_check)
[ENABLE_CHECKING]: New function for the sake of automated tests.
(init_atimer) [HAVE_TIMERFD]: Setup timerfd.
[HAVE_CLOCK_GETRES]: Likewise for system timer resolution.
[ENABLE_CHECKING]: Defsubr test function.
* src/atimer.h (timerfd_callback) [HAVE_TIMERFD]: Add prototype.
* src/lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise.
* src/process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function.
* test/automated/timer-tests.el (timer-tests-debug-timer-check): New test.
Linux 'sysinfo' function and 'struct sysinfo' type.
* src/alloc.c (Fmemory_info): New function.
* lisp/files.el (warn-maybe-out-of-memory): New function.
(find-file-noselect): Use it.
* Makefile.in (epaths-force): Don't allow ':' in directories whose
names go into a colon-separated path.
* configure.ac: Fail if submake fails.
Fixes: debbugs:17278
* configure.ac (CFLAGS): With link time optimization,
use -ffat-lto-objects if supported; otherwise Emacs won't
build with GCC 4.9.0.
Fixes: debbugs:17806
* configure.ac (_REENTRANT): Define on Solaris if HAVE_PTHREAD.
This ports part of the recent AIX fix to Solaris. It is needed
for the same reason that _THREAD_SAFE is needed on AIX, e.g., to
make sure that each thread has its own 'errno'.
Fixes: debbugs:17598
* configure.ac (emacs_check_gnu_make): New shell function.
Use it to avoid duplication when checking for GNU Make.
It's OK for 'configure' to use shell functions these days,
as long as we follow the advice in the 'Shell Functions'
section of the Autoconf manual.
It's never been anything more than pointless complexity
* configure.ac (INFO_EXT, INFO_OPTS): Remove output variables.
* Makefile.in (INFO_EXT): Remove and replace by ".info" throughout.
* doc/emacs/Makefile.in (INFO_EXT): Remove and replace by ".info" throughout.
(INFO_OPTS): Set directly rather than with configure.
* doc/lispintro/Makefile.in (INFO_EXT): Remove and replace by ".info" throughout.
(INFO_OPTS): Set directly rather than with configure.
* doc/lispref/Makefile.in (INFO_EXT): Remove and replace by ".info" throughout.
(INFO_OPTS): Set directly rather than with configure.
* doc/misc/Makefile.in (INFO_EXT): Remove and replace by ".info" throughout.
(INFO_OPTS): Set directly rather than with configure.
* configure.ac (with_xpm_set): New shell var.
(_THREAD_SAFE): Define on AIX if HAVE_PTHREAD.
(with_xpm): Default to 'no' on AIX.
(LIBXPM): Append -lXpm if -lXaw is also used, as the latter
requires the former on AIX.
Fixes: debbugs:17598
* configure.ac (AC_PROG_MAKE_SET): Define a dummy.
(MAKE): Set it to GNU Make, if one can be found.
Search PATH for 'make', 'gmake', 'gnumake'.
This works better on platforms like AIX, where GNU Make
might be in /opt/freeware/bin/make, and reside
behind /usr/bin/make in the PATH.
* nt/inc/ms-w32.h (POLL_FOR_INPUT): Likewise.
* src/keyboard.c, src/process.c: Do not define POLL_FOR_INPUT here
because it will be defined in generated config.h if needed.
configure.ac (C_HEAP_SWITCH): Remove.
src/w32heap.c (DUMPED_HEAP_SIZE): Move from w32heap.h. Don't use
HEAPSIZE; instead, define separate values for the 32- and 64-bit
builds.
src/Makefile.in (C_HEAP_SWITCH): Remove.
(ALL_CFLAGS): Don't use $(C_HEAP_SWITCH).
This doesn't fix Bug#17598, but it does fix a regression since Emacs
built with xlc until recently, and perhaps it'll help us fix Bug#17598.
* configure.ac (GC_SETJMP_WORKS): Define for AIX, too.
Merge from gnulib, incorporating:
2014-05-30 ftoastr: work around compiler bug in IBM xlc 12.1
* lib/ftoastr.c: Update from gnulib.
* src/alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE.
* src/conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty.
* src/lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum,
to work around a compiler bug in IBM xlc 12.1.
sigprocmask isn't portable in a multithreaded process.
* configure.ac (gl_THREADLIB): Remove dummy.
Merge from gnulib, incorporating:
2014-05-28 pthread_sigmask, timer-time: use gl_THREADLIB only if needed
* m4/pthread_sigmask.m4, m4/timer_time.m4: Update from gnulib.
* src/Makefile.in (LIB_PTHREAD_SIGMASK): Remove; all uses removed.
Fixes: debbugs:17561
src/Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
configure.
(ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
src/lisp.h (NONPOINTER_BITS): Modify the condition to define to zero
for MinGW, since it no longer uses gmalloc.
src/buffer.c: Do not define mmap allocations functions for Windows.
Remove mmap_find which is unused. Remove mmap_set_vars which does
nothing useful.
[WINDOWSNT]: Include w32heap.h.
(init_buffer): Always allocate new memory for buffers.
src/emacs.c: Remove mmap_set_vars calls.
src/image.c (free_image): Undef free for Windows because it is
redirected to our private version.
src/unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits
compatibility.
(copy_executable_and_dump_data): Remove dumping the heap section.
(unexec): Restore using_dynamic_heap after dumping.
src/w32heap.c (dumped_data_commit, malloc_after_dump)
(malloc_before_dump, realloc_after_dump, realloc_before_dump)
(free_after_dump, free_before_dump, mmap_alloc, mmap_realloc)
(mmap_free): New functions.
src/w32heap.h: Declare dumped_data and mmap_* function prototypes.
nt/inc/ms-w32.h: Switch to the system heap allocation scheme
instead of GNU malloc and ralloc.
nt/inc/sys/mman.h: New file.
nt/INSTALL: Update for the new build requirements.
etc/NEWS: Mention build changes on MS-Windows.
configure.ac (C_HEAP_SWITCH) define for different values of
dumped heap size depending on 32/64bits arch on Windows.
Don't check for pthreads.h on MinGW32/64, it gets in the way.
Use mmap(2) for buffers and system malloc for MinGW32/64.
* configure.ac (opsys): On Power Architecture, treat release 7 of
AIX like releases 5 and 6.
* src/unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr
twice. _text already includes this offset.
(unrelocate_symbols): Don't cast 64-bit integer to pointer.
Fixes: debbugs:17540
Also, remove update-game-scores's limits on game scores and
simplify its file-locking code.
* configure.ac (getdelim, getline): Remove.
* lib-src/update-game-score.c (struct score_entry): Unify the username and
data members to a single user_data member, since they don't need to be
changed independently and getdelim and getline aren't helpful.
Make the score member char *, not intmax_t, so that scores are not
limited to intmax_t. All uses changed.
(lose_syserr): A zero errno stands for invalid data in score file.
(normalize_integer): New function.
(main): Use it. Check for invalid scores. Omit redundant stat check.
(read_score): First arg is now a string, not a FILE *. All uses
changed. Do not use getdelim or getline; that's way simpler.
(read_scores): Read the whole file, and let read_score handle each
line.
(score_compare): Compare strings representing integers, not integers.
(write_scores) [DOS_NT]: Eliminate unnecessary chmod.
(lock_file): Simplify locking code, eliminating goto.
Check for unlink failure.
* configure.ac (HAVE_PNG): Port to platforms where libpng-config
succeeds but png.h is absent, by testing libpng-config's output
rather than trusting it. I ran into this problem when building
Emacs trunk on a Solaris 10 host.
* INSTALL: Prefer './configure FOO=BAR' to 'FOO=BAR ./configure'.
* INSTALL.REPO: pkg-config is no longer required to build from
the repository.
* autogen.sh: Don't check for pkg-config.
(progs): Remove pkg-config.
(pkg_config_min, AUTORECONF_ENV, env_space, ACLOCAL_PATH):
Remove. All uses removed.
* m4/pkg.m4: New file, built by admin/merge-pkg-config.
* configure.ac: Remove unnecessary m4_pattern_forbid of ^PKG_ and
an AC_ARG_VAR of PKG_CONFIG_PATH. pkg.m4 does that for us.
(EMACS_CHECK_MODULES): Remove workaround for old pkg-config bug,
as we use pkg.m4 from a newer pkg-config.
* admin/merge-pkg-config: New script.
* admin/notes/copyright: Update for m4/*.m4, in particular m4/pkg.m4.
* etc/NEWS: Prefer './configure FOO=BAR' to 'FOO=BAR ./configure'.
* etc/PROBLEMS (Build-time-problems): Remove pkg-config problem
that is no longer an issue.
* nt/INSTALL: Remove no-longer-needed notes about pkg-config.
* configure.ac (HAVE_XFIXES): Define if available.
(XFIXES_CFLAGS, XFIXES_LIBS): New AC_SUBSTs.
* src/Makefile.in (XFIXES_CFLAGS, XFIXES_LIBS): New var.
* src/xfns.c (x_set_mouse_color): Do not call make_invisible_cursor here.
(make_invisible_cursor): Move to...
* src/xterm.c (make_invisible_cursor): ...here.
(x_probe_xfixes_extension, xfixes_toggle_visible_pointer)
(x_toggle_visible_pointer, x_setup_pointer_blanking): New functions.
(x_term_init): Call to x_setup_pointer_blanking.
(XTtoggle_invisible_pointer): Use blanking specific to this display.
* src/xterm.h (struct x_display_info): New member toggle_visible_pointer.
* configure.ac (EMACS_CHECK_MODULES): Check for failed exit status
of pkg-config, on older pkg-config versions that don't do it
properly.
Fixes: debbugs:17438
Earlier versions are buggy, as pkg-config --libs can output
nothing, which causes xrandr link failures.
* configure.ac (PKG_PROG_PKG_CONFIG): Bump from 0.9.0 to 0.26.
Fixes: debbugs:17438
This is mainly for simplicity, but it should also avoid
some future problems like the ones we recently had with NetBSD.
* configure.ac (LIBPNG): Configure after LIBZ. Use libpng-config
for cflags, too. Append -lz if we're not already doing that with
LIBZ. Do not bother appending -lm, since we always append that.
Coalesce some duplicate code.
* src/Makefile.in (PNG_CFLAGS): New var.
(ALL_CFLAGS): Use it.
* src/image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
CFLAGS now handles this.
Fixes: debbugs:17339
They fix only bugs that aren't being reported, so it may be better
to do them on the trunk.
* configure.ac (PNG_CFLAGS): Remove. All uses removed.
(LIBPNG): Don't be consistent about -lpng16 versus -lpng.
Ignore libpng-config's exit status. Always append -lz -lm.
* src/Makefile.in (PNG_CFLAGS): Remove; all uses removed.
* src/image.c [HAVE_LIBPNG_PNG_H]: Include <libpng/png.h>, not <png.h>.
Fixes: debbugs:17339
* configure.ac (IMAGEMAGICK_MODULE): Bump prereq from 6.2.8 to 6.3.5.
A more-complicated fix would be to remove uses of PixelSetMagickColor,
introduced in ImageMagick 6.3.5 (Sept. 2007).
Fixes: debbugs:17339
Preserve ACLOCAL_PATH in later builds, so that by default it has
the same value as it did in the first build after initial checkout.
* Makefile.in (ACLOCAL_PATH): New macro.
($(srcdir)/aclocal.m4): Use it.
* configure.ac (ACLOCAL_PATH): AC_SUBST it.
* autogen.sh (env_space): New var.
Tell user what variables, if any, to pass to 'configure'.
The recent changes to configure.ac removed the transliteration of
-I to -isystem in CFLAGS, which is needed for --enable-gcc-warnings.
Bring this back while keeping the spirit of the recent changes.
* configure.ac (edit_cflags): Restore this shell var, and put it
at the top level, where it'll be useful when emacs-24 is next merged.
(EMACS_CHECK_MODULES): New macro. All uses of PKG_CHECK_MODULES
changed to use it.
* configure.ac: Use pkg-config's pkg.m4, rather than reinventing it.
Add explicit AC_SUBST's where needed.
* autogen.sh (progs): Add pkg-config.
(pkg_config_min): New variable.
* INSTALL.REPO: Mention pkg-config.
* etc/PROBLEMS: Mention a related issue that can occur with a local automake.
* configure.ac (edit_cflags): Move this up and to the top level,
so that PNG_CFLAGS can use it too.
(PNG_CFLAGS): New var.
(png_longjmp): Use PNG_CFLAGS when checking.
(LIBPNG): Be consistent about -lpng16 etc; e.g., don't use -lpng16
in some places and -lpng in others. Test libpng-config's exit
status. If it succeeds, use its output rather than appending -lz -lm.
* src/Makefile.in (PNG_CFLAGS): New var.
(ALL_CFLAGS): Use it.
* src/image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
CFLAGS now handles this.
Fixes: debbugs:17339
The DATA_SEG_BITS hack was needed for older 32 bit platforms.
As a result of this change, Emacs won't work on IRIX 6.5 with IRIX
cc, but that platform is so old that SGI itself stopped supporting
it in December 2013. If you still need Emacs on IRIX, please
either compile with GCC and port the undumping code, or run
'./configure --with-wide-int'.
* configure.ac (DATA_SEG_BITS): Remove. All uses removed.
* src/alloc.c (gdb_make_enums_visible): Update to match lisp.h.
* src/lisp.h (GCTYPEBITS): Move definition up, and switch to the
DEFINE_GDB_SYMBOL_START way to define it.
(NONPOINTER_BITS): New macro.
(EMACS_INT): Use it.
[!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting
the problem and/or configuring --with-wide-int.
(USE_LSB_TAG): Simplify, based on above changes.
(gdb_DATA_SEG_BITS): Remove. All uses removed.
* src/vm-limit.c (exceeds_lisp_ptr): Remove. All uses removed.
This patch was inspired by emacs-24 2014-04-09T13:37:49Z!sdl.web@gmail.com, which fixed
a bug due to sloppy library handling in 'configure'.
* configure.ac (LIB_MATH, LIB_PTHREAD, LIBXMU):
Use AC_SEARCH_LIBS instead of AC_CHECK_LIB as per Autoconf manual.
(LIB_MATH, LIB_PTHREAD, HAVE_X11, IMAGEMAGICK_LIBS, GTK_LIBS)
(DBUS_LIBS, LIBXMU, XFT_LIBS, LIBXSM, LIBXML2_LIBS, LIBS_MAIL)
(with_kerberos):
Don't let the library choice infect $LIBS.
(dnet_ntoa, cma_open): Remove obsolete tests.
(emacs_pthread_function): Probe for pthread_kill, not pthread_self,
as that's a bit more selective on GNU/Linux.
(LIBXEXT): Remove.
(touchlock): Test for existence when $LIBS_MAIL is in use.
(AC_CHECK_FUNCS): Use only $LIB_MATH in addition to $LIBS
when testing for typical functions like accept4, lrand48.
(random, rint): Remove obsolete HP-UX 9 A.09.05 test.
This port requires IRIX cc, as I did not have time to get
undump working with the old GCC on the system I had access to,
but that's better than nothing.
* configure.ac (gl_GCC_VERSION_IFELSE): Remove unused macro
that wouldn't have worked anyway, with IRIX cc.
(emacs_cv_clang, emacs_cv_sanitize_address)
(ns_osx_have_104, ns_osx_have_105):
Don't assume '#error' makes the compiler fail,
as this doesn't work with IRIX cc.
(CFLAGS, LIBS): Don't let the GnuTLS results infect later 'configure'
checks. This runs afoul of an IRIX configuration where GnuTLS is
in an optional library that also contains getdelim, and causes
a later 'configure' to incorrectly think getdelim is supported.
* src/alloc.c (TAGGABLE_NULL): New constant,
for porting to hosts with nontrivial DATA_SEG_BITS settings.
(next_vector, set_next_vector): Use it.
* src/conf_post.h (INET6) [IRIX6_5]: Define.
(HAVE_GETADDRINFO) [IRIX6_5]: Undef.
* src/data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined.
* src/lisp.h (lisp_h_XPNTR): Don't OR in bits that aren't masked out,
for consistency with how TAGGABLE_NULL is computed.
Fixes: debbugs:9684