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

223 Commits

Author SHA1 Message Date
YAMAMOTO Mitsuharu
2d8ac645c2 * configure.ac (HAVE_XRANDR): Check availability of XRRGetScreenResources rather than that of XRRQueryExtension. 2013-05-27 11:03:18 +09:00
Paul Eggert
31ff141c22 Port --enable-gcc-warnings to clang.
* configure.ac (nw): Remove obsolescent warnings.
These aren't needed for clang, or for gcc for that matter.
(emacs_cv_clang): New var, which tests for clang.
Omit warnings that clang is too picky about.
(GLIB_DISABLE_DEPRECATION_WARNINGS): Define this;
needed for Ubuntu 13.04 + clang + --enable-gcc-warnings.
* lib-src/etags.c: Omit unnecessary forward decls.
(print_version, print_help): Declare _Noreturn.
* lib-src/pop.c (socket_connection) [HAVE_GETADDRINFO]: Simplify.
* src/bytecode.c (exec_byte_code):
* src/regex.c:
Redo diagnostic pragmas to pacify clang, too.
* src/dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
* src/editfns.c (Fencode_time):
* src/fileio.c (file_accessible_directory_p):
* src/font.c (font_unparse_xlfd):
Use '&"string"[index]' instead of '"string" + (index)'.
* src/undo.c (user_error): Remove; unused.
2013-05-17 22:32:17 -07:00
Eli Zaretskii
d14365f941 Merge from trunk, configury not fixed yet. 2013-05-15 19:15:07 +03:00
Paul Eggert
bb8eb35723 * configure.ac (LD_SWITCH_SYSTEM_EMACS): Fix typo in previous change. 2013-05-12 23:23:08 -07:00
Paul Eggert
522fe43b9f * configure.ac (LD_SWITCH_SYSTEM_TEMACS): OpenBSD needs -fno-pie.
Reported privately by Han Boetes <han@boetes.org>.
2013-05-12 20:54:34 -07:00
Jan Djärv
4465bfb465 Implement display-monitor-attributes-list for NS.
* lisp/frame.el (display-monitor-attributes-list): Add NS case.
(ns-display-monitor-attributes-list): Declare.

