1. 01 Jan, 2014 2 commits
  2. 31 Dec, 2013 1 commit
    • Fabrice Popineau's avatar
      Minor fixes for MinGW64 build. · bd717ca4
      Fabrice Popineau authored
       configure.ac (canonical, C_SWITCH_SYSTEM): Support a 64-bit
       MinGW64 build on MS-Windows.
      
       nt/inc/ms-w32.h (sys_kill): Fix prototype.
      
       src/w32term.c (w32_initialize): Use LCID and LOWORD.
       src/w32proc.c (create_child): Use pid_t for 5th argument.
       (IsValidLocale): Don't provide prototype for MinGW64.
       (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
       (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
       src/w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
       MinGW64 doesn't support.
       src/lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
      bd717ca4
  3. 29 Dec, 2013 3 commits
  4. 28 Dec, 2013 3 commits
  5. 27 Dec, 2013 2 commits
  6. 26 Dec, 2013 1 commit
    • Paul Eggert's avatar
      Fix core dumps with gcc -fsanitize=address and GNU/Linux. · e76119d7
      Paul Eggert authored
      On my Fedora 19 platform the core dumps were so big that
      my desktop became nearly catatonic.
      * configure.ac: Check whether addresses are sanitized.
      (CANNOT_DUMP): Warn if addresses are sanitized and not CANNOT_DUMP.
      (DOUG_LEA_MALLOC): Do not define if addresses are sanitized.
      (SYSTEM_MALLOC): Define if addresses are sanitized.
      * src/alloc.c (no_sanitize_memcpy) [MAX_SAVE_STACK > 0]: New function.
      (Fgarbage_collect) [MAX_SAVE_STACK > 0]: Use it.
      (USE_ALIGNED_MALLOC): Do not define if addresses are sanitized.
      (mark_memory): Use ATTRIBUTE_NO_SANITIZE_ADDRESS rather than
      a clang-only syntax.
      * src/conf_post.h (__has_feature): New macro, if not already defined.
      (ADDRESS_SANITIZER, ADDRESS_SANITIZER_WORKAROUND)
      (ATTRIBUTE_NO_SANITIZE_ADDRESS): New macros.
      e76119d7
  7. 23 Dec, 2013 1 commit
  8. 14 Dec, 2013 4 commits
    • Dani Moncayo's avatar
      * configure.ac (srcdir) [MINGW32]: Yet another tweak to avoid failure · f629af54
      Dani Moncayo authored
        when srcdir is ".".  Fix also the indentation.
      f629af54
    • Dani Moncayo's avatar
    • Paul Eggert's avatar
      Use bool for boolean, focusing on headers. · 96c06863
      Paul Eggert authored
      * configure.ac (PTY_OPEN, GC_MARK_SECONDARY_STACK):
      Use bool for boolean.
      * lib-src/emacsclient.c, lib-src/etags.c, lib-src/hexl.c (FALSE, TRUE):
      Remove.  All uses replaced with uncapitalized version.
      * lib-src/emacsclient.c (message):
      * lib-src/etags.c (make_tag, pfnote, consider_token, make_C_tag, lang_names):
      * lib-src/hexl.c (un_flag, iso_flag, endian):
      * lib-src/pop.c (pop_debug, pop_open, pop_multi_first, pop_multi_next)
      (pop_trash):
      Use bool for boolean.
      * lib-src/etags.c (bool): Remove.
      * lib-src/etags.c (globals, members, declarations, no_line_directive)
      (no_duplicates): Use 'int' for boolean values that getopt requires
      to be 'int'.  Formerly, these were 'bool' and 'bool' was 'int',
      but we can no longer rely on this implementation.
      * lib-src/pop.h (struct _popserver): Use bool_bf for boolean bit-fields.
      * lwlib/xlwmenuP.h (XlwMenu_part): Use bool_bf for boolean bit-fields.
      * src/atimer.h, src/lisp.h, src/syssignal.h, src/syswait.h, src/unexelf.c:
      No need to include <stdbool.h>, since conf_post.h does it now.
      * src/buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
      (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
      (SET_PER_BUFFER_VALUE_P):
      * src/ccl.c, src/ccl.h (setup_ccl_program):
      * src/ccl.h (CHECK_CCL_PROGRAM):
      * src/character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
      (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
      (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
      (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
      (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
      (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
      (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
      * src/charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
      (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
      (CHARSET_FAST_MAP_SET):
      * src/coding.c (decode_coding_ccl, encode_coding_ccl):
      * src/coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
      (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
      (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
      (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
      (decode_coding_c_string):
      * src/composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
      * src/conf_post.h (has_attribute):
      * src/dispextern.h (trace_redisplay_p):
      (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
      (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
      (SET_GLYPH_FROM_CHAR_GLYPH):
      (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
      (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
      (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
      (cursor_in_mouse_face_p):
      * src/dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
      (blank_row, prepare_desired_row)
      (build_frame_matrix_from_leaf_window, make_current)
      (mirror_make_current, mirrored_line_dance, mirror_line_dance)
      (update_window, scrolling_window, update_frame_line):
      * src/disptab.h (GLYPH_FOLLOW_ALIASES):
      * src/editfns.c (Fformat):
      * src/font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
      (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
      (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
      (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
      (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
      (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
      (FONT_DEFERRED_LOG):
      * src/frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P):
      (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
      (FRAME_MOUSE_UPDATE):
      * src/fringe.c (Fdefine_fringe_bitmap):
      * src/image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
      (x_create_bitmap_from_xpm_data, xpm_load_image):
      * src/intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
      (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
      (MERGE_INTERVAL_CACHE):
      * src/keymap.h (KEYMAPP):
      * src/lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
      (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
      (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
      (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
      (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
      (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
      (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
      (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
      * src/syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
      (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
      (SETUP_BUFFER_SYNTAX_TABLE):
      * src/systime.h (timespec_valid_p):
      * src/term.c (save_and_enable_current_matrix):
      * src/window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
      * src/xdisp.c (in_display_vector_p, display_tool_bar_line)
      (redisplay_internal, try_window_reusing_current_matrix)
      (sync_frame_with_window_matrix_rows, try_window_id)
      (display_menu_bar, display_tty_menu_item, display_mode_line)
      (coords_in_mouse_face_p, cursor_in_mouse_face_p):
      * src/xmenu.c (xmenu_show):
      * src/xterm.c (use_xim, x_term_init):
      * src/xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
      (struct x_bitmap_record):
      Use bool for booleans.
      * src/ccl.c (struct buffer_text):
      * src/ccl.h (struct ccl_program):
      * src/charset.h (struct charset):
      * src/cm.h (struct cm):
      * src/coding.h (struct iso_2022_spec, struct coding_system):
      * src/dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
      (struct glyph_string, struct face, struct face_cache)
      (struct bidi_string_data, struct bidi_it)
      (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
      (struct image):
      * src/editfns.c (Fformat):
      * src/frame.h (struct frame):
      * src/fringe.c (struct fringe_bitmap):
      * src/intervals.h (struct interval):
      * src/keyboard.h (struct kboard):
      * src/lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
      (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
      (struct Lisp_Buffer_Local_Value, union specbinding):
      * src/macfont.m (struct macfont_info):
      * src/process.h (struct Lisp_Process):
      * src/termchar.h (struct tty_display_info):
      * src/window.h (struct window):
      * src/xterm.h (struct x_output):
      Use bool_bf for boolean bit-fields.
      * src/ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
      All callers changed.
      * src/ccl.h (struct ccl_program): Remove unused members private_state,
      src_multibyte, dst_multibyte, cr_consumed, suppress_error,
      eight_bit_control.
      (struct ccl_spec): Remove unused members cr_carryover,
      eight_bit_carryover.
      * src/conf_post.h: Include <stdbool.h>.
      (bool_bf): New type.
      * src/dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
      * src/interval.h (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE)
      Surround statement macro with proper 'do { ... } while (false)' brackets.
      (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
      (PRODUCE_GLYPHS): Simplify use of boolean.
      * src/fileio.c (Fcopy_file):
      If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
      * src/lisp.h (UNGCPRO): Return void, not int.
      (FOR_EACH_TAIL): Use void expression, not int expression.
      * src/region-cache.c: Reindent.
      * src/region-cache.h: Copy comments from region-cache.c, to fix
      incorrect remarks about booleans.
      96c06863
    • Dani Moncayo's avatar
      * configure.ac (srcdir) [MINGW32]: Convert to an absolute MSYS · 6084a28b
      Dani Moncayo authored
      path of the form "/c/foo/bar" to simplify conversion of formats.
      6084a28b
  9. 12 Dec, 2013 1 commit
  10. 11 Dec, 2013 2 commits
    • Paul Eggert's avatar
      Make 'configure' work out-of-the-box on Solaris. · 7204a2e6
      Paul Eggert authored
      * configure.ac: Work even if libgif etc. are missing.  Emacs works
      without these libraries even if its default GUI is harmed, so they
      are not strictly necessary.  Another possibility would be to
      disable X11 if these libraries are missing.  The point is that a
      plain 'configure' should not fail on platforms like Solaris 11
      where one or more image libraries are not installed by default.
      7204a2e6
    • Paul Eggert's avatar
      Remove the option of using libcrypto. · a8f9bc05
      Paul Eggert authored
      This scorches the earth and waits for spring;
      see Ted Zlatanov and Stefan Monnier in
      <http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00323.html>.
      * configure.ac (with_openssl_default, HAVE_LIB_CRYPTO): Remove.
      Do not say whether Emacs is configured to use a crypto library,
      since it's no longer an option.
      (gl_CRYPTO_CHECK): Define a dummy.
      * lib/gl_openssl.h, m4/gl-openssl.m4: Remove.
      * admin/merge-gnulib: Remove lib/gl_openssh.h and m4/gl-openssl.m4.
      * src/Makefile.in (LIB_CRYPTO): Remove.
      (LIBES): Don't use it.
      a8f9bc05
  11. 10 Dec, 2013 1 commit
  12. 08 Dec, 2013 3 commits
    • Eli Zaretskii's avatar
      Fix librsvg build on MS-Windows. · 83a5a2c8
      Eli Zaretskii authored
       configure.ac (HAVE_RSVG) [mingw32]: Don't link against librsvg statically.
      83a5a2c8
    • Paul Eggert's avatar
      * configure.ac: Simplify supression of GTK deprecation warning. · 3bc9da32
      Paul Eggert authored
      Move -DGDK_DISABLE_DEPRECATION_WARNINGS out of the command line
      and into config.h, to shorten the command line when doing 'make'.
      Don't AC_SUBST GTK_CFLAGS, as this is not needed.
      3bc9da32
    • Paul Eggert's avatar
      Use libcrypto's checksum implementations if available, for speed. · e9551b12
      Paul Eggert authored
      On commonly used platform libcrypto uses architecture-specific
      assembly code, which is significantly faster than the C code we
      were using.  See Pádraig Brady's note in
      <http://lists.gnu.org/archive/html/bug-gnulib/2013-12/msg00000.html>.
      Merge from gnulib, incorporating:
      2013-12-07 md5, sha1, sha256, sha512: add gl_SET_CRYPTO_CHECK_DEFAULT
      2013-12-07 md5, sha1, sha256, sha512: add 'auto', and set-default method
      2013-12-04 include_next: minimize code duplication
      2013-12-03 md5, sha1, sha256, sha512: support mandating use of openssl
      2013-12-02 md5, sha1, sha256, sha512: use openssl routines if available
      * configure.ac (--without-all): Set with_openssl_default too.
      Use gl_SET_CRYPTO_CHECK_DEFAULT to default to 'auto'.
      (HAVE_LIB_CRYPTO): New var.
      Say whether Emacs is configured to use a crypto library.
      * lib/gl_openssl.h, m4/absolute-header.m4, m4/gl-openssl.m4:
      New files, copied from gnulib.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * lib/md5.c, lib/md5.h, lib/sha1.c, lib/sha1.h:
      * lib/sha256.c, lib/sha256.h, lib/sha512.c, lib/sha512.h:
      * m4/include_next.m4, m4/md5.m4, m4/sha1.m4, m4/sha256.m4, m4/sha512.m4:
      Update from gnulib.
      * src/Makefile.in (LIB_CRYPTO): New macro.
      (LIBES): Use it.
      e9551b12
  13. 01 Dec, 2013 1 commit
  14. 30 Nov, 2013 1 commit
    • Glenn Morris's avatar
      Stop keeping (all but one) generated cedet grammar files in the repository · f9b697dd
      Glenn Morris authored
      * configure.ac (SUBDIR_MAKEFILES, AC_CONFIG_FILES):
      Add admin/grammars Makefile.
      
      * Makefile.in (distclean, bootstrap-clean, maintainer-clean):
      Also clean admin/grammars, if present.
      
      * admin/grammars/README: Remove.
      
      * admin/grammars/Makefile.in: New file.
      
      * admin/grammars/c.by, admin/grammars/java-tags.wy, admin/grammars/js.wy:
      * admin/grammars/python.wy: Update declarations to match generated outputs.
      
      * lisp/Makefile.in (semantic): New.
      (compile-main): Depend on semantic.
      
      * lisp/cedet/semantic/bovine/grammar.el (bovine--make-parser-1):
      New function, split from bovine-make-parsers.
      (bovine-make-parsers): Use bovine--make-parser-1.
      (bovine-batch-make-parser): New function.
      
      * lisp/cedet/semantic/wisent/grammar.el (wisent--make-parser-1):
      New function, split from wisent-make-parsers.
      (wisent-make-parsers): Use wisent--make-parser-1.
      (wisent-batch-make-parser): New function.
      
      * lisp/cedet/semantic/db.el (semanticdb-save-all-db):
      Avoid prompting in batch mode.
      
      * lisp/cedet/semantic/grammar.el (semantic-grammar-footer-template):
      Disable version-control and autoloads in the output.
      (semantic-grammar-create-package):
      Add option to return nil if output is up-to-date.
      
      * lisp/cedet/semantic/bovine/c-by.el, lisp/cedet/semantic/bovine/make-by.el:
      * lisp/cedet/semantic/bovine/scm-by.el, lisp/cedet/semantic/wisent/javat-wy.el:
      * lisp/cedet/semantic/wisent/js-wy.el, lisp/cedet/semantic/wisent/python-wy.el:
      * lisp/cedet/srecode/srt-wy.el: Remove generated files from repository.
      
      * .bzrignore: Update for this.
      f9b697dd
  15. 29 Nov, 2013 1 commit
    • Stefan Monnier's avatar
      * configure.ac (HAVE_MENUS): Remove. · 7cdf484b
      Stefan Monnier authored
      * src/xmenu.c (Fmenu_or_popup_active_p):
      * src/window.c (Fset_window_configuration):
      * src/menu.c (Fx_popup_menu, Fx_popup_dialog):
      * src/keyboard.c (record_menu_key, read_char_x_menu_prompt):
      * src/fns.c (Fyes_or_no_p):
      * src/editfns.c (Fmessage_box, Fmessage_or_box):
      * src/alloc.c (make_save_ptr_ptr):
      * src/xdisp.c, src/w32menu.c, src/term.c, src/xterm.h, src/xterm.c:
      Remove HAVE_MENUS.
      7cdf484b
  16. 28 Nov, 2013 2 commits
  17. 27 Nov, 2013 1 commit
    • Glenn Morris's avatar
      Move runtime leim lisp files to lisp/leim directory · cb6c95a3
      Glenn Morris authored
      This allows us to reuse much of the lisp build and installation machinery,
      rather than duplicating it.
      
      * Makefile.in (abs_builddir, leimdir): Remove.
      (buildlisppath, SUBDIR, COPYDIR, COPYDESTS): No more leim directory.
      (epaths-force-w32): No longer set BLD.
      (leim): Remove.
      (install-arch-indep): No longer run or install leim.
      (mostlyclean, clean): No longer run leim rule.
      (bootstrap-clean): Change leim target.
      (maintainer-clean): Add leim.
      (check-declare): Remove leim.
      
      * README: Update for leim changes.
      
      * configure.ac (leimdir): Remove.
      (standardlisppath): No more leimdir.
      
      * make-dist: Update for files from leim/ now being in lisp/leim/.
      
      * doc/lispref/loading.texi (Library Search):
      * doc/lispref/os.texi (Startup Summary): No more leim directory.
      
      * leim/Makefile.in (leimdir): New variable.
      (TIT_GB, TIT_BIG5, MISC, changed.tit, changed.misc)
      (${leimdir}/leim-list.el, ${leimdir}/ja-dic/ja-dic.el):
      Generate in $leimdir.
      (all): Remove compilation, add ja-dic.
      (leim-list.el): Now PHONY.
      (setwins, compile-targets, compile-main, clean, mostlyclean)
      (extraclean): Remove.
      (bootstrap-clean): Delete all generated files.
      
      * leim/README: Update for moved leim/ directory.
      
      * leim/leim-ext.el (ucs-input-activate, hangul-input-method-activate):
      Remove manual autoloads; now in loaddefs.el.
      Disable byte-compile, version-control, autoloads in the output.
      
      * lisp/Makefile.in (setwins_for_subdirs): Skip leim/ directory.
      (compile-main): Depend on lisp/leim rule.
      (leim): New rule.
      
      * lisp/loadup.el: Move leim-list.el to leim/ subdirectory.
      
      * lisp/startup.el (normal-top-level): No more leim directory.
      
      * lisp/international/ja-dic-cnv.el (skkdic-convert):
      Disable version-control and autoloads in output files.
      * lisp/international/titdic-cnv.el (titdic-convert, miscdic-convert):
      Disable version-control and autoloads in output files.
      
      * lisp/leim/quail: Move here from ../leim.
      
      * lisp/leim/quail/hangul.el (hangul-input-method-activate):
      Add autoload cookie.
      (generated-autoload-load-name): Set file-local value.
      
      * lisp/leim/quail/uni-input.el (ucs-input-activate): Add autoload cookie.
      (generated-autoload-load-name): Set file-local value.
      
      * nt/README.W32:
      * nt/addpm.c (env_vars):
      * nt/epaths.nt (PATH_LOADSEARCH, PATH_DUMPLOADSEARCH):
      * nt/paths.h (PATH_LOADSEARCH): No more leim directory.
      
      * src/Makefile.in (leimdir): Now in lisp source directory.
      ($(leimdir)/leim-list.el): Just use ../leim .
      
      * src/epaths.in (PATH_DUMPLOADSEARCH):
      
      * src/lread.c (load_path_default):
      
      * src/nsterm.m (ns_load_path): No more leim directory.
      
      * .bzrignore: Update for relocated leim files.
      cb6c95a3
  18. 21 Nov, 2013 2 commits
  19. 17 Nov, 2013 1 commit
  20. 15 Nov, 2013 1 commit
  21. 14 Nov, 2013 1 commit
    • Paul Eggert's avatar
      Simplify, port and tune bool vector implementation. · 2cf00efc
      Paul Eggert authored
      * configure.ac (BITSIZEOF_SIZE_T, SIZEOF_SIZE_T): Remove.
      * src/alloc.c (bool_vector_exact_payload_bytes)
      (bool_vector_payload_bytes): Remove.
      (bool_vector_fill): Return its argument.
      * src/alloc.c (bool_vector_fill):
      * src/lread.c (read1):
      * src/print.c (print_object):
      Simplify by using bool_vector_bytes.
      * src/alloc.c (make_uninit_bool_vector):
      New function, broken out from Fmake_bool_vector.
      (Fmake_bool_vector): Use it.  Use tail call.
      (make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
      * src/data.c (BITS_PER_ULL): New constant.
      (ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
      if long long versions don't exist.
      (shift_right_ull): New function.
      (count_one_bits_word): New function, replacing popcount_bits_word
      macro.  Don't assume that bits_word is no wider than long long.
      (count_one_bits_word, count_trailing_zero_bits):
      Don't assume that bits_word is no wider than long long.
      * src/data.c (bool_vector_binop_driver, bool_vector_not):
      * src/fns.c (Fcopy_sequence):
      * src/lread.c (read1):
      Create an uninitialized destination, to avoid needless work.
      (internal_equal): Simplify.
      (Ffillarray): Prefer tail call.
      * src/data.c (bool_vector_binop_driver): Don't assume bit vectors always
      contain at least one word.
      (bits_word_to_host_endian): Prefer if to #if.  Don't assume
      chars are narrower than ints.
      * src/data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
      * src/fns.c (Fcopy_sequence):
      Simplify and tune.
      * src/lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
      Don't try to port to hosts where bits_word values have holes; the
      code wouldn't work there anyway.  Verify this assumption, though.
      (bool_vector_bytes): New function.
      (make_uninit_bool_vector): New decl.
      (bool_vector_fill): Now returns Lisp_Object.
      2cf00efc
  22. 12 Nov, 2013 2 commits
    • Glenn Morris's avatar
      * configure.ac: test portability fix · 45088549
      Glenn Morris authored
        (I can never remember whether this is still relevant or not)
      45088549
    • Dani Moncayo's avatar
      Remove nt/msysconfig.sh · f4f38fad
      Dani Moncayo authored
      * configure.ac [MINGW32]: Source nt/mingw-cfg.site.
      
      * make-dist: Don't distribute nt/msysconfig.sh.
      
      * nt/msysconfig.sh: Remove.
      
      * nt/INSTALL: Update for this.
      
      * nt/mingw-cfg.site: Comment.
      f4f38fad
  23. 07 Nov, 2013 1 commit
    • Paul Eggert's avatar
      Port to C11 aligned_alloc, and fix some integer overflows. · aea07e2c
      Paul Eggert authored
      * configure.ac (GMALLOC_OBJ): Initialize to empty if !system_malloc
      and doug_lea_malloc.
      (aligned_alloc): Test for existence if !GMALLOC_OBJ and not darwin.
      (posix_memalign): Test for existence only if !GMALLOC_OBJ and
      not darwin and !aligned_alloc.
      * src/alloc.c (USE_ALIGNED_ALLOC): New symbol.
      (USE_POSIX_MEMALIGN): Remove.  All uses replaced with USE_ALIGNED_ALLOC,
      and use of posix_memalign replaced with aligned_alloc.
      (aligned_alloc): New function, defined or declared as needed.
      * src/conf_post.h (HAVE_POSIX_MEMALIGN) [DARWIN_OS]:
      Don't undef; configure.ac now does this.
      * src/gmalloc.c (aligned_alloc) [MSDOS]: New decl.
      (calloc, aligned_alloc): Check for integer overflow.
      (aligned_alloc): Rename from memalign.  All uses changed.
      (memalign): New function, an alias for aligned_alloc.
      aea07e2c
  24. 05 Nov, 2013 2 commits
    • Glenn Morris's avatar
      * Makefile.in (epaths-force-w32): Move srcdir tweak here · c923b188
      Glenn Morris authored
      * configure.ac (abs_srcdir) [MINGW32]: No point setting it here,
      config.status computes it.
      c923b188
    • Paul Eggert's avatar
      Simplify and port recent bool vector changes. · df5b4930
      Paul Eggert authored
      * configure.ac (BITSIZEOF_SIZE_T, SIZEOF_SIZE_T):
      New symbols to configure.
      * src/alloc.c (ROUNDUP): Move here from lisp.h, since it's now used
      only in this file.  Use a more-efficient implementation if the
      second argument is a power of 2.
      (ALIGN): Rewrite in terms of ROUNDUP.  Make it a function.
      Remove no-longer-necessary compile-time checks.
      (bool_vector_exact_payload_bytes): New function.
      (bool_vector_payload_bytes): Remove 2nd arg; callers that need
      exact payload changed to call the new function.  Do not assume
      that the arg or result fits in ptrdiff_t.
      (bool_vector_fill): New function.
      (Fmake_bool_vector): Use it.  Don't assume bit counts fit
      in ptrdiff_t.
      (vroundup_ct): Don't assume arg fits in size_t.
      * src/category.c (SET_CATEGORY_SET): Remove.  All callers now just
      invoke set_category_set.
      (set_category_set): 2nd arg is now EMACS_INT and 3rd is now bool.
      All callers changed.  Use bool_vector_set.
      * src/category.h (XCATEGORY_SET): Remove; no longer needed.
      (CATEGORY_MEMBER): Now a function.  Rewrite in terms of
      bool_vector_bitref.
      * src/data.c (Faref): Use bool_vector_ref.
      (Faset): Use bool_vector_set.
      (bits_word_to_host_endian): Don't assume you can shift by CHAR_BIT.
      (Fbool_vector_not, Fbool_vector_count_matches)
      (Fbool_vector_count_matches_at): Don't assume CHAR_BIT == 8.
      * src/fns.c (concat): Use bool_vector_ref.
      (Ffillarray): Use bool_vector_fill.
      (mapcar1): Use bool_vector_ref.
      (sxhash_bool_vector): Hash words, not bytes.
      * src/lisp.h (BOOL_VECTOR_BITS_PER_CHAR): Now a macro as well as
      a constant, since it's now used in #if.
      (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD): Fall back on
      unsigned char on unusual architectures, so that we no longer
      assume that the number of bits per bits_word is a power of two or
      is a multiple of 8 or of CHAR_BIT.
      (Qt): Add forward decl.
      (struct Lisp_Bool_Vector): Don't assume EMACS_INT is aligned
      at least as strictly as bits_word.
      (bool_vector_data, bool_vector_uchar_data): New accessors.
      All data structure accesses changed to use them.
      (bool_vector_words, bool_vector_bitref, bool_vector_ref)
      (bool_vector_set): New functions.
      (bool_vector_fill): New decl.
      (ROUNDUP): Move to alloc.c as described above.
      df5b4930