Now on revision 104698. ------------------------------------------------------------ revno: 104698 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2011-06-24 14:13:35 +0200 message: lisp/progmodes/verilog-mode.el (verilog-mode): Fix test for bound variable. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-23 17:08:15 +0000 +++ lisp/ChangeLog 2011-06-24 12:13:35 +0000 @@ -1,3 +1,7 @@ +2011-06-24 Juanma Barranquero + + * progmodes/verilog-mode.el (verilog-mode): Fix test for bound variable. + 2011-06-23 Richard Stallman * mail/rmail.el: Going to grep hit in Rmail buffer finds the message. === modified file 'lisp/progmodes/verilog-mode.el' --- lisp/progmodes/verilog-mode.el 2011-05-23 17:57:17 +0000 +++ lisp/progmodes/verilog-mode.el 2011-06-24 12:13:35 +0000 @@ -3110,7 +3110,7 @@ #'verilog-indent-line-relative) (setq comment-indent-function 'verilog-comment-indent) (set (make-local-variable 'parse-sexp-ignore-comments) nil) - + (set (make-local-variable 'comment-start) "// ") (set (make-local-variable 'comment-end) "") (set (make-local-variable 'comment-start-skip) "/\\*+ *\\|// *") @@ -3157,7 +3157,7 @@ (set (make-local-variable 'imenu-generic-expression) verilog-imenu-generic-expression) ;; Tell which-func-modes that imenu knows about verilog - (when (boundp 'which-function-modes) + (when (boundp 'which-func-modes) (add-to-list 'which-func-modes 'verilog-mode)) ;; hideshow support (when (boundp 'hs-special-modes-alist) ------------------------------------------------------------ revno: 104697 committer: Ted Zlatanov branch nick: quickfixes timestamp: Fri 2011-06-24 05:29:19 -0500 message: * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-06-23 07:37:31 +0000 +++ src/ChangeLog 2011-06-24 10:29:19 +0000 @@ -1,3 +1,8 @@ +2011-06-24 Teodor Zlatanov + + * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from + character.h. + 2011-06-23 Paul Eggert Integer and buffer overflow fixes (Bug#8873). === modified file 'src/gnutls.c' --- src/gnutls.c 2011-05-30 08:03:15 +0000 +++ src/gnutls.c 2011-06-24 10:29:19 +0000 @@ -22,6 +22,7 @@ #include "lisp.h" #include "process.h" +#include "character.h" #ifdef HAVE_GNUTLS #include @@ -1101,72 +1102,36 @@ { gnutls_global_initialized = 0; - Qgnutls_dll = intern_c_string ("gnutls"); - staticpro (&Qgnutls_dll); - - Qgnutls_log_level = intern_c_string ("gnutls-log-level"); - staticpro (&Qgnutls_log_level); - - Qgnutls_code = intern_c_string ("gnutls-code"); - staticpro (&Qgnutls_code); - - Qgnutls_anon = intern_c_string ("gnutls-anon"); - staticpro (&Qgnutls_anon); - - Qgnutls_x509pki = intern_c_string ("gnutls-x509pki"); - staticpro (&Qgnutls_x509pki); - - Qgnutls_bootprop_hostname = intern_c_string (":hostname"); - staticpro (&Qgnutls_bootprop_hostname); - - Qgnutls_bootprop_priority = intern_c_string (":priority"); - staticpro (&Qgnutls_bootprop_priority); - - Qgnutls_bootprop_trustfiles = intern_c_string (":trustfiles"); - staticpro (&Qgnutls_bootprop_trustfiles); - - Qgnutls_bootprop_keylist = intern_c_string (":keylist"); - staticpro (&Qgnutls_bootprop_keylist); - - Qgnutls_bootprop_crlfiles = intern_c_string (":crlfiles"); - staticpro (&Qgnutls_bootprop_crlfiles); - - Qgnutls_bootprop_callbacks = intern_c_string (":callbacks"); - staticpro (&Qgnutls_bootprop_callbacks); - - Qgnutls_bootprop_callbacks_verify = intern_c_string ("verify"); - staticpro (&Qgnutls_bootprop_callbacks_verify); - - Qgnutls_bootprop_loglevel = intern_c_string (":loglevel"); - staticpro (&Qgnutls_bootprop_loglevel); - - Qgnutls_bootprop_verify_flags = intern_c_string (":verify-flags"); - staticpro (&Qgnutls_bootprop_verify_flags); - - Qgnutls_bootprop_verify_hostname_error = intern_c_string (":verify-error"); - staticpro (&Qgnutls_bootprop_verify_error); - - Qgnutls_bootprop_verify_hostname_error = intern_c_string (":verify-hostname-error"); - staticpro (&Qgnutls_bootprop_verify_hostname_error); - - Qgnutls_e_interrupted = intern_c_string ("gnutls-e-interrupted"); - staticpro (&Qgnutls_e_interrupted); + DEFSYM(Qgnutls_dll, "gnutls"); + DEFSYM(Qgnutls_log_level, "gnutls-log-level"); + DEFSYM(Qgnutls_code, "gnutls-code"); + DEFSYM(Qgnutls_anon, "gnutls-anon"); + DEFSYM(Qgnutls_x509pki, "gnutls-x509pki"); + DEFSYM(Qgnutls_bootprop_hostname, ":hostname"); + DEFSYM(Qgnutls_bootprop_priority, ":priority"); + DEFSYM(Qgnutls_bootprop_trustfiles, ":trustfiles"); + DEFSYM(Qgnutls_bootprop_keylist, ":keylist"); + DEFSYM(Qgnutls_bootprop_crlfiles, ":crlfiles"); + DEFSYM(Qgnutls_bootprop_callbacks, ":callbacks"); + DEFSYM(Qgnutls_bootprop_callbacks_verify, "verify"); + DEFSYM(Qgnutls_bootprop_loglevel, ":loglevel"); + DEFSYM(Qgnutls_bootprop_verify_flags, ":verify-flags"); + DEFSYM(Qgnutls_bootprop_verify_hostname_error, ":verify-error"); + DEFSYM(Qgnutls_bootprop_verify_hostname_error, ":verify-hostname-error"); + + DEFSYM(Qgnutls_e_interrupted, "gnutls-e-interrupted"); Fput (Qgnutls_e_interrupted, Qgnutls_code, make_number (GNUTLS_E_INTERRUPTED)); - Qgnutls_e_again = intern_c_string ("gnutls-e-again"); - staticpro (&Qgnutls_e_again); + DEFSYM(Qgnutls_e_again, "gnutls-e-again"); Fput (Qgnutls_e_again, Qgnutls_code, make_number (GNUTLS_E_AGAIN)); - Qgnutls_e_invalid_session = intern_c_string ("gnutls-e-invalid-session"); - staticpro (&Qgnutls_e_invalid_session); + DEFSYM(Qgnutls_e_invalid_session, "gnutls-e-invalid-session"); Fput (Qgnutls_e_invalid_session, Qgnutls_code, make_number (GNUTLS_E_INVALID_SESSION)); - Qgnutls_e_not_ready_for_handshake = - intern_c_string ("gnutls-e-not-ready-for-handshake"); - staticpro (&Qgnutls_e_not_ready_for_handshake); + DEFSYM(Qgnutls_e_not_ready_for_handshake, "gnutls-e-not-ready-for-handshake"); Fput (Qgnutls_e_not_ready_for_handshake, Qgnutls_code, make_number (GNUTLS_E_APPLICATION_ERROR_MIN)); ------------------------------------------------------------ revno: 104696 committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2011-06-23 23:17:26 +0000 message: auth-source.el (auth-source-netrc-cache): Move forward. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-06-23 00:00:38 +0000 +++ lisp/gnus/ChangeLog 2011-06-23 23:17:26 +0000 @@ -1,3 +1,7 @@ +2011-06-23 Katsumi Yamaoka + + * auth-source.el (auth-source-netrc-cache): Move forward. + 2011-06-22 Lars Magne Ingebrigtsen * auth-source.el (auth-source-netrc-create): Don't query the bits that === modified file 'lisp/gnus/auth-source.el' --- lisp/gnus/auth-source.el 2011-06-22 14:48:31 +0000 +++ lisp/gnus/auth-source.el 2011-06-23 23:17:26 +0000 @@ -705,6 +705,8 @@ (equal collection value) (member value collection))) +(defvar auth-source-netrc-cache nil) + (defun auth-source-forget-all-cached () "Forget all cached auth-source data." (interactive) @@ -816,8 +818,6 @@ ;;; Backend specific parsing: netrc/authinfo backend -(defvar auth-source-netrc-cache nil) - ;;; (auth-source-netrc-parse "~/.authinfo.gpg") (defun* auth-source-netrc-parse (&rest spec ------------------------------------------------------------ revno: 104695 committer: Richard Stallman branch nick: trunk timestamp: Thu 2011-06-23 13:08:15 -0400 message: Going to grep hit in Rmail buffer finds the message. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-23 17:03:59 +0000 +++ lisp/ChangeLog 2011-06-23 17:08:15 +0000 @@ -1,3 +1,10 @@ +2011-06-23 Richard Stallman + + * mail/rmail.el: Going to grep hit in Rmail buffer finds the message. + (rmail-variables): Set next-error-move-function. + (rmail-what-message): Take argument POS. + (rmail-next-error-move): New function. + 2011-06-23 Stefan Monnier * emacs-lisp/smie.el (smie-bnf->prec2): Give more understandable error === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2011-06-23 17:03:59 +0000 +++ lisp/mail/rmail.el 2011-06-23 17:08:15 +0000 @@ -1444,7 +1444,8 @@ (make-local-variable 'file-precious-flag) (setq file-precious-flag t) (make-local-variable 'desktop-save-buffer) - (setq desktop-save-buffer t)) + (setq desktop-save-buffer t) + (setq next-error-move-function 'rmail-next-error-move)) ;; Handle M-x revert-buffer done in an rmail-mode buffer. (defun rmail-revert (arg noconfirm) @@ -3019,15 +3020,73 @@ (rmail-maybe-set-message-counters) (rmail-show-message rmail-total-messages)) -(defun rmail-what-message () - "For debugging Rmail: find the message number that point is in." +(defun rmail-next-error-move (msg-pos bad-marker) + "Move to an error locus (probably grep hit) in an Rmail buffer. +MSG-POS is a marker pointing at the error message in the grep buffer. +BAD-MARKER is a marker that ought to point at where to move to, +but probably is garbage." + (let* ((message (car (get-text-property msg-pos 'message (marker-buffer msg-pos)))) + (column (car message)) + (linenum (cadr message)) + pos + msgnum msgbeg msgend + header-field + line-number-within) + + ;; Look at the whole Rmail file. + (rmail-swap-buffers-maybe) + + (save-restriction + (widen) + (save-excursion + ;; Find the line that the error message points at. + (goto-char (point-min)) + (forward-line linenum) + (setq pos (point)) + + ;; Find which message that's in, + ;; and the limits of that message. + (setq msgnum (rmail-what-message pos)) + (setq msgbeg (rmail-msgbeg msgnum)) + (setq msgend (rmail-msgend msgnum)) + + ;; Find which header this locus is in, + ;; or if it's in the message body, + ;; and the line-based position within that. + (goto-char msgbeg) + (let ((header-end msgend)) + (if (search-forward "\n\n" nil t) + (setq header-end (point))) + (if (>= pos header-end) + (setq line-number-within + (count-lines header-end pos)) + (goto-char pos) + (unless (looking-at "^[^ \t]") + (re-search-backward "^[^ \t]")) + (looking-at "[^:\n]*[:\n]") + (setq header-field (match-string 0) + line-number-within (count-lines (point) pos)))))) + + ;; Display the right message. + (rmail-show-message msgnum) + + ;; Move to the right position within the displayed message. + (if header-field + (re-search-forward (concat "^" (regexp-quote header-field)) nil t) + (search-forward "\n\n" nil t)) + (forward-line line-number-within) + (forward-char column))) + +(defun rmail-what-message (&optional pos) + "Return message number POS (or point) is in." (let* ((high rmail-total-messages) (mid (/ high 2)) (low 1) - (where (with-current-buffer (if (rmail-buffers-swapped-p) - rmail-view-buffer - (current-buffer)) - (point)))) + (where (or pos + (with-current-buffer (if (rmail-buffers-swapped-p) + rmail-view-buffer + (current-buffer)) + (point))))) (while (> (- high low) 1) (if (>= where (rmail-msgbeg mid)) (setq low mid) ------------------------------------------------------------ revno: 104694 committer: Richard Stallman branch nick: trunk timestamp: Thu 2011-06-23 13:03:59 -0400 message: Work with changes in mail-bury. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-23 16:55:59 +0000 +++ lisp/ChangeLog 2011-06-23 17:03:59 +0000 @@ -7,6 +7,9 @@ * mail/rmail.el (rmail-retry-ignored-headers): Add message-id. (rmail-show-message-1): Preserve buffer modified flag. + (rmail-start-mail): Don't specify use of rmail-mail-return; + that's done by mail-bury now. + (rmail-mail-return): Handle arg NEWBUF. 2011-06-23 Michael Albinus === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2011-06-23 16:38:40 +0000 +++ lisp/mail/rmail.el 2011-06-23 17:03:59 +0000 @@ -3458,15 +3458,15 @@ (if (stringp subject) (setq subject (rfc2047-decode-string subject))) (prog1 (compose-mail to subject other-headers noerase - switch-function yank-action sendactions - '(rmail-mail-return)) + switch-function yank-action sendactions) (if (eq switch-function 'switch-to-buffer-other-frame) ;; This is not a standard frame parameter; nothing except ;; sendmail.el looks at it. (modify-frame-parameters (selected-frame) '((mail-dedicated-frame . t))))))) -(defun rmail-mail-return () +(defun rmail-mail-return (&optional newbuf) + "NEWBUF is a buffer to switch to." (cond ;; If there is only one visible frame with no special handling, ;; consider deleting the mail window to return to Rmail. @@ -3491,7 +3491,8 @@ (if rmail-flag ;; If the Rmail buffer has a summary, show that. (if summary-buffer (switch-to-buffer summary-buffer) - (delete-window))))) + (delete-window)) + (switch-to-buffer newbuf)))) ;; If the frame was probably made for this buffer, the user ;; probably wants to delete it now. ((display-multi-frame-p) ------------------------------------------------------------ revno: 104693 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2011-06-23 12:55:59 -0400 message: * lisp/emacs-lisp/smie.el (smie-bnf->prec2): Give more understandable error messages for adjacent non-terminals. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-23 16:38:40 +0000 +++ lisp/ChangeLog 2011-06-23 16:55:59 +0000 @@ -1,3 +1,8 @@ +2011-06-23 Stefan Monnier + + * emacs-lisp/smie.el (smie-bnf->prec2): Give more understandable error + messages for adjacent non-terminals. + 2011-06-23 Richard Stallman * mail/rmail.el (rmail-retry-ignored-headers): Add message-id. === modified file 'lisp/emacs-lisp/smie.el' --- lisp/emacs-lisp/smie.el 2011-06-15 18:36:00 +0000 +++ lisp/emacs-lisp/smie.el 2011-06-23 16:55:59 +0000 @@ -229,14 +229,18 @@ ;; the trouble, and it lets the writer of the BNF ;; be a bit more sloppy by skipping uninteresting base ;; cases which are terminals but not OPs. - (assert (not (member (cadr rhs) nts))) + (when (member (cadr rhs) nts) + (error "Adjacent non-terminals: %s %s" + (car rhs) (cadr rhs))) (pushnew (cadr rhs) first-ops))) (let ((shr (reverse rhs))) (if (not (member (car shr) nts)) (pushnew (car shr) last-ops) (pushnew (car shr) last-nts) (when (consp (cdr shr)) - (assert (not (member (cadr shr) nts))) + (when (member (cadr rhs) nts) + (error "Adjacent non-terminals: %s %s" + (cadr rhs) (car rhs))) (pushnew (cadr shr) last-ops))))) (push (cons nt first-ops) first-ops-table) (push (cons nt last-ops) last-ops-table) ------------------------------------------------------------ revno: 104692 committer: Richard Stallman branch nick: trunk timestamp: Thu 2011-06-23 12:38:40 -0400 message: Marking message as "seen" should not mark buffer as changed. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-23 16:33:05 +0000 +++ lisp/ChangeLog 2011-06-23 16:38:40 +0000 @@ -1,6 +1,7 @@ 2011-06-23 Richard Stallman * mail/rmail.el (rmail-retry-ignored-headers): Add message-id. + (rmail-show-message-1): Preserve buffer modified flag. 2011-06-23 Michael Albinus === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2011-06-23 16:33:05 +0000 +++ lisp/mail/rmail.el 2011-06-23 16:38:40 +0000 @@ -2669,8 +2669,11 @@ (t (setq rmail-current-message msg))) (with-current-buffer rmail-buffer (setq header-style rmail-header-style) - ;; Mark the message as seen - (rmail-set-attribute rmail-unseen-attr-index nil) + ;; Mark the message as seen, but preserve buffer modified flag. + (let ((modiff (buffer-modified-p))) + (rmail-set-attribute rmail-unseen-attr-index nil) + (unless modiff + (set-buffer-modified-p nil))) ;; bracket the message in the mail ;; buffer and determine the coding system the transfer encoding. (rmail-swap-buffers-maybe) ------------------------------------------------------------ revno: 104691 committer: Richard Stallman branch nick: trunk timestamp: Thu 2011-06-23 12:33:05 -0400 message: Don't reuse previous Message-id when resending. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-23 13:03:04 +0000 +++ lisp/ChangeLog 2011-06-23 16:33:05 +0000 @@ -1,3 +1,7 @@ +2011-06-23 Richard Stallman + + * mail/rmail.el (rmail-retry-ignored-headers): Add message-id. + 2011-06-23 Michael Albinus * net/tramp-sh.el (tramp-method-out-of-band-p): Check, whether === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2011-06-23 08:58:45 +0000 +++ lisp/mail/rmail.el 2011-06-23 16:33:05 +0000 @@ -349,7 +349,7 @@ :group 'rmail-headers) ;;;###autoload -(defcustom rmail-retry-ignored-headers (purecopy "^x-authentication-warning:\\|^x-detected-operating-system:\\|^x-spam[-a-z]*:\\|content-type:\\|content-transfer-encoding:\\|mime-version:") +(defcustom rmail-retry-ignored-headers (purecopy "^x-authentication-warning:\\|^x-detected-operating-system:\\|^x-spam[-a-z]*:\\|content-type:\\|content-transfer-encoding:\\|mime-version:\\|message-id:") "Headers that should be stripped when retrying a failed message." :type '(choice regexp (const nil :tag "None")) :group 'rmail-headers ------------------------------------------------------------ revno: 104690 committer: Michael Albinus branch nick: trunk timestamp: Thu 2011-06-23 15:03:04 +0200 message: * net/tramp-sh.el (tramp-method-out-of-band-p): Check, whether SIZE is a number. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-23 08:58:45 +0000 +++ lisp/ChangeLog 2011-06-23 13:03:04 +0000 @@ -1,3 +1,8 @@ +2011-06-23 Michael Albinus + + * net/tramp-sh.el (tramp-method-out-of-band-p): Check, whether + SIZE is a number. + 2011-06-23 Martin Rudalics * window.el (get-lru-window, get-mru-window) === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2011-06-04 14:11:26 +0000 +++ lisp/net/tramp-sh.el 2011-06-23 13:03:04 +0000 @@ -4661,6 +4661,8 @@ (and ;; It shall be an out-of-band method. (tramp-get-method-parameter (tramp-file-name-method vec) 'tramp-copy-program) + ;; There must be a size, otherwise the file doesn't exist. + (numberp size) ;; Either the file size is large enough, or (in rare cases) there ;; does not exist a remote encoding. (or (null tramp-copy-size-limit) ------------------------------------------------------------ revno: 104689 committer: Glenn Morris branch nick: trunk timestamp: Thu 2011-06-23 06:18:34 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/Makefile.in' --- autogen/Makefile.in 2011-06-21 10:18:39 +0000 +++ autogen/Makefile.in 2011-06-23 10:18:34 +0000 @@ -24,7 +24,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -51,10 +51,10 @@ subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/extensions.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/getloadavg.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gl-comp.m4 \ - $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/c-strtod.m4 \ + $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/filemode.m4 \ + $(top_srcdir)/m4/getloadavg.m4 $(top_srcdir)/m4/getopt.m4 \ + $(top_srcdir)/m4/gl-comp.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/mktime.m4 \ @@ -104,6 +104,7 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ @@ -732,10 +733,10 @@ # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. -BUILT_SOURCES = arg-nonnull.h c++defs.h $(GETOPT_H) inttypes.h \ - $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h \ - stdlib.h sys/stat.h time.h unistd.h warn-on-use.h -EXTRA_DIST = allocator.h $(top_srcdir)/./arg-nonnull.h \ +BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h c++defs.h $(GETOPT_H) \ + inttypes.h $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) \ + stdio.h stdlib.h sys/stat.h time.h unistd.h warn-on-use.h +EXTRA_DIST = alloca.in.h allocator.h $(top_srcdir)/./arg-nonnull.h \ $(top_srcdir)/./c++defs.h careadlinkat.h md5.h sha1.h sha256.h \ sha512.h dosname.h ftoastr.c ftoastr.h filemode.h getloadavg.c \ getopt.c getopt.in.h getopt1.c getopt_int.h ignore-value.h \ @@ -746,12 +747,12 @@ sys_stat.in.h time.in.h time_r.c u64.h unistd.in.h verify.h \ $(top_srcdir)/./warn-on-use.h MOSTLYCLEANDIRS = sys -MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ - c++defs.h c++defs.h-t getopt.h getopt.h-t inttypes.h \ - inttypes.h-t stdarg.h stdarg.h-t stdbool.h stdbool.h-t \ - stddef.h stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t \ - stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h time.h-t \ - unistd.h unistd.h-t warn-on-use.h warn-on-use.h-t +MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \ + arg-nonnull.h-t c++defs.h c++defs.h-t getopt.h getopt.h-t \ + inttypes.h inttypes.h-t stdarg.h stdarg.h-t stdbool.h \ + stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \ + stdio.h-t stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h \ + time.h-t unistd.h unistd.h-t warn-on-use.h warn-on-use.h-t noinst_LIBRARIES = libgnu.a DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src libgnu_a_SOURCES = allocator.c careadlinkat.c md5.c sha1.c sha256.c \ @@ -1052,6 +1053,17 @@ mostlyclean-generic mostlyclean-local pdf pdf-am ps ps-am tags \ uninstall uninstall-am + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +@GL_GENERATE_ALLOCA_H_TRUE@alloca.h: alloca.in.h $(top_builddir)/config.status +@GL_GENERATE_ALLOCA_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_ALLOCA_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@GL_GENERATE_ALLOCA_H_TRUE@ cat $(srcdir)/alloca.in.h; \ +@GL_GENERATE_ALLOCA_H_TRUE@ } > $@-t && \ +@GL_GENERATE_ALLOCA_H_TRUE@ mv -f $@-t $@ +@GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status +@GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@ # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/arg-nonnull.h, except that it has the copyright header cut off. arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h === modified file 'autogen/aclocal.m4' --- autogen/aclocal.m4 2011-06-21 10:18:39 +0000 +++ autogen/aclocal.m4 2011-06-23 10:18:34 +0000 @@ -985,6 +985,7 @@ ]) # _AM_PROG_TAR m4_include([m4/00gnulib.m4]) +m4_include([m4/alloca.m4]) m4_include([m4/c-strtod.m4]) m4_include([m4/extensions.m4]) m4_include([m4/filemode.m4]) === modified file 'autogen/config.in' --- autogen/config.in 2011-06-07 10:18:29 +0000 +++ autogen/config.in 2011-06-23 10:18:34 +0000 @@ -104,7 +104,8 @@ /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM -/* Define to 1 if you have `alloca', as a function or macro. */ +/* Define to 1 if you have 'alloca' after including , a header that + may be supplied by this distribution. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). @@ -1290,6 +1291,12 @@ #undef volatile +/* On AIX 3 this must be included before any other include file. */ +#include +#if ! HAVE_ALLOCA +# error "alloca not available on this machine" +#endif + /* Define AMPERSAND_FULL_NAME if you use the convention that & in the full name stands for the login id. */ /* Turned on June 1996 supposing nobody will mind it. */ @@ -1366,20 +1373,6 @@ #include #include -#ifdef HAVE_ALLOCA_H -# include -#elif defined __GNUC__ -# define alloca __builtin_alloca -#elif defined _AIX -# define alloca __alloca -#else -# include -# ifdef __cplusplus -extern "C" -# endif -void *alloca (size_t); -#endif - #ifndef HAVE_STRCHR #define strchr(a, b) index (a, b) #endif === modified file 'autogen/configure' --- autogen/configure 2011-06-21 10:18:39 +0000 +++ autogen/configure 2011-06-23 10:18:34 +0000 @@ -1070,12 +1070,15 @@ GNULIB_CALLOC_POSIX GNULIB_ATOLL GNULIB__EXIT +GL_GENERATE_ALLOCA_H_FALSE +GL_GENERATE_ALLOCA_H_TRUE +ALLOCA_H +ALLOCA GL_COND_LIBTOOL_FALSE GL_COND_LIBTOOL_TRUE BLESSMAIL_TARGET LIBS_MAIL liblockfile -ALLOCA LIBXML2_LIBS LIBXML2_CFLAGS LIBXSM @@ -6535,6 +6538,7 @@ + # Code from module alloca-opt: # Code from module allocator: # Code from module arg-nonnull: # Code from module c++defs: @@ -13313,201 +13317,6 @@ fi -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_working_alloca_h=yes -else - ac_cv_working_alloca_h=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } -if test $ac_cv_working_alloca_h = yes; then - -$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif - -int -main () -{ -char *p = (char *) alloca (1); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_alloca_works=yes -else - ac_cv_func_alloca_works=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } - -if test $ac_cv_func_alloca_works = yes; then - -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h - -else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. - -ALLOCA=\${LIBOBJDIR}alloca.$ac_objext - -$as_echo "#define C_ALLOCA 1" >>confdefs.h - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then : - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF - - break -fi - - done -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_c_stack_direction=0 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -find_stack_direction () -{ - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} - -int -main () -{ - return find_stack_direction () < 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_stack_direction=1 -else - ac_cv_c_stack_direction=-1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF - - -fi - - -if test x"$ac_cv_func_alloca_works" != xyes; then - as_fn_error "a system implementation of alloca is required " "$LINENO" 5 -fi - # fmod, logb, and frexp are found in -lm on most systems. # On HPUX 9.01, -lm does not contain logb, so check for sqrt. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 @@ -13962,6 +13771,197 @@ LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_ +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if test "${ac_cv_working_alloca_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes +else + ac_cv_working_alloca_h=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then + +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if test "${ac_cv_func_alloca_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +int +main () +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes +else + ac_cv_func_alloca_works=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } + +if test $ac_cv_func_alloca_works = yes; then + +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + + + + + +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + +$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if test "${ac_cv_os_cray+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if test "${ac_cv_c_stack_direction+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction (int *addr, int depth) +{ + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; +} + +int +main (int argc, char **argv) +{ + return find_stack_direction (0, argc + !argv + 20) < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 +else + ac_cv_c_stack_direction=-1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + +fi + @@ -16682,6 +16682,61 @@ gl_source_base='lib' + if test $ac_cv_func_alloca_works = no; then + : + fi + + # Define an additional variable used in the Makefile substitution. + if test $ac_cv_working_alloca_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 +$as_echo_n "checking for alloca as a compiler built-in... " >&6; } +if test "${gl_cv_rpl_alloca+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if defined __GNUC__ || defined _AIX || defined _MSC_VER + Need own alloca +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Need own alloca" >/dev/null 2>&1; then : + gl_cv_rpl_alloca=yes +else + gl_cv_rpl_alloca=no +fi +rm -f conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 +$as_echo "$gl_cv_rpl_alloca" >&6; } + if test $gl_cv_rpl_alloca = yes; then + +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + + ALLOCA_H=alloca.h + else + ALLOCA_H= + fi + else + ALLOCA_H=alloca.h + fi + + if test -n "$ALLOCA_H"; then + GL_GENERATE_ALLOCA_H_TRUE= + GL_GENERATE_ALLOCA_H_FALSE='#' +else + GL_GENERATE_ALLOCA_H_TRUE='#' + GL_GENERATE_ALLOCA_H_FALSE= +fi + + + + : @@ -18798,6 +18853,9 @@ if $condition; then func_gl_gnulib_m4code_dosname fi + if $condition; then + func_gl_gnulib_m4code_verify + fi fi } func_gl_gnulib_m4code_strtoull () @@ -21098,6 +21156,10 @@ as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then + as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.