1. 19 Feb, 2017 1 commit
  2. 01 Feb, 2017 1 commit
    • Paul Eggert's avatar
      Remove immediate_quit. · 33be5003
      Paul Eggert authored
      The old code that sets and clears immediate_quit was
      ineffective except when Emacs is running in terminal mode, and
      has problematic race conditions anyway, so remove it.  This
      will introduce some hangs when Emacs runs in terminal mode,
      and these hangs should be fixed in followup patches.
      * src/keyboard.c (immediate_quit): Remove.  All uses removed.
      33be5003
  3. 26 Jan, 2017 1 commit
    • Paul Eggert's avatar
      Replace QUIT with maybe_quit · b3a3ed52
      Paul Eggert authored
      There’s no longer need to have QUIT stand for a slug of C statements.
      Use the more-obvious function-call syntax instead.
      Also, use true and false when setting immediate_quit.
      These changes should not affect the generated machine code.
      * src/lisp.h (QUIT): Remove.  All uses replaced by maybe_quit.
      b3a3ed52
  4. 01 Jan, 2017 1 commit
  5. 30 Dec, 2016 2 commits
    • Ken Raeburn's avatar
      Don't call xg_select for a NextStep build. · 53d5bd78
      Ken Raeburn authored
      NextStep builds use glib but don't use xg_select.
      
      * src/process.c (wait_reading_process_output): Don't call xg_select
      for a NextStep build.
      53d5bd78
    • Eli Zaretskii's avatar
      Attempt to fix crashes with threads in GTK builds · 54353231
      Eli Zaretskii authored
      * src/xgselect.c (xg_select): Call pselect via thread_select, not
      directly, to avoid running Lisp (via unblock_input) when more than
      one thread could be running.  (Bug#25247)
      * src/process.c (wait_reading_process_output) [HAVE_GLIB]: Call
      xg_select directly instead of through thread_select.
      * src/xgselect.h (xg_select): Last 2 arguments are no longer
      'const', for consistency with thread_select.
      54353231
  6. 22 Dec, 2016 1 commit
  7. 17 Dec, 2016 1 commit
    • Eli Zaretskii's avatar
      Fix comments · 0390edcb
      Eli Zaretskii authored
      * src/thread.h (struct thread_state): Fix comments.
      * src/process.c (wait_reading_process_output): Fix a typo in
      commentary.
      0390edcb
  8. 09 Dec, 2016 1 commit
  9. 07 Dec, 2016 2 commits
    • Eli Zaretskii's avatar
      Fix network streams. · fa7d1f07
      Eli Zaretskii authored
      The original code messed up flags in fd_callback_data[], and also
      didn't call add_process_read_fd for process-related file descriptors.
      fa7d1f07
    • Paul Eggert's avatar
      Clean out some IRIX cruft · 8e5a7699
      Paul Eggert authored
      * etc/MACHINES: Remove obsolete discussion of IRIX.
      * src/process.c (allocate_pty) [__sgi]: Remove SGI-specific code.
      (create_process) [HAVE_PTYS]: Don't worry about IRIX.
      * src/syntax.c (scan_sexps_forward): Remove obsolete comment.
      * src/unexelf.c [__sgi]: Don't include <syms.h>.
      (unexec) [__sgi]: Remove SGI-specific code.
      8e5a7699
  10. 05 Dec, 2016 2 commits
  11. 19 Nov, 2016 1 commit
  12. 07 Nov, 2016 1 commit
    • Paul Eggert's avatar
      Restore file descriptor limit in subprocesses · b6d9613d
      Paul Eggert authored
      Problem reported by Philipp Stephani (Bug#24869).
      * src/callproc.c (child_setup) [!DOS_NT]:
      Call restore_nofile_limit in the child.
      * src/process.c (nofile_limit) [HAVE_SETRLIMIT]: New static var.
      (restore_nofile_limit): New function.
      (init_process_emacs) [HAVE_SETRLIMIT]: Set the new var.
      b6d9613d
  13. 01 Nov, 2016 1 commit
  14. 12 Oct, 2016 1 commit
    • Paul Eggert's avatar
      Port --enable-gcc-warnings to GCC 6.2.1 · eb17d6f5
      Paul Eggert authored
      Backport from master.
      * src/conf_post.h (GNUC_PREREQ): New macro.
      * src/keyboard.c: Use it to work around GCC bug 54561.
      * src/process.c (would_block): New function.
      (server_accept_connection, wait_reading_process_output, send_process):
      Use it.
      eb17d6f5
  15. 30 Sep, 2016 1 commit
    • Paul Eggert's avatar
      Limit <config.h>’s includes · f4eb8900
      Paul Eggert authored
      This follows up on recent problems with the fact that config.h
      includes stdlib.h etc.; some files need to include stdlib.h later.
      config.h generally should limit itself to includes that are
      universally safe; outside of MS-Windows, only stdbool.h makes
      the cut among the files currently included.  So, move the
      other includes to just the files that need them (Bug#24506).
      * configure.ac (config_opsysfile): Remove, as this generic hook
      is no longer needed.
      * lib-src/etags.c, src/unexmacosx.c, src/w32.c, src/w32notify.c:
      * src/w32proc.c (_GNU_SOURCE):
      Remove, as it’s OK for config.h to do this now.
      * src/conf_post.h: Include <ms-w32.h>, instead of the generic
      config_opsysfile, for simplicity as this old way of configuring is
      now done only for the MS-Windows port.  Do not include <ms-w32.h>
      if DEFER_MS_W32_H, for the benefit of the few files that want its
      effects later.  Do not include <alloca.h>, <string.h>, or
      <stdlib.h>.  Other files modified to include these headers as
      needed, or to not include headers that are no longer needed.
      * src/lisp.h: Include <alloca.h> and <string.h> here, since
      some of the inline functions need them.
      * src/regex.c: Include <alloca.h> if not emacs.  (If emacs,
      we can rely on SAFE_ALLOCA.)  There is no longer any need to
      worry about HAVE_ALLOCA_H.
      * src/unexmacosx.c: Rely on config.h not including stdlib.h.
      * src/w32.c, src/w32notify.c, src/w32proc.c (DEFER_MS_W32_H):
      Define before including <config.h> first, and include <ms-w32.h>
      after the troublesome headers.
      f4eb8900
  16. 08 Sep, 2016 1 commit
    • Paul Eggert's avatar
      Port flexible array members to GCC + valgrind · d2f1971d
      Paul Eggert authored
      These changes are needed to conform to the C standard's rule for
      allocating structs containing flexible array members.  C11 says
      that malloc (offsetof (struct s, m) + n) does not suffice to
      allocate a struct with an n-byte tail; instead, malloc’s arg
      should be rounded up to the nearest multiple of alignof (struct s).
      Although this is arguably a defect in C11, gcc -O2 + valgrind
      sometimes complains when this rule is violated, and when debugging
      it’s better to keep valgrind happy.
      For details please see the thread containing the message at:
      https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00416.html
      * lib-src/ebrowse.c, src/alloc.c, src/image.c, src/process.c:
      Include flexmember.h.
      * lib-src/ebrowse.c (add_sym, add_member, make_namespace)
      (register_namespace_alias):
      * src/alloc.c (SDATA_SIZE, allocate_string_data):
      * src/image.c (xpm_cache_color, imagemagick_create_cache):
      * src/process.c (Fmake_network_process):
      Use FLEXSIZEOF instead of offsetof and addition.
      * src/alloc.c (SDATA_SIZE, vector_alignment):
      Use FLEXALIGNOF instead of sizeof (ptrdiff_t).
      * src/lisp.h (ALIGNOF_STRUCT_LISP_VECTOR):
      Remove, as alloc.c can now calculate this on its own.
      d2f1971d
  17. 07 Sep, 2016 1 commit
    • Paul Eggert's avatar
      Use DEV_TTY more consistently · 5d2ac743
      Paul Eggert authored
      * src/conf_post.h (DEV_TTY): Move from here ...
      * src/keyboard.c, src/keyboard.h: ... to here, as it doesn’t need
      to be visible everywhere.  Make it a constant.
      * src/keyboard.c (handle_interrupt, Fset_quit_char):
      * src/process.c (create_process): Prefer DEV_TTY to "/dev/tty".
      5d2ac743
  18. 02 Sep, 2016 1 commit
    • Paul Eggert's avatar
      Don’t create fd >= FD_SETSIZE · a5509099
      Paul Eggert authored
      This avoids a potential crash if too many subprocesses (Bug#24325).
      * src/process.c [HAVE_SETRLIMIT]: Include <sys/resource.h>.
      (init_process_emacs): If ulimit -n is greater than FD_SETSIZE,
      set it to FD_SETSIZE.
      a5509099
  19. 24 Aug, 2016 1 commit
    • Eli Zaretskii's avatar
      Improve and clarify documentation of subprocesses · 88a50525
      Eli Zaretskii authored
      * doc/lispref/processes.texi (Subprocess Creation, Shell Arguments):
      Mention 'make-process' rather than 'start-process'.  Update wrt
      standard destinations of standard output/error streams and due to
      different formats of arguments accepted by 'make-process'.
      (Processes): Mention process objects that represent connections.
      (Synchronous Processes): Minor clarifications.
      (Asynchronous Processes): Describe 'make-process' and
      'make-pipe-process' before 'start-process'.  Update and expand the
      documentation.
      (Deleting Processes, Process Information, Input to Processes)
      (Signals to Processes, Query Before Exit, Network): Update and
      expand the documentation, especially wrt process objects that
      represent connections.
      (Output from Processes): Mention the possibility of separating
      stderr via 'make-process'.
      (Filter Functions): Mention that stderr by default arrives at the
      filter function together with stdout.  (Bug#24287)
      
      * src/process.c (Fprocess_id, Fprocess_command)
      (Fprocess_contact, Fprocess_type, Fstop_process): Doc fixes for
      process objects that represent connections.
      88a50525
  20. 11 Aug, 2016 1 commit
    • Paul Eggert's avatar
      Fix process leak with make-network-process · 2dd8044b
      Paul Eggert authored
      This problem was introduced by the recent async changes (Bug#23808).
      * src/process.c (Fmake_process): Move USE_SAFE_ALLOCA later,
      so that it follows the start_process_unwind unwind-protect.
      Set pid to -1 while the process is being created.
      (start_process_unwind): Omit unnecessary emacs_abort test.
      (connect_network_socket): Simplify use of counts.  Unwind
      bind_polling_period a bit earlier, so that a remove_process
      unwind-protect can be added when needed; this is the heart of
      the fix.  Undo the unwind-protect just before returning.
      2dd8044b
  21. 10 Aug, 2016 1 commit
    • Paul Eggert's avatar
      Omit unnecessary process initialization · cd352406
      Paul Eggert authored
      * src/process.c (make_process, Fmake_process)
      (Fmake_pipe_process, Fmake_serial_process)
      (Fmake_network_process, server_accept_connection):
      Omit unnecessary initialization of already-cleared storage.
      cd352406
  22. 02 Aug, 2016 1 commit
  23. 21 Jul, 2016 1 commit
  24. 05 Jul, 2016 1 commit
    • Paul Eggert's avatar
      Fix open-network-stream responsiveness · a5dcc97b
      Paul Eggert authored
      Problem reported by Christer Ekholm (Bug#23864).
      Backport from master.
      * src/process.c (wait_reading_process_output):
      Fix typo introduced in 2015-07-06T02:19:13Z!eggert@cs.ucla.edu
      when wait == INFINITY and got_output_end_time is invalid.
      In this case the code should break, not continue.
      a5dcc97b
  25. 03 Jul, 2016 2 commits
    • Paul Eggert's avatar
      Re-fix open-network-stream responsiveness · 838f1228
      Paul Eggert authored
      Problem reported by Christer Ekholm (Bug#23864).
      * src/process.c (wait_reading_process_output): Further fix for
      typo introduced in 2015-07-06T02:19:13Z!eggert@cs.ucla.edu when
      wait == INFINITY and got_output_end_time is invalid.  See:
      http://bugs.gnu.org/23864#20
      838f1228
    • Paul Eggert's avatar
      Fix open-network-stream responsiveness · 1e97ecb9
      Paul Eggert authored
      Problem reported by Constantin Kulikov (Bug#23684).
      * src/process.c (wait_reading_process_output):
      Fix typo introduced in 2015-07-06T02:19:13Z!eggert@cs.ucla.edu
      when wait == INFINITY and got_output_end_time is invalid.
      In this case the code should break, not continue.
      1e97ecb9
  26. 26 Jun, 2016 1 commit
    • Paul Eggert's avatar
      Try other addresses when connecting to multihomed · 2989ad90
      Paul Eggert authored
      Problem reported by Juliusz Chroboczek (Bug#17976)
      and by Artur Malabarba (Bug#23620).
      Patch from a suggestion by Andreas Schwab in:
      http://bugs.gnu.org/17976#39
      This patch is for non-MS-Windows platforms.
      I don't know the situation on MS-Windows.
      * src/process.c (connecting_status):
      New function, for (connect . ADDRINFOS).
      (connect_network_socket, check_for_dns, wait_for_socket_fds)
      (wait_while_connecting, wait_reading_process_output, status_notify):
      Use it.
      (decode_status, Fmake_network_process):
      Support (connect . ADDRINFOS) status.
      (connect_network_socket) [!WINDOWSNT]:
      If the connection failed and there are other addresses to try, do not
      signal an error; instead, loop around to try the next address.
      (wait_reading_process_output): Advance to the next address
      if there are multiple addresses and the first remaining address
      failed.
      * src/process.h (struct Lisp_Process.status): Adjust comment
      to describe (connect . ADDRINFOS).
      2989ad90
  27. 12 Jun, 2016 1 commit
    • Paul Eggert's avatar
      New macro GNUC_PREREQ for GCC version · ab182c62
      Paul Eggert authored
      * src/conf_post.h (GNUC_PREREQ): New macro.
      Change uses of __GNUC_MINOR__ and __GNUC_PATCHLEVEL__ to use this
      macro instead, for clarity and consistency.
      (PRINTF_ARCHETYPE): New macro.  Define it to __gnu_printf__ only
      if glibc, since non-GNU platforms don’t necessarily support GNU
      printf formats.
      (ATTRIBUTE_FORMAT_PRINTF): Use it.
      ab182c62
  28. 10 Jun, 2016 2 commits
    • Paul Eggert's avatar
      Prefer getsockopt to getpeername on non-MS-Windows · 07b77b8e
      Paul Eggert authored
      * admin/CPP-DEFINES: Remove HAVE_GETPEERNAME.
      * configure.ac: Don’t check for getpeername.
      * src/process.c (wait_reading_process_output) [!WINDOWSNT]:
      Use getsockopt even if not GNU/Linux, as the platforms where
      getsockopt used to hang are no doubt long dead.
      07b77b8e
    • Paul Eggert's avatar
      Fix XFASTINT of non-fixnum in process status · 560202f6
      Paul Eggert authored
      * src/process.c (decode_status): 3rd arg is now Lisp_Object *,
      not int *, and is not decoded.  All uses changed.
      (status_message): Do not assume ‘failed’ code is an integer.
      * src/process.h: Document codes better.
      560202f6
  29. 23 May, 2016 1 commit
    • Paul Eggert's avatar
      Don’t use only last protocol from getaddrinfo · 918ef715
      Paul Eggert authored
      Problem reported by Ken Brown in:
      http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00483.html
      * src/process.c (conv_addrinfo_to_lisp): New function.
      (connect_network_socket): Arg is now a list of addrinfos, not
      merely IP addresses.  All uses changed.  Use protocol from
      each addrinfo.
      (Fmake_network_process): Accumulate protocols into addrinfos
      rather than just using the last one found.
      (check_for_dns): Accumulate protocols here, too.
      * src/process.h (struct Lisp_Process): Remove ai_protocol;
      no longer needed.
      918ef715
  30. 22 May, 2016 2 commits
    • Alp Aker's avatar
      * src/process.c (SOCK_NONBLOCK): Fix typo. · 848d487c
      Alp Aker authored
      848d487c
    • Paul Eggert's avatar
      Prefer SOCK_NONBLOCK to O_NONBLOCK · f2d03334
      Paul Eggert authored
      * src/process.c (SOCK_NONBLOCK): Define to 0 if not already defined.
      (connect_network_socket): Create the socket with SOCK_NONBLOCK, to
      avoid an fcntl with O_NONBLOCK if SOCK_NONBLOCK works.  Put the
      SOCK_DGRAM check a bit later, to keep the logic cleaner, as
      the order does not matter here.
      f2d03334
  31. 21 May, 2016 1 commit
    • Eli Zaretskii's avatar
      Fix compiler warnings in the MinGW build · cb5af792
      Eli Zaretskii authored
      * configure.ac [mingw32]: Don't add -Wpointer-sign, and add
      -Wno-pointer-sign, to keep the noise level down.
      
      * nt/mingw-cfg.site (gl_cv_warn_c__Wredundant_decls): Disable
      -Wredundant-decls, as that produces a lot of noise due to
      redeclaration of time-related functions by gnulib.
      * nt/runemacs.c (set_user_model_id): Fix argument type of
      'SetCurrentProcessExplicitAppUserModelID'.
      
      * src/image.c (x_create_bitmap_from_file) [HAVE_NTGUI]: Don't
      declare 'dpyinfo', as it is unused.
      (xpm_load): Fix warnings about pointer signedness.
      * src/w32proc.c (IsValidLocale, init_winsock): Remove redundant
      prototypes.
      (sys_spawnve): Avoid warnings about discarding 'const' qualifier.
      (sys_select): Provide prototype.
      (g_b_init_compare_string_w): Move declaration to file scope.
      * src/w32heap.c (dumped_data_commit): Now static.
      (FREEABLE_P): Avoid warnings about pointer comparison with integer.
      (mmap_realloc): Cast to 'char *' for arithmetics on void pointers.
      * src/w32console.c (ctrl_c_handler, sys_tputs, sys_tgetstr)
      (evalcost, cmputc, cmcheckmagic, cmcostinit, cmgoto, Wcm_clear):
      Provide prototypes.
      * src/w32.c (globals_of_w32, conv_sockaddr_to_lisp): Remove
      redundant prototypes.
      (w32_get_internal_run_time, map_w32_filename): Provide prototype.
      (init_environment, sys_ctime): Avoid warnings about discarding
      'const' qualifier.
      Include utimens.h.
      (sys_ctime, sys_chdir, sys_creat, sys_fopen, sys_mkdir)
      (sys_open, sys_rename, sys_rmdir, is_slow_fs, term_winsock)
      (sys_close, sys_dup2, sys_read, sys_write, sys_localtime): Provide
      prototypes.
      (sys_rename_replace): Use %d to avoid compiler warnings.
      (_wsa_errlist): Make the message text 'const char *', to avoid
      compilation warnings.
      (dynlib_reset_last_error): Move prototype to file scope.
      (w32_get_resource): First argument is now 'const char *'.
      * src/w32uniscribe.c (syms_of_w32uniscribe): Provide prototype.
      (otf_features): Second argument is no 'const char *'.
      * src/w32term.c (free_frame_menubar, x_wm_set_size_hint)
      (x_set_window_size): Remove redundant prototypes.
      (XChangeGC, XGetGCValues, w32_draw_underwave)
      (w32_draw_rectangle, w32_shift_glyphs_for_insert, x_mouse_leave)
      (x_calc_absolute_position, x_destroy_window): Now static.
      (menubar_selection_callback): Move prototype to file scope.
      * src/w32font.c (g_b_init_get_glyph_outline_w): Remove redundant
      declaration.
      (w32_to_x_charset): Fix warnings about discarding 'const' qualifier.
      (w32font_full_name): Fix warnings about implicit conversion of
      'float' to 'double'.
      * src/w32reg.c (w32_get_rdb_resource): Fix warnings about
      discarding 'const' qualifier.
      * src/w32menu.c (syms_of_w32menu, globals_of_w32menu)
      (set_frame_menubar): Remove redundant prototypes.
      (menubar_selection_callback, w32_menu_display_help): Provide
      prototypes.
      (simple_dialog_show): Avoid warnings about discarding 'const'
      qualifier.
      * src/w32fns.c (syms_of_w32fns, globals_of_w32fns)
      (free_frame_menubar, w32_strerror, x_set_menu_bar_lines)
      (x_set_tool_bar_lines, x_set_internal_border_width): Remove
      redundant prototypes.
      (current_popup_menu): Remove redundant declaration.
      (colormap_t): Member 'name' is now 'const char *'.
      (add_system_logical_colors_to_map): Fix signed/unsigned warnings.
      (x_decode_color, x_set_border_pixel)
      (x_clear_under_internal_border, x_set_name, hook_w32_key)
      (reset_w32_kbdhook_state, deliver_wm_chars, w32_backtrace): Now
      static.
      (w32_load_cursor, w32_key_to_modifier, map_keypad_keys)
      (w32_msg_worker, w32_last_error): Provide prototypes.
      (funhook, lookup_vk_code): Avoid warnings about missing
      parentheses.
      (x_default_font_parameter, Fw32_notification_notify): Avoid
      warnings about discarding 'const' qualifier.
      (Fx_create_frame): Avoid warnings about empty body of 'else'.
      (x_screen_planes): Ifdef away unused function.
      (Fx_show_tip): Remove unused variables.
      (Fw32_battery_status): Avoid warnings about implicit promotion
      from float to double.
      (Fw32_notification_notify): Initialize 'timeout'.
      * src/profiler.c (profiler_cpu_running) [HAVE_ITIMERSPEC]: Only
      define the TIMER_SETTIME_RUNNING value if it will be used.
      * src/w32notify.c (send_notifications): Ifdef away an empty if
      clause.  Remove unused variable.
      (watch_end, watch_completion): Provide prototypes.
      * src/sound.c (sound_warning) [WINDOWSNT]: Don't define: unused.
      * src/callproc.c (child_setup, getenv_internal_1) [WINDOWSNT]: Fix
      warning with pointer signedness.
      * src/gnutls.c (gnutls_x509_crt_get_signature)
      (gnutls_alert_send_appropriate) [WINDOWSNT]: Don't define, and
      don't load them from the GnuTLS library, as they are no longer
      used.
      * src/process.c (DATAGRAM_CHAN_P) [!DATAGRAM_SOCKETS]: Don't
      define, as it's unused.
      * src/unexw32.c (open_input_file, open_output_file)
      (close_file_data): Remove redundant prototypes.
      (_start): provide prototype.
      (mainCRTStartup): Move prototype to file level.
      (find_section): Use type-cast to shut up compiler warnings.
      (offset_to_section, relocate_offset): Now static.
      (find_section): First argument is now a 'const char *'.
      (offset_to_section): Ifdef away, as it's unused.
      * src/w32heap.h (find_section): Adjust prototype.
      * src/dynlib.c (dynlib_reset_last_error): Provide prototype.
      * src/dired.c (directory_files_internal_w32_unwind): Avoid
      warnings about missing prototypes.
      (is_slow_fs) [WINDOWSNT]: Provide prototype at file level.
      (directory_files_internal) [WINDOWSNT]: Fix warnings about pointer
      signedness.
      * src/fileio.c (Ffile_writable_p, Ffile_regular_p) [WINDOWSNT]:
      Fix warnings about pointer signedness.
      * src/filelock.c (WTMP_FILE) [WINDOWSNT]: Don't define, it's
      unused.
      * src/sysdep.c (_getpid): Remove redundant prototype.
      (sys_subshell) [DOS_NT]: Don't define 'status', it's unused.
      [!MSDOS]: Don't define 'st', it's unused.
      (init_sys_modes) [DOS_NT]: Don't define 'terminal', it's unused.
      (str_collate) [WINDOWSNT]: Avoid warnings about pointer signedness.
      * src/keyboard.c (tty_read_avail_input) [WINDOWSNT]: Don't define
      n_to_read, as it is not used.
      (MAX_ENCODED_BYTES) [WINDOWSNT]: Don't define, as it's unused.
      * src/w32font.h (syms_of_w32font): Remove redundant prototype.
      * src/xfaces.c (x_display_info) [HAVE_NTGUI]: Remove unused macro.
      * src/term.c (init_tty) [DOS_NT]: Ifdef away variables that are
      not used by DOS_NT builds, to avoid compiler warnings.
      * src/menu.c (current_popup_menu) [HAVE_NTGUI]: Remove redundant
      declaration.
      * src/dispnew.c (init_display) [WINDOWSNT]: Use type-cast to shut
      up compiler warnings.
      * src/w32term.h (x_set_window_size, x_get_focus_frame)
      (x_make_frame_visible, x_make_frame_invisible, x_iconify_frame)
      (x_set_frame_alpha, x_activate_menubar, x_bitmap_icon)
      (x_free_frame_resources, x_real_positions)
      (display_x_get_resource): Remove redundant prototypes.
      
      * lib-src/ntlib.c (sys_ctime, sys_fopen, sys_chdir, mkostemp)
      (sys_rename, gettimeofday): Provide prototypes.
      * lib-src/ntlib.h (getuid, geteuid, mkostemp): Remove redundant
      declarations.
      * lib-src/emacsclient.c (w32_getenv): Argument is now 'const char *'.
      (xstrdup, w32_get_resource, w32_window_app, w32_execvp, ttyname)
      (close_winsock, initialize_sockets, w32_set_user_model_id)
      (w32_find_emacs_process, w32_give_focus) [WINDOWSNT]: Add
      prototypes.
      (w32_get_resource) [WINDOWSNT]: Fix a warning about signedness
      difference.
      (w32_set_user_model_id): Update prototype of
      SetCurrentProcessExplicitAppUserModelID to avoid compiler
      warnings.
      (start_daemon_and_retry_set_socket) [WINDOWSNT]: Use type-cast to
      shut up compiler warnings.
      * lib-src/etags.c (MAXPATHLEN) [WINDOWSNT]: Remove unused macro.
      cb5af792
  32. 18 May, 2016 1 commit
    • Paul Eggert's avatar
      Port --enable-gcc-warnings to GCC 6.1 · 374f6a5f
      Paul Eggert authored
      * configure.ac (WERROR_CFLAGS): Omit -Wunused-const-variable=2.
      * lib-src/etags.c (LOOKING_AT, LOOKING_AT_NOCASE):
      Omit test whether pointer plus a constant equals a null pointer.
      * src/alloc.c (compact_small_strings):
      Avoid pointer arithmetic on null pointers.
      * src/alloc.c (mark_face_cache):
      * src/fontset.c (free_realized_fontsets, Fset_fontset_font):
      * src/fringe.c (draw_fringe_bitmap_1)
      (Fset_fringe_bitmap_face):
      * src/macfont.m (macfont_draw):
      * src/msdos.c (IT_set_face, IT_clear_screen):
      * src/nsfont.m (nsfont_draw):
      * src/nsterm.h (FRAME_DEFAULT_FACE):
      * src/nsterm.m (ns_draw_window_cursor)
      (ns_draw_vertical_window_border, ns_draw_window_divider)
      (ns_dumpglyphs_box_or_relief)
      (ns_maybe_dumpglyphs_background, ns_dumpglyphs_image)
      (ns_dumpglyphs_stretch):
      * src/w32term.c (w32_draw_vertical_window_border)
      (w32_draw_window_divider, x_set_mouse_face_gc):
      * src/xdisp.c (estimate_mode_line_height, init_iterator)
      (handle_face_prop, handle_single_display_spec, pop_it)
      (CHAR_COMPOSED_P, get_next_display_element)
      (next_element_from_display_vector, extend_face_to_end_of_line)
      (fill_gstring_glyph_string,BUILD_COMPOSITE_GLYPH_STRING):
      * src/xfaces.c (Finternal_merge_in_global_face, Fface_font)
      (lookup_named_face):
      * src/xterm.c (x_draw_vertical_window_border)
      (x_draw_window_divider, x_set_mouse_face_gc):
      Prefer FACE_OPT_FROM_ID to FACE_FROM_ID when the result might be null.
      * src/xterm.c (try_window_id):
      Redo loop to convince GCC 6.1 that it is null pointer safe.
      (x_color_cells):
      Use eassume as necessary to pacify GCC 6.1.
      * src/dispextern.h (FACE_FROM_ID, IMAGE_FROM_ID): Now returns non-null.
      (FACE_OPT_FROM_ID, IMAGE_OPT_FROM_ID): New macro, with the old
      behavior of the non-_OPT macro, to be used when the result
      might be a null pointer.
      * src/dispnew.c (buffer_posn_from_coords, marginal_area_string)
      [HAVE_WINDOW_SYSTEM]:
      * src/intervals.h (INTERVAL_WRITABLE_P):
      * src/term.c (turn_off_face):
      * src/xdisp.c (get_glyph_face_and_encoding, fill_image_glyph_string)
      (produce_image_glyph, produce_xwidget_glyph):
      * src/xfaces.c (lookup_named_face):
      Remove unnecessary test for null pointer.
      * src/keyboard.c (read_char): Suppress bogus -Wclobbered warning.
      * src/process.c (would_block): New function.
      (server_accept_connection, wait_reading_process_output, send_process):
      Use it.
      * src/xdisp.c (get_window_cursor_type, note_mouse_highlight):
      Prefer IMAGE_OPT_FROM_ID to IMAGE_FROM_ID when the result
      might be null.
      374f6a5f
  33. 13 May, 2016 1 commit
  34. 07 May, 2016 1 commit