1. 18 Nov, 2019 1 commit
  2. 17 Nov, 2019 1 commit
  3. 22 Oct, 2019 1 commit
    • Paul Eggert's avatar
      Portcheck only if --enable-gcc-warnings · 3716921c
      Paul Eggert authored
      Problem reported by Richard Copley (Bug#37852).
      This patch causes the problem to not occur if one uses plain
      ‘configure’.  The problem can still occur if with ‘configure
      --enable-gcc-warnings’, so a further fix may be needed.
      * configure.ac (GNULIB_PORTCHECK, _FORTIFY_SOURCE):
      Define these only with an explicit --enable-gcc-warnings.
      3716921c
  4. 14 Oct, 2019 1 commit
  5. 24 Sep, 2019 1 commit
  6. 04 Sep, 2019 1 commit
  7. 30 Aug, 2019 1 commit
  8. 28 Aug, 2019 1 commit
  9. 21 Aug, 2019 1 commit
  10. 20 Aug, 2019 1 commit
  11. 15 Aug, 2019 1 commit
    • Paul Eggert's avatar
      Debug out-of-range make_fixnum args · 3548fd8a
      Paul Eggert authored
      With --enable-checking, make_fixnum (N) now checks that N is
      in fixnum range.  Suggested by Pip Cet in:
      https://lists.gnu.org/r/emacs-devel/2019-07/msg00548.html
      A new function make_ufixnum (N) is for the rare cases where N
      is intended to be unsigned and is in the range 0..INTMASK.
      * configure.ac (AC_C_TYPEOF): Add.
      (HAVE_STATEMENT_EXPRESSIONS): Resurrect this macro.
      * src/fns.c (Frandom, hashfn_eq, hashfn_equal, hashfn_user_defined):
      * src/profiler.c (hashfn_profiler):
      Use make_ufixnum rather than make_fixum, since the argument is
      an unsigned integer in the range 0..INTMASK rather than a signed
      integer in the range MOST_NEGATIVE_FIXNUM..MOST_POSITIVE_FIXNUM.
      Typically this is for hashes.
      * src/lisp.h (lisp_h_make_fixnum_wrap) [USE_LSB_TAG]:
      Rename from lisp_h_make_fixnum.
      (lisp_h_make_fixnum): Redefine in terms of lisp_h_make_fixnum_wrap.
      Check for fixnum overflow on compilers like GCC that
      have statement expressions and typeof.
      (FIXNUM_OVERFLOW_P): Move up.
      (make_fixnum): Check for fixnum overflow.
      (make_ufixnum): New function, which checks that the arg
      fits into 0..INTMASK range.
      3548fd8a
  12. 12 Jul, 2019 1 commit
  13. 29 Jun, 2019 1 commit
    • Ken Brown's avatar
      Simplify workaround for Cygwin O_PATH bug · 0b2841f9
      Ken Brown authored
      Suggested by Paul Eggert (Bug#36405#22).
      * configure.ac (HAVE_CYGWIN_O_PATH_BUG): New AC_DEFINE, for Cygwin
      versions 3.0.0 through 3.0.7.
      * src/dired.c (O_PATH) [__CYGWIN__]: Remove #undef.
      (file_attributes) [HAVE_CYGWIN_O_PATH_BUG]: Don't use O_PATH.
      0b2841f9
  14. 24 Jun, 2019 1 commit
  15. 22 Jun, 2019 1 commit
    • Paul Eggert's avatar
      Bring macuvs.h back under Git control · f4f165f7
      Paul Eggert authored
      * admin/unidata/Makefile.in (maintainer-clean):
      Instead of removing macuvs.h here ...
      (extraclean): ... Remove it here.
      * admin/unidata/uvs.el (uvs-print-table-ivd):
      Add to comment explaining why macuvs.h is in Git.
      * src/macuvs.h: Regenerate and re-add to Git.
      f4f165f7
  16. 21 Jun, 2019 1 commit
  17. 19 Jun, 2019 1 commit
  18. 15 Jun, 2019 1 commit
  19. 12 Jun, 2019 1 commit
  20. 08 Jun, 2019 1 commit
    • YAMAMOTO Mitsuharu's avatar
      Support X core font driver on cairo (Bug#28236) · faf10bd8
      YAMAMOTO Mitsuharu authored
      * configure.ac (HAVE_X_WINDOWS): Add xfont.o to FONT_OBJ if HAVE_CAIRO.
      
      * doc/lispref/frames.texi (Font and Color Parameters): Mention X core font
      driver with Cairo drawing.
      
      * src/font.c (syms_of_font) [HAVE_X_WINDOWS && USE_CAIRO]: Call syms_of_xfont.
      
      * src/xfns.c (x_create_tip_frame) [USE_CAIRO]: Register xfont_driver.
      
      * src/xterm.c (x_cr_gc_clip) [USE_CAIRO]: New function extracted from
      x_begin_cr_clip.
      (x_begin_cr_clip) [USE_CAIRO]: Use it.
      (xlib_surface_key, saved_drawable_key) [USE_CAIRO]: New variables.
      (x_cr_destroy_xlib_surface, x_try_cr_xlib_drawable)
      (x_end_cr_xlib_drawable) [USE_CAIRO]: New functions.
      (x_draw_composite_glyph_string_foreground)
      (x_draw_glyph_string_foreground) [USE_CAIRO]: Get Xlib surface when drawing
      text with X core fonts into bitmap surfaces.  Add fallback code for drawing
      into outline surfaces.
      faf10bd8
  21. 02 Jun, 2019 3 commits
    • YAMAMOTO Mitsuharu's avatar
      Implement the get_variation_glyphs method for FreeType >= 2.3.6 · 295572c6
      YAMAMOTO Mitsuharu authored
      * configure.ac: Check availability of FT_Face_GetCharVariantIndex.
      
      * src/ftfont.c (ftfont_variation_glyphs) [HAVE_FT_FACE_GETCHARVARIANTINDEX]:
      Add function implementation.
      
      * src/ftcrfont.c (ftcrfont_variation_glyphs)
      [HAVE_FT_FACE_GETCHARVARIANTINDEX]: Use function implementation for
      HAVE_OTF_GET_VARIATION_GLYPHS.
      
      * src/ftfont.c (ftfont_driver) [HAVE_FT_FACE_GETCHARVARIANTINDEX]:
      * src/xftfont.c (xftfont_driver) [HAVE_FT_FACE_GETCHARVARIANTINDEX]:
      * src/ftxfont.c (ftxfont_driver) [HAVE_FT_FACE_GETCHARVARIANTINDEX]:
      * src/ftcrfont.c (ftcrfont_driver) [HAVE_FT_FACE_GETCHARVARIANTINDEX]:
      Populate the get_variation_glyphs method.
      295572c6
    • YAMAMOTO Mitsuharu's avatar
      Revert previous commit · 2ae0c7a4
      YAMAMOTO Mitsuharu authored
      This reverts commit 1ab69630.
      It has a wrong commit message.
      2ae0c7a4
    • YAMAMOTO Mitsuharu's avatar
      Make fthbfont and derivatives use common HarfBuzz code in hbfont.c · 1ab69630
      YAMAMOTO Mitsuharu authored
      * src/font.h (fthbfont_shape, fthbfont_combining_capability)
      [HAVE_HARFBUZZ]: Remove prototypes.
      
      * src/ftfont.c: Don't include math.h.
      (uni_combining, uni_general, uni_mirroring, get_hb_unicode_funcs)
      (fthbfont_shape_by_hb, fthbfont_combining_capability, fthbfont_shape)
      [HAVE_HARFBUZZ]: Remove functions.
      
      * src/ftfont.c (syms_of_ftfont_for_pdumper) [HAVE_HARFBUZZ]:
      * src/xftfont.c (syms_of_xftfont_for_pdumper) [HAVE_HARFBUZZ]:
      * src/ftcrfont.c (syms_of_ftcrfont_for_pdumper) [HAVE_HARFBUZZ]: Use
      hbfont_shape and hbfont_combining_capability for fthbfont_shape and
      fthbfont_combining_capability, respectively.
      1ab69630
  22. 01 Jun, 2019 1 commit
    • Eli Zaretskii's avatar
      Move common HarfBuzz code to a common file hbfont.c · 4363777d
      Eli Zaretskii authored
      * src/hbfont.c: New file, with code moved from w32uniscribe.c
      and renamed/modified as appropriate.
      * src/w32uniscribe.c: Move to hbfont.c DEF_DLL_FN and macro
      definitions for HarfBuzz functions used in hbfont.c
      (load_harfbuzz_funcs): Move loading of HarfBuzz functions used
      by hbfont.c to hbfont.c:hbfont_init_w32_funcs, and call that
      function from here.
      (syms_of_w32uniscribe_for_pdumper): Fill the 'shape' and
      'combining_capability' members with hbfont.c function names.
      * src/w32common.h (hbfont_init_w32_funcs) [HAVE_HARFBUZZ]: Add
      prototype.
      * src/font.h (hbfont_shape, hbfont_combining_capability)
      [HAVE_HARFBUZZ]: Add prototypes.
      * src/Makefile.in (SOME_MACHINE_OBJECTS): Add hbfont.o.
      
      * configure.ac (FONT_OBJ): Add hbfont.o if HAVE_HARFBUZZ.
      4363777d
  23. 31 May, 2019 1 commit
    • Eli Zaretskii's avatar
      Add HarfBuzz font backend for MS-Windows · fba3687d
      Eli Zaretskii authored
      * src/w32uniscribe.c [HAVE_HARFBUZZ]: Include math.h and
      hb.h.
      (bswap_32): Define for GCC 4.3.0 and later; else include
      <byteswap.h> from Gnulib.
      (struct uniscribe_font_info): Extend for HarfBuzz; 'cache' is
      now a 'void *' (all users changed).
      [HAVE_HARFBUZZ]: Define typedefs for HarfBuzz functions to be
      loaded dynamically from the HarfBuzz DLL.  Define macros to
      call those functions via function pointers.
      (uniscribe_open) [HAVE_HARFBUZZ]: Use the HarfBuzz font driver
      if the type of the font entity is 'harfbuzz'.
      (uniscribe_close) [HAVE_HARFBUZZ]: For fonts using the
      HarfBuzz backend, call hb_font_destroy to free memory used for
      the cached hb_font data.
      (uniscribe_shape): Fix assignment of character codepoints to
      glyphs from a single cluster.
      (w32hb_list, w32hb_match, free_cb, w32hb_get_font_table)
      (w32hb_get_font, w32hb_encode_char, w32hb_begin_font)
      (w32uni_combining, w32uni_general, w32uni_mirroring)
      (get_hb_unicode_funcs, w32hb_shape)
      (w32hb_combining_capability, load_harfbuzz_funcs)
      [HAVE_HARFBUZZ]: New functions.
      (syms_of_w32uniscribe_for_pdumper) [HAVE_HARFBUZZ]: Load the
      HarfBuzz DLL and register the HarfBuzz backend with its
      functions.
      * src/w32font.c (syms_of_w32font) <Qharfbuzz>: New DEFSYM.
      * src/w32fns.c (Fx_create_frame, w32_create_tip_frame)
      [HAVE_HARFBUZZ]: Register the harfbuzz font backend.
      * src/lisp.h (get_unicode_property): Declare prototype.
      * src/font.h (harfbuzz_font_driver) [HAVE_NTGUI]: Declare.
      * src/chartab.c (get_unicode_property): New function, body
      taken from get-unicode-property-internal.
      (Fget_unicode_property_internal): Call get_unicode_property
      after validating input.
      
      * doc/lispref/frames.texi (Font and Color Parameters):
      * doc/emacs/msdos.texi (Windows Fonts): Document support for
      HarfBuzz text shaping on MS-Windows.
      
      * configure.ac (HAVE_HARFBUZZ): Move out of the X-specific
      part, and consider HarfBuzz also for HAVE_W32 systems.
      Require HarfBuzz v1.2.3 for w32.
      fba3687d
  24. 16 May, 2019 1 commit
    • Paul Eggert's avatar
      Distribute test cases in tarballs by default · 4ac234ad
      Paul Eggert authored
      * INSTALL, INSTALL.REPO, admin/make-tarball.txt:
      Mention ‘make check’.
      * configure.ac: Update comment.
      * etc/NEWS: Say that tarballs have a test directory.
      * make-dist (with_tests): Default to "yes".
      Add an option --no-tests to make it "no".
      4ac234ad
  25. 14 May, 2019 1 commit
  26. 28 Apr, 2019 1 commit
    • Philipp Stephani's avatar
      Export major version of latest Emacs supported by emacs-module.h. · 4d97e1a9
      Philipp Stephani authored
      This is useful if module authors want to support multiple versions of
      emacs-module.h.
      
      * configure.ac (emacs_major_version): Define substitution.
      
      * src/emacs-module.h.in (EMACS_MAJOR_VERSION): Define macro.
      
      * doc/lispref/internals.texi (Module Initialization): Document
      EMACS_MAJOR_VERSION preprocessor macro.
      
      * test/data/emacs-module/mod-test.c (emacs_module_init): Verify
      behavior of EMACS_MAJOR_VERSION.
      4d97e1a9
  27. 27 Apr, 2019 1 commit
  28. 24 Apr, 2019 1 commit
    • YAMAMOTO Mitsuharu's avatar
      Don't link libXft when using cairo · 5f4e8e2e
      YAMAMOTO Mitsuharu authored
      * configure.ac: Check cairo early.  Don't try Xft if cairo is used.
      * lwlib/lwlib-utils.h [USE_CAIRO]: Include cairo.h and fontconfig.h.
      (XftFont, XftDraw, XftColor, XGlyphInfo) [USE_CAIRO]: New typedefs.
      (XftFontOpenName, XftFontClose, XftDrawCreate, XftDrawDestroy)
      (XftDrawRect, XftDrawStringUtf8, XftTextExtentsUtf8) [USE_CAIRO]: New macros.
      (crxft_font_open_name, crxft_font_close, crxft_draw_create)
      (crxft_draw_rect, crxft_draw_string, crxft_text_extents) [USE_CAIRO]: New
      externs.
      * lwlib/lwlib-utils.c [USE_CAIRO]: Include math.h, cairo-ft.h, and
      cairo-xlib.h.
      (crxft_font_open_name, crxft_font_close, crxft_draw_create)
      (crxft_set_source_color, crxft_draw_rect, crxft_draw_string)
      (crxft_text_extents) [USE_CAIRO]: New Xft compatibility functions.
      * lwlib/xlwmenuP.h [USE_CAIRO]: Include lwlib-utils.h.
      * lwlib/xlwmenu.c (display_menu_item) [USE_CAIRO]: Call
      cairo_surface_mark_dirty and cairo_surface_flush.
      * lwlib/lwlib-Xaw.c [USE_CAIRO]: Include stdlib.h and lwlib-utils.h.
      (draw_text) [USE_CAIRO]: Call cairo_surface_flush.
      * src/xsettings.c [USE_CAIRO]: Include fontconfig.h
      (apply_xft_settings) [!HAVE_XFT]: Don't call XftDefaultSubstitute or
      XftDefaultSet.
      * lwlib/lwlib-Xaw.c:
      * lwlib/lwlib-int.h:
      * lwlib/xlwmenu.c:
      * lwlib/xlwmenuP.h:
      * src/xrdb.c:
      * src/xsettings.c:
      * src/xterm.c: Replace all #ifdef HAVE_XFT with #if defined USE_CAIRO ||
      defined HAVE_XFT.
      * src/xfns.c (x_default_font_parameter): Replace #ifdef HAVE_XFT with #if
      defined	USE_CAIRO || defined HAVE_XFT.
      5f4e8e2e
  29. 23 Apr, 2019 1 commit
    • Paul Eggert's avatar
      Let plain ‘make’ work even not GNU Make · 6fa8d3c8
      Paul Eggert authored
      * Makefile.in (top_distclean): Clean makefile as well as Makefile.
      * configure.ac: If not using plain ‘make’, create a makefile
      so that plain ‘make’ simply calls $(MAKE).
      6fa8d3c8
  30. 22 Apr, 2019 2 commits
    • Paul Eggert's avatar
      Remove --enable-checking=xmallocoverrun · 1ea048f6
      Paul Eggert authored
      It doesn’t work anymore, and these days ‘gcc -fsanitize=address’
      does a better job anyway.
      * configure.ac: Remove the option.
      * configure.ac (ac_xmalloc_overrun, XMALLOC_OVERRUN_CHECK):
      * src/alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD)
      (XMALLOC_OVERRUN_CHECK_SIZE, XMALLOC_OVERRUN_SIZE_SIZE)
      (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer)
      (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
      (overrun_check_realloc, overrun_check_free):
      Remove.  All uses removed.
      * etc/NEWS: Mention this.
      1ea048f6
    • Paul Eggert's avatar
      Remove --enablechecking=conslist configure option · 72067661
      Paul Eggert authored
      * configure.ac: Remove the option.
      * configure.ac (ac_gc_check_cons_list, GC_CHECK_CONS_LIST):
      * src/alloc.c (check_cons_list) [GC_CHECK_CONS_LIST]:
      * src/lisp.h (lisp_h_check_cons_list, check_cons_list):
      Remove.  All uses removed.
      * etc/NEWS: Mention this.
      72067661
  31. 21 Apr, 2019 2 commits
  32. 20 Apr, 2019 1 commit
  33. 18 Apr, 2019 1 commit
    • Paul Eggert's avatar
      Mark _Noreturn error functions as cold · 6d6c55db
      Paul Eggert authored
      On my platform this made ‘make compile-always’ 1.3% faster.
      Suggested by Alex Gramiak in:
      https://lists.gnu.org/r/emacs-devel/2019-04/msg00684.html
      * configure.ac (nw): Don’t use -Wsuggest-attribute=cold.
      * lib-src/make-docfile.c (write_globals):
      Mark noreturn functions as cold.
      * src/callproc.c (exec_failed):
      * src/data.c (wrong_length_argument, wrong_type_argument):
      * src/emacs-module.c (module_abort):
      * src/emacs.c (terminate_due_to_signal):
      * src/eval.c (unwind_to_catch):
      * src/image.c (my_png_error, my_error_exit):
      * src/json.c (json_out_of_memory, json_parse_error):
      * src/keyboard.c (quit_throw_to_read_char, user_error):
      * src/lisp.h (die, wrong_type_argument, wrong_choice)
      (args_out_of_range, args_out_of_range_3, circular_list)
      (buffer_overflow, memory_full, buffer_memory_full)
      (string_overflow, xsignal, xsignal0, xsignal1, xsignal2)
      (xsignal3, signal_error, overflow_error, error, verror)
      (nsberror, report_file_errno, report_file_error)
      (report_file_notify_error, terminate_due_to_signal)
      (emacs_abort, fatal):
      * src/lread.c (load_error_old_style_backquotes)
      (end_of_file_error, invalid_syntax):
      * src/pdumper.c (error_unsupported_dump_object):
      * src/puresize.h (pure_write_error):
      * src/search.c (matcher_overflow):
      * src/sound.c (sound_perror, alsa_sound_perror):
      * src/sysdep.c (handle_arith_signal):
      * src/systime.h (time_overflow):
      * src/term.c (maybe_fatal, vfatal):
      * src/textprop.c (text_read_only):
      * src/timefns.c (invalid_time_zone_specification)
      (time_error, invalid_hz):
      * src/xterm.c (x_connection_closed):
      Use AVOID instead of _Noreturn void, so that it’s marked cold.
      * src/conf_post.h (__has_attribute_cold) [!__has_attribute]:
      New macro.
      (ATTRIBUTE_COLD): New macro.
      * src/frame.h (WINDOW_SYSTEM_RETURN): Add ATTRIBUTE_COLD.
      * src/lisp.h (AVOID): New macro.
      * src/xterm.c: Omit unnecessary static decls, so that we needn’t
      worry about which functions should be marked cold.
      (x_io_error_quitter): Mark as cold.
      6d6c55db
  34. 15 Apr, 2019 2 commits
    • Alexander Gramiak's avatar
      Bump minimum GTK versions to 2.24 and 3.10 · fc0f469f
      Alexander Gramiak authored
      * configure.ac: Bump required GTK 2 and GTK 3 versions and the
      associated GLib versions. Remove obsolete AC_CHECK_FUNCS calls. These
      check for functions available in later GTK 2 versions. These checks
      and can safely be removed with the exception of
      gtk_window_set_has_resize_grip, which according to a comment in
      gtkutil.c causes an issue in Ubuntu's GTK 2.
      
      * src/gtkutil.c:
      * src/xfns.c:
      * src/xterm.c:
      * src/xterm.h: Remove now unused conditional blocks. Use HAVE_GTK3
      instead of GTK_CHECK_VERSION where now applicable. Remove checks of
      now always true USE_GTK_TOOLTIP.
      fc0f469f
    • Paul Eggert's avatar
      Replace executable’s fingerprint in place · 5c2f94a1
      Paul Eggert authored
      * admin/merge-gnulib (GNULIB_MODULES): Add memmem-simple.
      (AVOIDED_MODULES): Add memchr.
      * configure.ac (HAVE_PDUMPER): AC_SUBST it, too, for use in makefiles.
      * lib/Makefile.in (libgnu_a_OBJECTS): Add fingerprint.o.
      * lib/fingerprint.c: New file.
      * lib/memmem.c, lib/str-two-way.h, m4/memmem.m4: New files,
      copied from Gnulib.
      * lib/fingerprint.h: Rename from src/fingerprint.h.
      * lib-src/make-fingerprint.c: Include limits.h, sys/stat.h,
      fingerprint.h, intprops.h, min-max.h.
      (SSIZE_MAX): New macro, if not already defined.
      (main): Without -r, Replace the fingerprint in the input file
      instead of generating a fingerprint.c.
      * lib/Makefile.in (libgnu_a_OBJECTS): Add fingerprint.o.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * src/Makefile.in (HAVE_PDUMPER, MAKE_PDUMPER_FINGERPRINT):
      New macros.
      (temacs$(EXEEXT)): Use them to replace the fingerprint instead
      of precalculating it.
      (mostlyclean, ctagsfiles1): Do not worry about fingerprint.c.
      5c2f94a1
  35. 11 Apr, 2019 1 commit