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

1792 Commits

Author SHA1 Message Date
Andreas Schwab
75d7aa242d * configure.ac: Fix source command in .gdbinit.
Don't quote $MAKEINFO.
2012-12-09 09:37:01 +01:00
Paul Eggert
3cc53d6024 Allow spaces in some configuration vars (Bug#13078).
* configure.ac (srcdir): Don't assume $PWD lacks spaces.
(srcdir, MAKEINFO, PKG_CONFIG, PKG_CONFIG_MIN_VERSION):
All uses quoted, to allow spaces in these vars.
2012-12-08 18:22:39 -08:00
Paul Eggert
5745a7df2b Use putenv+unsetenv instead of modifying environ directly.
* admin/merge-gnulib (GNULIB_MODULES): Add putenv, unsetenv.
* lib/putenv.c, lib/unsetenv.c, m4/putenv.m4, m4/setenv.m4:
New files, copied automatically from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* src/alloc.c (xputenv): New function.
* src/dbusbind.c (Fdbus_init_bus):
* src/emacs.c (main):
* src/xterm.c (x_term_init):
Use xputenv instead of setenv or putenv, to detect memory exhaustion.
* src/editfns.c (initial_tz): Move static var decl up.
(tzvalbuf_in_environ): New static var.
(init_editfns):	Initialize these two static vars.
(Fencode_time): Don't assume arbitrary limit on EMACS_INT width.
Save old TZ value on stack, if it's small.
(Fencode_time, set_time_zone_rule): Don't modify 'environ' directly;
instead, use xputenv+unsetenv to set and restore TZ.
(environbuf): Remove static var.  All uses removed.
(Fset_time_zone_rule): Do not save TZ and environ;
no longer needed here.
(set_time_zone_rule_tz1, set_time_zone_rule_tz2) [LOCALTIME_CACHE]:
Move to inside set_time_zone_rule; they don't need file scope any more.
(set_time_zone_rule): Maintain the TZ=value string separately.
(syms_of_editfns): Don't initialize initial_tz;
init_editfns now does it.
* src/emacs.c (dump_tz) [HAVE_TZSET]: Now const.
* src/lisp.h (xputenv): New decl.

Fixes: debbugs:13070
2012-12-08 09:19:51 -08:00
Eli Zaretskii
63999a7dbe Windows followup to 2012-12-08T02:30:51Z!eggert@cs.ucla.edu.
lib/makefile.w32-in ($(BLD)/sig2str.$(O)): New dependency.
 Remove a stray character at the beginning of the file.

Fixes: debbugs:13026
2012-12-08 11:57:43 +02:00
Paul Eggert
7be78020e3 Simplify get_lim_data.
* admin/CPP-DEFINES (ULIMIT_BREAK_VALUE): Remove.
* configure.ac (ULIMIT_BREAK_VALUE): Remove.
* src/vm-limit.c (get_lim_data): Combine RLIMIT_AS and RLIMIT_DATA methods.
Remove USG and vlimit methods; no longer used these days.
Add #error catchall just in case.
2012-12-07 22:56:26 -08:00
Paul Eggert
d983a10b9a Assume POSIX 1003.1-1988 or later for signal.h.
Exceptions: do not assume SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN,
SIGTTOU, SIGUSR1, SIGUSR2, as Microsoft platforms lack these.
* admin/CPP-DEFINES (SIGALRM, SIGCHLD, SIGHUP, SIGKILL, SIGPIPE, SIGQUIT):
Remove.
(SIGTRAP): Remove this one too, as config.h no longer defines it.
* admin/merge-gnulib (GNULIB_MODULES): Add sig2str.
* configure.ac (PTY_OPEN, PTY_TTY_NAME_SPRINTF):
Use SIGCHLD rather than SIGCLD.
* lib/sig2str.c, lib/sig2str.h, m4/sig2str.m4: New files, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/makefile.w32-in (GNULIBOBJS): Add $(BUILD)/sig2str.$(O).
* src/process.c [subprocesses]: Include <c-ctype.h>, <sig2str.h>.
(deleted_pid_list, Fdelete_process, create_process)
(record_child_status_change, handle_child_signal, deliver_child_signal)
(init_process_emacs, syms_of_process):
Assume SIGCHLD is defined.
(parse_signal): Remove.  All uses removed.
(abbr_to_signal): New static function.
(Fsignal_process): Use it to convert signal names to ints.
* src/sysdep.c (sys_suspend) [!DOS_NT]: Use kill (0, ...) rather than
kill (getpgrp (), ...).
(emacs_sigaction_init): Assume SIGCHLD is defined.
(init_signals): Assume SIGALRM, SIGCHLD, SIGHUP, SIGKILL,
SIGPIPE, and SIGQUIT are defined.  Do not worry about SIGCLD any more.
* src/syssignal.h (EMACS_KILLPG): Remove.
All uses replaced by 'kill' with a negative pid.
(SIGCHLD): Remove definition, as we now assume SIGCHLD.
* src/w32proc.c (sys_kill): Support negative pids compatibly with POSIX.

Fixes: debbugs:13026
2012-12-07 18:30:51 -08:00
Glenn Morris
d8ad4d3ff9 Merge from emacs-24; up to 2012-11-24T16:58:43Z!cyd@gnu.org 2012-12-05 22:17:10 -08:00
Glenn Morris
82d384f014 Revert dumb change 2012-12-04 20:05:57 -08:00
Glenn Morris
0b2224850b * configure.ac (MAKEINFO, EGREP, CC): Quote, in case of spaces in file names. 2012-12-04 21:17:03 -05:00
Glenn Morris
de0e31edcc * configure.ac: Handle info/ files with or without ".info" extension. 2012-12-04 21:13:40 -05:00
Paul Eggert
f64898abf4 Merge from gnulib for 'inline'.
2012-11-29 snippet/warn-on-use: no 'static inline'
2012-11-29 ftruncate, fts, lstat, openat, raise: no 'static inline'
2012-11-29 arctwo, md4, md5, sha1, sha256, sha512: no 'static inline'
2012-11-29 fflush, stat: no 'static inline'
2012-11-29 stdio: better 'inline'
2012-11-29 sys_stat: no 'static inline'
2012-11-29 unistd: better 'inline'
2012-11-29 c-strtod, memcoll, readutmp: no 'static inline'
2012-11-29 extern-inline: no 'static inline'
2012-11-29 sys_socket: better 'inline'
* lib/stdio.c, lib/unistd.c: New files, from gnulib.
* build-aux/snippet/warn-on-use.h, lib/gnulib.mk, lib/lstat.c:
* lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c, lib/stat.c:
* lib/stdio.in.h, lib/sys_stat.in.h, lib/unistd.in.h, m4/c-strtod.m4:
* m4/extern-inline.m4, m4/gnulib-comp.m4, m4/lstat.m4, m4/md5.m4:
* m4/sha1.m4, m4/sha256.m4, m4/sha512.m4, m4/stat.m4, m4/stdio_h.m4:
* m4/sys_socket_h.m4, m4/sys_stat_h.m4, m4/unistd_h.m4:
Update from gnulib.

Fixes: debbugs:13040
2012-11-30 10:25:59 -08:00
Glenn Morris
5c9cf0a3f9 Merge from emacs-24; up to 2012-11-20T20:06:17Z!monnier@iro.umontreal.ca 2012-11-26 19:10:32 -08:00
Ken Brown
bcd77a2ba0 Remove HAVE_MOUSE; see https://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00403.html.
* configure.ac (HAVE_MOUSE): Remove.
* admin/CPP-DEFINES (HAVE_MOUSE): Remove.
* msdos/sed2v2.inp (HAVE_MOUSE): Remove.
* nt/config.nt (HAVE_MOUSE): Remove.
* src/keyboard.c (HAVE_MOUSE):
* src/frame.c (HAVE_MOUSE): Remove, and rewrite code as if HAVE_MOUSE
were always defined.
2012-11-24 12:20:49 -05:00
Eli Zaretskii
50a60e0257 Fix the MS-Windows build broken by absence of the *.manifest files.
make-dist (nt): Adjust to changes in names of the *.manifest files.
2012-11-24 18:58:28 +02:00
Paul Eggert
95ef7787fb Assume POSIX 1003.1-1988 or later for dirent.h.
* admin/CPP-DEFINES (HAVE_CLOSEDIR, HAVE_DIRENT_H): Remove.
* admin/notes/copyright: Adjust to src/ndir.h -> nt/inc/dirent.h renaming.
* configure.ac: Do not check for dirent.h or closdir.
* nt/inc/dirent.h: Rename from ../src/ndir.h, with these changes:
(struct dirent): Rename from struct direct.  All uses changed.
* nt/inc/sys/dir.h: Remove.
* src/dired.c: Assume HAVE_DIRENT_H.
(NAMLEN): Remove, replacing with ...
(dirent_namelen): New function.  All uses changed.  Use the GNU macro
_D_EXACT_NAMELEN if available, as it's faster than strlen.
(DIRENTRY): Remove, replacing all uses with 'struct dirent'.
(DIRENTRY_NONEMPTY): Remove.  All callers now assume it's nonzero.
* src/makefile.w32-in (DIR_H): Remove.  All uses replaced with
$(NT_INC)/dirent.h.
($(BLD)/w32.$(O)): Do not depend on $(SRC)/ndir.h.
* src/ndir.h: Rename to ../nt/inc/dirent.h.
* src/sysdep.h (closedir) [!HAVE_CLOSEDIR]: Remove.
Do not include <dirent.h>; no longer needed.
* src/w32.c: Include <dirent.h> rather than "ndir.h".

Fixes: debbugs:12958
2012-11-22 23:48:43 -08:00
Paul Eggert
9239d97052 Assume POSIX 1003.1-1988 or later for unistd.h.
* admin/CPP-DEFINES (BROKEN_GETWD, HAVE_GETCWD, HAVE_GETWD, HAVE_SIZE_T)
(HAVE_UNISTD_H): Remove.
* configure.ac: Do not check for getcwd or getwd.
* lib-src/emacsclient.c (getcwd): Remove decl.
(get_current_dir_name): Assume getcwd exists.
* lib-src/etags.c (HAVE_GETCWD): Remove.
(getcwd): Remove decl.
(NO_LONG_OPTIONS): Remove this.  All uses removed.
Emacs always has GNU getopt.
(etags_getcwd): Assume getcwd exists.
* lib-src/movemail.c (F_OK, X_OK, W_OK, R_OK): Remove.
* nt/config.nt (HAVE_GETCWD): Remove.
* src/alloc.c: Assume unistd.h exists.
* src/fileio.c (Fexpand_file_name) [DOS_NT]: Use getcwd, not getwd.
* src/sysdep.c (get_current_dir_name): Assume getcwd exists.
(getwd) [USG]: Remove; no longer needed.
(sys_subshell) [DOS_NT]: Use getcwd, not getwd.
* src/w32.c (getcwd): Rename from getwd, and switch to getcwd's API.
* src/w32.h (getcwd): Remove decl.

Fixes: debbugs:12945
2012-11-21 13:06:52 -08:00
Glenn Morris
6ef2e5ef52 Merge from emacs-24; up to 2012-11-17T22:12:47Z!eggert@cs.ucla.edu 2012-11-20 20:47:55 -08:00
Glenn Morris
1b3b7caa0c * configure.ac (--enable-profiling): Doc fix. 2012-11-20 20:22:09 -05:00
Paul Eggert
d7fcbbfe4a Omit -Wstrict-overflow as it does not play well with --enable-checking. 2012-11-20 00:29:04 -08:00
Paul Eggert
8ea5c4de2a Improve static checking of integer overflow and stack smashing.
* configure.ac (WARN_CFLAGS): Add -Wstack-protector and
-Wstrict-overflow if using GCC 4.7.2 or later on a platform with
at least 64-bit long int.  This improves static checking on these
platforms, when configured with --enable-gcc-warnings.
2012-11-19 15:39:28 -08:00
Paul Eggert
49cdacdad3 Assume POSIX 1003.1-1988 or later for fcntl.h.
* admin/CPP-DEFINES (O_RDONLY, O_RDWR, HAVE_FCNTL_H): Remove.
* admin/merge-gnulib (GNULIB_MODULES): Add fcntl-h.
* configure.ac: Do not check for fcntl.h.
* lib/gnulib.mk: Regenerate.
* lib-src/movemail.c, lib-src/update-game-score.c: Assume <fcntl.h> exists.
* nt/inc/sys/socket.h (O_NONBLOCK): Rename from O_NDELAY, since the
POSIX name for this flag is O_NONBLOCK.  All uses changed.
* nt/inc/unistd.h (O_RDWR, O_NOCTTY): New macros.  Like AT_FDCWD etc.
these really should be moved to a replacement <fcntl.h> if and
when that gets implemented.  In the meantime, include <fcntl.h>
to make sure we don't override its definitions.
* src/callproc.c (relocate_fd): Assume F_DUPFD.
* src/emacs.c, src/term.c (O_RDWR): Remove.
* src/keyboard.c (tty_read_avail_input): Use O_NONBLOCK rather than
O_NDELAY, since O_NONBLOCK is the standard name for this flag.
* src/nsterm.m: Assume <fcntl.h> exists.
* src/process.c (NON_BLOCKING_CONNECT, allocate_pty, create_process)
(create_pty, Fmake_network_process, server_accept_connection)
(wait_reading_process_output, init_process_emacs):
Assume O_NONBLOCK.
(wait_reading_process_output): Put in a special case for WINDOWSNT
to mimick the older behavior where it had O_NDELAY but not O_NONBLOCK.
It's not clear this is needed, but it's a more-conservative change.
(create_process): Assume FD_CLOEXEC.
(create_process, create_pty): Assume O_NOCTTY.
* src/sysdep.c (init_sys_modes, reset_sys_modes): Assume F_SETFL.
(reset_sys_modes): Use O_NONBLOCK rather than O_NDELAY.
Omit if not DOS_NT, since F_GETFL is not defined there.
(serial_open): Assume O_NONBLOCK and O_NOCTTY.
* src/term.c: Include <fcntl.h>, for flags like O_NOCTTY.
(O_NOCTTY): Remove.
(init_tty): Assume O_IGNORE_CTTY is defined to 0 on platforms that
lack it, since gnulib guarantees this.
* src/w32.c (fcntl): Test for O_NONBLOCK rather than O_NDELAY.

Fixes: debbugs:12881
2012-11-17 14:12:47 -08:00
Paul Eggert
3d082a269e Remove no-longer-used pty_max_bytes variable.
* configure.ac (fpathconf): Remove unnecessary check.
* admin/CPP-DEFINES (HAVE_FPATHCONF): Remove.
* src/process.c (pty_max_bytes): Remove; unused.
(send_process): Do not set it.
2012-11-16 07:29:22 -08:00
Paul Eggert
73dcdb9f30 Use faccessat, not access, when checking file permissions.
This fixes a bug that has been present in Emacs since its creation.
It was reported by Chris Torek in 1983 even before GNU Emacs existed,
which must set some sort of record.  (Torek's bug report was against
a predecessor of GNU Emacs, but GNU Emacs happened to have the
same common flaw.)  See Torek's Usenet posting
"setuid/setgid programs & Emacs" Article-I.D.: sri-arpa.858
Posted: Fri Apr  8 14:18:56 1983.
* .bzrignore: Add lib/fcntl.h.
* configure.ac (euidaccess): Remove check; gnulib does this for us now.
(gl_FCNTL_O_FLAGS): Define a dummy version.
* lib/at-func.c, lib/euidaccess.c, lib/faccessat.c, lib/fcntl.in.h:
* lib/getgroups.c, lib/group-member.c, lib/root-uid.h:
* lib/xalloc-oversized.h, m4/euidaccess.m4, m4/faccessat.m4:
* m4/fcntl_h.m4, m4/getgroups.m4, m4/group-member.m4:
New files, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* admin/merge-gnulib (GNULIB_MODULES): Add faccessat.
(GNULIB_TOOL_FLAGS): Avoid at-internal, fchdir, malloc-posix,
openat-die, openat-h, save-cwd.  Do not avoid fcntl-h.
Omit gnulib's m4/fcntl-o.m4.
* nt/inc/ms-w32.h (AT_FDCWD, AT_EACCESS): New symbols.
(access): Remove.
(faccessat): New macro.
* src/Makefile.in (LIB_EACCESS): New macro.
(LIBES): Use it.
* src/callproc.c (init_callproc):
* src/charset.c (init_charset):
* src/fileio.c (check_existing, check_executable, check_writable)
(Ffile_readable_p):
* src/lread.c (openp, load_path_check):
* src/process.c (allocate_pty):
* src/xrdb.c (file_p):
Use effective UID when checking permissions, not real UID.
* src/callproc.c (init_callproc):
* src/charset.c (init_charset):
* src/lread.c (load_path_check, init_lread):
Test whether directories are accessible, not merely whether they exist.
* src/conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): New macro.
* src/fileio.c (check_existing, check_executable, check_writable)
(Ffile_readable_p):
Use symbolic names instead of integers for the flags, as they're
portable now.
(check_writable): New arg AMODE.  All uses changed.
Set errno on failure.
(Ffile_readable_p): Use faccessat, not stat + open + close.
(Ffile_writable_p): No need to call check_existing + check_writable.
Just call check_writable and then look at errno.  This saves a syscall.
dir should never be nil; replace an unnecessary runtime check
with an eassert.  When checking the parent directory of a nonexistent
file, check that the directory is searchable as well as writable, as
we can't create files in unsearchable directories.
(file_directory_p): New function, which uses 'stat' on most platforms
but faccessat with D_OK (for efficiency) if WINDOWSNT.
(Ffile_directory_p, Fset_file_times): Use it.
(file_accessible_directory_p): New function, which uses a single
syscall for efficiency.
(Ffile_accessible_directory_p): Use it.
* src/xrdb.c (file_p): Use file_directory_p.
* src/lisp.h (file_directory_p, file_accessible_directory_p): New decls.
* src/lread.c (openp): When opening a file, use fstat rather than
stat, as that avoids a permissions race.  When not opening a file,
use file_directory_p rather than stat.
(dir_warning): First arg is now a usage string, not a format.
Use errno.  All uses changed.
* src/nsterm.m (ns_term_init): Remove unnecessary call to file-readable
that merely introduced a race.
* src/process.c, src/sysdep.c, src/term.c: All uses of '#ifdef O_NONBLOCK'
changed to '#if O_NONBLOCK', to accommodate gnulib O_* style,
and similarly for the other O_* flags.
* src/w32.c (sys_faccessat): Rename from sys_access and switch to
faccessat's API.  All uses changed.
* src/xrdb.c: Do not include <sys/stat.h>; no longer needed.
(magic_db): Rename from magic_file_p.
(magic_db, search_magic_path): Return an XrmDatabase rather than a
char *, so that we don't have to test for file existence
separately from opening the file for reading.  This removes a race
fixes a permission-checking problem, and simplifies the code.
All uses changed.
(file_p): Remove; no longer needed.

