1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 04:30:45 -08:00
Commit graph

33661 commits

Author SHA1 Message Date
Eli Zaretskii
c54ebba4e0 Update w32 dependencies in the wake of cygw32 changes.
src/makefile.w32-in (FONT_H): Add $(FRAME_H).
 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
 (GLOBAL_SOURCES): Add cygw32.c.

 lib-src/makefile.w32-in (obj): Add cygw32.o.
2012-10-08 14:21:04 +02:00
Eli Zaretskii
b6f4e30044 Avoid compiler warnings on w32, caused by cygw32 changes.
src/w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
 'const char *'.
 (x_to_w32_color): Don't modify the argument, modify a copy instead.
2012-10-08 13:19:35 +02:00
Eli Zaretskii
303cc1d110 Fix wording of comments in w32fns.c. 2012-10-08 13:03:00 +02:00
Daniel Colascione
93aa5c811f Improve fix for jpeglib build break 2012-10-08 02:26:10 -08:00
Eli Zaretskii
8ee4c6ce76 Commit ChangeLog for last change. 2012-10-08 12:07:16 +02:00
Eli Zaretskii
a1d638346f Remove CHECK_LIB_AVAILABLE from image.c, mistakenly reintroduced by cygw32.
src/image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
2012-10-08 12:05:50 +02:00
Eli Zaretskii
d424f3d8f5 Fix conditional macros in emacs.c, introduced by cygw32 addition.
src/emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on Cygwin.
2012-10-08 12:01:59 +02:00
Eli Zaretskii
bb84afd570 Fix comments in src/cygw32.h. 2012-10-08 11:52:25 +02:00
Eli Zaretskii
245dc6da18 Fix copyright years in new cygw32 files. 2012-10-08 11:41:04 +02:00
Eli Zaretskii
2ae3a8a712 Temporary fix for changes in 2012-10-08T08:23:13Z!dancol@dancol.org. 2012-10-08 11:19:20 +02:00
Daniel Colascione
a28a3ae362 fix NT build 2012-10-08 00:18:01 -08:00
Daniel Colascione
e08348a0e6 Changelog entries for cygw32 2012-10-07 23:58:40 -08:00
Daniel Colascione
36a305a723 Merge from trunk 2012-10-07 14:31:58 -08:00
Eli Zaretskii
98daa89356 Don't abort when ralloc.c:relinquish cannot return a heap to the system.
src/ralloc.c (relinquish): If a heap is ready to be relinquished,
 but it still has blocs in it, don't return it to the system,
 instead of aborting.  (Bug#12402)
2012-10-07 20:33:10 +02:00
Jan Djärv
8ad5b73b60 Reformat last entries to fit 80 columns. 2012-10-07 18:54:43 +02:00
Eli Zaretskii
17917e7468 Fixa typo in last commit. 2012-10-07 16:54:01 +02:00
Eli Zaretskii
d263a63399 Add a comment with overview of how Emacs input works on MS-Windows. 2012-10-07 16:50:29 +02:00
Jan Djärv
493b5b1c4a * nsterm.m (ns_dumpglyphs_image): Only draw slize of image (Bug#12506). 2012-10-07 13:09:04 +02: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
Jan Djärv
3bc0a2f7e9 * nsfns.m (ns_in_resize): Remove.
(x_set_icon_name, ns_set_name, ns_set_name_as_filename):  Remove ns_in_resize
check.

* nsterm.m (ns_in_resize): Remove.
(ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
(ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove ns_in_resize
check.
(ns_clear_frame_area): Remove resize handle code.

Fixes: debbugs:12479
2012-10-07 11:17:17 +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
Jan Djärv
04fafa4675 Handle fullscreen parameter in initial/defult-frame-alist for NS.
* nsfns.m (Fx_create_frame): Call x_default_parameter with
fullscreen/Fullscreen.

* nsterm.h (EmacsView): Rename tbar_height to tibar_height.
tobar_height is new.

* nsterm.m (x_make_frame_visible): Check for fullscreen.
(ns_fullscreen_hook): Activate old style fullscreen with a timer.
(ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
(windowDidResize:): Check for correct window if old style fullscreen.
Capitalize word in comment.  Remove incorrect comment.
(initFrameFromEmacs:): tbar_height renamed tibar_height.
(windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
error in drawing background.
(toggleFullScreen:): Remove comment. Rearrange calls.
Set toolbar values to zero, save old height in tobar_height.
Restore tool bar height when leaving fullscreen.
(canBecomeMainWindow): New function.
2012-10-06 19:31:11 +02:00
Paul Eggert
c6e21c0323 * keyboard.c (read_char): Remove unnecessary 'volatile's and label. 2012-10-05 17:52:17 -07:00
Eli Zaretskii
a65fbb5f0e Fix a typo in a w32proc.c declaration.
src/w32proc.c (stop_timer_thread): Fix declaration of 'err'.
2012-10-05 13:19:58 +02:00
Eli Zaretskii
0ace05d38a Improve commentary for the last commit. 2012-10-05 11:21:51 +02:00
Eli Zaretskii
0d9f584b2c Support setting file times of directories on MS-Windows.
src/w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
 that time stamps of directories could also be changed.  Don't
 request the too broad GENERIC_WRITE, only the more restrictive
 FILE_WRITE_ATTRIBUTES access rights.
 src/fileio.c (Fset_file_times): Special-case ignoring errors for
 directories only on MSDOS, not on MS-Windows.
2012-10-05 11:17:17 +02:00
Glenn Morris
e8757f091a Merge from emacs-24; up to 2012-05-08T14:11:47Z!monnier@iro.umontreal.ca 2012-10-05 00:38:05 -07:00
Paul Eggert
735135f9bc Spelling fixes. 2012-10-04 22:57:24 -07:00
Eli Zaretskii
7604f29862 Fix test for invalid handle in w32.c's 'utime'.
src/w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
 see whether CreateFile failed.
2012-10-04 22:07:45 +02:00
Ikumi Keita
ca347e3d40 * src/minibuf.c (Fcompleting_read): Doc fix (tiny change)
Fixes: debbugs:12555
2012-10-04 00:31:56 -07:00
Paul Eggert
7509f454d2 Move ChangeLog entry to proper file. 2012-10-04 00:23:35 -07:00
Paul Eggert
88d69b7ddc * profiler.c (handle_profiler_signal): Inhibit pending signals too,
to avoid similar races.
* keyboard.c (pending_signals): Now bool, not int.
2012-10-03 22:52:49 -07:00
Paul Eggert
2b794d6940 Port timers to OpenBSD, plus check for timer failures.
OpenBSD problem reported by Han Boetes.
* profiler.c (setup_cpu_timer): Check for failure of timer_settime
and/or setitimer.
(Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
* syssignal.h (HAVE_ITIMERSPEC): New macro.  This is for platforms
like OpenBSD, which has timer_settime but does not declare it.
OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
whether to use itimerspec-related primitives.  All uses of
HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
2012-10-03 17:10:47 -07:00
Paul Eggert
a3c5c0c580 * profiler.c (handle_profiler_signal): Fix a malloc race
that caused Emacs to hang on Fedora 17 when profiling Lisp.
2012-10-02 12:38:10 -07:00
Jan Djärv
914e743b60 * nsterm.m (windowDidEnterFullScreen): Remove fprintf. 2012-10-02 20:51:51 +02:00
Eli Zaretskii
d8ab37a818 Fix compilation warnings in the MS-Windows build.
src/w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
 consistent with the change in return value of 'safe_strsignal'.

 nt/preprep.c (RVA_TO_PTR): Cast the result to 'void *', to avoid
 compiler warnings when using the value.
2012-10-02 19:55:29 +02:00
Paul Eggert
0a99eee11b Prefer plain 'static' to 'static inline'.
* bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
(bidi_set_sor_type, bidi_push_embedding_level)
(bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
(bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
(bidi_cache_search, bidi_cache_ensure_space)
(bidi_cache_iterator_state, bidi_cache_find)
(bidi_peek_at_next_level, bidi_set_paragraph_end)
(bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
(bidi_explicit_dir_char, bidi_resolve_neutral_1):
Now 'static', not 'static inline'.

Fixes: debbugs:12541
2012-10-01 23:55:27 -07:00
Paul Eggert
b3ecad33ae Count overruns when profiling; change units to ns.
* lisp/profiler.el (profiler-sampling-interval): Change units
from ms to ns, multiplying the default by 1000000 so that
it remains 1 ms.
(profiler-report-cpu-line-format): Give enough room for
the maximum counters on 64-bit hosts.
(profiler-report-render-calltree-1): Call them "CPU samples",
not "Time (ms)", since they are not milliseconds now (and
never really were).
* src/profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
Give extra weight to samples after overruns, to attempt to count
the time more accurately.
(setup_cpu_timer): Change sampling interval units from ms to ns, since
the underlying primitives nominally do ns.
(Fprofiler_cpu_start): Document the change.  Mention that
the sampling intervals are only approximate.
2012-10-01 23:30:40 -07:00
Stefan Monnier
64edc7770f * src/buffer.c (Fmake_overlay): Fix last change.
(fix_start_end_in_overlays): Remove redundant recentering.
2012-10-01 22:43:53 -04:00
Stefan Monnier
090cf9dbb0 Misc minor simplifications in C code.
* src/buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
(Fmake_overlay): Remove redundant tests.
* src/coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
case for the special 0 coding-system.
* src/frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
2012-10-01 20:31:56 -04:00
Juanma Barranquero
81550bf43d src/makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)): Update dependencies. 2012-10-02 02:08:54 +02:00
Paul Eggert
aa1ba90e4a Fix a malloc race condition involving strsignal.
A signal can arrive in the middle of a malloc, and Emacs's signal
handler can invoke strsignal, which can invoke malloc, which is
not portable.  This race condition bug makes Emacs hang on GNU/Linux.
Fix it by altering the signal handler so that it does not invoke
strsignal.
* emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
* process.c (status_message): Use const pointer, in case strsignal
is #defined to safe_strsignal.
* sysdep.c (sys_siglist, init_signals): Always define and
initialize a substitute sys_siglist if the system does not define
one, even if HAVE_STRSIGNAL.
(safe_strsignal): Rename from strsignal.  Always define,
using sys_siglist.  Return a const pointer.
* syssignal.h (safe_strsignal): New decl.
(strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
2012-10-01 15:12:44 -07:00
Eli Zaretskii
ace917bddb Fix high CPU usage in profiling on MS-Windows.
src/w32proc.c (timer_loop): Fix code that waits for timer
 expiration, to avoid high CPU usage.
2012-10-01 23:09:30 +02:00
Stefan Monnier
9eb71b9c7d * src/fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
(sweep_weak_table): Remove redundant prototypes.
2012-10-01 14:59:52 -04:00
Fabrice Popineau
b3317662ac Fix minor compilation problem with MSVC.
src/emacs.c: Move the inclusion of TERM_HEADER after including
 windows.h on WINDOWSNT.  This avoids compilation problems with
 MSVC.
2012-10-01 16:25:40 +02:00
Eli Zaretskii
2d7d160838 Clean up the Windows x64 changes.
nt/preprep.c (RVA_TO_PTR): Use 'unsigned char *' instead of
 'void *', for pointer arithmetics.
 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET): Enclose all
 macro arguments in parentheses.

 src/unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
 as the previous version used 'void *'.
 src/ralloc.c (ROUNDUP): Fix last change.
 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
 'size_t'.

Fixes: debbugs:12544
2012-10-01 13:37:37 +02:00
Eli Zaretskii
db9848e480 Remove forgotten debug code from w32proc.c. 2012-10-01 11:59:53 +02:00
Eli Zaretskii
4cdfbb8976 Improve 'alarm' implementation on MS-Windows.
src/w32proc.c (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
 return results.
 [!HAVE_SETITIMER]: Behave as the previous version that didn't
 support timers.
2012-10-01 11:46:01 +02:00
Eli Zaretskii
f0e5f2255f Fix termination sequence on Windows wrt interval timers.
src/w32proc.c <disable_itimers>: New static flag.
 (init_timers): Initialize it to zero, after creating the critical
 sections used by the timer threads.
 (term_timers): Set to 1 before deleting the critical sections.
 (getitimer, setitimer): If disable_itimers is non-zero, return an
 error indication without doing anything.  Reported by Fabrice
 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
2012-10-01 11:29:14 +02:00
Paul Eggert
b3a4c387c0 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100. 2012-10-01 00:03:04 -07:00