1. 14 May, 2017 1 commit
    • Eli Zaretskii's avatar
      Remove gettimeofday from w32 sources · 792ffa02
      Eli Zaretskii authored
      * lib-src/ntlib.c (gettimeofday):
      * nt/inc/sys/time.h (gettimeofday, struct timezone): Remove unused
      function 'gettimeofday' and all of its supporting code.
      792ffa02
  2. 30 Apr, 2017 1 commit
    • Paul Eggert's avatar
      Fix buffer overflow in make-docfile · a3f3fea1
      Paul Eggert authored
      * lib-src/make-docfile.c (scan_c_stream): Check for buffer
      overflow when reading an identifier.  Use a static buffer for NAME
      rather than a small dynamically-allocated buffer.
      a3f3fea1
  3. 25 Mar, 2017 1 commit
  4. 24 Mar, 2017 1 commit
  5. 17 Mar, 2017 1 commit
    • Paul Eggert's avatar
      Emacs 'movemail' is now a configure-time option · 9f771f64
      Paul Eggert authored
      The new configure option --with-mailutils lets the builder say
      that Emacs should assume that GNU Mailutils is installed, instead
      of continuing to build and install its own limited and insecure
      substitute for 'movemail'.
      * INSTALL, etc/NEWS, etc/PROBLEMS: Mention --with-mailutils.
      * configure.ac: Add --with-mailutils option.
      (with_mailutils): New variable.
      Do not bother configuring 'movemail' when not building it.
      Warn about issues relating to --with-mailutils.
      * doc/emacs/rmail.texi (Movemail): Mention --with-mailutils.
      (Movemail, Remote Mailboxes): Document port numbers in
      POP and IMAP URLs.
      * lib-src/Makefile.in (with_mailutils): New macro.
      (UTILITIES): Use it.
      9f771f64
  6. 12 Mar, 2017 2 commits
    • Paul Eggert's avatar
      Install update-game-score only on request · 995be66f
      Paul Eggert authored
      Most distributions do not install update-game-score properly
      due to setuid/setgid complications, so install it only when
      the installer specifies a user or group (Bug#25895).
      * .gitattributes: Remove lib-src/update-game-score.exe.manifest.
      * Makefile.in (gameuser, gamegroup, use_gamedir, PATH_GAME):
      New vars.
      (epaths-force): Use PATH_GAME.
      (uninstall): Remove snake-scores and tetris-scores only if shared.
      * configure.ac: Default --with-gameuser to 'no'.
      (UPDATE_MANIFEST): Remove.
      * etc/NEWS: Mention this.
      * lib-src/Makefile.in (UPDATE_MANIFEST): Remove.
      (use_gamedir): New macro.
      (UTILITIES): Remove update-game-score unless use_gamedir.
      (SCRIPTS): Remove $(UPDATE_MANIFEST).
      ($(DESTDIR)${archlibdir}): Install game directory program and data
      only if use_gamedir.
      * lib-src/update-game-score.exe.manifest: Remove, as
      update-game-score is no longer installed on MS-Windows.
      * lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score):
      Use auxiliary program only if setuid or setgid.
      * make-dist: Do not distribute update-game-score.exe.manifest.
      * src/callproc.c (init_callproc):
      Set Vshared_game_score_directory based on PATH_GAME, not DOS_NT.
      (syms_of_callproc): Remove unnecessary initialization of
      Vshared_game_score_directory.
      995be66f
    • Eli Zaretskii's avatar
      Teach etags to process ENUM_BF correctly · f0836259
      Eli Zaretskii authored
      * lib-src/etags.c (sym_type): New enumeration value st_C_enum_bf.
      (hash): Regenerated values for asso_values[] array.
      (in_word_set): Update values of TOTAL_KEYWORDS and
      MAX_HASH_VALUE.  Add "ENUM_BF" to the wordlist[] array.
      (in_enum_bf): New file-global variable.
      (consider_token): Skip ENUM_BF if not in a macro definition.
      (C_entries): Reset the in_enum_bf flag when past its closing
      parenthesis.
      
      * test/manual/etags/ETAGS.good_1:
      * test/manual/etags/ETAGS.good_2:
      * test/manual/etags/ETAGS.good_3:
      * test/manual/etags/ETAGS.good_4:
      * test/manual/etags/ETAGS.good_5:
      * test/manual/etags/ETAGS.good_6:
      * test/manual/etags/CTAGS.good: Adapt to changes in etags.
      f0836259
  7. 25 Feb, 2017 1 commit
    • Peder O. Klingenberg's avatar
      New option -u / --suppress-output to emacsclient · ecbd5f9a
      Peder O. Klingenberg authored
      * lib-src/emacsclient.c (print_help_and_exit, longopts)
      (decode_options, main): Implement new option --suppress-output / -u to
      suppress printing of eval-results.
      * doc/emacs/misc.texi (emacsclient Options): Document the new
      "--suppress-output/-u" options.
      * etc/NEWS: Mention the new options.
      ecbd5f9a
  8. 23 Feb, 2017 2 commits
    • Paul Eggert's avatar
      Merge from gnulib · 7204577b
      Paul Eggert authored
      This incorporates:
      2017-02-16 xbinary-io: rename from xsetmode
      2017-02-15 xsetmode: new module
      * lib-src/etags.c (main):
      * lib-src/hexl.c (main):
      * src/emacs.c (main) [MSDOS]:
      Prefer set_binary_mode to the obsolescent SET_BINARY.
      * lib/binary-io.c, lib/binary-io.h: Copy from gnulib.
      7204577b
    • Paul Eggert's avatar
      hexl: handle large files and I/O errors · 23e64fac
      Paul Eggert authored
      * lib-src/hexl.c: Include inttypes.h, for PRIxMAX etc.
      Do not include ctype.h, as the code no longer uses isdigit.
      (DEFAULT_GROUPING, un_flag, iso_flag, group_by): Now local to ‘main’.
      (DEFAULT_BASE, endian): Remove; was not really used.
      (usage): Remove; now done by ‘main’, as that’s simpler.
      (progname): Now static.
      (output_error, hexchar): New functions.
      (main): Use them.  Simplify.  Remove "-oct", "-big-endian", and
      "-little-endian" options, as they did not work and were not used.
      Use SET_BINARY only on stdin, and fopen with "rb" otherwise.
      Use SET_BINARY only once on stdout.
      Do not assume file offsets fit in ‘long’.
      If an I/O error occurs, report it and exit with nonzero status.
      23e64fac
  9. 01 Jan, 2017 2 commits
  10. 01 Dec, 2016 1 commit
    • Helmut Eller's avatar
      Forth related improvements for etags · bb8e3827
      Helmut Eller authored
      Generate correct tags names for things like "(foo)".
      Previously "(foo" created.
      
      Fix a bug where a tag for "-bar" was created when encountering things
      like "create-bar".
      
      Recognize more words from the Forth-2012 Standard.
      
      * lib-src/etags.c (Forth_words): Check for whitespace after defining
      words.  Create tag with make_tag instead of get_tag to avoid notiname
      which isn't appropriate for Forth.
      
      * test/manual/etags/forth-src/test-forth.fth: Add some test cases.
      * test/manual/etags/ETAGS.good_1:
      * test/manual/etags/ETAGS.good_2:
      * test/manual/etags/ETAGS.good_3:
      * test/manual/etags/ETAGS.good_4:
      * test/manual/etags/ETAGS.good_5:
      * test/manual/etags/ETAGS.good_6:
      * test/manual/etags/CTAGS.good: Adapt to the changes in etags.c and
      new test cases.
      bb8e3827
  11. 26 Nov, 2016 1 commit
    • Paul Eggert's avatar
      Port build to gcc -fcheck-pointer-bounds · d2d4b074
      Paul Eggert authored
      This does not let Emacs run, just build.
      * lib-src/etags.c (main):
      * lib-src/profile.c (main):
      Use return, not exit.
      * src/bytecode.c (BYTE_CODE_THREADED) [__CHKP__]:
      Do not define, as -fcheck-pointer-bounds is incompatible with taking
      addresses of labels.
      * src/menu.c (Fx_popup_dialog): Use eassume, not eassert,
      to pacify gcc -fcheck-pointer-bounds -Wnull-dereference.
      d2d4b074
  12. 08 Nov, 2016 1 commit
    • Paul Eggert's avatar
      Port emacsclient to FreeBSD 11 etc. · 86baa208
      Paul Eggert authored
      * lib-src/emacsclient.c: Include <string.h>.  This is needed on
      platforms like FreeBSD 11 that use code involving strlen etc., and
      because <config.h> no longer includes string.h.
      86baa208
  13. 06 Nov, 2016 1 commit
    • Paul Eggert's avatar
      Modernize usage of 'macOS' in doc and comments · dc152c54
      Paul Eggert authored
      Apple changed the spelling of its operating system again, to "macOS",
      effective with macOS 10.12 Sierra (2016-09-20).  Change Emacs
      documentation and comments to match this.  Stick with older OS
      spellings ("OS X", "Mac OS X") when talking about older releases where
      the older names are more correct.
      dc152c54
  14. 12 Oct, 2016 1 commit
  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. 21 Sep, 2016 1 commit
    • Eli Zaretskii's avatar
      Fix tagging of DEFUN by etags · 73c67dda
      Eli Zaretskii authored
      * lib-src/etags.c (C_entries): Tag DEFUN twice: once with its C
      name, and then again with its Lisp name.  This restores the
      ability to find Lisp primitives by their C name, which was lost
      when the etags back-end was switched to a more strict search
      criteria.
      
      * test/etags/ETAGS.good_1:
      * test/etags/ETAGS.good_2:
      * test/etags/ETAGS.good_3:
      * test/etags/ETAGS.good_4:
      * test/etags/ETAGS.good_5:
      * test/etags/ETAGS.good_6:
      * test/etags/CTAGS.good: Adapt to the changes in etags.c wrt
      tagging DEFUN.
      73c67dda
  17. 12 Sep, 2016 1 commit
    • Michal Nazarewicz's avatar
      Fix compiler thinking tmpdir may be unitialised in emacsclient · ef474bd3
      Michal Nazarewicz authored
      This fixes the following warning:
      
      	emacsclient.c: In function ‘set_local_socket’:
      	/usr/include/x86_64-linux-gnu/bits/string3.h:111:3: error:
      		‘tmpdir’ may be used uninitialized in this function
      		[-Werror=maybe-uninitialized]
      	   return __builtin___stpcpy_chk (__dest, __src, __bos (__dest));
      	   ^
      	emacsclient.c:1197:17: note: ‘tmpdir’ was declared here
      	     const char *tmpdir;
      
      * lib-src/emacsclient.c (set_local_socket): Get rid of use_tmpdir
      variable and instead use tmpdir being non-NULL as sign that it should
      be used.
      ef474bd3
  18. 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
  19. 31 Aug, 2016 4 commits
  20. 28 Aug, 2016 1 commit
    • Paul Eggert's avatar
      Pacify --enable-gcc-warnings for lib-src/pop.c · 4be1ab61
      Paul Eggert authored
      * lib-src/pop.c: Include c-ctype.h.
      (socket_connection): Pacify --enable-gcc-warnings by rewriting to
      avoid 'if (v = E) ...'.  Use c_tolower, instead of a combination
      of the (undeclared) isupper and tolower.  Fix pointer constness
      problem.
      4be1ab61
  21. 22 Jul, 2016 1 commit
    • Eli Zaretskii's avatar
      Fix compilation warning in the MinGW build · d0e1774a
      Eli Zaretskii authored
      * nt/inc/ms-w32.h: Include stdint.h.
      (_execvp, execve): Provide prototypes.
      
      * lib-src/emacsclient.c [WINDOWSNT]: Remove prototype for execvp,
      it is now in nt/inc/ms-w32.h.
      * lib-src/ntlib.c (getppid): Avoid compiler warnings due to format
      mismatch.
      (sys_ctime): Remove, not used.
      d0e1774a
  22. 08 Jun, 2016 1 commit
  23. 30 May, 2016 1 commit
    • Paul Eggert's avatar
      Omit IF_LINT code that no longer seems needed · 237244bb
      Paul Eggert authored
      Nowadays GCC is smarter, or the Emacs code has mutated, or both,
      and now is as good a time as any to remove uses of IF_LINT that
      now seem to be unnecessary.
      * lib-src/emacsclient.c (set_local_socket):
      * lib-src/movemail.c (main) [MAIL_USE_MAILLOCK && HAVE_TOUCHLOCK]:
      * src/buffer.c (fix_start_end_in_overlays, fix_overlays_before):
      * src/casefiddle.c (casify_region):
      * src/charset.c (load_charset_map):
      * src/coding.c (decode_coding_object, encode_coding_object):
      * src/data.c (Fmake_variable_buffer_local, Fmake_local_variable)
      (cons_to_unsigned, cons_to_signed):
      * src/frame.c (make_frame, x_set_frame_parameters):
      * src/keyboard.c (read_event_from_main_queue):
      * src/regex.c (regex_compile):
      * src/syntax.c (back_comment):
      * src/window.c (Frecenter):
      * src/xfaces.c (Fx_list_fonts):
      Remove IF_LINT that no longer seems necessary.
      * src/image.c (png_load_body, jpeg_load_body): Simplify use of IF_LINT.
      * src/keyboard.c (read_char): Use IF_LINT (volatile) rather than
      a pragma dance to pacify GCC -Wclobbered.
      * src/xdisp.c (x_produce_glyphs): Rewrite to avoid need for IF_LINT.
      
      * src/xterm.c (x_connection_closed): Now _Noreturn, which should
      mean we do not need IF_LINT any more.
      (x_io_error_quitter): Now _Noreturn.  Put an 'assume (false)’
      at the end, to forestall warnings from older compilers.
      237244bb
  24. 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
  25. 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
  26. 08 May, 2016 1 commit
    • Paul Eggert's avatar
      Prefer grep -E/-F to egrep/fgrep · e8bda380
      Paul Eggert authored
      POSIX marked egrep and fgrep as legacy apps in SUSv2 (1997) and
      withdrew them in SUSv3 (2001), and these days grep -E and grep -F
      are probably more portable.
      * lib-src/etags.c (main):
      * lisp/eshell/em-unix.el (eshell-grep, eshell/egrep)
      (eshell/fgrep):
      * lisp/cedet/semantic/symref.el (semantic-symref-find-text):
      * lisp/eshell/esh-var.el (eshell-apply-indices):
      * lisp/progmodes/ada-xref.el (ada-xref-search-with-egrep)
      (ada-find-in-src-path):
      * lisp/textmodes/ispell.el (ispell-grep-command):
      (ispell-lookup-words):
      Use or document grep -E and grep -F instead of egrep and fgrep.
      * lisp/textmodes/ispell.el (ispell-grep-options):
      Use -Ei on all platforms, not just MS-Windows.
      e8bda380
  27. 22 Mar, 2016 1 commit
  28. 10 Mar, 2016 2 commits
    • Paul Eggert's avatar
      Rework C source files to avoid ^( · 7352c6c6
      Paul Eggert authored
      Work around Bug#22884 by rewording comments and strings to avoid ‘(’
      at the start of a line unless it starts a function.  This change
      is a short-term hack; in the longer run we plan to fix cc-mode’s
      performance for C files that have ‘(’ at the start of a line in a
      comment or string.
      7352c6c6
    • Eli Zaretskii's avatar
      By default, etags produces unqualified Perl tag names · a589e9ae
      Eli Zaretskii authored
      * lib-src/etags.c (Perl_functions): Produce unqualified names,
      unless -Q was specified.
      (print_help): Update the description of -Q.
      
      * doc/man/etags.1: Update the documentation of -Q.
      
      * test/etags/ETAGS.good_1:
      * test/etags/ETAGS.good_2:
      * test/etags/ETAGS.good_3:
      * test/etags/ETAGS.good_4:
      * test/etags/ETAGS.good_5:
      * test/etags/CTAGS.good: Adapt the expected test results to the
      changed Perl functionality.
      a589e9ae
  29. 08 Mar, 2016 1 commit
    • Paul Eggert's avatar
      Assume getaddrinfo in C code · 59c7a5d7
      Paul Eggert authored
      * admin/CPP-DEFINES, configure.ac: Remove HAVE_GETADDRINFO, HAVE_H_ERRNO.
      All uses removed.
      * doc/lispref/processes.texi (Network, Network Processes), etc/NEWS:
      Say that port numbers can be integer strings.
      * lib-src/pop.c (h_errno) [!WINDOWSNT && !HAVE_H_ERRNO]: Remove decl.
      (socket_connection): Assume HAVE_GETADDRINFO.
      * lisp/mpc.el (mpc--proc-connect):
      * lisp/net/network-stream.el (open-network-stream):
      It’s now OK to use integer strings as port numbers.
      * src/process.c (conv_numerical_to_lisp) [!HAVE_GETADDRINFO]: Remove.
      (Fmake_network_process): Assume HAVE_GETADDRINFO.
      59c7a5d7
  30. 06 Mar, 2016 1 commit
  31. 05 Mar, 2016 3 commits
    • Paul Eggert's avatar
      Restore leading space in movemail pop output · b1abce1a
      Paul Eggert authored
      * lib-src/movemail.c (movemail_strftime) [WINDOWSNT]: New function.
      (strftime) [WINDOWSNT]: New macro.
      (mbx_delimit_begin): Go back to previous version of this code,
      now that there’s a special-purpose WINDOWSNT implementation
      that should do the right thing.  That way, the output continues
      to use leading space rather than leading zero for day of month.
      b1abce1a
    • Eli Zaretskii's avatar
      Fix mbox files produced by movemail on MS-Windows · 79231122
      Eli Zaretskii authored
      * lib-src/movemail.c (mbx_delimit_begin): Use portable strftime
      format specifiers, as at least the MS-Windows version of strftime
      doesn't support %e and %T.
      79231122
    • Eli Zaretskii's avatar
      Implement getaddrinfo fallback for MS-Windows · bc96f6e8
      Eli Zaretskii authored
      See http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg01602.html
      for more details.
      
      * nt/mingw-cfg.site (ac_cv_func_getaddrinfo)
      (ac_cv_func_gai_strerror): Set to "yes", as the configure script's
      test program is not smart enough to auto-detect these.
      * nt/inc/sys/socket.h (getaddrinfo, freeaddrinfo): Redirect to
      sys_getaddrinfo and sys_freeaddrinfo.  Provide prototypes for
      sys_getaddrinfo and sys_freeaddrinfo.
      
      * src/w32.c (init_winsock): Try loading getaddrinfo and
      freeaddrinfo from ws2_32.dll.
      (sys_getaddrinfo, sys_freeaddrinfo): New functions.
      
      * lib-src/pop.c [WINDOWSNT]: Include winsock2.h, not winsock.h,
      and also ws2tcpip.h.
      (getaddrinfo, freeaddrinfo) [WINDOWSNT]: Redirect to
      sys_getaddrinfo and sys_freeaddrinfo, respectively.
      (load_ws2, sys_getaddrinfo, sys_freeaddrinfo) [WINDOWSNT]: New
      functions.
      bc96f6e8