Fixes: debbugs:12632
2012-11-13 20:55:41 -08:00
Paul Eggert
dd0333b615 Assume at least POSIX.1-1988 for getpgrp, setpgid, setsid.
This removes code that has been obsolete since around 1990.
* admin/CPP-DEFINES (HAVE_SETPGID, HAVE_SETSID, SETPGRP_RELEASES_CTTY):
Remove; obsolete.
* configure.ac (setpgid, setsid): Assume their existence.
(AC_FUNC_GETPGRP, SETPGRP_RELEASES_CTTY): Remove; obsolete.
* src/callproc.c (Fcall_process):
* src/emacs.c (main):
* src/process.c (create_process):
* src/term.c (dissociate_if_controlling_tty):
Assume setsid exists.
* src/callproc.c (child_setup): Assume setpgid exists and behaves as
per POSIX.1-1988 or later.
* src/conf_post.h (setpgid) [!HAVE_SETPGID]: Remove.
* src/emacs.c (shut_down_emacs):
* src/sysdep.c (sys_suspend, init_foreground_group):
Assume getpgrp behaves as per POSIX.1-1998 or later.
* src/msdos.c (setpgrp): Remove.
(tcgetpgrp, setpgid, setsid): New functions.
* src/systty.h (EMACS_GETPGRP): Remove.  All callers now use getpgrp.
* src/term.c (no_controlling_tty): Remove; unused.
* src/w32proc.c (setpgrp): Remove.
(setsid, tcgetpgrp): New functions.

