1. 03 Jan, 2013 1 commit
  2. 01 Jan, 2013 1 commit
  3. 15 Dec, 2012 1 commit
  4. 24 Nov, 2012 2 commits
  5. 23 Nov, 2012 1 commit
    • Paul Eggert's avatar
      Fix a race condition with glib (Bug#8855). · 6d4e8f62
      Paul Eggert authored
      This is a backport from the trunk, consisting of:
      
      2012-11-17  Eli Zaretskii  <eliz@gnu.org>
      
      * nt/inc/sys/wait.h: New file, with prototype of waitpid and
      definitions of macros it needs.
      * nt/inc/ms-w32.h (wait): Don't define, 'wait' is not used anymore.
      (sys_wait): Remove prototype.
      * nt/config.nt (HAVE_SYS_WAIT_H): Define to 1.
      * src/w32proc.c (create_child): Don't clip the PID of the child
      process to fit into an Emacs integer, as this is no longer a
      restriction.
      (waitpid): Rename from sys_wait.  Emulate a Posix 'waitpid' by
      reaping only the process specified by PID argument, if that is
      positive.  Use PID instead of dead_child to know which process to
      reap.  Wait for the child to die only if WNOHANG is not in
      OPTIONS.
      (sys_select): Don't set dead_child.
      * src/sysdep.c (wait_for_termination_1): Remove the WINDOWSNT portion,
      as it is no longer needed.
      * src/process.c (waitpid, WUNTRACED) [!WNOHANG]: Remove definitions,
      no longer needed.
      (record_child_status_change): Remove the setting of
      record_at_most_one_child for the !WNOHANG case.
      
      2012-11-03  Paul Eggert  <eggert@cs.ucla.edu>
      
      Fix a race condition that causes Emacs to mess up glib (Bug#8855).
      This is a backport from the trunk.
      The symptom is a diagnostic "GLib-WARNING **: In call to
      g_spawn_sync(), exit status of a child process was requested but
      SIGCHLD action was set to SIG_IGN and ECHILD was received by
      waitpid(), so exit status can't be returned."  The diagnostic
      is partly wrong, as the SIGCHLD action is not set to SIG_IGN.
      The real bug is a race condition between Emacs and glib: Emacs
      does a waitpid (-1, ...) and reaps glib's subprocess by mistake,
      so that glib can't find it.  Work around the bug by invoking
      waitpid only on subprocesses that Emacs itself creates.
      * src/process.c (create_process, record_child_status_change):
      Don't use special value -1 in pid field, as the caller now must
      know the pid rather than having the callee infer it.  The
      inference was sometimes incorrect anyway, due to another race.
      (create_process): Set new 'alive' member if child is created.
      (process_status_retrieved): New function.
      (record_child_status_change): Use it.
      Accept negative 1st argument, which means to wait for the
      processes that Emacs already knows about.  Move special-case code
      for DOS_NT (which lacks WNOHANG) here, from caller.  Keep track of
      processes that have already been waited for, by testing and
      clearing new 'alive' member.
      (CAN_HANDLE_MULTIPLE_CHILDREN): Remove, as record_child_status_change
      now does this internally.
      (handle_child_signal): Let record_child_status_change do all
      the work, since we do not want to reap all exited child processes,
      only the child processes that Emacs itself created.
      * src/process.h (Lisp_Process): New boolean member 'alive'.
      6d4e8f62
  6. 01 Nov, 2012 1 commit
  7. 24 Oct, 2012 1 commit
  8. 17 Oct, 2012 1 commit
    • Eli Zaretskii's avatar
      Fix warnings when compiling on MS-Windows with -std=gnu99. · a68089e4
      Eli Zaretskii authored
       src/makefile.w32-in ($(BLD)/w32.$(O)): 
       ($(BLD)/vm-limit.$(O)): 
       ($(BLD)/term.$(O)): 
       ($(BLD)/unexw32.$(O)): 
       ($(BLD)/fileio.$(O)): 
       ($(BLD)/dispnew.$(O)): Update dependencies.
       src/w32term.h (w32_initialize_display_info, initialize_w32_display):
       Add prototypes.
       src/w32proc.c: Include ctype.h.
       src/w32.h (init_environment, check_windows_init_file)
       (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
       (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
       (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
       (sys_link): Add prototypes.
       src/w32.c: Include w32select.h.
       (sys_access, e_malloc, sys_select): Add prototypes.
       (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
       src/vm-limit.c [WINDOWSNT]: Include w32heap.h.
       src/unexw32.c: Include lisp.h and w32.h.
       src/term.c [WINDOWSNT]: Include w32term.h.
       src/process.c [WINDOWSNT]: Add prototype of sys_select.
       src/fileio.c [WINDOWSNT]: Include w32.h.
       src/dispnew.c [WINDOWSNT]: Include w32.h.
      
       nt/inc/pwd.h (getuid, geteuid): Add prototypes.
       nt/inc/ms-w32.h (sys_wait, _getpid, gmtgime_r, localtime_r)
       (signal_handler, sys_signal, sigemptyset, sigfillset, sigprocmask)
       (pthread_sigmask, sigismember, setpgrp, sigaction, alarm)
       (sys_kill, getpagesize): Add prototypes for emulated functions.
       nt/inc/grp.h (getgid, getegid): Add prototypes.
       nt/gmake.defs (DEBUG_CFLAGS) [NOOPT]: Add -std=gnu99.
       nt/configure.bat (chkapiN): Avoid compiler warning in junk.c when
       compiling with -std=gnu99.
       nt/config.nt (CHECK_LISP_OBJECT_TYPE): Don't undef, so that it
       could be used via --cflags switch to configure.bat.
      a68089e4
  9. 08 Oct, 2012 1 commit
  10. 30 Sep, 2012 2 commits
    • Eli Zaretskii's avatar
      Support atimers and CPU profiler via profile.c on MS-Windows. · c06c382a
      Eli Zaretskii authored
       src/w32proc.c (sig_mask, crit_sig): New static variables.
       (sys_signal): Support SIGALRM and SIGPROF.
       (sigemptyset, sigaddset, sigfillset, sigprocmask)
       (pthread_sigmask, setpgrp): Moved here from w32.c.  sigaddset,
       sigfillset, and sigprocmask are no longer no-ops.
       (sigismember): New function.
       (struct itimer_data): New definition.
       (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
       (crit_prof): New static variables.
       (MAX_SINGLE_SLEEP): New definition.
       (timer_loop, stop_timer_thread, term_timers, init_timers)
       (start_timer_thread, getitimer, setitimer): New functions.
       (alarm): No longer a no-op, calls setitimer.
       src/w32.c (term_ntproc): Call term_timers.
       (init_ntproc): Make sure all signals are unblocked at startup, to
       erase any traces of dumping.  Call init_timers.
       src/w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
       Windows-specific code to display the hourglass mouse pointer is no
       longer used.
       (w32_wnd_proc): Remove code that handled the WM_TIMER message due
       to hourglass timer expiration.
       (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
       Remove, no longer used.
       (w32_note_current_window, show_hourglass, hide_hourglass): New
       functions, in support of hourglass cursor display similar to other
       window systems.
       (syms_of_w32fns): Don't initialize hourglass_timer.
       src/xdisp.c (start_hourglass, cancel_hourglass): Now used on
       WINDOWSNT as well.
       (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
       src/w32.h (init_timers, term_timers): Add prototypes.
      
       nt/inc/sys/time.h (ITIMER_REAL, ITIMER_PROF): Define.
       (struct itimerval): Define.
       (getitimer, setitimer): Add prototypes.
       nt/inc/ms-w32.h <sigset_t> [_MSVC_VER]: Make the typedef consistent
       with MinGW.
       (SA_RESTART, SIGPROF): Define.
       nt/config.nt (HAVE_SETITIMER): Define to 1.
      c06c382a
    • Juanma Barranquero's avatar
      9ee2ee9f
  11. 29 Sep, 2012 1 commit
  12. 17 Sep, 2012 2 commits
    • Juanma Barranquero's avatar
      nt/config.nt: Sync with autogen/config.in. · caf4040f
      Juanma Barranquero authored
      (BROKEN_SA_RESTART, SYNC_INPUT): Remove.
      caf4040f
    • Glenn Morris's avatar
      Reduce the number of versioned files storing the short copyright string · 78f83752
      Glenn Morris authored
      * configure.ac (copyright): New output variable.
      (COPYRIGHT): New AC_DEFINE.
      
      * admin/admin.el (set-copyright): No more need to set copyrights for
      nextstep, or .c files.  Add configure.ac and config.nt.
      
      * lib-src/ebrowse.c (version):
      * lib-src/etags.c (print_version): Use COPYRIGHT.
      
      * nextstep/templates/Info-gnustep.plist.in:
      * nextstep/templates/InfoPlist.strings.in:
      * nextstep/templates/Info.plist.in: Let configure set copyright.
      
      * nt/config.nt (COPYRIGHT): New.
      
      * src/emacs.c: Use COPYRIGHT.
      78f83752
  13. 15 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Port _setjmp fix to POSIXish hosts as well as Microsoft. · 39a57ad0
      Paul Eggert authored
      * nt/config.nt: Attempt to sync with autogen/config.in.
      (HAVE_SIGSETJMP, HAVE__SETJMP): New macros.
      (_longjmp, _setjmp): Remove.
      * src/image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
      it's needed on POSIXish hosts that lack _setjmp.  Attempt to solve
      the Microsoft problem in a different way, by altering nt/config.nt.
      39a57ad0
  14. 14 Sep, 2012 1 commit
  15. 10 Sep, 2012 1 commit
  16. 07 Sep, 2012 1 commit
  17. 05 Sep, 2012 1 commit
  18. 02 Sep, 2012 1 commit
  19. 22 Aug, 2012 1 commit
  20. 17 Aug, 2012 1 commit
  21. 15 Aug, 2012 2 commits
  22. 14 Aug, 2012 1 commit
  23. 10 Aug, 2012 1 commit
    • Glenn Morris's avatar
      Move DIRECTORY_SEP from lisp.h to config.h · 9374581a
      Glenn Morris authored
      * configure.ac (DIRECTORY_SEP): Move here from src/lisp.h.
      
      * src/lisp.h (DIRECTORY_SEP): Let configure set it.
      
      * nt/config.nt (DIRECTORY_SEP): Move here from src/lisp.h.
      
      * lib-src/movemail.c (DIRECTORY_SEP, IS_DIRECTORY_SEP):
      * lib-src/make-docfile.c (DIRECTORY_SEP, IS_DIRECTORY_SEP):
      * lib-src/emacsclient.c (DIRECTORY_SEP, IS_DIRECTORY_SEP, IS_DEVICE_SEP):
      Remove (they are in config.h now).
      9374581a
  24. 07 Aug, 2012 1 commit
  25. 06 Aug, 2012 1 commit
    • Glenn Morris's avatar
      Remove GNU_LIBRARY_PENDING_OUTPUT_COUNT · 1c6f11f4
      Glenn Morris authored
      * configure.ac (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Remove.
      (PENDING_OUTPUT_COUNT): Absorb GNU_LIBRARY_PENDING_OUTPUT_COUNT.
      (DISPNEW_NEEDS_STDIO_EXT): New define.
      
      * src/dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
      Let configure handle it.
      (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
      
      * nt/config.nt (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Remove.
      (PENDING_OUTPUT_COUNT): Define it as dispnew.c used to.
      
      * admin/CPP-DEFINES (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Remove.
      1c6f11f4
  26. 03 Aug, 2012 1 commit
    • Juanma Barranquero's avatar
      * nt/config.nt: Sync with autogen/config.in. · 3fbc4b54
      Juanma Barranquero authored
      (DOS_NT, MSDOS): New macros.
      (WRETCODE, wait3): Remove.
      
      * nt/inc/ms-w32.h (DOS_NT): Remove; defined in config.nt.
      
      * lib-src/makefile.w32-in (LOCAL_FLAGS): Remove WINDOWSNT and DOS_NT,
      they are always defined in config.h.
      3fbc4b54
  27. 02 Aug, 2012 2 commits
    • Paul Eggert's avatar
      Use C99-style 'extern inline' if available. · f162bcc3
      Paul Eggert authored
      * lib-src/profile.c (SYSTIME_INLINE): Define.
      * nt/config.nt: Sync with autogen/config.in.
      (_GL_INLINE, _GL_EXTERN_INLINE, _GL_INLINE_HEADER_BEGIN)
      (_GL_INLINE_HEADER_END): New macros.
      * src/buffer.h (BUFFER_INLINE):
      * src/category.h (CATEGORY_INLINE):
      * src/character.h (CHARACTER_INLINE):
      * src/charset.h (CHARSET_INLINE):
      * src/composite.h (COMPOSITE_INLINE):
      * src/dispextern.h (DISPEXTERN_INLINE):
      * src/lisp.h (LISP_INLINE):
      * src/systime.h (SYSTIME_INLINE):
      New macro, replacing 'static inline' in this header.
      * src/buffer.h, src/category.h, src/character.h, src/charset.h:
      * src/composite.h, src/dispextern.h, lisp.h, systime.h:
      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
      * src/alloc.c (LISP_INLINE):
      * src/buffer.c (BUFFER_INLINE):
      * src/category.c (CATEGORY_INLINE):
      * src/character.c (CHARACTER_INLINE):
      * src/charset.c (CHARSET_INLINE):
      * src/composite.c (COMPOSITE_INLINE):
      * src/dispnew.c (DISPEXTERN_INLINE):
      * src/sysdep.c (SYSTIME_INLINE):
      Define to EXTERN_INLINE, so that the corresponding functions
      are compiled into code.
      * src/conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
      (INLINE_HEADER_END): New macros.
      * src/lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
      since it's used in non-static inline functions now.
      f162bcc3
    • Glenn Morris's avatar
      Move NT-specific include file to the NT include directory · 837b365b
      Glenn Morris authored
      * nt/inc/ms-w32.h: Move here from ../src/s.
      * nt/config.nt (config_opsysfile): Change to <ms-w32.h>.
      
      * s/ms-w32.h: Move to ../nt/inc.
      * src/makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
      Update for new ms-w32.h location.
      
      * lib-src/makefile.w32-in (MS_W32_H): Update for new ms-w32.h location.
      
      * lib/makefile.w32-in (MS_W32_H): Update for new ms-w32.h location.
      
      * lisp/emacs-lisp/authors.el (authors-renamed-files-alist): Add ms-w32.h.
      837b365b
  28. 01 Aug, 2012 2 commits
    • Juanma Barranquero's avatar
      Sync Windows port with autogen/config.in changes. · c90acc54
      Juanma Barranquero authored
      * nt/config.nt: Sync with autogen/config.in.
      (DEVICE_SEP, FLOAT_CHECK_DOMAIN, HAVE_INVERSE_HYPERBOLIC)
      (INTERNAL_TERMINAL, IS_ANY_SEP, IS_DEVICE_SEP, IS_DIRECTORY_SEP):
      New macros.
      
      * src/s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
      Remove; moved to nt/config.nt.
      c90acc54
    • Juanma Barranquero's avatar
      Adapt Windows port to recent changes in autogen/config.in. · 552a99b4
      Juanma Barranquero authored
      * lib-src/makefile.w32-in (CONFIG_H): Update dependencies.
      (CONF_POST_H): New macro.
      
      * lib/makefile.w32-in (CONFIG_H): Update dependencies.
      (CONF_POST_H): New macro.
      
      * nt/config.nt: Sync with autogen/config.in.
      Remove code moved to conf_post.h and include <conf_post.h>
      (NULL_DEVICE, SEPCHAR, SIGNAL_H_AHB, TIOCSIGSEND, USER_FULL_NAME)
      (USG5_4, WRETCODE, _longjmp, _setjmp, wait3): New macros.
      
      * src/makefile.w32-in (CONFIG_H): Update dependencies.
      (CONF_POST_H): New macro.
      
      * src/s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
      552a99b4
  29. 29 Jul, 2012 1 commit
  30. 28 Jul, 2012 1 commit
    • Paul Eggert's avatar
      Use Gnulib stdalign and environ modules (Bug#9772, Bug#9960). · e32a5799
      Paul Eggert authored
      * .bzrignore: Add lib/stdalign.h.
      * config.bat: Do not set NO_DECL_ALIGN; no longer needed.
      Copy lib/stdalign.in.h to lib/stdalign.in-h as needed.
      * configure.ac (HAVE_ATTRIBUTE_ALIGNED): Remove the code that
      fiddles with this, as gnulib now does this for us.
      * admin/merge-gnulib: Add environ, stdalign.
      * m4/environ.m4: New file, from gnulib.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * lib/stdalign.in.h, m4/stdalign.m4: New files, from gnulib.
      * sed2v2.inp (HAVE_ATTRIBUTE_ALIGNED): Remove edit.
      * sedlibmk.inp (STDALIGN_H, @GL_GENERATE_STDALIGN_H_TRUE@)
      (GL_GENERATE_STDALIGN_H_FALSE): New edits.
      * nt/config.nt (HAVE_ATTRIBUTE_ALIGNED): Remove.
      * src/alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
      Simplify by using alignof.
      (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
      * src/lisp.h: Include <stdalign.h>.
      (GCALIGNMENT): New macro and constant.
      (DECL_ALIGN): Remove.  All uses replaced by alignas (GCALIGNMENT).
      (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
      (stdalign): New macro, if not already defined.
      e32a5799
  31. 14 Jul, 2012 1 commit
  32. 13 Jul, 2012 1 commit
    • Juanma Barranquero's avatar
      * nt/config.nt: Sync with autogen/config.in. · ef099b57
      Juanma Barranquero authored
      (BROKEN_FIONREAD, BROKEN_GET_CURRENT_DIR_NAME)
      (BROKEN_PTY_READ_AFTER_EAGAIN, BROKEN_SIGAIO, BROKEN_SIGPOLL)
      (BROKEN_SIGPTY, BSD4_2, BSD_SYSTEM, BSD_SYSTEM_AHB, CYGWIN, DARWIN_OS)
      (FIRST_PTY_LETTER, GNU_LINUX, G_SLICE_ALWAYS_MALLOC, HAVE_PTYS)
      (HAVE_SOCKETS, HPUX, INTERRUPT_INPUT, IRIX6_5, NARROWPROTO, NO_ABORT)
      (NO_EDITRES, NSIG_MINIMUM, PREFER_VSUSP, PTY_ITERATION
      (PTY_NAME_SPRINTF, PTY_OPEN, PTY_TTY_NAME_SPRINTF, RUN_TIME_REMAP)
      (SETPGRP_RELEASES_CTTY, SOLARIS2, TAB3, TABDLY, ULIMIT_BREAK_VALUE)
      (UNIX98_PTYS, USG, USG5, XOS_NEEDS_TIME_H, _AIX): New macros.
      (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
      Set in src/s/ms-w32.h, not here.
      
      * src/s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
      (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
      Set here, not in nt/config.nt.
      ef099b57
  33. 11 Jul, 2012 1 commit
  34. 10 Jul, 2012 1 commit