* src/nsfns.m: Include IOGraphicsLib.h if Cocoa.
(Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
(MonitorInfo): New struct.
(free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
(Fns_display_monitor_attributes_list): New functions.
(display-usable-bounds): Remove.
(syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
Qsource.
2013-05-09 17:17:38 +02:00
Paul Eggert
ffdc270a76 Use Gnulib ACL implementation, for benefit of Solaris etc.
* configure.ac: Remove -with-acl option, since Gnulib does that for
us now.
(LIBACL_LIBS): Remove; no longer needed.
* lib/Makefile.am (CLEANFILES, SUFFIXES): New (empty) macros,
for the benefit of the new ACL implementation.
* lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/acl-errno-valid.$(O).
($(BLD)/acl-errno-valid.$(O)): New rule.
* lib/acl-errno-valid.c, lib/acl-internal.h, lib/acl.h:
* lib/acl_entries.c, lib/errno.in.h, lib/file-has-acl.c:
* lib/qcopy-acl.c, lib/qset-acl.c, m4/acl.m4, m4/errno_h.m4:
New files, taken from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* admin/merge-gnulib (GNULIB_MODULES): Add qacl.
(GNULIB_TOOL_FLAGS): Do not avoid errno.
* etc/NEWS: Emacs is no longer limited to POSIX ACLs.  --disable-acl,
not --without-acl, since we're now using Gnulib's implementation.
* nt/config.nt (HAVE_ACL_SET_FILE): Rename from HAVE_POSIX_ACL.
* nt/inc/ms-w32.h (EOPNOTSUPP): New macro.
* src/Makefile.in (LIB_ACL): New macro.
(LIBACL_LIBS): Remove.
(LIBES): Use LIB_ACL, not LIBACL_LIBS.
* src/fileio.c: Include <acl.h>.
Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
(ACL_NOT_WELL_SUPPORTED): Remove.  All uses replaced by
!acl_errno_valid.
(Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
it ourselves.

Fixes: debbugs:14295
2013-05-07 14:34:03 -07:00
YAMAMOTO Mitsuharu
4e3f92301d Add multi-monitor support on X11. 2013-05-07 10:12:22 +09:00
Eli Zaretskii
b1cb82edff Merge from trunk. 2013-05-01 20:47:50 +03:00
Paul Eggert
f780d632f2 Port better to AIX.
* configure.ac (CFLAGS): Append -O if the user did not specify CFLAGS,
we did not already infer an optimization option, and -O works.
AIX xlc needs -O, otherwise garbage collection doesn't work.
* src/lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
to pacify AIX xlc.

Fixes: debbugs:14258
2013-04-26 12:31:09 -07:00
Eli Zaretskii
54ab7d34c5 Don't use -subsystem=console link option, it is the default. 2013-04-23 20:06:09 +03:00
Eli Zaretskii
4cf86a2fa7 Merge from trunk. 2013-04-19 11:39:24 +03:00
Eli Zaretskii
d4d223998d Used AH_TEMPLATE as suggested by Glenn Morris. 2013-04-18 21:29:04 +03:00
Eli Zaretskii
09e94df23e Refactored tests for windows.h as suggested by Paul Eggert. 2013-04-18 21:02:48 +03:00
John Marino
7e00831f51 * configure.ac: Add DragonFly BSD, mostly same as FreeBSD (tiny change)
Fixes: debbugs:14068
2013-04-18 10:12:21 -07:00
Eli Zaretskii
4f0e6095fc Merge from trunk. 2013-04-18 19:20:48 +03:00
Glenn Morris
4f8902cd02 Replace AC_PROG_LN_S by a less strict configure test
* configure.ac (AC_PROG_LN_S): Remove, too restrictive.
(LN_S_FILEONLY): New output variable.
* Makefile.in (LN_S): Remove.
(LN_S_FILEONLY): New, set by configure.
(install-arch-dep): Use LN_S_FILEONLY rather than LN_S.
2013-04-17 22:03:53 -07:00
Eli Zaretskii
f576f7fb04 Fixed the LN_S and LN_EMACS issue. 2013-04-17 20:51:31 +03:00
Eli Zaretskii
eb7a410c14 Merge from trunk, resolve conflicts. 2013-04-14 20:27:45 +03:00
Eli Zaretskii
6454498502 Avoid building blessmail and use hard links when installing emacs.exe. 2013-04-14 19:36:49 +03:00
Eli Zaretskii
f1fecede18 Fixed linking with the resource file. 2013-04-14 18:15:31 +03:00
Eli Zaretskii
5e00cfa510 Fixed autoloads and byte compilation due to MSYS filename-butchering and xargs limitations. 2013-04-14 18:05:42 +03:00
Ken Brown
e8bdb06e29 * configure.ac (canonical): Adapt to 64-bit Cygwin. 2013-04-12 09:00:57 -04:00
Ken Brown
ba3b2d88d8 Fix icon for the cygw32 build on 64-bit Cygwin. (Bug#12993)
* nt/emacs.rc: Use 64-bit manifest for 64-bit Cygwin build.

* configure.ac (W32_RES_LINK): Remove unnecessary linker directive
`-Wl,-bpe-i386', which is confusing in the 64-bit case.
2013-04-08 22:38:56 -04:00
Paul Eggert
876da980f8 Fix --enable-profiling bug introduced by 2013-02-25 change.
This bug was introduced by my 2013-02-25 change that simplified
data_start configuration.  Without this change, on GNU/Linux
an Emacs configured with --enable-profiling fails immediately
due to a profiler signal.
* configure.ac (LD_SWITCH_SYSTEM_TEMACS): Append -pg if profiling
and if not on GNU/Linux or FreeBSD.
* lib/Makefile.am (AM_CFLAGS): Add $(PROFILING_CFLAGS), so that
lib/*.o is profiled too.
* src/Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
with these flags.  On platforms where special flags are needed
when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
(ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
(.c.o, .m.o): Compile with $(PROFILING_CFLAGS).

Fixes: debbugs:13783
2013-04-06 23:21:40 -07:00
Eli Zaretskii
d6db9fd60a Fixed src/epaths.h generation and lib-src dependencies and libraries. 2013-04-06 16:25:17 +03:00
Eli Zaretskii
86e9346005 Fixed misc compilation warnings and errors. Dumping errors out. 2013-04-01 19:28:53 +03:00
Eli Zaretskii
030a1c5ea6 Fixed nt/Makefile.in and top-level Makefile.in.
Programs in nt/ and lib-src/ compile and link.
Warnings and errors in src/.
2013-04-01 17:35:26 +03:00
Eli Zaretskii
f540ee868c Fixed -gdwarf-2 switch and added emacsclientw.exe to lib-src/Makefile.in. 2013-04-01 16:51:33 +03:00
Eli Zaretskii
095bf25383 Added nt/Makefile.in and appropriate tweaks to configure.ac.
Added emacsclient.res support to lib-src/.
Fixed temacs and dumping commands in src/Makefile.in.
Miscellaneous fixes all over the place.

Not tried to build yet.
2013-04-01 16:18:20 +03:00
Eli Zaretskii
a74b0e1bdf Added nt/gnulib.mk and removed kludges from ms-w32.h and ntlib.h. 2013-03-31 17:04:49 +03:00
Eli Zaretskii
7c4026b6ad Finished with lib-src compilation, except emacsclientw and emacsclient.res.
Next -- compilation in nt/, and then problems in src/.
2013-03-30 20:00:51 +03:00
Eli Zaretskii
803ee34370 Fixed problem with mmsystem.h during configure. 2013-03-30 10:24:02 +03:00
Eli Zaretskii
cb11bd957d Finished with config.nt diffs. Problem with mmsystem.h remains. 2013-03-29 22:53:25 +03:00
Eli Zaretskii
52aa6b170b Fix CLASH_DETECTION and 'not needed' result for fdopendir. 2013-03-29 14:38:13 +03:00
Eli Zaretskii
845b7499e3 Made references to nt/inc absolute, so out-of-tree build could be supported. 2013-03-28 21:19:19 +02:00
Eli Zaretskii
d76bf86f43 Merge from trunk and resolve conflicts. 2013-03-28 20:13:59 +02:00
Paul Eggert
afeee3e578 * configure.ac (HAVE_XKBGETKEYBOARD): Remove; subsumed by HAVE_XKB.
All uses changed.
2013-03-26 22:13:31 -07:00
Jan Djärv
a4cedbf774 * configure.ac (HAVE_XKB): Define if Xkb is present.
* src/xterm.c: Include X11/XKBlib.h
(XTring_bell): Use XkbBell if HAVE_XKB.

Fixes: debbugs:14041
2013-03-25 18:58:35 +01:00
Paul Eggert
19151a7f8c Emacs crashes with ImageMagick 6.8.2-3 through 6.8.3-9.
* configure.ac (IMAGEMAGICK_MODULE): Reject 6.8.2.
We want to reject 6.8.2-3 through 6.8.3-9, but there seems to be
no way to do this in pkg-config, so make do with a reasonable
approximation.
* etc/PROBLEMS: Mention problem with ImageMagick 6.8.2-3 through 6.8.3-9.

Fixes: debbugs:13867
2013-03-17 22:26:56 -07:00
Paul Eggert
47d7532e09 File synchronization fixes.
* admin/CPP-DEFINES (BSD_SYSTEM, HAVE_FSYNC): Remove.
* admin/merge-gnulib (GNULIB_MODULES): Add fsync, fdatasync.
* configure.ac (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
(fsync): Remove check; now done by gnulib.
* lib/fdatasync.c, lib/fsync.c, m4/fdatasync.m4, m4/fsync.m4:
New files, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib-src/Makefile.in (LIB_FDATASYNC): New macro.
(emacsclient${EXEEXT}): Use it.
* lib-src/emacsclient.c (main): Use fdatasync, not fsync, since we don't
care about metadata.  Keep trying if interrupted.
* lib-src/movemail.c (main, popmail): Don't worry about BSD_SYSTEM, since
fsync is available everywhere (or there is a substitute).  Don't
report an error if fsync returns EINVAL.
* nt/inc/ms-w32.h (fdatasync): New macro, suggested by Eli Zaretskii.
* src/Makefile.in (LIB_FDATASYNC): New macro.
(LIBES): Use it.
* src/conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
* src/fileio.c (Fwrite_region, write_region_inhibit_fsync):
Don't worry about HAVE_FSYNC, since a substitute fsync is
available if the system lacks one.
(Fwrite_regin): Retry fsync if interrupted.

Fixes: debbugs:13944
2013-03-13 11:42:22 -07:00
Glenn Morris
0bafabe7b2 Merge from emacs-24; up to 2012-12-25T11:37:21Z!dmantipov@yandex.ru 2013-03-06 00:01:47 -08:00
Paul Eggert
707431575a FILE's lock is now always .#FILE and may be a regular file.
* etc/NEWS: Document this.
* nt/inc/unistd.h (O_NOFOLLOW): New macro.
* src/filelock.c: Include <c-ctype.h>.
(MAX_LFINFO): New top-level constant.
(lock_info_type): Remove members pid, boot_time.  Add members at,
dot, colon.  Change user member to be the entire buffer, not a
pointer.  This allows us to handle the case where a foreign
pid or boot time exceeds the local range.  All uses changed.
(LINKS_MIGHT_NOT_WORK): New constant.
(FREE_LOCK_INFO): Remove, as the pieces no longer need freeing.
(defined_WINDOWSNT): Remove.
(MAKE_LOCK_NAME, file_in_lock_file_name):
Always use .#FILE (not .#-FILE) for the file lock,
even if it is a regular file.
(rename_lock_file): New function.
(create_lock_file): Use it.
(create_lock_file, read_lock_data):
Prefer a symbolic link for the lock file, falling back on a
regular file if symlinks don't work.  Do not try to create
symlinks on MS-Windows, due to security hassles.  Stick with
POSIXish functions (open, read, write, close, fchmod, readlink, symlink,
link, rename, unlink, mkstemp) when creating locks, as a GNUish
host may be using a Windowsish file system, and cannot use
MS-Windows-only system calls.  Fall back on mktemp if mkstemp
doesn't work.  Don't fail merely because of a symlink-contents
length limit in the current file system; fall back on regular
files.  Increase the symlink contents length limit to 8 KiB, this
should be big enough for any real use and doesn't crunch the
stack.
(create_lock_file, lock_file_1, read_lock_data):
Simplify allocation of lock file buffers now that they fit in 8 KiB.
(lock_file_1): Return error number, not bool.  All callers changed.
(ELOOP): New macro, if not already defined.
(read_lock_data): Return size of lock file contents, not Lisp object.
All callers changed.  Handle a race condition if some other process
replaces a regular-file lock with a symlink lock or vice versa,
while we're trying to read the lock.
(current_lock_owner): Parse contents more carefully, to help avoid
confusing a regular-file lock with some other application's use
of the file.  Check for lock file contents being too long, or
not parsing correctly.
(current_lock_owner, lock_file):
Allow foreign pid and boot times that exceed the local range.
(current_lock_owner, lock_if_free, lock_file):
Simplify allocation of lock file contents.
* src/w32.c (sys_rename_replace): New function, containing most of
the contents of the old sys_rename.
(sys_rename): Use it.
(fchmod): New dummy function.
* src/w32.h (sys_rename_replace, fchmod): New decls.

Fixes: debbugs:13807
2013-03-05 14:35:41 -08:00
Paul Eggert
3b108d19a0 * configure.ac (TERM_HEADER): Remove duplicate definition.
It can mess up 'configure' runs.

Fixes: debbugs:13872
2013-03-05 09:25:50 -08:00
Glenn Morris
d6ec407089 Bump version to 24.3 (only a release candidate at the moment) 2013-03-04 19:53:34 -08:00
Ken Brown
0e9467861c * configure.ac (HAVE_DATA_START): Fix test. (Bug#13818) 2013-02-27 22:19:51 -05:00
Paul Eggert
1ddc2bd6ff Simplify data_start configuration.
This is a followon simplification to the fix for Bug#13650.
* admin/CPP-DEFINES (DATA_START, ORDINARY_LINK): Remove.
* configure.ac (CRT_DIR, LIB_STANDARD, START_FILES, DATA_START)
(LD_FIRSTFLAG, ORDINARY_LINK, LIB_GCC): Remove.
(AC_CHECK_HEADERS_ONCE): Remove sys/resource.h, as it's
not always needed.
(HAVE_DATA_START): New macro.
* etc/PROBLEMS (LIBS_SYSTEM, LIBS_MACHINE, LIBS_STANDARD): Remove.
Remove legacy-systems section, as this stuff is no longer
applicable with current linking strategies.
* src/Makefile.in (LD_FIRSTFLAG, LIB_GCC, CRT_DIR, LIB_STANDARD)
(START_FILES): Remove.  All uses removed.
(otherobj): Remove $(VMLIMIT_OBJ), as it's now first.
(ALLOBJS): Move here from autodeps.mk, and with VMLIMITS_OBJ first.
(buildobj.h): Use it.
($(ALLOBJS)): Depend on globals.h.
(temacs$(EXEEXT)): Use $(ALLOBJS).
* src/autodeps.mk (ALLOBJS): Move to Makefile.in.
* src/deps.mk (vm-limit.o):
* src/makefile.w32-in ($(BLD)/vm-limit.$(O)):
Do not depend on mem-limits.h.
* src/emacs.c (__do_global_ctors, __do_global_ctors_aux)
(__do_global_dtors, __CTOR_LIST__, __DTOR_LIST__)
[__GNUC__ && !ORDINARY_LINK]: Remove.
* src/mem-limits.h, src/pre-crt0.c: Remove.
* src/unexaix.c, src/unexcoff.c: Don't include mem-limits.h.
* src/unexcoff.c (etext): New decl.
(make_hdr): Use it instead of start_of_data.
* src/vm-limit.c: Move most of mem-limits.h's contents here.
(data_start): New decl.  It's OK if this is approximate,
so simplify-away some unnecessary exactness.
(POINTER): Remove; all uses removed.
(data_space_start): Now char *, to avoid casts.
(exceeds_lisp_ptr): New function, replacing the old
EXCEEDS_LISP_PTR macro.  All uses changed.
(check_memory_limits): Simplify and remove casts.
(start_of_data) [!CANNOT_DUMP || !SYSTEM_MALLOC]: Remove.
(memory_warnings): Use data_start instead of start_of_data.

Fixes: debbugs:13783
2013-02-24 21:55:37 -08:00
Paul Eggert
648e5523fb Merge from emacs-24; up to 2012-12-19T13:01:16Z!michael.albinus@gmx.de 2013-02-14 22:35:54 -08:00
Paul Eggert
35b3a27e67 Fix AIX port.
* configure.ac (DATA_START, DATA_SEG_BITS): Set to 0x20000000 on AIX.
(GC_MARK_STACK): Do not set to GC_USE_GCPROS_AS_BEFORE, as that
runs afoul of some other bug in Emacs, and the default value
GC_MAKE_GCPROS_NOOPS has been tested and works.
* src/lisp.h (XPNTR) [!USE_LSB_TAG && DATA_SEG_BITS]:
Fix bug introduced in 2012-07-27 change.  DATA_SEG_BITS, if set,
was #undeffed earlier, so it cannot be used as a macro here.
Use the constant and not the macro.  Tested on AIX.
* src/unexaix.c: Revert 2013-02-11 and 2013-02-12 changes to this
file.  They're almost surely OK but we're just before a release so
we should avoid changes unless they're clearly needed.  Instead,
make the following minor change:
(ADDR_CORRECT): New macro.

Fixes: debbugs:13650
2013-02-14 12:05:10 -08:00
Glenn Morris
71b8431643 Tweak quoting in earlier configure.ac emacs_config_options change 2013-02-11 19:51:24 -05:00