Fixes: debbugs:12800
2012-11-04 19:18:32 -08:00
Paul Eggert
8148369cfb Simplify by assuming __fpending.
Now that Emacs is using the gnulib fpending module,
there's no need for Emacs to have a separate implementation.
* configure.ac (stdio_ext.h, __fpending): Remove now-duplicate checks.
(PENDING_OUTPUT_COUNT, DISPNEW_NEEDS_STDIO_EXT): Remove.
* admin/CPP-DEFINES (PENDING_OUTPUT_COUNT): Remove.
* src/dispnew.c: Include <fpending.h>, not <stdio_ext.h>.
(update_frame_1): Use __fpending, not PENDING_OUTPUT_COUNT.
Do not assume that __fpending's result fits in int.
2012-11-04 17:59:00 -08:00
Eli Zaretskii
3478f4b5c4 Fix order of entries in ChangeLog files. 2012-11-03 22:48:03 +02:00
Eli Zaretskii
3a7089c180 Fix Windows build as fallout from 2012-11-03T18:54:17Z!eggert@cs.ucla.edu.
nt/config.nt (PENDING_OUTPUT_N_BYTES): Define.

 lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/fpending.$(O) and
 $(BLD)/close-stream.$(O).
 ($(BLD)/close-stream.$(O)):
 ($(BLD)/fpending.$(O)): New dependencies.

