1. 12 Dec, 2013 1 commit
    • David Engster's avatar
      Merge with CEDET upstream. · b0fe992f
      David Engster authored
      * admin/grammars/c.by (expr-binop): Add MOD.
      (variablearg): Add 'opt-assign'.
      (variablearg, varnamelist): Add default values so that it can be
      later expanded into the tag.
      (opt-stuff-after-symbol): Rename to 'brackets-after-symbol' and
      remove empty match.
      (multi-stage-dereference): Adapt to above rename.
      (unaryexpression): Use 'symbol' instead of 'namespace-symbol',
      since the latter also leads to an empty match at the end which
      would make this too greedy.
      (variablearg-opt-name): Support parsing of function pointers
      inside an argument list.
      
      * semantic/analyze.el
      (semantic-analyze-find-tag-sequence-default): Always add scope to
      the local miniscope for each type.  Otherwise, structure tags are
      not analyzed correctly.  Also, always search the extended
      miniscope even when not dealing with types.
      
      * semantic/ctxt.el (semantic-get-local-variables-default): Also
      try to parse local variables for buffers which are currently
      marked as unparseable.  Otherwise, it is often impossible to
      complete local variables.
      
      * semantic/scope.el (semantic-analyze-scoped-types-default): If we
      cannot find a type in the typecache, also look into the the types
      we already found.  This is necessary since in C++, a 'using
      namespace' can be dependend on a previous one.
      (semantic-completable-tags-from-type): When creating the list of
      completable types, pull in types which are referenced through
      'using' statements, and also preserve their filenames.
      
      * semanitc/bovine/c.el (semantic/analyze/refs): Require.
      (semantic-analyze-tag-references): New override.  Mainly copied
      from the default implementation, but if nothing could be found (or
      just the tag itself), drop all namespaces from the scope and
      search again.  This is necessary for implementations which are
      defined outside of the namespace and only pull those in through
      'using' statements.
      (semantic-ctxt-scoped-types): Go through all tags around point and
      search them for using statements.  In the case for using
      statements outside of function scope, append them in the correct
      order instead of using 'cons'.  This is important since using
      statements may depend on previous ones.
      (semantic-expand-c-tag-namelist): Do not try to parse struct
      definitions as default values.  The grammar parser seems to return
      the point positions slightly differently (as a cons instead of a
      list).  Also, set parent for typedefs to 'nil'.  It does not
      really make sense to set a parent class for typedefs, and it can
      also lead to endless loops when calculating scope.
      (semantic-c-reconstitute-token): Change handling of function
      pointers; instead of seeing them as variables, handle them as
      functions with a 'function-pointer' attribute.  Also, correctly
      deal with function pointers as function arguments.
      (semantic-c-reconstitute-function-arglist): New function to parse
      function pointers inside an argument list.
      (semantic-format-tag-name): Use 'function-pointer' attribute
      instead of the old 'functionpointer-flag'.
      (semantic-cpp-lexer): Use new `semantic-lex-spp-paren-or-list'.
      
      * semantic/bovine/gcc.el (semantic-gcc-setup): Add 'features.h' to
      the list of files whose preprocessor symbols are included.  This
      pulls in things like __USE_POSIX and similar.
      
      * semantic/format.el (semantic-format-tag-prototype-default):
      Display default values if available.
      
      * semantic/analyze/refs.el (semantic-analyze-refs-impl)
      (semantic-analyze-refs-proto): Add 'default-value' as ignorable in
      call to `semantic-tag-similar-p'.
      
      * semantic/db-mode.el (semanticdb-semantic-init-hook-fcn): Always
      set buffer for `semanticdb-current-table'.
      
      * semantic/db.el (semanticdb-table::semanticdb-refresh-table): The
      previous change turned up a bug in this method.  Since the current
      table now correctly has a buffer set, the first clause in the
      `cond' would be taken, but there was a `save-excursion' missing.
      
      * semantic/lex-spp.el (semantic-c-end-of-macro): Declare.
      (semantic-lex-spp-token-macro-to-macro-stream): Deal with macros
      which open/close a scope.  For this, leave an overlay if we
      encounter a single open paren and return a semantic-list in the
      lexer.  When this list gets expanded, retrieve the old position
      from the overlay.  See the comments in the function for further
      details.
      (semantic-lex-spp-find-closing-macro): New function to find the
      next macro which closes scope (i.e., has a closing paren).
      (semantic-lex-spp-replace-or-symbol-or-keyword): Go to end of
      closing macro if necessary.
      (semantic-lex-spp-paren-or-list): New lexer to specially deal with
      parens in macro definitions.
      
      * semantic/decorate/mode.el (semantic-decoration-mode): Do not
      decorate available tags immediately but in an idle timer, since
      EDE will usually not be activated yet, which will make it
      impossible to find project includes.
      
      * semantic/decorate/include.el
      (semantic-decoration-on-includes-highlight-default): Remove
      'unloaded' from throttle when decorating includes, otherwise all
      would be loaded.  Rename 'table' to 'currenttable' to make things
      clearer.
      
      * ede/linux.el (cl): Require during compile.
      
      * ede/linux.el (project-linux-build-directory-default)
      (project-linux-architecture-default): Add customizable variables.
      (ede-linux-project): Add additional slots to track Linux-specific
      information (out-of-tree build directory and selected
      architecture).
      (ede-linux--get-build-directory, ede-linux--get-archs)
      (ede-linux--detect-architecture, ede-linux--get-architecture)
      (ede-linux--include-path): Added function to detect Linux-specific
      information.
      (ede-linux-load): Set new Linux-specific information when creating
      a project.
      (ede-expand-filename-impl): Use new and more accurate include
      information.
      
      * semantic/scope.el (semantic-calculate-scope): Return a clone of
      the scopecache, so that everyone is working with its own (shallow)
      copy.  Otherwise, if one caller is resetting the scope, it would
      be reset for all others working with the scope cache as well.
      b0fe992f
  2. 11 Dec, 2013 1 commit
    • 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
  3. 04 Dec, 2013 1 commit
    • Eli Zaretskii's avatar
      Fix bug #16043 with crashes when displaying new bidi control characters. · ad826124
      Eli Zaretskii authored
       src/bidi.c (bidi_get_type, bidi_get_category): Handle the isolate
       directional control characters.  Update type and category
       determination according to the UBA from Unicode v6.3.
       (bidi_category_t): New category EXPLICIT_FORMATTING.
       src/dispextern.h (bidi_type_t): Update to include new bidirectional
       properties introduced with Unicode v6.3.
      
       admin/unidata/unidata-gen.el (unidata-prop-alist): Update bidi-class
       to include the new isolate-related classes introduced with Unicode
       v6.3.
       (unidata-encode-val): Accept an additional optional argument, a
       warning message to emit when UnicodeData.txt defines bidi-class
       values that are not in unidata-prop-alist.  Add a comment
       explaining what should maintainers do if/when such a warning ever
       appears.
       (unidata-gen-table): Call unidata-encode-val with 3rd arg non-nil
       when generating uni-bidi.el.
      ad826124
  4. 01 Dec, 2013 1 commit
  5. 30 Nov, 2013 3 commits
    • Glenn Morris's avatar
    • Eli Zaretskii's avatar
      (Mostly) fix bug #16007 with generation of MULE-*.map files. · 28c9be2d
      Eli Zaretskii authored
       admin/charsets/mule-charsets.el: Rewritten to work in Emacs 23 and
       later.
      28c9be2d
    • 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
  6. 28 Nov, 2013 1 commit
  7. 27 Nov, 2013 1 commit
    • Glenn Morris's avatar
      Stop keeping generated Unicode lisp files in the repository · 7e3bf78c
      Glenn Morris authored
      Ref: http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg01023.html
      
      * admin/unidata/Makefile.in (all, install, clean, bootstrap-clean)
      (distclean, maintainer-clean): Declare as PHONY.
      (compile, extraclean): New.
      (${DSTDIR}/charprop.el): Depend on source files rather than
      intermediate products.
      
      * lisp/international/charprop.el, lisp/international/uni-bidi.el:
      * lisp/international/uni-category.el, lisp/international/uni-combining.el:
      * lisp/international/uni-comment.el, lisp/international/uni-decimal.el:
      * lisp/international/uni-decomposition.el, lisp/international/uni-digit.el:
      * lisp/international/uni-lowercase.el, lisp/international/uni-mirrored.el:
      * lisp/international/uni-name.el, lisp/international/uni-numeric.el:
      * lisp/international/uni-old-name.el, lisp/international/uni-titlecase.el:
      * lisp/international/uni-uppercase.el:
      Remove generated files from VCS repository.
      
      * src/Makefile.in ($(lispsource)/international/charprop.el): New.
      (emacs$(EXEEXT)): Depend on charprop.el.
      
      * Makefile.in: Comment.
      
      * .bzrignore: Add generated Unicode files.
      7e3bf78c
  8. 11 Nov, 2013 2 commits
  9. 09 Nov, 2013 1 commit
  10. 07 Nov, 2013 2 commits
  11. 05 Nov, 2013 1 commit
    • Glenn Morris's avatar
      Remove the autogen/ directory · 4dde498b
      Glenn Morris authored
      Ref: http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00806.html
      
      * autogen: Remove directory.  Move update_autogen to admin/.
      * autogen.sh: Remove reference to copy_autogen.
      * GNUmakefile (configure):
      * Makefile.in (bootstrap): Do not try to run copy_autogen.
      * config.bat: Use msdos/autogen rather than autogen.
      
      * admin/update_autogen: Move here from ../autogen.
      (usage): Update.  Remove -l, add -A.
      (autogendir): New variable.
      (ldefs_flag): Default to set.
      (genfiles): Reduce to only ms-dos relevant files.
      (main): Make checking autogen sources optional.
      Make copying of autogen files optional.
      
      * msdos/autogen/config.in:
      * msdos/autogen/Makefile.in: Move here from ../autogen.
      
      * nt/INSTALL: Remove reference to copy_autogen.
      
      * nt/config.nt: Comment.
      4dde498b
  12. 30 Oct, 2013 4 commits
  13. 23 Oct, 2013 1 commit
    • Glenn Morris's avatar
      Make building in directories with whitespace possible · b8e3b0a9
      Glenn Morris authored
      Make has trouble with targets containing whitespace, 
      http://savannah.gnu.org/bugs/?712, so the general approach is
      to use relative paths where possible.  It's generally only Emacs
      itself that needs absolute paths, eg in src/epaths.h.
      
      * configure.ac (srcdir): Don't make it absolute - abs_srcdir exists.
      
      * Makefile.in (abs_srcdir): New, set by configure.
      (buildlisppath): Use abs_srcdir.
      (install-arch-indep, install-etcdoc, install-info, install-man)
      (install-etc): Quote entities that might contain whitespace.
      
      * admin/unidata/Makefile.in (emacs, ${DSTDIR}/charprop.el):
      Quote entities that might contain whitespace.
      
      * leim/Makefile.in (abs_srcdir): New, set by configure.
      (buildlisppath): Use abs_srcdir.
      (RUN_EMACS, .el.elc, changed.tit, changed.misc, leim-list.el)
      ($(srcdir)/ja-dic/ja-dic.el, setwins, distclean, check-declare):
      Quote entities that might contain whitespace.
      
      * lib-src/Makefile.in ($(DESTDIR)${archlibdir}):
      Quote entities that might contain whitespace.
      
      * lisp/Makefile.in (abs_srcdir, abs_lisp): New, set by configure.
      (emacs, compile, compile-always):
      Quote entities that might contain whitespace.
      (custom-deps, finder-data, autoloads): Use abs_lisp.
      ($(MH_E_DIR)/mh-loaddefs.el, $(TRAMP_DIR)/tramp-loaddefs.el)
      ($(CAL_DIR)/cal-loaddefs.el, $(CAL_DIR)/diary-loaddefs.el)
      ($(CAL_DIR)/hol-loaddefs.el): Manually expand target file name.
      
      * nextstep/Makefile.in (${ns_check_file} ${ns_appdir}):
      Quote entities that might contain whitespace.
      
      * nt/Makefile.in ($(DESTDIR)${archlibdir}):
      Quote entities that might contain whitespace.
      
      * src/Makefile.in (RUN_TEMACS): Make relative (again).
      ($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
      (bootstrap-emacs$(EXEEXT)):
      Quote entities that might contain whitespace.
      
      * test/automated/Makefile.in (abs_top_srcdir, top_builddir):
      New, set by configure.
      (top_srcdir): Remove.
      (abs_test, abs_lispsrc): New.
      (lisp): No longer absolute.
      (emacs, lisp-compile, compile, compile-always):
      Quote entities that might contain whitespace.
      
      Fixes: debbugs:15675
      b8e3b0a9
  14. 07 Oct, 2013 1 commit
    • Paul Eggert's avatar
      Improve support for popcount and counting trailing zeros. · 595e113b
      Paul Eggert authored
      Do this by using the Gnulib modules for this.
      This should generate faster code on non-GCC, non-MSC platforms,
      and make the code a bit more portable, at least in theory.
      * admin/merge-gnulib (GNULIB_MODULES): Add count-one-bits
      and count-trailing-zeros.
      * lib/count-one-bits.c, lib/count-one-bits.h:
      * lib/count-trailing-zeros.c, lib/count-trailing-zeros.h:
      * m4/count-one-bits.m4, m4/count-trailing-zeros.m4:
      New files, copied from gnulib.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * nt/gnulib.mk: Merge changes from lib/gnulib.mk.
      * src/data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
      (USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
      (NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
      (popcount_size_t_msc, popcount_size_t_gcc):
      Remove; now done by Gnulib.
      (popcount_size_t): Now a macro that defers to Gnulib.
      (count_trailing_zero_bits): Return int, for consistency with
      Gnulib and because Emacs prefers signed to unsigned int.
      Don't assume that size_t is either unsigned int or unsigned long
      or unsigned long long.
      (size_t_to_host_endian): Do not assume that size_t is either
      exactly 32 or exactly 64 bits wide.
      * src/lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
      etc., so that it's now an enum constant, not a macro.
      No need to assume that it's either 32 or 64.
      
      Fixes: debbugs:15550
      595e113b
  15. 04 Oct, 2013 1 commit
    • Paul Eggert's avatar
      Use hardware support for byteswapping on glibc x86 etc. · 4eed3157
      Paul Eggert authored
      On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
      whereas the old swap64 needed 30.
      * admin/merge-gnulib (GNULIB_MODULES): Add byteswap.
      * lib/byteswap.in.h, m4/byteswap.m4: New files, copied from Gnulib.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * src/fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
      * src/sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
      Use byteswap.h's macros to swap bytes.
      * src/lisp.h (swap16, swap32, swap64): Remove.
      All uses replaced by bswap_16, bswap_32, bswap_64.
      4eed3157
  16. 28 Aug, 2013 1 commit
  17. 27 Aug, 2013 2 commits
    • Glenn Morris's avatar
      * doc/misc/efaq.texi: Rename from faq.texi, to match its output files. · 278208b8
      Glenn Morris authored
      * doc/misc/Makefile.in: Update for faq.texi name change.
      
      * admin/admin.el (manual-misc-manuals): "faq" does not need special
        treatment any more.
      278208b8
    • Glenn Morris's avatar
      Move source for Emacs on MS Windows FAQ here from Emacs webpages repository · 1857cd3f
      Glenn Morris authored
      * Makefile.in (mostlyclean, clean, distclean, bootstrap-clean)
      (maintainer-clean, check-declare): Remove pointless subshells.
      Check cd return value.
      
      * configure.ac (DOCMISC_DVI_W32, DOCMISC_HTML_W32, DOCMISC_INFO_W32)
      (DOCMISC_PDF_W32, DOCMISC_PS_W32): New output variables.
      * Makefile.in (check-info-dir): Ignore efaq-w32.
      
      * admin/admin.el (manual-misc-manuals): Use INFO_COMMON rather than
      INFO_TARGETS.
      
      * doc/misc/efaq-w32.texi: Move here from the web-pages repository.
      
      * doc/misc/Makefile.in (DOCMISC_DVI_W32, DOCMISC_HTML_W32, DOCMISC_INFO_W32)
      (DOCMISC_PDF_W32, DOCMISC_PS_W32): New configure output variables.
      (INFO_COMMON, INFO_INSTALL): New derivations of INFO_TARGETS.
      (DVI_TARGETS, HTML_TARGETS, PDF_TARGETS, PS_TARGETS):
      Add DOCMISC_*_W32 variables.
      (echo-info): Use INFO_INSTALL rather than INFO_TARGETS.
      (efaq_w32_deps): New variable.
      (efaq-w32, $(buildinfodir)/efaq-w32$(INFO_EXT), efaq-w32.dvi)
      (efaq-w32.pdf, efaq-w32.html): New rules.
      (clean): Remove efaq-w32 products.
      1857cd3f
  18. 15 Aug, 2013 2 commits
    • Glenn Morris's avatar
      Stop keeping etc/refcards generated PDFs in the repository · 8e5c7e6f
      Glenn Morris authored
      They are on the gnu.org website and will be in the release tarfiles.
      
      * admin/make-tarball.txt: Mention generating pdfs in etc/refcards.
      
      * etc/refcards/calccard.pdf, etc/refcards/cs-dired-ref.pdf:
      * etc/refcards/cs-refcard.pdf, etc/refcards/de-refcard.pdf:
      * etc/refcards/dired-ref.pdf, etc/refcards/fr-dired-ref.pdf:
      * etc/refcards/fr-refcard.pdf, etc/refcards/gnus-booklet.pdf:
      * etc/refcards/gnus-refcard.pdf, etc/refcards/orgcard.pdf:
      * etc/refcards/pl-refcard.pdf, etc/refcards/pt-br-refcard.pdf:
      * etc/refcards/refcard.pdf, etc/refcards/ru-refcard.pdf:
      * etc/refcards/sk-dired-ref.pdf, etc/refcards/sk-refcard.pdf:
      Remove generated files from repository.
      8e5c7e6f
    • Xue Fuqiao's avatar
      555d5565
  19. 10 Aug, 2013 1 commit
  20. 04 Aug, 2013 1 commit
    • Paul Eggert's avatar
      Fix some minor races in hosts lacking mkostemp. · e0fdb694
      Paul Eggert authored
      Gnulib's emulation of mkostemp doesn't have races that Emacs's does.
      * configure.ac (mkostemp): Remove check for this function;
      gnulib does the check now.
      (mkstemp): Remove check for this no-longer-used function.
      * lib/mkostemp.c, lib/secure_getenv.c, lib/tempname.c, lib/tempname.h:
      * m4/mkostemp.m4, m4/secure_getenv.m4, m4/tempname.m4:
      New files, copied from Gnulib.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * admin/merge-gnulib (GNULIB_MODULES): Add mkostemp.
      * lib-src/movemail.c (main):
      * lib-src/update-game-score.c (write_scores):
      Use mkostemp (which now works on all platforms, due to changes
      in the portability layer) rather than mktemp (which has a race)
      or mkstemp (which we no longer bother with).
      * src/callproc.c (create_temp_file):
      * src/filelock.c (create_lock_file):
      Assume mkostemp, since it's now provided by Gnulib.
      
      Fixes: debbugs:15015
      e0fdb694
  21. 12 Jul, 2013 1 commit
  22. 09 Jul, 2013 2 commits
    • Paul Eggert's avatar
      Port recent close-on-exec changes to Cygwin. · 7b154def
      Paul Eggert authored
      * lib/binary-io.c, lib/binary-io.h: New files.
      Merge from gnulib, incorporating:
      2013-07-09 accept4, dup3, pipe2: port to Cygwin
      * lib/pipe2.c: Update from gnulib, as part of this merge.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      
      Fixes: debbugs:14821
      7b154def
    • Paul Eggert's avatar
      Handle errno and exit status a bit more carefully. · 4ebbdd67
      Paul Eggert authored
      * lib/ignore-value.h: Remove this gnulib-imported file.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * admin/merge-gnulib (GNULIB_MODULES): Remove ignore-value.
      * src/callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
      number into an exit status.  Instead, use EXIT_CANCELED.
      (child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
      * src/callproc.c (relocate_fd):
      * src/emacs.c (close_output_streams, main):
      * src/process.c (create_process):
      * src/sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
      Use emacs_perror for simplicity.
      * src/callproc.c (relocate_fd, main):
      * src/sysdep.c (sys_subshell):
      Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
      (shut_down_emacs): Use emacs_write, not write.
      * src/emacs.c, src/sysdep.c: Don't include <ignore-value.h>.
      * src/fileio.c (Fcopy_file, e_write):
      * src/nsterm.m (ns_select):
      * src/process.c (send_process):
      * src/sound.c (vox_write):
      Use emacs_write_sig, not emacs_write.
      * src/lisp.h (emacs_write_sig, emacs_perror): New decls.
      * src/process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
      New constants.
      * src/sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
      of write.
      (emacs_full_write): New function.
      (emacs_write): Rewrite to use it.
      (emacswrite_sig, emacs_perror): New functions.
      * src/xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
      4ebbdd67
  23. 07 Jul, 2013 1 commit
    • Paul Eggert's avatar
      Make file descriptors close-on-exec when possible. · 067428c1
      Paul Eggert authored
      This simplifies Emacs a bit, since it no longer needs to worry
      about closing file descriptors by hand in some cases.
      It also fixes some unlikely races.  Not all such races, as
      libraries often open files internally without setting
      close-on-exec, but it's an improvement.
      * admin/merge-gnulib (GNULIB_MODULES): Add fcntl, pipe2.
      (GNULIB_TOOL_FLAGS): Avoid binary-io, close.  Do not avoid fcntl.
      * configure.ac (mkostemp): New function to check for.
      (PTY_OPEN): Pass O_CLOEXEC to posix_openpt.
      * lib/fcntl.c, lib/getdtablesize.c, lib/pipe2.c, m4/fcntl.m4:
      * m4/getdtablesize.m4, m4/pipe2.m4: New files, taken from gnulib.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * nt/gnulib.mk: Remove empty gl_GNULIB_ENABLED_verify section;
      otherwise, gnulib-tool complains given close-on-exec changes.
      * nt/inc/ms-w32.h (pipe): Remove.
      * nt/mingw-cfg.site (ac_cv_func_fcntl, gl_cv_func_fcntl_f_dupfd_cloexec)
      (gl_cv_func_fcntl_f_dupfd_works, ac_cv_func_pipe2): New vars.
      * src/alloc.c (valid_pointer_p) [!WINDOWSNT]:
      * src/callproc.c (Fcall_process) [!MSDOS]:
      * src/emacs.c (main) [!DOS_NT]:
      * src/nsterm.m (ns_term_init):
      * src/process.c (create_process):
      Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
      * src/emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
      * src/filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
      Prefer mkostemp with O_CLOEXEC to mkstemp.
      * src/callproc.c (relocate_fd) [!WINDOWSNT]:
      * src/emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
      No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
      now using pipe2.
      * src/filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
      Make the resulting file descriptor close-on-exec.
      * src/lisp.h, src/lread.c, src/process.c (close_load_descs, close_process_descs):
      * src/lread.c (load_descriptor_list, load_descriptor_unwind):
      Remove; no longer needed.  All uses removed.
      * src/process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
      (close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
      New functions.
      (socket) [!SOCK_CLOEXEC]: Supply a substitute.
      (Fmake_network_process, Fnetwork_interface_list):
      (Fnetwork_interface_info, server_accept_connection):
      Make newly-created socket close-on-exec.
      * src/sysdep.c (emacs_open, emacs_fopen):
      Make new-created descriptor close-on-exec.
      * src/w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
      * src/w32.c, src/w32.h (pipe2): Rename from 'pipe', with new flags arg.
      
      Fixes: debbugs:14803
      067428c1
  24. 06 Jul, 2013 2 commits
  25. 05 Jul, 2013 2 commits
  26. 29 Jun, 2013 2 commits
  27. 19 Jun, 2013 1 commit