1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00
Commit Graph

702 Commits

Author SHA1 Message Date
Paul Eggert
241260cc28 Revert changes installed by xwidgets merge 2015-02-01 11:45:15 -08:00
Ulrich Müller
f1cea3e96c configure.ac: Fix a typo. 2015-02-01 15:05:20 +01:00
Joakim Verona
69815dfe37 Merge branch 'master' into xwidget 2015-02-01 00:37:46 +01:00
Fabián Ezequiel Gallina
294127e7d5 Merge from origin/emacs-24
24aacfc Improve documentation of buttons  (Bug#19628)
52ae3db doc/lispref/text.texi (Clickable Text): Improve indexing.  (Bug#19629)
310f707 lisp/button.el (button-activate, push-button): Doc fix.  (Bug#19628)
3ee38f2 Disallow w32 builds --without-toolkit-scroll-bars.
e6518fc Fix display of images in R2L screen lines
b0af674 Use u+05f4 in TUTORIAL.he.
2015-01-28 01:03:45 -03:00
Joakim Verona
d522fd8ca7 Merge branch 'master' into xwidget 2015-01-25 21:19:27 +01:00
Paul Eggert
f6ef836521 Use gnustep-config if available
* 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
2015-01-24 18:20:29 -08:00
Joakim Verona
d6ada5ae0f Merge branch 'master' into xwidget 2015-01-22 00:05:27 +01:00
Ulrich Müller
20f6648552 Allow update-game-score to run sgid instead of suid.
* 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.
2015-01-21 21:33:17 +01:00
Eli Zaretskii
3ee38f2000 Disallow w32 builds --without-toolkit-scroll-bars.
configure.ac (HAVE_W32): Abort with error message if
 --without-toolkit-scroll-bars was specified.  See
 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00525.html
 for the details.
2015-01-20 18:26:28 +02:00
Joakim Verona
5e22550173 merge master 2015-01-16 22:29:10 +01:00
Paul Eggert
0adc75af18 Give up on -Wsuggest-attribute=const
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.
2015-01-15 20:37:44 -08:00
Joakim Verona
cc7cb20d6a merge master, fix conflicts 2015-01-11 18:40:21 +01:00
Paul Eggert
b995b4ae8f Default to 'configure --enable-silent-rules'
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
2015-01-11 01:18:48 -08:00
jave
db4613576d merge master 2015-01-02 16:30:55 +01:00
Paul Eggert
52a4e87c63 Fix copyright years by hand
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.
2015-01-01 14:27:34 -08:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Paul Eggert
a012c7bbca Fix copyright years by hand
These are dates that admin/update-copyright did not update,
or updated incorrectly.
2015-01-01 09:18:59 -08:00
Paul Eggert
732fd4c7e1 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 09:18:06 -08:00
Glenn Morris
9875d23d86 * configure.ac: Simplify gnutls tests.
Ref: http://debbugs.gnu.org/19168#21
2014-11-28 19:00:15 -08:00
Dani Moncayo
c9cb3d535b configure.ac [MINGW]: Fix the way of getting the right host platform.
* configure.ac [MINGW]: Fix the way of getting the right host
platform.
2014-11-26 20:59:07 +01:00
Glenn Morris
7dbd10d530 * configure.ac: Fix yesterday's use of uninitialised $version. 2014-11-25 08:43:52 -08:00
Oscar Fuentes
70d7aa8a28 configure.ac [mingw]: Set $canonical default value
... 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.
2014-11-25 03:29:43 +01:00
Glenn Morris
8df5745cf5 * configure.ac: Relocate some recent changes to a more logical location. 2014-11-24 13:40:02 -05:00
Glenn Morris
409e4c82dc * configure.ac [HAVE_W32]: Generate nt/*.rc files when HAVE_W32. 2014-11-24 09:07:45 -08:00
Glenn Morris
84e2f13cd5 Further reduce number of versioned files storing Emacs version number.
* 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.
2014-11-22 14:07:48 -08:00
Paul Eggert
5caf6c9358 build: port to GCC 4.6.4 + glibc 2.5
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.
2014-11-14 12:25:11 -08:00
Glenn Morris
be1f31616a Further reduce the number of versioned files storing the version number
* 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.
2014-11-09 18:01:56 -08:00
Glenn Morris
4e65e7e2b9 Stop keeping etc/refcards/emacsver.tex in the repository
* configure.ac (etc/refcards/emacsver.tex): Generate it.

* Makefile.in (etc-emacsver): New PHONY rule.
(bootstrap-clean): Delete etc/refcards/emacsver.tex.

* admin/admin.el (set-version): No need to update etc/refcards/emacsver.tex.
(set-copyright): Update etc/refcards/emacsver.tex.in.

* etc/refcards/emacsver.tex.in: Rename from emacsver.tex.

* .bzrignore: Add etc/refcards/emacsver.tex.
2014-11-09 16:57:01 -08:00
Glenn Morris
a16d6f90ee Stop keeping doc/emacs/emacsver.texi in the repository
* configure.ac (doc/emacs/emacsver.texi): Generate it.

* make-dist (doc/emacs/emacsver.texi) [update]: No longer check it.

* doc/emacs/Makefile.in (top_srcdir, version): New, set by configure.
(doc-emacsver): New rule.
(bootstrap-clean, maintainer-clean): Delete emacsver.texi.
(emacsver.texi.in): Rename from emacsver.texi.

* admin/admin.el (set-version): No need to update doc/emacs/emacsver.texi.
(make-manuals-dist-output-variables): Add top_srcdir.
(make-manuals-dist--1): Handle @version@ specially.

* .bzrignore: Add doc/emacs/emacsver.texi.
2014-11-09 16:17:17 -08:00
Stefan Monnier
bdc9a8b5ac * configure.ac: Bump version to 24.4.51 to avoid ambiguity with the old
trunk's 24.4.50.
2014-10-22 09:10:41 -04:00
Eli Zaretskii
acb965c2ad Bump Emacs version to 24.4.50. 2014-10-21 18:36:23 +03:00
Glenn Morris
67ac6d6051 * configure.ac: Simplify OS X $canonical tests.
* etc/NEWS: Clarify OS X entries.
2014-10-17 14:05:48 -04:00
Glenn Morris
6743c1928e Bump version to 24.4
Regenerate ldefs-boot and AUTHORS
2014-10-16 21:56:41 -07:00
Jan Djärv
290569dcce * configure.ac: Move the OSX 10.6 test. 2014-10-15 19:42:05 +02:00
Jan Djärv
980d78b358 * configure.ac: Require OSX >= 10.6 even if --with-ns is not given. 2014-10-14 17:31:44 +02:00
Jan Djärv
3f8c645caa * configure.ac: apple-darwin powerpc is unported. 2014-10-14 07:07:21 +02:00
Glenn Morris
b1d5ab0352 Merge from emacs-24; up to 2014-07-26T11:58:24Z!schwab@linux-m68k.org 2014-10-12 15:56:45 -07:00
Jan Djärv
9a265587d2 Require OSX >= 10.6. Remove PowerPC unexec code.
* configure.ac: Require OSX 10.6.  Remove NSInteger test,
use nsfont for Gnustep, macfont for OSX.

* etc/NEWS: OSX required is 10.6 or newer.

* src/Makefile.in: Replace nsfont.o macfont.o with ns_fontfile in
comment.

* src/macfont.h (MAC_FONT_FORMAT_ATTRIBUTE, MAC_FONT_FORMAT_BITMAP)
(mac_font_copy_non_synthetic_table): Remove versions for OSX < 10.6

* src/nsfns.m: Always include src/macfont.h on COCOA.
(ns_filename_from_panel, ns_directory_from_panel)
(Fx_create_frame, Fns_popup_font_panel, ns_run_file_dialog)
(Fns_read_file_name, Fns_list_services): Remove code for OSX < 10.6

* src/nsterm.m: Always include src/macfont.h on COCOA.
(ns_update_auto_hide_menu_bar, ns_draw_fringe_bitmap)
(ns_dumpglyphs_image, ns_check_menu_open)
(applicationDidFinishLaunching)
(antialiasThresholdDidChange:)
(keyDown:, toggleFullScreen:, setPosition:portion:whole:): Remove
checks for OSX <= 10.5/10.6.
(changeFont:): Use macfont on COCOA, nsfont on GNUSTEP.
(syms_of_nsterm): Call syms_of_macfont on COCOA, syms_of_nsfont on
GNUSTEP.

* src/macfont.m: Remove >= 1050 check.
(macfont_create_family_with_symbol)
(macfont_get_glyph_for_character)
(mac_font_get_glyphs_for_variants)
(mac_ctfont_create_available_families, syms_of_macfont): Remove
code for OSX < 10.6.
(mac_font_family_group, mac_font_family_compare): Remove, only used
for OSX < 10.6.

* src/nsimage.m (allocInitFromFile:): Remove code for OSX < 10.6.

* src/nsmenu.m (NSMenuDidBeginTrackingNotification): Remove.
(x_activate_menubar, trackingNotification:): Remove check for
OSX >= 10.5.
(menuNeedsUpdate:): Remove check for OSX < 10.5.

* src/nsterm.h (MAC_OS_X_VERSION_10_4, MAC_OS_X_VERSION_10_5): Remove.
(NS_HAVE_NSINTEGER): Remove block.
Remove >= OSX 10.6 tests.

* src/unexmacosx.c: Remove include ppc/reloc.h.
(unrelocate, copy_dysymtab): Remove PPC code.
(rebase_reloc_address): Remove, only used for PPC:
2014-10-12 10:35:50 +02:00
Paul Eggert
4c4c5b9121 Fix putenv race conditions with undefined behavior.
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
2014-10-11 23:09:50 -07:00
Ken Brown
20f02f2768 * configure.ac (LD_SWITCH_SYSTEM_TEMACS) [CYGWIN]: Set stack size to 8 MB. (Bug#18438) 2014-10-11 13:16:12 -04:00
Jan Djärv
971113a869 * configure.ac: Add -Wno-string-plus-int for clang. 2014-10-06 08:21:13 +02:00
Glenn Morris
d311e8d04b * configure.ac: Silence warning with some old Xrandr.h.
Fixes: debbugs:18465
2014-10-04 00:22:51 -07:00
Glenn Morris
79a90058ec Merge from emacs-24; up to 2014-07-16T17:06:12Z!rgm@gnu.org 2014-10-03 08:44:46 -07:00
Paul Eggert
6d5bb00fd1 * configure.ac: Port to strict POSIX shells on non-MinGW.
Fixes: debbugs:18612
2014-10-02 15:29:39 -07:00
Glenn Morris
ef9bcf3b40 Bump version to 24.3.94; regenerate ldefs-boot and AUTHORS 2014-10-01 17:49:14 -07:00
Eli Zaretskii
2b3d968a02 Follow-up to renaming v24.5 to 25.1.
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.
2014-09-29 22:49:44 +03:00
Dmitry Antipov
71a72686e3 Keep stack-allocated Lisp objects fast rather than versatile.
* 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.
2014-09-29 10:44:31 +04:00
Ken Brown
bbf5e14b38 * configure.ac [CYGWIN]: Enable sound support. 2014-09-27 19:35:50 -04:00
Paul Eggert
2494447b71 * configure.ac (MAKEINFO): Allow 'makeinfo' to be called 'texi2any'. 2014-09-24 19:59:45 -07:00
Stefan Monnier
9949231fb0 Merge from emacs-24 2014-09-22 15:20:45 -04:00
David Caldwell
63126683db * configure.ac: Increase headerpad_extra to 1000, update the comment
about load commands.

* src/unexmacosx.c (dump_it): Improve error message.

Fixes: debbugs:18505
2014-09-21 22:35:22 +02:00
Glenn Morris
11af46027d Merge from emacs-24; up to 2014-07-09T02:04:12Z!rgm@gnu.org 2014-09-14 17:20:21 -07:00
Eli Zaretskii
e868e853a8 Resurrect sound support on MS-Windows that was lost in transition.
configure.ac (HAVE_SOUND): Check for mmsystem.h header that
 defines the sound stuff on MS-Windows.  (Bug#18463)
2014-09-13 10:10:40 +03:00
Paul Eggert
11e28ab08d Improve the experimental local and scoped allocation.
* 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.
2014-09-09 23:38:38 -07:00
Paul Eggert
6726de5263 Expand @AM_DEFAULT_VERBOSITY@ even if Automake is old.
* configure.ac: Assume verbose output for older Automake.

Fixes: debbugs:18415
2014-09-07 01:46:42 -07:00
Paul Eggert
315d21d20f * configure.ac (MAKEINFO): Clean up some configuration bitrot.
MAKEINFO is already set before we get here, so no need to call AC_PATH_PROG.
Bypass $am_missing_run.  Simplify version-number checking.
2014-09-03 19:02:46 -07:00
Paul Eggert
1564080f0b Clean up extern decls a bit.
* 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.
2014-08-31 19:37:22 -07:00
Paul Eggert
53d815b09f * configure.ac (__restrict_arr): Remove; no longer used. 2014-08-30 19:50:10 -07:00
Paul Eggert
ced5a8f219 * configure.ac (MAKE): Export it, for config.status.
Needed on AIX when 'configure' infers MAKE=gmake.
2014-08-30 19:34:31 -07:00
Paul Eggert
f9caea8233 Vector-sorting fixes.
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
2014-08-30 15:59:39 -07:00
Dmitry Antipov
1764ec4414 Add vectors support to Fsort.
* 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.
2014-08-29 11:29:47 +04:00
Ken Brown
ea65250077 Add support for HYBRID_MALLOC, allowing the use of gmalloc before
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.
2014-08-28 10:48:02 -04:00
Paul Eggert
110d87a1cc Improve robustness of new string-collation code.
* 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
2014-08-27 11:56:47 -07:00
Dmitry Antipov
75c76162ab * configure.ac (HAVE_LINUX_SYSINFO): Avoid false positive on Solaris. 2014-08-26 18:42:06 +04:00
Dmitry Antipov
ebd31792b2 Handle C stack overflow caused by too nested Lisp evaluation.
* 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.
2014-08-26 10:25:59 +04:00
Ken Brown
940ac42ae3 Fix accidental deletion of a line in last change. 2014-08-25 16:55:37 -04:00
Ken Brown
79404e16fb * configure.ac (G_SLICE_ALWAYS_MALLOC): Remove obsolete macro.
* src/emacs.c (main): Remove use of obsolete macro
G_SLICE_ALWAYS_MALLOC.
2014-08-25 16:49:52 -04:00
Michael Albinus
07b47905d3 Add string collation.
* 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)
2014-08-24 17:40:07 +02:00
Eli Zaretskii
3410f2a31e configure.ac: Comment fix. 2014-08-23 12:14:13 +03:00
Karol Ostrovsky
0d880e737b Fix bug #18302 with minor issues in the MSYS2/MinGW64 build.
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.
2014-08-23 11:48:30 +03:00
Ken Brown
09f3715543 Backport: * configure.ac (HAVE_XPM): Explain the use of CPPFLAGS in the Cygwin-w32 build. (Bug#18302) 2014-08-22 09:03:05 -04:00
Ken Brown
58e6bac86f * configure.ac (HAVE_XPM): Explain the use of CPPFLAGS in the Cygwin-w32 build. (Bug#18302) 2014-08-21 17:52:26 -04:00
Glenn Morris
64a6f1f30e Bump version number to 24.3.93 2014-08-14 15:56:31 -04:00
Glenn Morris
c7367d2de3 Merge from emacs-24; up to 2014-06-28T23:35:17Z!rgm@gnu.org 2014-08-10 17:59:34 -07:00
Paul Eggert
f22bc725a1 Don't prevent random file systems from being unmounted.
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
2014-08-10 13:40:57 -07:00
Paul Eggert
88e3bc88c7 * configure.ac (HAVE_TIMERFD): Also check for TFD_NONBLOCK,
since the code is using TFD_NONBLOCK now.
2014-08-02 14:50:13 -07:00
Paul Eggert
5c6476b48a Simplify timerfd configuration and fix some minor glitches.
* 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.
2014-07-31 13:17:01 -07:00
Dmitry Antipov
768b24eb0e On GNU/Linux, use timerfd for asynchronous timers.
* 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.
2014-07-28 10:28:15 +04:00
Dmitry Antipov
9242810cd3 * configure.ac: Check whether sys/sysinfo.h provides
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.
2014-07-10 16:33:35 +04:00
Glenn Morris
93160ec392 Use gcc auto-dependency information for lwlib and oldXMenu
* configure.ac (lwlib_deps_frag, oldxmenu_deps_frag): New output files.

* make-dist (lwlib, oldXMenu): Distribute *.mk.

* lwlib/Makefile.in: Move old dependency information to new file deps.mk.
(MKDIR_P, DEPFLAGS, MKDEPDIR, lwlib_deps_frag):
New, set by configure.
(DEPDIR): New variable.
(ALL_CFLAGS): Add DEPFLAGS.
(.c.o): Add MKDEPDIR.
(clean, mostlyclean): Delete DEPDIR.

* lwlib/deps.mk, lwlib/autodeps.mk: New files.

* oldXMenu/Makefile.in: Move old dependency information to new file deps.mk.
(MKDIR_P, DEPFLAGS, MKDEPDIR, oldxmenu_deps_frag):
New, set by configure.
(DEPDIR): New variable.
(ALL_CFLAGS): Add DEPFLAGS.
(.c.o): Add MKDEPDIR.
(clean, mostlyclean): Delete DEPDIR.

* oldXMenu/deps.mk, oldXMenu/autodeps.mk: New files.

* src/deps.mk: Comment update.

* .bzrignore: Ignore lwlib/deps, oldXMenu/deps.
2014-06-28 15:57:23 -07:00
Glenn Morris
f387f87052 Bump version to 24.3.92 2014-06-25 23:48:25 -07:00
Glenn Morris
c400516ab1 Merge from emacs-24; up to 2014-06-06T02:22:40Z!monnier@iro.umontreal.ca 2014-06-21 12:45:59 -07:00
Paul Eggert
81e5c6fc89 * configure.ac: Warn about --enable-link-time-optimization's issues
in --help message.

Fixes: debbugs:17806
2014-06-20 12:46:18 -07:00
Paul Eggert
539ad293eb Diagnose failures due to colons in directory names.
* 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
2014-06-20 09:05:10 -07:00
Paul Eggert
0b20117e96 Port to GCC 4.9.0 with link time optimization.
* 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
2014-06-19 23:07:47 -07:00
Paul Eggert
73bfe891e2 Omit redundant extern decls.
Most of this patch is from Dmitry Antipov, in:
http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html
* configure.ac (WERROR_CFLAGS): Add -Wredundant-decls.
* lib-src/emacsclient.c (getenv): Remove decl.
* lib-src/make-docfile.c (write_globals): Add ATTRIBUTE_CONST for
Fbyteorder, Ftool_bar_height, Fmax_char, Fidentity.
* lwlib/lwlib-Xm.c (lw_motif_widget_p, xm_update_one_value)
(xm_create_dialog, xm_destroy_instance, xm_popup_menu)
(xm_set_keyboard_focus, xm_set_main_areas): Remove decls.
* src/commands.h (update_mode_lines):
* src/frame.h (Qbackground_color, Qforeground_color)
(x_set_menu_bar_lines):
* src/ftfont.c (ftfont_font_format):
* src/intervals.h (Qkeymap, Qfont):
* src/keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function):
* src/lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump)
(Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp)
(Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p)
(Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object)
(Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite)
(Fidentity, extract_float, init_display, syms_of_display, Qdisplay):
(Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref)
(char_table_set, char_table_translate, Qautoload, Qbottom, Qtop)
(Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio)
(Qtool_bar, Qheader_line):
* src/macros.c (Fexecute_kbd_macro):
* src/xdisp.c (Ftool_bar_height, Ftool_bar_height):
* src/xterm.c (x_delete_terminal, XSetIMValues):
* src/xterm.h (x_set_window_size, x_query_color, x_get_focus_frame)
(x_implicitly_set_name, popup_activated)
(widget_store_internal_border):
Remove redundant decls.
* src/frame.c [USE_X_TOOLKIT]: Include widget.h.
* src/keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit):
Remove _Noreturn, as make-docfile now does that for us.
* src/lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile.
(Qregion_extract_function): New decl.
* src/window.c, src/xfns.c: Include menu.h.
2014-06-17 09:09:19 -07:00
Glenn Morris
90de50e270 Merge from emacs-24; up to 2014-06-03T06:51:18Z!eliz@gnu.org 2014-06-14 17:06:30 -07:00
Paul Eggert
50bee07154 Port part of the AIX fix to Solaris.
* 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
2014-06-14 13:24:08 -07:00
Paul Eggert
faded0b139 Use a shell function in configure.ac to cut down on code duplication.
* 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.
2014-06-11 10:51:27 -07:00
Glenn Morris
6014484659 * configure.ac: Tweak previous change, for make 10+ 2014-06-10 20:33:34 -07:00
Glenn Morris
b12e56ab01 * configure.ac: Require at least version 3.81 of GNU make.
It's 8 years old and has some useful features not in older versions.

* etc/NEWS: Mention this.
2014-06-10 20:03:40 -07:00
Paul Eggert
ec4a33476e Rely on AC_CANONICAL_HOST to detect whether we're using mingw.
See the thread containing:
http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00206.html
* configure.ac (AC_CANONICAL_HOST): Invoke this as early as we
can, which is just after AM_INIT_AUTOMAKE.  Then check for mingw
just after that.
2014-06-10 12:43:13 -07:00
Glenn Morris
40abffe4c6 Get rid of the INFO_EXT variable
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.
2014-06-09 22:11:38 -04:00
Glenn Morris
36cf8493af Merge from emacs-24; up to 2014-06-01T23:37:59Z!eggert@cs.ucla.edu 2014-06-07 17:35:27 -07:00
Paul Eggert
a0e26ff003 Port better to AIX.
* 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
2014-06-06 23:10:39 -07:00
Paul Eggert
4545be9dcb Try harder to find GNU Make when configuring.
* 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.
2014-06-05 01:03:22 -07:00
Dmitry Antipov
ea633fff4c * configure.ac (POLL_FOR_INPUT): Define with HAVE_WINDOW_SYSTEM.
* 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.
2014-06-05 10:24:54 +04:00
Paul Eggert
444060a55d * configure.ac: --without-all now implies --without-xft, --disable-acl.
* INSTALL: Remove apparently unmaintained documentation about what
--without-all exactly means.
2014-06-04 17:34:34 -07:00
Eli Zaretskii
89b3620292 Define the size of dumped data for MS-Windows locally on w32heap.c.
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).
2014-06-03 10:28:07 +03:00
Glenn Morris
953e106ac8 Merge from emacs-24; up to 2014-05-29T17:16:00Z!dmantipov@yandex.ru 2014-06-01 17:18:22 -07:00
Juanma Barranquero
89187af1bd * configure.ac: Raise HEAPSIZE value for 32-bit builds on Windows. 2014-06-01 23:27:53 +02:00
Paul Eggert
1915d8d63c Fix port to 32-bit AIX with xlc.
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.
2014-05-30 13:19:29 -07:00
Paul Eggert
acc16b66ff * configure.ac (pthread_sigmask): Look in LIB_PTHREAD too.
Fixes configuration glitch found in <http://bugs.gnu.org/17561#59>.
2014-05-29 16:13:32 -07:00
Eli Zaretskii
7479dd3e8a Remove nt/addsection.c and don't build addsection.exe.
configure.ac (ADDSECTION, TEMACS_POST_LINK): Don't compute,
 unused.

 nt/Makefile.in (DONT_INSTALL): Now empty.
 (addsection${EXEEXT}): Remove target.
 nt/addsection.c: File removed.

 src/Makefile.in (TEMACS_POST_LINK): Remove target.
 (emacs$(EXEEXT)): Remove $(ADDSECTION) from prerequisites.
 (temacs$(EXEEXT)): Remove $(TEMACS_POST_LINK) from the recipe.
2014-05-29 22:16:32 +03:00
Paul Eggert
035159ed54 Don't substitute sigprocmask for pthread_sigmask.
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
2014-05-29 08:05:06 -07:00
Glenn Morris
2662ca5cd9 * configure.ac: Explicitly drop some ancient Solaris versions. 2014-05-28 21:36:44 -04:00
Fabrice Popineau
587fd086a0 Use mmap(2) emulation for buffer text on MS-Windows.
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.
2014-05-27 20:31:17 +03:00
Glenn Morris
015936fba1 Merge from emacs-24; up to 2014-05-26T10:21:18Z!rgm@gnu.org 2014-05-25 19:28:09 -07:00
Paul Eggert
4f4ec76fd6 Fix port to 32-bit AIX.
* 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
2014-05-21 22:00:39 -07:00
Paul Eggert
60fc70a8e0 Remove dependencies on getdelim and getline.
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.
2014-05-18 21:56:03 -07:00
Glenn Morris
337ee6b38e * configure.ac: Do not bother testing for png in non-graphical builds.
This seems to have been lost in the changes from the current emacs-24
branch version.
2014-05-18 16:02:29 -07:00
Glenn Morris
3b7865ca9b * configure.ac (INSTALL_INFO): Revert to just checking for "install-info". 2014-05-18 15:41:22 -07:00
Paul Eggert
0d1b87f90e Port recent libpng changes to hosts with missing png.h.
* 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.
2014-05-17 22:50:17 -07:00
Paul Eggert
8208d2bf95 Assume C99 or later.
* lib/stdarg.in.h, lib/stdbool.in.h, m4/stdarg.m4, m4/stdbool.m4:
Remove.
* configure.ac (_AC_PROG_CC_C89): Define a dummy, to keep 'configure'
smaller.
(gl_PROG_CC_C99): Use this to get C99 or later.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* admin/merge-gnulib (GNULIB_MODULES): Remove stdarg, stdbool.
(GNULIB_TOOL_FLAGS): Avoid stdarg, stdbool.
* doc/lispref/internals.texi (C Dialect): Document this.
* etc/NEWS: Document this.
* nt/gnulib.mk: Remove stdarg and stdbool modules.
* src/bytecode.c (B__dummy__): Remove.
* src/conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool.
(FLEXIBLE_ARRAY_MEMBER): Now always empty.
* src/dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]:
* src/regex.c (DEBUG_PRINT): Assume varargs macros.
* src/lisp.h (DEFUN_FUNCTION_INIT): Remove.  All uses now assume C99.

Fixes: debbugs:17487
2014-05-17 01:11:31 -07:00
Glenn Morris
f81605024f * configure.ac: Add comments accidentally omitted from previous change 2014-05-16 21:40:49 -04:00
Glenn Morris
d137278ad4 * configure.ac (INSTALL_INFO): Try "ginstall-info" before "install-info".
Ref: http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00232.html
2014-05-16 21:38:33 -04:00
Paul Eggert
87374fcc51 * configure.ac (EMACS_CHECK_MODULES): Fix typo and simplify. 2014-05-16 12:03:07 -07:00
Paul Eggert
c56327b55d Don't require pkg-config when building from repository.
* 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.
2014-05-16 08:49:13 -07:00
Jan Djärv
440cef5fc5 Fix yet another configure error on OSX.
* configure.ac (LIBONG): Do not test for libpng if NS_IMPL_COCOA.
2014-05-15 18:54:44 +02:00
Dmitry Antipov
d3e5c0ea8f If available, use Xfixes extension to do pointer blanking.
* 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.
2014-05-13 18:18:54 +04:00
Dmitry Antipov
bd098f41af * configure.ac (--enable-link-time-optimization): Add clang support.
* INSTALL: Mention it.
* etc/PROBLEMS: Mention potential problems with
--enable-link-time-optimization and clang on Fedora 20.
2014-05-13 15:12:05 +04:00
Glenn Morris
5c06e5e758 Bump version to 24.3.91 2014-05-11 23:11:08 -07:00
Katsumi Yamaoka
ffd6d9c4d3 * configure.ac (EMACS_CHECK_MODULES): Fix typo in previous change. 2014-05-11 23:09:27 -07:00
Paul Eggert
3c95f44ce5 Work around bug in pkg-config before 0.26.
* 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
2014-05-11 12:14:12 -07:00
Paul Eggert
68b067b393 Require pkg-config 0.26 or later in autogen.sh only.
* autogen.sh (pkg_config_min): Make this at least 0.26.
* configure.ac (PKG_PROG_PKG_CONFIG): Revert back to 0.9.0.

Fixes: debbugs:17438
2014-05-10 19:47:57 -07:00
Paul Eggert
eab25ea7c0 Require pkg-config 0.26 or later.
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
2014-05-10 19:27:53 -07:00
Glenn Morris
2ddb358900 * configure.ac: Comment. 2014-05-06 16:36:40 -04:00
Paul Eggert
f8c2cef5e6 Consult libpng-config more consistently.
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
2014-05-04 14:28:08 -07:00
Paul Eggert
3e9fa60a5c Merge from emacs-24; up to 2014-05-04T21:18:30Z!eggert@cs.ucla.edu 2014-05-04 12:37:56 -07:00
Paul Eggert
61febcb6e3 Revert recent libpng changes.
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
2014-05-04 11:51:32 -07:00
Paul Eggert
ec5f5b309d * configure.ac (LIBPNG): Add -lz -lm on platforms where they're needed
but libpng-config --libs omits them.  Problem reported by Glenn
Morris.
2014-05-03 23:34:04 -07:00
Paul Eggert
7e00998fbc Require ImageMagick >= 6.3.5, due to PixelSetMagickColor.
* 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
2014-05-03 14:06:04 -07:00
Paul Eggert
541df9f424 Get --enable-gcc-warnings to work after touching configure.ac.
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'.
2014-05-03 09:27:17 -07:00
Paul Eggert
2bafb7c4a3 Get --enable-gcc-warnings working again.
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.
2014-05-03 01:12:06 -07:00
Glenn Morris
53a7da76db * configure.ac (PKG_CONFIG_PATH): Declare with AC_ARG_VAR. 2014-05-02 19:31:41 -04:00
Glenn Morris
ef9ea0a623 Remove the --with-pkg-config-prog configure option
* configure.ac (--with-pkg-config-prog): Remove.
Use the PKG_CONFIG environment variable instead if you need it.

* etc/NEWS: Mention this.
2014-05-02 19:29:57 -04:00
Glenn Morris
b05e08a465 Use pkg-config's pkg.m4
* 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.
2014-05-02 19:18:11 -04:00
Glenn Morris
cd626254b7 * configure.ac (AC_CONFIG_MACRO_DIR): Use it. 2014-05-02 17:57:58 -04:00
Paul Eggert
6f074205d3 Consult libpng-config more consistently.
* 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
2014-05-02 12:34:03 -07:00
Glenn Morris
969aabf250 * configure.ac (LIBPNG): Consult libpng-config
for the precise form of "-lpng" to use.

Fixes: debbugs:17339
2014-05-01 17:57:27 -04:00
Juanma Barranquero
09b911adf4 Merge from emacs-24; up to 2014-05-01T10:21:17Z!rgm@gnu.org 2014-04-30 21:54:52 +02:00
Glenn Morris
ca489750c2 * configure.ac: Treat MirBSD as OpenBSD.
Fixes: debbugs:17339
2014-04-29 07:49:11 -07:00
Paul Eggert
04d84d16f0 * configure.ac: Add comment explaining why HAVE_GLIB is different. 2014-04-19 15:19:54 -07:00
Paul Eggert
2123570f1b Link to glib-using libraries when checking for glib.
* configure.ac (XGSELOBJ): Include GTK_LIBS, RSVG_LIBS, etc.
when testing whether Glib is linked in.  Similarly for CFLAGS.

Fixes: debbugs:17289
2014-04-19 10:45:20 -07:00
Paul Eggert
290d7ac277 Merge from emacs-24; up to 2014-04-16T15:28:26Z!monnier@iro.umontreal.ca 2014-04-16 12:43:46 -07:00
Paul Eggert
5403b2d3aa Remove DATA_SEG_BITS.
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.
2014-04-16 08:16:35 -07:00
Paul Eggert
93ca48872e Clean up configure-time library handling a bit.
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.
2014-04-13 22:23:31 -07:00
Paul Eggert
13a5993b31 Port to IRIX 6.5.
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
2014-04-13 15:51:08 -07:00
Eli Zaretskii
0bf20677bd Fix last commit. 2014-04-13 09:46:10 +03:00
Eli Zaretskii
aa1f3497ed Fix creation of emacs.exe hardlink at "make install" time on MS-Windows.
configure.ac (LN_S_FILEONLY, LN_S): Use "/bin/ln" on MinGW, to
 ensure the MSYS ln.exe is invoked.
2014-04-13 09:44:22 +03:00