Fixes: debbugs:9574
2012-11-03 22:43:29 +02:00
Glenn Morris
f58542e151 Merge from emacs-24; up to 2012-11-03T05:11:34Z!dmantipov@yandex.ru 2012-11-03 12:14:22 -07:00
Paul Eggert
7ccfb720b4 Fix data-loss with --batch.
* admin/merge-gnulib (GNULIB_MODULES): Add close-stream.
* lib/close-stream.c, lib/close-stream.h, lib/fpending.c
* lib/fpending.h, m4/close-stream.m4, m4/fpending.m4:
New files, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* src/emacs.c: Include <close-stream.h>.
(close_output_streams): New function.
(main): Pass it to atexit, so that Emacs closes stdout and stderr
and handles errors appropriately.
(Fkill_emacs): Don't worry about flushing, as close_output_stream
does that now.

Fixes: debbugs:9574
2012-11-03 11:54:17 -07:00
Eli Zaretskii
b3cf17f695 Adapt the MSDOS build to the latest changes on mainline. 2012-11-03 15:48:33 +02:00
Glenn Morris
d036bcdffe Allow choice of icon style at install time
This feature is intentionally not advertised
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12536#40

* Makefile.in (EMACS_ICON): New variable.
(install-etc): Use EMACS_ICON to allow choice of icon.
2012-11-02 18:22:11 -04:00
Glenn Morris
59696ae01c * Makefile.in (EMACS_NAME): New variable.
(EMACS, install-etc, uninstall): Use $EMACS_NAME.
2012-10-26 14:35:36 -04:00
Glenn Morris
eeced60b6c Program name transformations should not be applied to $EXEEXT.
* Makefile.in (EMACS, EMACSFULL):
* lib-src/Makefile.in (install, uninstall):
Transformations should not be applied to $EXEEXT.
2012-10-26 00:39:47 -07:00
Glenn Morris
25ca458727 Misc fixes for make uninstall
* Makefile.in (uninstall): Don't abort if some directories are missing.
Apply transformation rules to manual pages, desktop and icon files.
No more emacs22 icons to uninstall.
2012-10-26 00:32:40 -07:00
Glenn Morris
8bfcb8a6a8 * Makefile.in (install-etc): Don't apply program transform to file suffixes. 2012-10-24 13:25:24 -04:00
Glenn Morris
a6c2cc07fc * Makefile.in (install-man): Don't apply transform to suffix. 2012-10-24 09:41:59 -07:00
Paul Eggert
7f8de58ca5 * configure.ac (_FORTIFY_SOURCE): Do not multiply define.
This ports to Gentoo.  Problem originally reported against coreutils,
but Emacs has it too.

Fixes: debbugs:12714
2012-10-23 12:39:36 -07:00
Glenn Morris
ed68379ea9 Revert 2012-10-21 Makefile.in change (bug#12713)
* Makefile.in (emacs_transform): Remove.
(install-man): Revert 2012-10-21 change.
2012-10-23 13:33:22 -04:00
Glenn Morris
ad483434e5 Put back old Emacs 22 icons, just don't install them
Some people prefer them to the newer icon

* Makefile.in (install-etc): Don't install emacs22 icons.

* etc/images/icons/hicolor/32x32/apps/emacs22.png:
* etc/images/icons/hicolor/16x16/apps/emacs22.png:
* etc/images/icons/hicolor/48x48/apps/emacs22.png:
* etc/images/icons/hicolor/24x24/apps/emacs22.png: Restore old icons.

* etc/images/icons/README: Restore info about emacs22 icons
2012-10-20 18:35:46 -07:00
Glenn Morris
8dc2a723eb In Makefile.in, use a make variable rather than a shell variable.
* Makefile.in (emacs_transform): New variable.
(install-etc): Prefer a make variable to a shell variable.
2012-10-20 18:27:09 -07:00
Paul Eggert
f0a8017501 Undo faccessat change. 2012-10-19 12:25:18 -07:00
Paul Eggert
e752e0b0a2 Use faccessat, not access, when checking file permissions.
* .bzrignore: Add lib/fcntl.h.
* configure.ac (euidaccess): Remove check; gnulib does this for us now.
(gl_FCNTL_O_FLAGS): Define a dummy version.
* lib/at-func.c, lib/euidaccess.c, lib/faccessat.c, lib/fcntl.in.h:
* lib/getgroups.c, lib/group-member.c, lib/root-uid.h:
* lib/xalloc-oversized.h, m4/euidaccess.m4, m4/faccessat.m4:
* m4/fcntl_h.m4, m4/getgroups.m4, m4/group-member.m4:
New files, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* admin/merge-gnulib (GNULIB_MODULES): Add faccessat.
(GNULIB_TOOL_FLAGS): Avoid at-internal, fchdir, malloc-posix,
openat-die, openat-h, save-cwd.  Do not avoid fcntl-h.
Omit gnulib's m4/fcntl-o.m4.
* nt/inc/ms-w32.h (AT_FDCWD, AT_EACCESS): New symbols.
(access): Remove.
(faccessat): New macro.
* src/Makefile.in (LIB_EACCESS): New macro.
(LIBES): Use it.
* src/callproc.c (init_callproc):
* src/charset.c (init_charset):
* src/fileio.c (check_existing, check_executable):
* src/lread.c (openp, load_path_check):
* src/process.c (allocate_pty):
* src/xrdb.c (file_p):
Use faccessat, not access or euidaccess.  Use symbolic names
instead of integers for the flags, as they're portable now.
* src/charset.c, src/xrdb.c: Include <fcntl.h>, for the new flags used.
* src/fileio.c (Ffile_readable_p):
Use faccessat, not stat + open + close.
(file_directory_p): New function, which uses 'stat' on most places
but 'access' (for efficiency) if WINDOWSNT.
* src/fileio.c (Ffile_directory_p, Fset_file_times):
* src/xrdb.c (file_p): Use file_directory_p.
* src/lisp.h (file_directory_p): New decl.
* src/lread.c (openp): When opening a file, use fstat rather than
stat, as that avoids a permissions race.  When not opening a file,
use file_directory_p rather than stat.
* src/process.c, src/sysdep.c, src/term.c: All uses of '#ifdef O_NONBLOCK'
changed to '#if O_NONBLOCK', to accommodate gnulib O_* tyle.
* src/w32.c (sys_faccessat): Rename from sys_access and switch to
faccessat's API.  All uses changed.

Fixes: debbugs:12632
2012-10-19 09:52:02 -07:00
Stefan Monnier
90eacf9920 * lisp/emacs-lisp/gv.el (cond): Same fix as before for `if'.
* Makefile.in ($(MAKEFILE_NAME)): Depend on src/lisp.mk as well.
2012-10-18 08:56:10 -04:00
Juanma Barranquero
1f9f395d80 Fix ChangeLog typos. 2012-10-17 13:24:34 +02:00
Glenn Morris
1a9c683079 Apply program-transform-name etc in more places (bug#12536#34)
* Makefile.in (install-man, install-etc): Apply $TRANSFORM.  
(clean): Delete etc/emacs.tmpdesktop.

* .bzrignore: Add etc/emacs.tmpdesktop.

* etc/NEWS: Mention this.  Unrelated copyedits.
2012-10-15 16:56:07 -04:00
Kenichi Handa
d3e4228575 merge trunk 2012-10-11 20:29:47 +09:00
Kenichi Handa
cde44a7728 Re-generate charsets. Adjust for the change of admin/charset/mapfiles/*.gz 2012-10-11 20:26:26 +09:00
Daniel Colascione
e08348a0e6 Changelog entries for cygw32 2012-10-07 23:58:40 -08:00
Jan Djärv
335f5ae444 Check for OSX >= 10.4 to match what the maunal says and what we actually support.
* configure.ac: Check that OSX is 10.4 or newer.

* etc/NEWS (NextStep/OSX port changes): OSX 10.4 or newer is required.

* src/nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
(ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.

* src/nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.

* src/nsmenu.m (fillWithWidgetValue:): Remove code for < MAC_OS_X_VERSION_10_2.

* src/nsselect.m (ns_string_from_pasteboard): Remove check for >=
MAC_OS_X_VERSION_10_4.

* src/nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
(EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
(struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
2012-10-07 12:07:23 +02:00
Paul Eggert
c622b48f78 Improve sys_siglist detection.
* configure.ac (sys_siglist): Look for its decl in <signal.h>.
Otherwise, it's not found in either Fedora 17 or Solaris 11.
* src/sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
defined as a macro, as is done in Solaris.
(sys_siglist_entries): New macro.
(save_strsignal): Use it.
* src/syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
2012-10-06 19:26:03 -07:00