Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 104058. ------------------------------------------------------------ revno: 104058 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2011-04-30 00:03:19 +0000 message: shr.el (shr-strike-through): New face. (shr-tag-s): Use it to provide support. (shr-tag-s): Remove duplicate definition. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-04-25 04:32:07 +0000 +++ lisp/gnus/ChangeLog 2011-04-30 00:03:19 +0000 @@ -1,3 +1,9 @@ +2011-04-29 Lars Magne Ingebrigtsen + + * shr.el (shr-strike-through): New face. + (shr-tag-s): Use it to provide support. + (shr-tag-s): Remove duplicate definition. + 2011-04-25 Teodor Zlatanov * gnus-registry.el (gnus-registry-ignore-group-p): Don't call === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2011-04-24 22:12:21 +0000 +++ lisp/gnus/shr.el 2011-04-30 00:03:19 +0000 @@ -87,6 +87,10 @@ This is used for cid: URLs, and the function is called with the cid: URL as the argument.") +(defface shr-strike-through '((t (:strike-through t))) + "Font for elements." + :group 'shr) + ;;; Internal variables. (defvar shr-folding-mode nil) @@ -760,6 +764,9 @@ (shr-generic cont) (shr-ensure-newline)) +(defun shr-tag-s (cont) + (shr-fontize-cont cont 'shr-strike-through)) + (defun shr-tag-b (cont) (shr-fontize-cont cont 'bold)) @@ -775,9 +782,6 @@ (defun shr-tag-u (cont) (shr-fontize-cont cont 'underline)) -(defun shr-tag-s (cont) - (shr-fontize-cont cont 'strike-through)) - (defun shr-parse-style (style) (when style (save-match-data ------------------------------------------------------------ revno: 104057 fixes bug(s): http://debbugs.gnu.org/8528 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2011-04-29 22:47:29 +0300 message: Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files (bug#8528). src/fileio.c (Finsert_file_contents): Don't limit file size to 1/4 of MOST_POSITIVE_FIXNUM. src/coding.c (coding_alloc_by_realloc): Error out if destination will grow beyond MOST_POSITIVE_FIXNUM. (decode_coding_emacs_mule): Abort if there isn't enough place in charbuf for the composition carryover bytes. Reserve an extra space for up to 2 characters produced in a loop. (decode_coding_iso_2022): Abort if there isn't enough place in charbuf for the composition carryover bytes. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-29 19:34:06 +0000 +++ src/ChangeLog 2011-04-29 19:47:29 +0000 @@ -1,4 +1,18 @@ -2011-04-29 Eli Zaretskii +2011-04-21 Eli Zaretskii + + Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files. + * fileio.c (Finsert_file_contents): Don't limit file size to 1/4 + of MOST_POSITIVE_FIXNUM. (Bug#8528) + + * coding.c (coding_alloc_by_realloc): Error out if destination + will grow beyond MOST_POSITIVE_FIXNUM. + (decode_coding_emacs_mule): Abort if there isn't enough place in + charbuf for the composition carryover bytes. Reserve an extra + space for up to 2 characters produced in a loop. + (decode_coding_iso_2022): Abort if there isn't enough place in + charbuf for the composition carryover bytes. + +2011-04-21 Eli Zaretskii * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of aborting when %lld or %lll format is passed. === modified file 'src/coding.c' --- src/coding.c 2011-04-27 18:15:29 +0000 +++ src/coding.c 2011-04-29 19:47:29 +0000 @@ -1071,6 +1071,8 @@ static void coding_alloc_by_realloc (struct coding_system *coding, EMACS_INT bytes) { + if (coding->dst_bytes >= MOST_POSITIVE_FIXNUM - bytes) + error ("Maximum size of buffer or string exceeded"); coding->destination = (unsigned char *) xrealloc (coding->destination, coding->dst_bytes + bytes); coding->dst_bytes += bytes; @@ -2333,7 +2335,9 @@ /* We may produce two annotations (charset and composition) in one loop and one more charset annotation at the end. */ int *charbuf_end - = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3); + = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3) + /* We can produce up to 2 characters in a loop. */ + - 1; EMACS_INT consumed_chars = 0, consumed_chars_base; int multibytep = coding->src_multibyte; EMACS_INT char_offset = coding->produced_char; @@ -2348,6 +2352,8 @@ { int i; + if (charbuf_end - charbuf < cmp_status->length) + abort (); for (i = 0; i < cmp_status->length; i++) *charbuf++ = cmp_status->carryover[i]; coding->annotated = 1; @@ -3479,6 +3485,8 @@ if (cmp_status->state != COMPOSING_NO) { + if (charbuf_end - charbuf < cmp_status->length) + abort (); for (i = 0; i < cmp_status->length; i++) *charbuf++ = cmp_status->carryover[i]; coding->annotated = 1; === modified file 'src/fileio.c' --- src/fileio.c 2011-04-14 20:20:17 +0000 +++ src/fileio.c 2011-04-29 19:47:29 +0000 @@ -3245,15 +3245,10 @@ record_unwind_protect (close_file_unwind, make_number (fd)); - /* Arithmetic overflow can occur if an Emacs integer cannot represent the - file size, or if the calculations below overflow. The calculations below - double the file size twice, so check that it can be multiplied by 4 - safely. - - Also check whether the size is negative, which can happen on a platform - that allows file sizes greater than the maximum off_t value. */ + /* Check whether the size is too large or negative, which can happen on a + platform that allows file sizes greater than the maximum off_t value. */ if (! not_regular - && ! (0 <= st.st_size && st.st_size <= MOST_POSITIVE_FIXNUM / 4)) + && ! (0 <= st.st_size && st.st_size <= MOST_POSITIVE_FIXNUM)) error ("Maximum buffer size exceeded"); /* Prevent redisplay optimizations. */ ------------------------------------------------------------ revno: 104056 fixes bug(s): http://debbugs.gnu.org/8545 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2011-04-29 22:34:06 +0300 message: Don't abort in doprnt when passed unsupported %ll modifier. src/doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of aborting when %lld or %lll format is passed. [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when %llo or %llx format is passed. (Bug#8545) diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-29 18:03:00 +0000 +++ src/ChangeLog 2011-04-29 19:34:06 +0000 @@ -1,5 +1,10 @@ 2011-04-29 Eli Zaretskii + * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of + aborting when %lld or %lll format is passed. + [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when + %llo or %llx format is passed. (Bug#8545) + * window.c (window_scroll_line_based): Use a marker instead of simple variables to record original value of point. (Bug#7952) === modified file 'src/doprnt.c' --- src/doprnt.c 2011-04-29 11:01:11 +0000 +++ src/doprnt.c 2011-04-29 19:34:06 +0000 @@ -269,7 +269,7 @@ long long ll = va_arg (ap, long long); sprintf (sprintf_buffer, fmtcpy, ll); #else - abort (); + error ("Invalid format operation %%ll%c", fmt[-1]); #endif } else if (long_flag) @@ -299,7 +299,7 @@ unsigned long long ull = va_arg (ap, unsigned long long); sprintf (sprintf_buffer, fmtcpy, ull); #else - abort (); + error ("Invalid format operation %%ll%c", fmt[-1]); #endif } else if (long_flag) ------------------------------------------------------------ revno: 104055 fixes bug(s): http://debbugs.gnu.org/7952 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2011-04-29 21:03:00 +0300 message: Fix bug #7952 with vertical motion in Grep buffers. src/window.c (window_scroll_line_based): Use a marker instead of simple variables to record original value of point. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-29 11:01:11 +0000 +++ src/ChangeLog 2011-04-29 18:03:00 +0000 @@ -1,5 +1,8 @@ 2011-04-29 Eli Zaretskii + * window.c (window_scroll_line_based): Use a marker instead of + simple variables to record original value of point. (Bug#7952) + * doprnt.c (doprnt): Fix the case where a multibyte sequence produced by %s or %c overflows available buffer space. (Bug#8545) === modified file 'src/window.c' --- src/window.c 2011-04-25 19:40:22 +0000 +++ src/window.c 2011-04-29 18:03:00 +0000 @@ -5076,7 +5076,12 @@ window_scroll_line_based (Lisp_Object window, int n, int whole, int noerror) { register struct window *w = XWINDOW (window); - register EMACS_INT opoint = PT, opoint_byte = PT_BYTE; + /* Fvertical_motion enters redisplay, which can trigger + fontification, which in turn can modify buffer text (e.g., if the + fontification functions replace escape sequences with faces, as + in `grep-mode-font-lock-keywords'). So we use a marker to record + the old point position, to prevent crashes in SET_PT_BOTH. */ + Lisp_Object opoint_marker = Fpoint_marker (); register EMACS_INT pos, pos_byte; register int ht = window_internal_height (w); register Lisp_Object tem; @@ -5126,7 +5131,8 @@ pos = PT; pos_byte = PT_BYTE; bolp = Fbolp (); - SET_PT_BOTH (opoint, opoint_byte); + SET_PT_BOTH (marker_position (opoint_marker), + marker_byte_position (opoint_marker)); if (lose) { @@ -5177,8 +5183,9 @@ else top_margin = pos; - if (top_margin <= opoint) - SET_PT_BOTH (opoint, opoint_byte); + if (top_margin <= marker_position (opoint_marker)) + SET_PT_BOTH (marker_position (opoint_marker), + marker_byte_position (opoint_marker)); else if (!NILP (Vscroll_preserve_screen_position)) { SET_PT_BOTH (pos, pos_byte); @@ -5200,8 +5207,9 @@ else bottom_margin = PT + 1; - if (bottom_margin > opoint) - SET_PT_BOTH (opoint, opoint_byte); + if (bottom_margin > marker_position (opoint_marker)) + SET_PT_BOTH (marker_position (opoint_marker), + marker_byte_position (opoint_marker)); else { if (!NILP (Vscroll_preserve_screen_position)) ------------------------------------------------------------ revno: 104054 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2011-04-29 14:34:28 -0300 message: * lisp/progmodes/pascal.el: Use lexical binding. (pascal-mode-map): Remove author preferences. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-29 17:24:09 +0000 +++ lisp/ChangeLog 2011-04-29 17:34:28 +0000 @@ -1,5 +1,8 @@ 2011-04-29 Stefan Monnier + * progmodes/pascal.el: Use lexical binding. + (pascal-mode-map): Remove author preferences. + * pcomplete.el (pcomplete-std-complete): Don't abuse completion-at-point. === modified file 'lisp/progmodes/pascal.el' --- lisp/progmodes/pascal.el 2011-01-26 08:36:39 +0000 +++ lisp/progmodes/pascal.el 2011-04-29 17:34:28 +0000 @@ -1,4 +1,4 @@ -;;; pascal.el --- major mode for editing pascal source in Emacs +;;; pascal.el --- major mode for editing pascal source in Emacs -*- lexical-binding: t -*- ;; Copyright (C) 1993-2011 Free Software Foundation, Inc. @@ -76,8 +76,9 @@ (define-key map ":" 'electric-pascal-colon) (define-key map "=" 'electric-pascal-equal) (define-key map "#" 'electric-pascal-hash) - (define-key map "\r" 'electric-pascal-terminate-line) - (define-key map "\t" 'electric-pascal-tab) + ;; These are user preferences, so not to set by default. + ;;(define-key map "\r" 'electric-pascal-terminate-line) + ;;(define-key map "\t" 'electric-pascal-tab) (define-key map "\M-\t" 'pascal-complete-word) (define-key map "\M-?" 'pascal-show-completions) (define-key map "\177" 'backward-delete-char-untabify) ------------------------------------------------------------ revno: 104053 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2011-04-29 14:33:30 -0300 message: * pcomplete.el (pcomplete-std-complete): Fix last minute typo. diff: === modified file 'lisp/pcomplete.el' --- lisp/pcomplete.el 2011-04-29 17:24:09 +0000 +++ lisp/pcomplete.el 2011-04-29 17:33:30 +0000 @@ -545,7 +545,7 @@ ;; variables to parse args, so there's no point autoloading it. ;; ;;;###autoload (defun pcomplete-std-complete () - (let ((data pcomplete-completions-at-point)) + (let ((data (pcomplete-completions-at-point))) (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) (plist-get :predicate (nthcdr 3 data))))) ------------------------------------------------------------ revno: 104052 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2011-04-29 14:24:09 -0300 message: * lisp/pcomplete.el (pcomplete-std-complete): Don't abuse completion-at-point. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-28 23:08:37 +0000 +++ lisp/ChangeLog 2011-04-29 17:24:09 +0000 @@ -1,3 +1,8 @@ +2011-04-29 Stefan Monnier + + * pcomplete.el (pcomplete-std-complete): Don't abuse + completion-at-point. + 2011-04-28 Juanma Barranquero * calc/calccomp.el (math-comp-to-string-flat-term): Simplify by === modified file 'lisp/pcomplete.el' --- lisp/pcomplete.el 2011-04-28 19:39:11 +0000 +++ lisp/pcomplete.el 2011-04-29 17:24:09 +0000 @@ -545,8 +545,9 @@ ;; variables to parse args, so there's no point autoloading it. ;; ;;;###autoload (defun pcomplete-std-complete () - (let ((completion-at-point-functions '(pcomplete-completions-at-point))) - (completion-at-point))) + (let ((data pcomplete-completions-at-point)) + (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) + (plist-get :predicate (nthcdr 3 data))))) ;;; Pcomplete's native UI. ------------------------------------------------------------ revno: 104051 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2011-04-29 12:23:59 -0300 message: * lisp/erc/erc-pcomplete.el (erc-pcomplete-nick-postfix): Remove the " " in the suffix that's added by pcomplete-termination-string anyway. (pcomplete-erc-setup): Remove pcomplete-suffix-list setting now that it's not needed any more. diff: === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2011-04-26 13:50:09 +0000 +++ lisp/erc/ChangeLog 2011-04-29 15:23:59 +0000 @@ -1,3 +1,10 @@ +2011-04-29 Stefan Monnier + + * erc-pcomplete.el (erc-pcomplete-nick-postfix): Remove the " " in the + suffix that's added by pcomplete-termination-string anyway. + (pcomplete-erc-setup): Remove pcomplete-suffix-list setting now that + it's not needed any more. + 2011-04-26 Stefan Monnier * erc.el (erc-mode-map): Use completion-at-point. === modified file 'lisp/erc/erc-pcomplete.el' --- lisp/erc/erc-pcomplete.el 2011-04-26 13:50:09 +0000 +++ lisp/erc/erc-pcomplete.el 2011-04-29 15:23:59 +0000 @@ -48,7 +48,7 @@ "Programmable completion for ERC" :group 'erc) -(defcustom erc-pcomplete-nick-postfix ": " +(defcustom erc-pcomplete-nick-postfix ":" "*When `pcomplete' is used in the first word after the prompt, add this string to nicks completed." :group 'erc-pcomplete @@ -93,8 +93,6 @@ t) (set (make-local-variable 'pcomplete-use-paring) nil) - (set (make-local-variable 'pcomplete-suffix-list) - '(? ?:)) (set (make-local-variable 'pcomplete-parse-arguments-function) 'pcomplete-parse-erc-arguments) (set (make-local-variable 'pcomplete-command-completion-function) ------------------------------------------------------------ revno: 104050 fixes bug(s): http://debbugs.gnu.org/8545 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2011-04-29 14:01:11 +0300 message: Fix doprnt when buffer is too small for multibyte sequences. src/doprnt.c (doprnt): Fix the case where a multibyte sequence produced by %s or %c overflows available buffer space. (Bug#8545) diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-28 20:11:17 +0000 +++ src/ChangeLog 2011-04-29 11:01:11 +0000 @@ -1,3 +1,8 @@ +2011-04-29 Eli Zaretskii + + * doprnt.c (doprnt): Fix the case where a multibyte sequence + produced by %s or %c overflows available buffer space. (Bug#8545) + 2011-04-28 Paul Eggert * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545). === modified file 'src/doprnt.c' --- src/doprnt.c 2011-04-28 22:02:15 +0000 +++ src/doprnt.c 2011-04-29 11:01:11 +0000 @@ -367,9 +367,21 @@ /* Truncate the string at character boundary. */ tem = bufsize; while (!CHAR_HEAD_P (string[tem - 1])) tem--; - memcpy (bufptr, string, tem); - /* We must calculate WIDTH again. */ - width = strwidth (bufptr, tem); + /* If the multibyte sequence of this character is + too long for the space we have left in the + buffer, truncate before it. */ + if (tem > 0 + && BYTES_BY_CHAR_HEAD (string[tem - 1]) > bufsize) + tem--; + if (tem > 0) + memcpy (bufptr, string, tem); + bufptr[tem] = 0; + /* Trigger exit from the loop, but make sure we + return to the caller a value which will indicate + that the buffer was too small. */ + bufptr += bufsize; + bufsize = 0; + continue; } else memcpy (bufptr, string, tem); === modified file 'src/eval.c' --- src/eval.c 2011-04-27 18:15:29 +0000 +++ src/eval.c 2011-04-29 11:01:11 +0000 @@ -1994,7 +1994,7 @@ { char buf[4000]; size_t size = sizeof buf; - size_t size_max = min (MOST_POSITIVE_FIXNUM, SIZE_MAX); + size_t size_max = min (MOST_POSITIVE_FIXNUM, SIZE_MAX); size_t mlen = strlen (m); char *buffer = buf; size_t used; ------------------------------------------------------------ revno: 104049 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2011-04-29 01:08:37 +0200 message: lisp/calc/calccomp.el (math-comp-to-string-flat-term): Simplify. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-28 22:58:40 +0000 +++ lisp/ChangeLog 2011-04-28 23:08:37 +0000 @@ -1,5 +1,8 @@ 2011-04-28 Juanma Barranquero + * calc/calccomp.el (math-comp-to-string-flat-term): Simplify by + removing code that has been dead since 1991 or so. + * startup.el (command-line): When warning about "_emacs", use a delayed warning to allow the user to filter it out. === modified file 'lisp/calc/calccomp.el' --- lisp/calc/calccomp.el 2011-01-25 04:08:28 +0000 +++ lisp/calc/calccomp.el 2011-04-28 23:08:37 +0000 @@ -1282,12 +1282,7 @@ (let ((prefix "") mrg wid) (setq mrg (aref math-comp-buf-margin i)) (if (> mrg 12) ; indenting too far, go back to far left - (let ((j i) (new (if calc-line-numbering 5 1))) - '(while (<= j math-comp-level) - (aset math-comp-buf-margin j - (+ (aref math-comp-buf-margin j) (- new mrg))) - (setq j (1+ j))) - (setq mrg new))) + (setq mrg (if calc-line-numbering 5 1))) (setq wid (+ (length str) math-comp-margin)) (and (> (length str) 0) (= (aref str 0) ? ) (> (length math-comp-buf) 0) ------------------------------------------------------------ revno: 104048 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2011-04-29 00:58:40 +0200 message: lisp/startup.el (command-line): Use delayed warning for "_emacs". diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-28 20:22:51 +0000 +++ lisp/ChangeLog 2011-04-28 22:58:40 +0000 @@ -1,3 +1,8 @@ +2011-04-28 Juanma Barranquero + + * startup.el (command-line): When warning about "_emacs", use a + delayed warning to allow the user to filter it out. + 2011-04-28 Deniz Dogan * net/rcirc.el (rcirc-handler-353): Fix bug for channels which the === modified file 'lisp/startup.el' --- lisp/startup.el 2011-04-05 01:21:52 +0000 +++ lisp/startup.el 2011-04-28 22:58:40 +0000 @@ -1027,10 +1027,9 @@ "~/.emacs") ((directory-files "~" nil "^_emacs\\(\\.elc?\\)?$") ;; Also support _emacs for compatibility, but warn about it. - (display-warning - 'initialization - "`_emacs' init file is deprecated, please use `.emacs'" - :warning) + (push '(initialization + "`_emacs' init file is deprecated, please use `.emacs'") + delayed-warnings-list) "~/_emacs") (t ;; But default to .emacs if _emacs does not exist. "~/.emacs")))) ------------------------------------------------------------ revno: 104047 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2011-04-29 00:48:58 +0200 message: etc/NEWS: Document new "default HOME" warning. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2011-04-28 19:35:20 +0000 +++ etc/ChangeLog 2011-04-28 22:48:58 +0000 @@ -1,6 +1,7 @@ 2011-04-28 Juanma Barranquero * NEWS: Document `delayed-warnings-list' and `delayed-warnings-hook'. + Document new "default HOME" warning. 2011-04-26 Daniel Colascione === modified file 'etc/NEWS' --- etc/NEWS 2011-04-28 19:35:20 +0000 +++ etc/NEWS 2011-04-28 22:48:58 +0000 @@ -62,7 +62,8 @@ ** New command line option `--no-site-lisp' removes site-lisp directories from load-path. -Q now implies this. -** On Windows, Emacs now warns when the obsolete _emacs init file is used. +** On Windows, Emacs now warns when the obsolete _emacs init file is used, +and also when HOME is set to C:\ by default. * Changes in Emacs 24.1 ------------------------------------------------------------ revno: 104046 [merge] committer: Paul Eggert branch nick: trunk timestamp: Thu 2011-04-28 15:06:00 -0700 message: Merge: doprnt: Omit useless test; int overflow check (Bug#8545). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-28 19:51:12 +0000 +++ src/ChangeLog 2011-04-28 20:11:17 +0000 @@ -1,3 +1,8 @@ +2011-04-28 Paul Eggert + + * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545). + (SIZE_MAX): Move defn after all includes, as they might #define it. + 2011-04-28 Juanma Barranquero * w32.c (init_environment): Warn about defaulting HOME to C:\. === modified file 'src/doprnt.c' --- src/doprnt.c 2011-04-28 11:46:40 +0000 +++ src/doprnt.c 2011-04-28 22:02:15 +0000 @@ -70,7 +70,9 @@ %character where flags is [+ -0], width is [0-9]+, precision is .[0-9]+, and length - modifier is empty or l or ll. + is empty or l or ll. Also, %% in a format stands for a single % in the + output. A % that does not introduce a valid %-sequence causes + undefined behavior. The + flag character inserts a + before any positive number, while a space inserts a space before any positive number; these flags only affect %d, %o, @@ -111,9 +113,6 @@ #include #include -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif #include "lisp.h" @@ -122,14 +121,21 @@ another macro. */ #include "character.h" +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif + #ifndef DBL_MAX_10_EXP #define DBL_MAX_10_EXP 308 /* IEEE double */ #endif /* Generate output from a format-spec FORMAT, terminated at position FORMAT_END. + (*FORMAT_END is not part of the format, but must exist and be readable.) Output goes in BUFFER, which has room for BUFSIZE chars. - If the output does not fit, truncate it to fit. + BUFSIZE must be positive. If the output does not fit, truncate it + to fit and return BUFSIZE - 1; if this truncates a multibyte + sequence, store '\0' into the sequence's first byte. Returns the number of bytes stored into BUFFER, excluding the terminating null byte. Output is always null-terminated. String arguments are passed as C strings. @@ -198,8 +204,12 @@ while (fmt < format_end && '0' <= fmt[1] && fmt[1] <= '9') { - if (n >= SIZE_MAX / 10 - || n * 10 > SIZE_MAX - (fmt[1] - '0')) + /* Avoid size_t overflow. Avoid int overflow too, as + many sprintfs mishandle widths greater than INT_MAX. + This test is simple but slightly conservative: e.g., + (INT_MAX - INT_MAX % 10) is reported as an overflow + even when it's not. */ + if (n >= min (INT_MAX, SIZE_MAX) / 10) error ("Format width or precision too large"); n = n * 10 + fmt[1] - '0'; *string++ = *++fmt; ------------------------------------------------------------ revno: 104045 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2011-04-28 23:43:23 +0300 message: nt/gmake.defs (ARCH): Fix error message in case of unknown architecture. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2011-04-27 21:14:34 +0000 +++ nt/ChangeLog 2011-04-28 20:43:23 +0000 @@ -1,3 +1,8 @@ +2011-04-28 Eli Zaretskii + + * gmake.defs (ARCH): Fix error message in case of unknown + architecture. + 2011-04-27 Eli Zaretskii * inc/inttypes.h: New file. === modified file 'nt/gmake.defs' --- nt/gmake.defs 2011-04-25 01:29:31 +0000 +++ nt/gmake.defs 2011-04-28 20:43:23 +0000 @@ -149,7 +149,7 @@ ifeq "$(PROCESSOR_ARCHITECTURE)" "PPC" ARCH = ppc else -error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)" + $(error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)") endif endif endif ------------------------------------------------------------ revno: 104044 fixes bug(s): http://debbugs.gnu.org/8564 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2011-04-28 23:28:51 +0300 message: nt/INSTALL: More details about problems with MSYS Bash. diff: === modified file 'nt/INSTALL' --- nt/INSTALL 2011-04-28 17:25:14 +0000 +++ nt/INSTALL 2011-04-28 20:28:51 +0000 @@ -14,7 +14,8 @@ use the normal installation instructions, ../INSTALL. If you have a Cygwin or MSYS port of Bash on your Path, you will be - better off removing it from PATH. + better off removing it from PATH. (For details, search for "MSYS + sh.exe" below.) 1. Change to the `nt' directory (the directory of this file): @@ -132,11 +133,14 @@ for example). Also see the Trouble-shooting section below if you decide to go ahead and use Cygwin make. - In addition, using 4NT or TCC as your shell is known to fail the build - process, at least since 4NT version 3.01. Use CMD.EXE, the default - Windows shell, instead. MSYS sh.exe also appears to cause various - problems. If you have MSYS installed, try "make SHELL=cmd.exe" to - force the use of cmd.exe instead of sh.exe. + In addition, using 4NT or TCC as your shell is known to fail the + build process, at least since 4NT version 3.01. Use CMD.EXE, the + default Windows shell, instead. MSYS sh.exe also appears to cause + various problems, e.g., it is known to cause failures in commands + like "cmd /c FOO" in the Makefiles, because it thinks "/c" is a + Unix-style file name that needs conversion to the Windows format. + If you have MSYS installed, try "make SHELL=cmd.exe" to force the + use of cmd.exe instead of the MSYS sh.exe. sh exists no sh ------------------------------------------------------------ revno: 104043 committer: Deniz Dogan branch nick: emacs-trunk timestamp: Thu 2011-04-28 22:22:51 +0200 message: * lisp/net/rcirc.el (rcirc-handler-353): Fix bug for channels which the user has not joined. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-28 19:39:11 +0000 +++ lisp/ChangeLog 2011-04-28 20:22:51 +0000 @@ -1,3 +1,8 @@ +2011-04-28 Deniz Dogan + + * net/rcirc.el (rcirc-handler-353): Fix bug for channels which the + user has not joined. + 2011-04-28 Stefan Monnier * pcomplete.el (pcomplete-completions-at-point): Return nil if there === modified file 'lisp/net/rcirc.el' --- lisp/net/rcirc.el 2011-04-05 04:33:38 +0000 +++ lisp/net/rcirc.el 2011-04-28 20:22:51 +0000 @@ -2741,10 +2741,13 @@ (defun rcirc-handler-353 (process sender args text) "RPL_NAMREPLY" - (let ((channel (caddr args))) + (let ((channel (nth 2 args)) + (names (or (nth 3 args) ""))) (mapc (lambda (nick) (rcirc-put-nick-channel process nick channel)) - (split-string (cadddr args) " " t)) + (split-string names " " t)) + ;; create a temporary buffer to insert the names into + ;; rcirc-handler-366 (RPL_ENDOFNAMES) will handle it (with-current-buffer (rcirc-get-temp-buffer-create process channel) (goto-char (point-max)) (insert (car (last args)) " ")))) ------------------------------------------------------------ revno: 104042 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2011-04-28 21:51:12 +0200 message: src/w32.c (init_environment): Warn about defaulting HOME to C:\. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-28 19:35:20 +0000 +++ src/ChangeLog 2011-04-28 19:51:12 +0000 @@ -1,5 +1,9 @@ 2011-04-28 Juanma Barranquero + * w32.c (init_environment): Warn about defaulting HOME to C:\. + +2011-04-28 Juanma Barranquero + * keyboard.c (Qdelayed_warnings_hook): Define. (command_loop_1): Run `delayed-warnings-hook' if Vdelayed_warnings_list is non-nil. === modified file 'src/w32.c' --- src/w32.c 2011-04-25 12:48:24 +0000 +++ src/w32.c 2011-04-28 19:51:12 +0000 @@ -1561,6 +1561,7 @@ char locale_name[32]; struct stat ignored; char default_home[MAX_PATH]; + int appdata = 0; static const struct env_entry { @@ -1614,7 +1615,10 @@ /* If we can't get the appdata dir, revert to old behavior. */ if (profile_result == S_OK) - env_vars[0].def_value = default_home; + { + env_vars[0].def_value = default_home; + appdata = 1; + } } } @@ -1701,6 +1705,14 @@ lpval = env_vars[i].def_value; dwType = REG_EXPAND_SZ; dont_free = 1; + if (!strcmp (env_vars[i].name, "HOME") && !appdata) + { + Lisp_Object warning[2]; + warning[0] = intern ("initialization"); + warning[1] = build_string ("Setting HOME to C:\\ by default is deprecated"); + Vdelayed_warnings_list = Fcons (Flist (2, warning), + Vdelayed_warnings_list); + } } if (lpval) ------------------------------------------------------------ revno: 104041 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2011-04-28 16:39:11 -0300 message: * lisp/pcomplete.el (pcomplete-completions-at-point): Return nil if there aren't any completions at point. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-28 19:35:20 +0000 +++ lisp/ChangeLog 2011-04-28 19:39:11 +0000 @@ -1,3 +1,8 @@ +2011-04-28 Stefan Monnier + + * pcomplete.el (pcomplete-completions-at-point): Return nil if there + aren't any completions at point. + 2011-04-28 Juanma Barranquero * subr.el (display-delayed-warnings): New function. @@ -5,6 +10,10 @@ 2011-04-28 Stefan Monnier + * minibuffer.el (completion-at-point, completion-help-at-point): + Don't presume that a given completion-at-point-function will always + use the same calling convention. + * pcomplete.el (pcomplete-completions-at-point): Obey pcomplete-ignore-case. Don't call pcomplete-norm-func unless pcomplete-seen is non-nil. === modified file 'lisp/pcomplete.el' --- lisp/pcomplete.el 2011-04-28 00:18:12 +0000 +++ lisp/pcomplete.el 2011-04-28 19:39:11 +0000 @@ -489,57 +489,57 @@ ;; prefix from pcomplete-stub. (beg (max (- (point) (length pcomplete-stub)) (pcomplete-begin))) - (buftext (buffer-substring beg (point))) - (table - (cond - ((null completions) nil) - ((not (equal pcomplete-stub buftext)) - ;; This isn't always strictly right (e.g. if - ;; FOO="toto/$FOO", then completion of /$FOO/bar may - ;; result in something incorrect), but given the lack of - ;; any other info, it's about as good as it gets, and in - ;; practice it should work just fine (fingers crossed). - (let ((prefixes (pcomplete--common-quoted-suffix - pcomplete-stub buftext))) - (apply-partially - 'pcomplete--table-subvert - completions - (cdr prefixes) (car prefixes)))) - (t - (lexical-let ((completions completions)) - (lambda (string pred action) - (let ((res (complete-with-action - action completions string pred))) - (if (stringp res) - (pcomplete-quote-argument res) - res))))))) - (pred - ;; pare it down, if applicable - (when (and table pcomplete-use-paring pcomplete-seen) - (setq pcomplete-seen - (mapcar (lambda (f) - (funcall pcomplete-norm-func - (directory-file-name f))) - pcomplete-seen)) - (lambda (f) - (not (when pcomplete-seen - (member - (funcall pcomplete-norm-func - (directory-file-name f)) - pcomplete-seen))))))) - (unless (zerop (length pcomplete-termination-string)) - ;; Add a space at the end of completion. Use a terminator-regexp - ;; that never matches since the terminator cannot appear - ;; within the completion field anyway. - (setq table - (apply-partially #'completion-table-with-terminator - (cons pcomplete-termination-string - "\\`a\\`") - table))) - (when pcomplete-ignore-case - (setq table - (apply-partially #'completion-table-case-fold table))) - (list beg (point) table :predicate pred)))) + (buftext (buffer-substring beg (point)))) + (when completions + (let ((table + (cond + ((not (equal pcomplete-stub buftext)) + ;; This isn't always strictly right (e.g. if + ;; FOO="toto/$FOO", then completion of /$FOO/bar may + ;; result in something incorrect), but given the lack of + ;; any other info, it's about as good as it gets, and in + ;; practice it should work just fine (fingers crossed). + (let ((prefixes (pcomplete--common-quoted-suffix + pcomplete-stub buftext))) + (apply-partially + 'pcomplete--table-subvert + completions + (cdr prefixes) (car prefixes)))) + (t + (lexical-let ((completions completions)) + (lambda (string pred action) + (let ((res (complete-with-action + action completions string pred))) + (if (stringp res) + (pcomplete-quote-argument res) + res))))))) + (pred + ;; Pare it down, if applicable. + (when (and pcomplete-use-paring pcomplete-seen) + (setq pcomplete-seen + (mapcar (lambda (f) + (funcall pcomplete-norm-func + (directory-file-name f))) + pcomplete-seen)) + (lambda (f) + (not (when pcomplete-seen + (member + (funcall pcomplete-norm-func + (directory-file-name f)) + pcomplete-seen))))))) + (unless (zerop (length pcomplete-termination-string)) + ;; Add a space at the end of completion. Use a terminator-regexp + ;; that never matches since the terminator cannot appear + ;; within the completion field anyway. + (setq table + (apply-partially #'completion-table-with-terminator + (cons pcomplete-termination-string + "\\`a\\`") + table))) + (when pcomplete-ignore-case + (setq table + (apply-partially #'completion-table-case-fold table))) + (list beg (point) table :predicate pred)))))) ;; I don't think such commands are usable before first setting up buffer-local ;; variables to parse args, so there's no point autoloading it. ------------------------------------------------------------ revno: 104040 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2011-04-28 21:35:20 +0200 message: Add delayed warnings support. * etc/NEWS: Document `delayed-warnings-list' and `delayed-warnings-hook'. * lisp/subr.el (display-delayed-warnings): New function. (delayed-warnings-hook): New variable. * src/keyboard.c (Qdelayed_warnings_hook): Define. (command_loop_1): Run `delayed-warnings-hook' if Vdelayed_warnings_list is non-nil. (syms_of_keyboard) : DEFSYM it. (syms_of_keyboard) : DEFVAR_LISP it. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2011-04-26 14:07:29 +0000 +++ etc/ChangeLog 2011-04-28 19:35:20 +0000 @@ -1,3 +1,7 @@ +2011-04-28 Juanma Barranquero + + * NEWS: Document `delayed-warnings-list' and `delayed-warnings-hook'. + 2011-04-26 Daniel Colascione * DEBUG: Document debug-on-event default behavior and utility for === modified file 'etc/NEWS' --- etc/NEWS 2011-04-28 19:07:08 +0000 +++ etc/NEWS 2011-04-28 19:35:20 +0000 @@ -909,6 +909,9 @@ ** New variable `revert-buffer-in-progress-p' is true while a buffer is being reverted, even if the buffer has a local `revert-buffer-function'. +** New variables `delayed-warnings-list' and `delayed-warnings-hook' allow +deferring warnings until the main command loop is executed. + * Changes in Emacs 24.1 on non-free operating systems === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-28 00:18:12 +0000 +++ lisp/ChangeLog 2011-04-28 19:35:20 +0000 @@ -1,3 +1,8 @@ +2011-04-28 Juanma Barranquero + + * subr.el (display-delayed-warnings): New function. + (delayed-warnings-hook): New variable. + 2011-04-28 Stefan Monnier * pcomplete.el (pcomplete-completions-at-point): === modified file 'lisp/subr.el' --- lisp/subr.el 2011-04-27 07:56:55 +0000 +++ lisp/subr.el 2011-04-28 19:35:20 +0000 @@ -1772,6 +1772,19 @@ FILE should be the name of a library, with no directory name." (eval-after-load file (read))) (make-obsolete 'eval-next-after-load `eval-after-load "23.2") + +(defun display-delayed-warnings () + "Display delayed warnings from `delayed-warnings-list'. +This is the default value of `delayed-warnings-hook'." + (dolist (warning (nreverse delayed-warnings-list)) + (apply 'display-warning warning)) + (setq delayed-warnings-list nil)) + +(defvar delayed-warnings-hook '(display-delayed-warnings) + "Normal hook run to process delayed warnings. +Functions in this hook should access the `delayed-warnings-list' +variable (which see) and remove from it the warnings they process.") + ;;;; Process stuff. @@ -2522,7 +2535,7 @@ (concat "\"" result (substring argument start) "\""))) ((and (eq system-type 'windows-nt) (w32-shell-dos-semantics)) - + ;; First, quote argument so that CommandLineToArgvW will ;; understand it. See ;; http://msdn.microsoft.com/en-us/library/17w5ykft%28v=vs.85%29.aspx === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-28 11:46:40 +0000 +++ src/ChangeLog 2011-04-28 19:35:20 +0000 @@ -1,3 +1,11 @@ +2011-04-28 Juanma Barranquero + + * keyboard.c (Qdelayed_warnings_hook): Define. + (command_loop_1): Run `delayed-warnings-hook' + if Vdelayed_warnings_list is non-nil. + (syms_of_keyboard) : DEFSYM it. + (syms_of_keyboard) : DEFVAR_LISP it. + 2011-04-28 Eli Zaretskii * doprnt.c (doprnt): Don't return value smaller than the buffer === modified file 'src/keyboard.c' --- src/keyboard.c 2011-04-26 18:02:10 +0000 +++ src/keyboard.c 2011-04-28 19:35:20 +0000 @@ -267,6 +267,8 @@ static Lisp_Object Qdeferred_action_function; +static Lisp_Object Qdelayed_warnings_hook; + static Lisp_Object Qinput_method_exit_on_first_char; static Lisp_Object Qinput_method_use_echo_area; @@ -1356,6 +1358,10 @@ if (!NILP (echo_area_buffer[0])) resize_echo_area_exactly (); + /* If there are warnings waiting, process them. */ + if (!NILP (Vdelayed_warnings_list)) + safe_run_hooks (Qdelayed_warnings_hook); + if (!NILP (Vdeferred_action_list)) safe_run_hooks (Qdeferred_action_function); } @@ -1573,6 +1579,10 @@ if (!NILP (echo_area_buffer[0])) resize_echo_area_exactly (); + /* If there are warnings waiting, process them. */ + if (!NILP (Vdelayed_warnings_list)) + safe_run_hooks (Qdelayed_warnings_hook); + safe_run_hooks (Qdeferred_action_function); /* If there is a prefix argument, @@ -11498,6 +11508,7 @@ DEFSYM (Qpre_command_hook, "pre-command-hook"); DEFSYM (Qpost_command_hook, "post-command-hook"); DEFSYM (Qdeferred_action_function, "deferred-action-function"); + DEFSYM (Qdelayed_warnings_hook, "delayed-warnings-hook"); DEFSYM (Qfunction_key, "function-key"); DEFSYM (Qmouse_click, "mouse-click"); DEFSYM (Qdrag_n_drop, "drag-n-drop"); @@ -12069,6 +12080,14 @@ whenever `deferred-action-list' is non-nil. */); Vdeferred_action_function = Qnil; + DEFVAR_LISP ("delayed-warnings-list", Vdelayed_warnings_list, + doc: /* List of warnings to be displayed as soon as possible. +Each element must be a list (TYPE MESSAGE [LEVEL [BUFFER-NAME]]), +as per the args of `display-warning' (which see). +If this variable is non-nil, `delayed-warnings-hook' will be run +immediately after running `post-command-hook'. */); + Vdelayed_warnings_list = Qnil; + DEFVAR_LISP ("suggest-key-bindings", Vsuggest_key_bindings, doc: /* *Non-nil means show the equivalent key-binding when M-x command has one. The value can be a length of time to show the message for. ------------------------------------------------------------ revno: 104039 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2011-04-28 21:07:08 +0200 message: etc/NEWS: Fix typos. diff: === modified file 'etc/NEWS' --- etc/NEWS 2011-04-24 07:11:56 +0000 +++ etc/NEWS 2011-04-28 19:07:08 +0000 @@ -48,7 +48,7 @@ This is not a new feature; only the configure flag is new. --- -** New translation of the Emacs Tutorial in Hebrew is available +** New translation of the Emacs Tutorial in Hebrew is available. Type `C-u C-h t' to choose it in case your language setup doesn't automatically select it. @@ -85,7 +85,7 @@ ** Completion can cycle, depending on completion-cycle-threshold. ** `completing-read' can be customized using the new variable -`completing-read-function' +`completing-read-function'. ** auto-mode-case-fold is now enabled by default. @@ -154,7 +154,7 @@ Emacs.pane.menubar.font: Courier-12 +++ -** Enhanced support for characters that have no glyphs in available fonts +** Enhanced support for characters that have no glyphs in available fonts. If a character has no glyphs in any of the available fonts, Emacs by default will display it either as a hexadecimal code in a box or as a thin 1-pixel space. In addition to these two methods, Emacs can @@ -168,7 +168,7 @@ ** On graphical displays, the mode-line no longer ends in dashes. ** On Nextstep/OSX, the menu bar can be hidden by customizing - ns-auto-hide-menu-bar. +ns-auto-hide-menu-bar. ** Basic SELinux support has been added. This requires Emacs to be linked with libselinux at build time. @@ -791,7 +791,7 @@ * Lisp changes in Emacs 24.1 -** `glyphless-char-table' can now distinguish between graphical and +** `glyphless-char-display' can now distinguish between graphical and text terminal display, via a char-table entry that is a cons cell. ** `open-network-stream' can now be used to open an encrypted stream. ------------------------------------------------------------ revno: 104038 fixes bug(s): http://debbugs.gnu.org/8564 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2011-04-28 20:25:14 +0300 message: nt/INSTALL: Mention problems with MSYS/Cygwin Bash right at the beginning. diff: === modified file 'nt/INSTALL' --- nt/INSTALL 2011-04-25 01:29:31 +0000 +++ nt/INSTALL 2011-04-28 17:25:14 +0000 @@ -13,6 +13,9 @@ Do not use this recipe with Cygwin. For building on Cygwin, use the normal installation instructions, ../INSTALL. + If you have a Cygwin or MSYS port of Bash on your Path, you will be + better off removing it from PATH. + 1. Change to the `nt' directory (the directory of this file): cd nt ------------------------------------------------------------ revno: 104037 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2011-04-28 12:32:28 -0300 message: Make MH-E use completion-at-point * lisp/mh-e/mh-letter.el (mh-letter-completion-at-point): New function, extracted from mh-letter-complete (mh-letter-mode, mh-letter-complete, mh-letter-complete-or-space): Use it. (mh-complete-word): Only use the common-substring arg when it works. (mh-folder-expand-at-point): * lisp/mh-e/mh-alias.el (mh-alias-letter-expand-alias): Return data suitable for completion-at-point-functions. * lisp/mh-e/mh-utils.el (mh-folder-completion-function): Make it work like file-name completion, so partial-completion can do its job. * lisp/minibuffer.el (completion-at-point, completion-help-at-point): Don't presume that a given completion-at-point-function will always use the same calling convention. diff: === modified file 'lisp/mh-e/ChangeLog' --- lisp/mh-e/ChangeLog 2011-04-06 12:18:10 +0000 +++ lisp/mh-e/ChangeLog 2011-04-28 15:32:28 +0000 @@ -1,3 +1,17 @@ +2011-04-28 Stefan Monnier + + * mh-utils.el (mh-folder-completion-function): Make it work like + file-name completion, so partial-completion can do its job. + + * mh-letter.el (mh-letter-completion-at-point): New function, extracted + from mh-letter-complete + (mh-letter-mode, mh-letter-complete, mh-letter-complete-or-space): + Use it. + (mh-complete-word): Only use the common-substring arg when it works. + (mh-folder-expand-at-point): + * mh-alias.el (mh-alias-letter-expand-alias): Return data suitable for + completion-at-point-functions. + 2011-04-06 Juanma Barranquero * mh-funcs.el (mh-undo-folder): Accept and ignore arguments, === modified file 'lisp/mh-e/mh-alias.el' --- lisp/mh-e/mh-alias.el 2011-01-26 08:36:39 +0000 +++ lisp/mh-e/mh-alias.el 2011-04-28 15:32:28 +0000 @@ -296,16 +296,28 @@ (defun mh-alias-letter-expand-alias () "Expand mail alias before point." (mh-alias-reload-maybe) - (let* ((end (point)) - (begin (mh-beginning-of-word)) - (input (buffer-substring-no-properties begin end))) - (mh-complete-word input mh-alias-alist begin end) - (when mh-alias-expand-aliases-flag - (let* ((end (point)) - (expansion (mh-alias-expand (buffer-substring begin end)))) - (delete-region begin end) - (insert expansion))))) - + (let* ((begin (mh-beginning-of-word)) + (end (save-excursion + (goto-char begin) + (mh-beginning-of-word -1)))) + (when (>= end (point)) + (list + begin (if (fboundp 'completion-at-point) end (point)) + (if (not mh-alias-expand-aliases-flag) + mh-alias-alist + (lambda (string pred action) + (case action + ((nil) + (let ((res (try-completion string mh-alias-alist pred))) + (if (or (eq res t) + (and (stringp res) + (eq t (try-completion res mh-alias-alist pred)))) + (or (mh-alias-expand (if (stringp res) res string)) + res) + res))) + ((t) (all-completions string mh-alias-alist pred)) + ((lambda) (if (fboundp 'test-completion) + (test-completion string mh-alias-alist pred)))))))))) ;;; Alias File Updating === modified file 'lisp/mh-e/mh-e.el' --- lisp/mh-e/mh-e.el 2011-01-25 04:08:28 +0000 +++ lisp/mh-e/mh-e.el 2011-04-28 15:32:28 +0000 @@ -1179,7 +1179,7 @@ "*Non-nil means to expand aliases entered in the minibuffer. In other words, aliases entered in the minibuffer will be -expanded to the full address in the message draft. By default, +expanded to the full address in the message draft. By default, this expansion is not performed." :type 'boolean :group 'mh-alias === modified file 'lisp/mh-e/mh-letter.el' --- lisp/mh-e/mh-letter.el 2011-01-26 08:36:39 +0000 +++ lisp/mh-e/mh-letter.el 2011-04-28 15:32:28 +0000 @@ -185,7 +185,7 @@ "\C-c\C-w" mh-check-whom "\C-c\C-y" mh-yank-cur-msg "\C-c\M-d" mh-insert-auto-fields - "\M-\t" mh-letter-complete + "\M-\t" mh-letter-complete ;; FIXME: completion-at-point "\t" mh-letter-next-header-field-or-indent [backtab] mh-letter-previous-header-field) @@ -346,6 +346,8 @@ (define-key mh-letter-mode-map [menu-bar mail] 'undefined) (mh-do-in-xemacs (easy-menu-remove mail-menubar-menu)) (setq fill-column mh-letter-fill-column) + (add-hook 'completion-at-point-functions + 'mh-letter-completion-at-point nil 'local) ;; If text-mode-hook turned on auto-fill, tune it for messages (when auto-fill-function (make-local-variable 'auto-fill-function) @@ -488,24 +490,38 @@ (message "No signature found"))))) (force-mode-line-update)) -(defun mh-letter-complete (arg) - "Perform completion on header field or word preceding point. +(defun mh-letter-completion-at-point () + "Return the completion data at point for MH letters. +This provides alias and folder completion in header fields according to +`mh-letter-complete-function-alist' and falls back on +`mh-letter-complete-function-alist' elsewhere." + (let ((func (and (mh-in-header-p) + (cdr (assoc (mh-letter-header-field-at-point) + mh-letter-complete-function-alist))))) + (if func + (or (funcall func) #'ignore) + mh-letter-complete-function))) + +(defalias 'mh-letter-complete + (if (fboundp 'completion-at-point) #'completion-at-point + (lambda () + "Perform completion on header field or word preceding point. If the field contains addresses (for example, \"To:\" or \"Cc:\") or folders (for example, \"Fcc:\") then this command will provide alias completion. In the body of the message, this command runs `mh-letter-complete-function' instead, which is set to -`ispell-complete-word' by default. This command takes a prefix -argument ARG that is passed to the -`mh-letter-complete-function'." - (interactive "P") - (let ((func nil)) - (cond ((not (mh-in-header-p)) - (funcall mh-letter-complete-function arg)) - ((setq func (cdr (assoc (mh-letter-header-field-at-point) - mh-letter-complete-function-alist))) - (funcall func)) - (t (funcall mh-letter-complete-function arg))))) +`ispell-complete-word' by default." + (interactive) + (let ((data (mh-letter-completion-at-point))) + (cond + ((functionp data) (funcall data)) + ((consp data) + (let ((start (nth 0 data)) + (end (nth 1 data)) + (table (nth 2 data))) + (mh-complete-word (buffer-substring-no-properties start end) + table start end)))))))) (defun mh-letter-complete-or-space (arg) "Perform completion or insert space. @@ -521,11 +537,12 @@ (mh-beginning-of-word -1)))) (cond ((not mh-compose-space-does-completion-flag) (self-insert-command arg)) - ((not (mh-in-header-p)) (self-insert-command arg)) + ;; FIXME: This > test is redundant now that all the completion + ;; functions do it anyway. ((> (point) end-of-prev) (self-insert-command arg)) - ((setq func (cdr (assoc (mh-letter-header-field-at-point) - mh-letter-complete-function-alist))) - (funcall func)) + ((let ((mh-letter-complete-function nil)) + (mh-letter-completion-at-point)) + (mh-letter-complete)) (t (self-insert-command arg))))) (defun mh-letter-confirm-address () @@ -862,18 +879,17 @@ (defun mh-folder-expand-at-point () "Do folder name completion in Fcc header field." - (let* ((end (point)) - (beg (mh-beginning-of-word)) - (folder (buffer-substring-no-properties beg end)) - (leading-plus (and (> (length folder) 0) (equal (aref folder 0) ?+))) - (choices (mapcar (lambda (x) (list x)) - (mh-folder-completion-function folder nil t)))) - (unless leading-plus - (setq folder (concat "+" folder))) - (mh-complete-word folder choices beg end))) + (let* ((beg (mh-beginning-of-word)) + (end (save-excursion + (goto-char beg) + (mh-beginning-of-word -1)))) + (when (>= end (point)) + (list beg (if (fboundp 'completion-at-point) end (point)) + #'mh-folder-completion-function)))) ;;;###mh-autoload (defun mh-complete-word (word choices begin end) + ;; FIXME: Only needed when completion-at-point doesn't exist. "Complete WORD from CHOICES. Any match found replaces the text from BEGIN to END." (let ((completion (try-completion word choices)) @@ -889,8 +905,16 @@ ((stringp completion) (if (equal word completion) (with-output-to-temp-buffer completions-buffer - (mh-display-completion-list (all-completions word choices) - word)) + (mh-display-completion-list + (all-completions word choices) + ;; The `common-subtring' arg only works if it's a prefix. + (unless (and (functionp choices) + (let ((bounds + (funcall choices + word nil '(boundaries . "")))) + (and (eq 'boundaries (car-safe bounds)) + (< 0 (cadr bounds))))) + word))) (ignore-errors (kill-buffer completions-buffer)) (delete-region begin end) === modified file 'lisp/mh-e/mh-utils.el' --- lisp/mh-e/mh-utils.el 2011-01-26 08:36:39 +0000 +++ lisp/mh-e/mh-utils.el 2011-04-28 15:32:28 +0000 @@ -596,6 +596,7 @@ (setq name (substring name 0 (1- (length name))))) (push (cons name + ;; FIXME: what is this used for? --Stef (search-forward "(others)" (mh-line-end-position) t)) results)))) (forward-line 1)))) @@ -702,32 +703,33 @@ (remainder (cond (last-complete (substring name (1+ last-slash))) (name (substring name 1)) (t "")))) - (cond ((eq flag nil) + (cond ((eq (car-safe flag) 'boundaries) + (list* 'boundaries + (let ((slash (mh-search-from-end ?/ orig-name))) + (if slash (1+ slash) + (if (string-match "\\`\\+" orig-name) 1 0))) + (if (cdr flag) (string-match "/" (cdr flag))))) + ((eq flag nil) (let ((try-res (try-completion - name - (mapcar (lambda (x) - (cons (concat (or last-complete "+") (car x)) - (cdr x))) - (mh-sub-folders last-complete t)) + remainder + (mh-sub-folders last-complete t) predicate))) (cond ((eq try-res nil) nil) ((and (eq try-res t) (equal name orig-name)) t) ((eq try-res t) name) - (t try-res)))) + (t (concat (or last-complete "+") try-res))))) ((eq flag t) - (mapcar (lambda (x) - (concat (or last-complete "+") x)) - (all-completions - remainder (mh-sub-folders last-complete t) predicate))) + (all-completions + remainder (mh-sub-folders last-complete t) predicate)) ((eq flag 'lambda) (let ((path (concat (unless (and (> (length name) 1) (eq (aref name 1) ?/)) mh-user-path) (substring name 1)))) - (cond (mh-allow-root-folder-flag (file-exists-p path)) + (cond (mh-allow-root-folder-flag (file-directory-p path)) ((equal path mh-user-path) nil) - (t (file-exists-p path)))))))) + (t (file-directory-p path)))))))) ;; Shush compiler. (defvar completion-root-regexp) ; XEmacs === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2011-04-23 03:07:16 +0000 +++ lisp/minibuffer.el 2011-04-28 15:32:28 +0000 @@ -1377,6 +1377,10 @@ "List of well-behaved functions found on `completion-at-point-functions'.") (defun completion--capf-wrapper (fun which) + ;; FIXME: The safe/misbehave handling assumes that a given function will + ;; always return the same kind of data, but this breaks down with functions + ;; like comint-completion-at-point or mh-letter-completion-at-point, which + ;; could be sometimes safe and sometimes misbehaving (and sometimes neither). (if (case which (all t) (safe (member fun completion--capf-safe-funs)) @@ -1408,7 +1412,7 @@ (completion-in-region-mode-predicate (lambda () ;; We're still in the same completion field. - (eq (car (funcall hookfun)) start)))) + (eq (car-safe (funcall hookfun)) start)))) (completion-in-region start end collection (plist-get plist :predicate)))) ;; Maybe completion already happened and the function returned t. @@ -1433,7 +1437,7 @@ (completion-in-region-mode-predicate (lambda () ;; We're still in the same completion field. - (eq (car (funcall hookfun)) start))) + (eq (car-safe (funcall hookfun)) start))) (ol (make-overlay start end nil nil t))) ;; FIXME: We should somehow (ab)use completion-in-region-function or ;; introduce a corresponding hook (plus another for word-completion, ------------------------------------------------------------ revno: 104036 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2011-04-28 07:46:40 -0400 message: Fix return value from doprnt when message is truncated at non-ASCII character. src/doprnt.c (doprnt): Don't return value smaller than the buffer size if the message was truncated. (Bug#8545). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-28 02:01:33 +0000 +++ src/ChangeLog 2011-04-28 11:46:40 +0000 @@ -1,3 +1,8 @@ +2011-04-28 Eli Zaretskii + + * doprnt.c (doprnt): Don't return value smaller than the buffer + size if the message was truncated. (Bug#8545). + 2011-04-28 Juanma Barranquero * w32fns.c (Fx_change_window_property, Fx_delete_window_property) === modified file 'src/doprnt.c' --- src/doprnt.c 2011-04-27 23:04:20 +0000 +++ src/doprnt.c 2011-04-28 11:46:40 +0000 @@ -403,7 +403,9 @@ while (fmt < format_end && --bufsize > 0 && !CHAR_HEAD_P (*fmt)); if (!CHAR_HEAD_P (*fmt)) { - bufptr = save_bufptr; + /* Truncate, but return value that will signal to caller + that the buffer was too small. */ + *save_bufptr = 0; break; } } ------------------------------------------------------------ revno: 104035 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2011-04-28 04:01:33 +0200 message: src/w32fns.c: #if-0 some functions entirely, not just the bodies. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-27 23:48:43 +0000 +++ src/ChangeLog 2011-04-28 02:01:33 +0000 @@ -1,3 +1,8 @@ +2011-04-28 Juanma Barranquero + + * w32fns.c (Fx_change_window_property, Fx_delete_window_property) + (Fx_window_property): #if-0 the whole functions, not just the bodies. + 2011-04-27 Paul Eggert * doprnt.c (doprnt): Support "ll" length modifier, for long long. === modified file 'src/w32fns.c' --- src/w32fns.c 2011-03-25 15:39:59 +0000 +++ src/w32fns.c 2011-04-28 02:01:33 +0000 @@ -4865,6 +4865,8 @@ Window properties ***********************************************************************/ +#if 0 /* TODO : port window properties to W32 */ + DEFUN ("x-change-window-property", Fx_change_window_property, Sx_change_window_property, 2, 6, 0, doc: /* Change window property PROP to VALUE on the X window of FRAME. @@ -4884,7 +4886,6 @@ FRAME. Default is to change on the edit X window. */) (Lisp_Object prop, Lisp_Object value, Lisp_Object frame, Lisp_Object type, Lisp_Object format, Lisp_Object outer_p) { -#if 0 /* TODO : port window properties to W32 */ struct frame *f = check_x_frame (frame); Atom prop_atom; @@ -4901,8 +4902,6 @@ XFlush (FRAME_W32_DISPLAY (f)); UNBLOCK_INPUT; -#endif /* TODO */ - return value; } @@ -4913,8 +4912,6 @@ FRAME nil or omitted means use the selected frame. Value is PROP. */) (Lisp_Object prop, Lisp_Object frame) { -#if 0 /* TODO : port window properties to W32 */ - struct frame *f = check_x_frame (frame); Atom prop_atom; @@ -4926,7 +4923,6 @@ /* Make sure the property is removed when we return. */ XFlush (FRAME_W32_DISPLAY (f)); UNBLOCK_INPUT; -#endif /* TODO */ return prop; } @@ -4951,8 +4947,6 @@ no value of TYPE (always string in the MS Windows case). */) (Lisp_Object prop, Lisp_Object frame) { -#if 0 /* TODO : port window properties to W32 */ - struct frame *f = check_x_frame (frame); Atom prop_atom; int rc; @@ -4992,10 +4986,10 @@ return prop_value; -#endif /* TODO */ return Qnil; } +#endif /* TODO */ /*********************************************************************** ------------------------------------------------------------ revno: 104034 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2011-04-27 21:18:12 -0300 message: * lisp/pcomplete.el (pcomplete-completions-at-point): Obey pcomplete-ignore-case. Don't call pcomplete-norm-func unless pcomplete-seen is non-nil. (pcomplete-comint-setup): Also recognize the new comint/shell completion functions. (pcomplete-do-complete): Don't call pcomplete-norm-func unless pcomplete-seen is non-nil. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-27 19:51:19 +0000 +++ lisp/ChangeLog 2011-04-28 00:18:12 +0000 @@ -1,3 +1,13 @@ +2011-04-28 Stefan Monnier + + * pcomplete.el (pcomplete-completions-at-point): + Obey pcomplete-ignore-case. Don't call pcomplete-norm-func unless + pcomplete-seen is non-nil. + (pcomplete-comint-setup): Also recognize the new comint/shell + completion functions. + (pcomplete-do-complete): Don't call pcomplete-norm-func unless + pcomplete-seen is non-nil. + 2011-04-27 Niels Giesen * calendar/icalendar.el (diary-lib): Add require statement. === modified file 'lisp/pcomplete.el' --- lisp/pcomplete.el 2011-04-19 13:44:55 +0000 +++ lisp/pcomplete.el 2011-04-28 00:18:12 +0000 @@ -522,23 +522,24 @@ (directory-file-name f))) pcomplete-seen)) (lambda (f) - (not (member - (funcall pcomplete-norm-func - (directory-file-name f)) - pcomplete-seen)))))) - - (list - beg (point) - ;; Add a space at the end of completion. Use a terminator-regexp - ;; that never matches since the terminator cannot appear - ;; within the completion field anyway. - (if (zerop (length pcomplete-termination-string)) - table - (apply-partially 'completion-table-with-terminator - (cons pcomplete-termination-string - "\\`a\\`") - table)) - :predicate pred)))) + (not (when pcomplete-seen + (member + (funcall pcomplete-norm-func + (directory-file-name f)) + pcomplete-seen))))))) + (unless (zerop (length pcomplete-termination-string)) + ;; Add a space at the end of completion. Use a terminator-regexp + ;; that never matches since the terminator cannot appear + ;; within the completion field anyway. + (setq table + (apply-partially #'completion-table-with-terminator + (cons pcomplete-termination-string + "\\`a\\`") + table))) + (when pcomplete-ignore-case + (setq table + (apply-partially #'completion-table-case-fold table))) + (list beg (point) table :predicate pred)))) ;; I don't think such commands are usable before first setting up buffer-local ;; variables to parse args, so there's no point autoloading it. @@ -781,7 +782,9 @@ (set (make-local-variable completef-sym) (copy-sequence (symbol-value completef-sym))) (let* ((funs (symbol-value completef-sym)) - (elem (or (memq 'shell-dynamic-complete-filename funs) + (elem (or (memq 'comint-filename-completion funs) + (memq 'shell-filename-completion funs) + (memq 'shell-dynamic-complete-filename funs) (memq 'comint-dynamic-complete-filename funs)))) (if elem (setcar elem 'pcomplete) @@ -1248,11 +1251,12 @@ (setq completions (apply-partially 'completion-table-with-predicate completions - (lambda (f) - (not (member - (funcall pcomplete-norm-func - (directory-file-name f)) - pcomplete-seen))) + (when pcomplete-seen + (lambda (f) + (not (member + (funcall pcomplete-norm-func + (directory-file-name f)) + pcomplete-seen)))) 'strict))) ;; OK, we've got a list of completions. (if pcomplete-show-list ------------------------------------------------------------ revno: 104033 [merge] committer: Paul Eggert branch nick: trunk timestamp: Wed 2011-04-27 16:48:43 -0700 message: Merge: * doprnt.c (doprnt): Support "ll" length modifier, for long long. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-27 23:35:33 +0000 +++ src/ChangeLog 2011-04-27 23:48:43 +0000 @@ -1,3 +1,7 @@ +2011-04-27 Paul Eggert + + * doprnt.c (doprnt): Support "ll" length modifier, for long long. + 2011-04-27 Juanma Barranquero * makefile.w32-in: Update dependencies. === modified file 'src/doc.c' --- src/doc.c 2011-04-26 06:17:52 +0000 +++ src/doc.c 2011-04-27 19:05:21 +0000 @@ -347,6 +347,8 @@ { if (XSUBR (fun)->doc == 0) return Qnil; + /* FIXME: This is not portable, as it assumes that string + pointers have the top bit clear. */ else if ((EMACS_INT) XSUBR (fun)->doc >= 0) doc = build_string (XSUBR (fun)->doc); else === modified file 'src/doprnt.c' --- src/doprnt.c 2011-04-27 18:15:29 +0000 +++ src/doprnt.c 2011-04-27 23:04:20 +0000 @@ -70,7 +70,7 @@ %character where flags is [+ -0], width is [0-9]+, precision is .[0-9]+, and length - modifier is l. + modifier is empty or l or ll. The + flag character inserts a + before any positive number, while a space inserts a space before any positive number; these flags only affect %d, %o, @@ -81,9 +81,13 @@ The l (lower-case letter ell) length modifier is a `long' data type modifier: it is supported for %d, %o, and %x conversions of integral - arguments, must immediately preced the conversion specifier, and means that + arguments, must immediately precede the conversion specifier, and means that the respective argument is to be treated as `long int' or `unsigned long - int'. The EMACS_INT data type should use this modifier. + int'. Similarly, ll (two letter ells) means to use `long long int' or + `unsigned long long int'; this can be used only on hosts that have + these two types. The empty length modifier means to use `int' or + `unsigned int'. EMACS_INT arguments should use the pI macro, which + expands to whatever length modifier is needed for the target host. The width specifier supplies a lower limit for the length of the printed representation. The padding, if any, normally goes on the left, but it goes @@ -208,8 +212,8 @@ ; else if (*fmt == 'l') { - long_flag = 1; - fmt++; + long_flag = 1 + (fmt + 1 < format_end && fmt[1] == 'l'); + fmt += long_flag; break; } else @@ -240,7 +244,7 @@ { default: error ("Invalid format operation %%%s%c", - long_flag ? "l" : "", fmt[-1]); + "ll" + 2 - long_flag, fmt[-1]); /* case 'b': */ case 'l': @@ -249,7 +253,16 @@ int i; long l; - if (long_flag) + if (1 < long_flag) + { +#ifdef HAVE_LONG_LONG_INT + long long ll = va_arg (ap, long long); + sprintf (sprintf_buffer, fmtcpy, ll); +#else + abort (); +#endif + } + else if (long_flag) { l = va_arg(ap, long); sprintf (sprintf_buffer, fmtcpy, l); @@ -270,7 +283,16 @@ unsigned u; unsigned long ul; - if (long_flag) + if (1 < long_flag) + { +#ifdef HAVE_UNSIGNED_LONG_LONG_INT + unsigned long long ull = va_arg (ap, unsigned long long); + sprintf (sprintf_buffer, fmtcpy, ull); +#else + abort (); +#endif + } + else if (long_flag) { ul = va_arg(ap, unsigned long); sprintf (sprintf_buffer, fmtcpy, ul); ------------------------------------------------------------ revno: 104032 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2011-04-28 01:35:33 +0200 message: src/makefile.w32-in: Update dependencies. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-27 19:51:19 +0000 +++ src/ChangeLog 2011-04-27 23:35:33 +0000 @@ -1,3 +1,7 @@ +2011-04-27 Juanma Barranquero + + * makefile.w32-in: Update dependencies. + 2011-04-27 Eli Zaretskii Improve `doprnt' and its usage. (Bug#8545) === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2011-04-25 01:30:51 +0000 +++ src/makefile.w32-in 2011-04-27 23:35:33 +0000 @@ -953,12 +953,12 @@ $(SRC)/getpagesize.h $(BLD)/gnutls.$(O) : \ - $(SRC)/gnutls.h \ $(SRC)/gnutls.c \ $(CONFIG_H) \ - $(EMACS_ROOT)/nt/inc/sys/socket.h \ - $(SRC)/lisp.h \ - $(SRC)/process.h + $(EMACS_ROOT)/nt/inc/unistd.h \ + $(LISP_H) \ + $(PROCESS_H) \ + $(SRC)/w32.h $(BLD)/image.$(O) : \ $(SRC)/image.c \ @@ -1026,6 +1026,7 @@ $(SRC)/intervals.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ + $(EMACS_ROOT)/lib/intprops.h \ $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/coding.h \ @@ -1102,6 +1103,8 @@ $(BLD)/lread.$(O) : \ $(SRC)/lread.c \ $(CONFIG_H) \ + $(EMACS_ROOT)/nt/inc/inttypes.h \ + $(EMACS_ROOT)/nt/inc/stdint.h \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/file.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ @@ -1196,6 +1199,8 @@ $(EMACS_ROOT)/nt/inc/sys/file.h \ $(EMACS_ROOT)/nt/inc/sys/socket.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ + $(EMACS_ROOT)/lib/allocator.h \ + $(EMACS_ROOT)/lib/careadlinkat.h \ $(LISP_H) \ $(PROCESS_H) \ $(SRC)/coding.h \ @@ -1434,6 +1439,8 @@ $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ $(EMACS_ROOT)/nt/inc/sys/socket.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ + $(EMACS_ROOT)/lib/allocator.h \ + $(EMACS_ROOT)/lib/careadlinkat.h \ $(EMACS_ROOT)/lib/ignore-value.h \ $(LISP_H) \ $(PROCESS_H) \ ------------------------------------------------------------ revno: 104031 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2011-04-28 00:14:34 +0300 message: Support inttypes.h and strtoumax in non-MinGW builds on Windows. nt/inc/inttypes.h: New file. nt/config.nt (HAVE_DECL_STRTOULL, HAVE_DECL_STRTOUMAX) (HAVE_STRTOULL, HAVE_STRTOUMAX): New macros. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2011-04-27 19:51:19 +0000 +++ nt/ChangeLog 2011-04-27 21:14:34 +0000 @@ -1,3 +1,10 @@ +2011-04-27 Eli Zaretskii + + * inc/inttypes.h: New file. + + * config.nt (HAVE_DECL_STRTOULL, HAVE_DECL_STRTOUMAX) + (HAVE_STRTOULL, HAVE_STRTOUMAX): New macros. + 2011-04-27 Daniel Colascione * cmdproxy.c (try_dequote_cmdline): Notice variable substitutions === modified file 'nt/config.nt' --- nt/config.nt 2011-04-06 15:44:32 +0000 +++ nt/config.nt 2011-04-27 21:14:34 +0000 @@ -299,6 +299,20 @@ /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + +/* Define to 1 if you have the declaration of `strtoumax', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUMAX 1 + +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + +/* Define to 1 if you have the `strtoumax' function. */ +#define HAVE_STRTOUMAX 1 + /* Define if you have the 'wchar_t' type. */ #define HAVE_WCHAR_T 1 === added file 'nt/inc/inttypes.h' --- nt/inc/inttypes.h 1970-01-01 00:00:00 +0000 +++ nt/inc/inttypes.h 2011-04-27 21:14:34 +0000 @@ -0,0 +1,30 @@ +/* Replacement inntypes.h file for building GNU Emacs on Windows with MSVC. + +Copyright (C) 2011 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . */ + +#ifndef _REPL_INTTYPES_H +#define _REPL_INTTYPES_H + +#ifdef __MINGW32__ +#include_next +#else /* !__MINGW32__ */ +#define uintmax_t unsigned __int64 +#define strtoumax _strtoui64 +#endif /* !__MINGW32__ */ + +#endif ------------------------------------------------------------ revno: 104030 committer: Juanma Barranquero branch nick: trunk timestamp: Wed 2011-04-27 21:51:19 +0200 message: Fix ChangeLog typos. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-27 17:48:35 +0000 +++ lisp/ChangeLog 2011-04-27 19:51:19 +0000 @@ -1,8 +1,8 @@ -2011-04-27 Niels Giesen +2011-04-27 Niels Giesen - * calendar/icalendar.el (diary-lib): Added require statement. + * calendar/icalendar.el (diary-lib): Add require statement. (icalendar--create-uid): Read out a uid from a text-property on - the first character in the entry. This allows for code to add its + the first character in the entry. This allows for code to add its own uid to the entry. (icalendar--convert-float-to-ical): Add export of `diary-float'-entries save for those with the optional DAY @@ -17,7 +17,7 @@ * cus-start.el (all): Define customization for debug-on-event. -2011-04-26 Daniel Colascione +2011-04-26 Daniel Colascione * subr.el (shell-quote-argument): Escape correctly under Windows. @@ -75,7 +75,7 @@ (gnutls-negotiate): Adjust `gnutls-negotiate' declaration. * subr.el (shell-quote-argument): Escape correctly under Windows. -2011-04-24 Daniel Colascione +2011-04-24 Daniel Colascione * progmodes/cc-engine.el (c-forward-decl-or-cast-1): Use correct match group (bug#8438). @@ -141,7 +141,7 @@ * image-mode.el (image-type, image-mode-map, image-minor-mode-map) (image-toggle-display): Doc fix. -2011-04-23 Stephen Berman +2011-04-23 Stephen Berman * textmodes/page.el (what-page): Use line-number-at-pos to calculate line number (Bug#6825). === modified file 'nt/ChangeLog' --- nt/ChangeLog 2011-04-27 04:19:15 +0000 +++ nt/ChangeLog 2011-04-27 19:51:19 +0000 @@ -3,7 +3,7 @@ * cmdproxy.c (try_dequote_cmdline): Notice variable substitutions inside quotation marks and bail out. -2011-04-26 Daniel Colascione +2011-04-26 Daniel Colascione * cmdproxy.c (try_dequote_cmdline): New function. (main): Use it. === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-27 18:15:29 +0000 +++ src/ChangeLog 2011-04-27 19:51:19 +0000 @@ -30,7 +30,7 @@ Remove unused local. (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0. - lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546) + * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546) GCC 4.6.0 optimizes based on type-based alias analysis. For example, if b is of type struct buffer * and v of type struct Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size @@ -222,7 +222,7 @@ supposed to be handshaking. (Bug#8556) Reported by Paul Eggert . -2011-04-26 Daniel Colascione +2011-04-26 Daniel Colascione * lisp.h (Qdebug): List symbol. * eval.c (Qdebug): Restore global linkage. @@ -478,8 +478,8 @@ define if USE_GTK || USE_X_TOOLKIT. (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK. * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT. - * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only if - defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK. + * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only + if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK. * xmenu.c (menu_help_callback): Pointer type fixes. Use const pointers when pointing at readonly data. Avoid pointer ------------------------------------------------------------ revno: 104029 fixes bug(s): http://debbugs.gnu.org/8545 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2011-04-27 21:15:29 +0300 message: Improve `doprnt' and its usage. (Bug#8545) src/doprnt.c (doprnt): Make sure `format' is never accessed beyond `format_end'. Remove support for %l as a conversion specifier. Don't use xrealloc. Improve diagnostics when the %l size modifier is used. Update the commentary. src/eval.c (verror): Simplify calculation of size_t. src/coding.c (Ffind_operation_coding_system): Fix diagnostic error messages. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-27 08:06:26 +0000 +++ src/ChangeLog 2011-04-27 18:15:29 +0000 @@ -1,3 +1,16 @@ +2011-04-27 Eli Zaretskii + + Improve `doprnt' and its usage. (Bug#8545) + * doprnt.c (doprnt): Make sure `format' is never accessed beyond + `format_end'. Remove support for %l as a conversion specifier. + Don't use xrealloc. Improve diagnostics when the %l size modifier + is used. Update the commentary. + + * eval.c (verror): Simplify calculation of size_t. + + * coding.c (Ffind_operation_coding_system): Fix diagnostic error + messages. + 2011-04-27 Yoshiaki Kasahara (tiny change) * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing === modified file 'src/coding.c' --- src/coding.c 2011-04-26 06:17:52 +0000 +++ src/coding.c 2011-04-27 18:15:29 +0000 @@ -9282,14 +9282,15 @@ || !NATNUMP (target_idx = Fget (operation, Qtarget_idx))) error ("Invalid first argument"); if (nargs < 1 + XFASTINT (target_idx)) - error ("Too few arguments for operation: %s", + error ("Too few arguments for operation `%s'", SDATA (SYMBOL_NAME (operation))); target = args[XFASTINT (target_idx) + 1]; if (!(STRINGP (target) || (EQ (operation, Qinsert_file_contents) && CONSP (target) && STRINGP (XCAR (target)) && BUFFERP (XCDR (target))) || (EQ (operation, Qopen_network_stream) && INTEGERP (target)))) - error ("Invalid %"pI"dth argument", XFASTINT (target_idx) + 1); + error ("Invalid argument %"pI"d of operation `%s'", + XFASTINT (target_idx) + 1, SDATA (SYMBOL_NAME (operation))); if (CONSP (target)) target = XCAR (target); === modified file 'src/doprnt.c' --- src/doprnt.c 2011-04-25 08:04:22 +0000 +++ src/doprnt.c 2011-04-27 18:15:29 +0000 @@ -55,7 +55,6 @@ %s means print a string argument. %S is silently treated as %s, for loose compatibility with `Fformat'. %d means print a `signed int' argument in decimal. - %l means print a `long int' argument in decimal. %o means print an `unsigned int' argument in octal. %x means print an `unsigned int' argument in hex. %e means print a `double' argument in exponential notation. @@ -65,22 +64,26 @@ %c means print a `signed int' argument as a single character. %% means produce a literal % character. - A %-sequence may contain optional flag, width, and precision specifiers, as - follows: - - %character - - where flags is [+ -0l], width is [0-9]+, and precision is .[0-9]+ + A %-sequence may contain optional flag, width, and precision specifiers, and + a length modifier, as follows: + + %character + + where flags is [+ -0], width is [0-9]+, precision is .[0-9]+, and length + modifier is l. The + flag character inserts a + before any positive number, while a space - inserts a space before any positive number; these flags only affect %d, %l, - %o, %x, %e, %f, and %g sequences. The - and 0 flags affect the width - specifier, as described below. + inserts a space before any positive number; these flags only affect %d, %o, + %x, %e, %f, and %g sequences. The - and 0 flags affect the width specifier, + as described below. For signed numerical arguments only, the ` ' (space) + flag causes the result to be prefixed with a space character if it does not + start with a sign (+ or -). - The l (lower-case letter ell) flag is a `long' data type modifier: it is - supported for %d, %o, and %x conversions of integral arguments, and means - that the respective argument is to be treated as `long int' or `unsigned - long int'. The EMACS_INT data type should use this modifier. + The l (lower-case letter ell) length modifier is a `long' data type + modifier: it is supported for %d, %o, and %x conversions of integral + arguments, must immediately preced the conversion specifier, and means that + the respective argument is to be treated as `long int' or `unsigned long + int'. The EMACS_INT data type should use this modifier. The width specifier supplies a lower limit for the length of the printed representation. The padding, if any, normally goes on the left, but it goes @@ -166,7 +169,7 @@ bufsize--; /* Loop until end of format string or buffer full. */ - while (fmt != format_end && bufsize > 0) + while (fmt < format_end && bufsize > 0) { if (*fmt == '%') /* Check for a '%' character */ { @@ -178,7 +181,7 @@ /* Copy this one %-spec into fmtcpy. */ string = fmtcpy; *string++ = '%'; - while (1) + while (fmt < format_end) { *string++ = *fmt; if ('0' <= *fmt && *fmt <= '9') @@ -188,7 +191,8 @@ %1.1000f and %1000.1f both might need 1000+ bytes. Parse the width or precision, checking for overflow. */ size_t n = *fmt - '0'; - while ('0' <= fmt[1] && fmt[1] <= '9') + while (fmt < format_end + && '0' <= fmt[1] && fmt[1] <= '9') { if (n >= SIZE_MAX / 10 || n * 10 > SIZE_MAX - (fmt[1] - '0')) @@ -205,14 +209,15 @@ else if (*fmt == 'l') { long_flag = 1; - if (!strchr ("dox", fmt[1])) - /* %l as conversion specifier, not as modifier. */ - break; + fmt++; + break; } else break; fmt++; } + if (fmt > format_end) + fmt = format_end; *string = 0; /* Make the size bound large enough to handle floating point formats @@ -225,9 +230,8 @@ if (size_bound > size_allocated) { if (big_buffer) - big_buffer = (char *) xrealloc (big_buffer, size_bound); - else - big_buffer = (char *) xmalloc (size_bound); + xfree (big_buffer); + big_buffer = (char *) xmalloc (size_bound); sprintf_buffer = big_buffer; size_allocated = size_bound; } @@ -235,7 +239,8 @@ switch (*fmt++) { default: - error ("Invalid format operation %%%c", fmt[-1]); + error ("Invalid format operation %%%s%c", + long_flag ? "l" : "", fmt[-1]); /* case 'b': */ case 'l': @@ -373,7 +378,7 @@ char *save_bufptr = bufptr; do { *bufptr++ = *fmt++; } - while (--bufsize > 0 && !CHAR_HEAD_P (*fmt)); + while (fmt < format_end && --bufsize > 0 && !CHAR_HEAD_P (*fmt)); if (!CHAR_HEAD_P (*fmt)) { bufptr = save_bufptr; === modified file 'src/eval.c' --- src/eval.c 2011-04-26 11:26:05 +0000 +++ src/eval.c 2011-04-27 18:15:29 +0000 @@ -1994,8 +1994,7 @@ { char buf[4000]; size_t size = sizeof buf; - size_t size_max = - min (MOST_POSITIVE_FIXNUM, min (INT_MAX, SIZE_MAX - 1)) + 1; + size_t size_max = min (MOST_POSITIVE_FIXNUM, SIZE_MAX); size_t mlen = strlen (m); char *buffer = buf; size_t used; ------------------------------------------------------------ revno: 104028 committer: Ulf Jasper branch nick: trunk timestamp: Wed 2011-04-27 19:48:35 +0200 message: Applied icalendar patches from Niels Giesen. lisp/ChangeLog: 2011-04-27 Niels Giesen * calendar/icalendar.el (diary-lib): Added require statement. (icalendar--create-uid): Read out a uid from a text-property on the first character in the entry. This allows for code to add its own uid to the entry. (icalendar--convert-float-to-ical): Add export of `diary-float'-entries save for those with the optional DAY diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-27 07:56:55 +0000 +++ lisp/ChangeLog 2011-04-27 17:48:35 +0000 @@ -1,3 +1,13 @@ +2011-04-27 Niels Giesen + + * calendar/icalendar.el (diary-lib): Added require statement. + (icalendar--create-uid): Read out a uid from a text-property on + the first character in the entry. This allows for code to add its + own uid to the entry. + (icalendar--convert-float-to-ical): Add export of + `diary-float'-entries save for those with the optional DAY + argument. + 2011-04-27 Daniel Colascione * subr.el (shell-quote-argument): Use alternate escaping strategy === modified file 'lisp/calendar/icalendar.el' --- lisp/calendar/icalendar.el 2011-01-26 08:36:39 +0000 +++ lisp/calendar/icalendar.el 2011-04-27 17:48:35 +0000 @@ -34,6 +34,8 @@ ;; week of the year 2000 when they are exported. ;; - Yearly diary entries are assumed to occur the first time in the year ;; 1900 when they are exported. +;; - Float diary entries are assumed to occur the first time on the +;; day when they are exported. ;;; History: @@ -241,6 +243,7 @@ ;; all the other libs we need ;; ====================================================================== (require 'calendar) +(require 'diary-lib) ;; ====================================================================== ;; misc @@ -925,27 +928,30 @@ current iCalendar object, as a string. Increase `icalendar--uid-count'. Returns the UID string." (let ((uid icalendar-uid-format)) - - (setq uid (replace-regexp-in-string - "%c" - (format "%d" icalendar--uid-count) - uid t t)) - (setq icalendar--uid-count (1+ icalendar--uid-count)) - (setq uid (replace-regexp-in-string - "%t" - (format "%d%d%d" (car (current-time)) - (cadr (current-time)) - (car (cddr (current-time)))) - uid t t)) - (setq uid (replace-regexp-in-string - "%h" - (format "%d" (abs (sxhash entry-full))) uid t t)) - (setq uid (replace-regexp-in-string - "%u" (or user-login-name "UNKNOWN_USER") uid t t)) - (let ((dtstart (if (string-match "^DTSTART[^:]*:\\([0-9]*\\)" contents) - (substring contents (match-beginning 1) (match-end 1)) - "DTSTART"))) - (setq uid (replace-regexp-in-string "%s" dtstart uid t t))) + (if + ;; Allow other apps (such as org-mode) to create its own uid + (get-text-property 0 'uid entry-full) + (setq uid (get-text-property 0 'uid entry-full)) + (setq uid (replace-regexp-in-string + "%c" + (format "%d" icalendar--uid-count) + uid t t)) + (setq icalendar--uid-count (1+ icalendar--uid-count)) + (setq uid (replace-regexp-in-string + "%t" + (format "%d%d%d" (car (current-time)) + (cadr (current-time)) + (car (cddr (current-time)))) + uid t t)) + (setq uid (replace-regexp-in-string + "%h" + (format "%d" (abs (sxhash entry-full))) uid t t)) + (setq uid (replace-regexp-in-string + "%u" (or user-login-name "UNKNOWN_USER") uid t t)) + (let ((dtstart (if (string-match "^DTSTART[^:]*:\\([0-9]*\\)" contents) + (substring contents (match-beginning 1) (match-end 1)) + "DTSTART"))) + (setq uid (replace-regexp-in-string "%s" dtstart uid t t)))) ;; Return the UID string uid)) @@ -1545,18 +1551,65 @@ nil)) (defun icalendar--convert-float-to-ical (nonmarker entry-main) - "Convert float diary entry to icalendar format -- unsupported! - -FIXME! - -NONMARKER is a regular expression matching the start of non-marking -entries. ENTRY-MAIN is the first line of the diary entry." - (if (string-match (concat nonmarker - "%%(diary-float \\([^)]+\\))\\s-*\\(.*?\\) ?$") - entry-main) - (progn - (icalendar--dmsg "diary-float %s" entry-main) - (error "`diary-float' is not supported yet")) + "Convert float diary entry to icalendar format -- partially unsupported! + + FIXME! DAY from diary-float yet unimplemented. + + NONMARKER is a regular expression matching the start of non-marking + entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker "%%\\((diary-float .+\\) ?$") entry-main) + (with-temp-buffer + (insert (match-string 1 entry-main)) + (goto-char (point-min)) + (let* ((sexp (read (current-buffer))) ;using `read' here + ;easier than regexp + ;matching, esp. with + ;different forms of + ;MONTH + (month (nth 1 sexp)) + (dayname (nth 2 sexp)) + (n (nth 3 sexp)) + (day (nth 4 sexp)) + (summary + (replace-regexp-in-string + "\\(^\s+\\|\s+$\\)" "" + (buffer-substring (point) (point-max))))) + + (when day + (progn + (icalendar--dmsg "diary-float %s" entry-main) + (error "Don't know if or how to implement day in `diary-float'"))) + + (list (concat + ;;Start today (yes this is an arbitrary choice): + "\nDTSTART;VALUE=DATE:" + (format-time-string "%Y%m%d" (current-time)) + ;;BUT remove today if `diary-float' + ;;expression does not hold true for today: + (when + (null (let ((date (calendar-current-date)) + (entry entry-main)) + (diary-float month dayname n))) + (concat + "\nEXDATE;VALUE=DATE:" + (format-time-string "%Y%m%d" (current-time)))) + "\nRRULE:" + (if (or (numberp month) (listp month)) + "FREQ=YEARLY;BYMONTH=" + "FREQ=MONTHLY") + (when + (listp month) + (mapconcat + (lambda (m) + (number-to-string m)) + (cadr month) ",")) + (when + (numberp month) + (number-to-string month)) + ";BYDAY=" + (number-to-string n) + (aref icalendar--weekday-array dayname)) + summary))) ;; no match nil)) ------------------------------------------------------------ revno: 104027 committer: Daniel Colascione branch nick: trunk timestamp: Wed 2011-04-27 00:56:55 -0700 message: * subr.el (shell-quote-argument): Use alternate escaping strategy when we spot a variable reference in a string. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-26 14:07:29 +0000 +++ lisp/ChangeLog 2011-04-27 07:56:55 +0000 @@ -1,3 +1,8 @@ +2011-04-27 Daniel Colascione + + * subr.el (shell-quote-argument): Use alternate escaping strategy + when we spot a variable reference in a string. + 2011-04-26 Daniel Colascione * cus-start.el (all): Define customization for debug-on-event. === modified file 'lisp/subr.el' --- lisp/subr.el 2011-04-26 10:44:03 +0000 +++ lisp/subr.el 2011-04-27 07:56:55 +0000 @@ -2543,7 +2543,7 @@ "\\1\\1\\\\\"" argument))) - (if (string-match "\"" argument) + (if (string-match "[%!\"]" argument) (concat "^\"" (replace-regexp-in-string ------------------------------------------------------------ revno: 104026 [merge] committer: Paul Eggert branch nick: trunk timestamp: Wed 2011-04-27 01:08:00 -0700 message: * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing change. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-27 06:01:43 +0000 +++ src/ChangeLog 2011-04-27 08:06:26 +0000 @@ -1,3 +1,8 @@ +2011-04-27 Yoshiaki Kasahara (tiny change) + + * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing + change. + 2011-04-27 Paul Eggert * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF. === modified file 'src/buffer.c' --- src/buffer.c 2011-04-26 06:17:52 +0000 +++ src/buffer.c 2011-04-27 08:06:26 +0000 @@ -5155,7 +5155,7 @@ Map new memory. */ struct buffer *b; - for (b = all_buffers; b; b = b->next) + for (b = all_buffers; b; b = b->header.next.buffer) if (b->text->beg == NULL) enlarge_buffer_text (b, 0); } ------------------------------------------------------------ revno: 104025 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-04-27 02:48:35 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/Makefile.in' --- autogen/Makefile.in 2011-04-18 10:17:49 +0000 +++ autogen/Makefile.in 2011-04-27 06:48:35 +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 --no-libtool --macro-prefix=gl --no-vc-files careadlinkat crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdio strftime 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 --no-libtool --macro-prefix=gl --no-vc-files careadlinkat crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdio strftime strtoumax symlink sys_stat VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -54,19 +54,20 @@ $(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/longlong.m4 \ - $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/md5.m4 \ - $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/socklen.m4 \ - $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/st_dm_mode.m4 \ - $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ - $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/symlink.m4 \ - $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/time_h.m4 \ - $(top_srcdir)/m4/time_r.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \ - $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ - $(top_srcdir)/configure.in + $(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 \ + $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/readlink.m4 \ + $(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/ssize_t.m4 \ + $(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat.m4 \ + $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ + $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdio_h.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strftime.m4 \ + $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ + $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ + $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ + $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ + $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -201,6 +202,8 @@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ @@ -257,8 +260,10 @@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRTOD = @GNULIB_STRTOD@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ @@ -310,10 +315,14 @@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ +HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ +HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ @@ -413,6 +422,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ +INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ KRB4LIB = @KRB4LIB@ KRB5LIB = @KRB5LIB@ LDFLAGS = @LDFLAGS@ @@ -466,6 +477,7 @@ MOUSE_SUPPORT = @MOUSE_SUPPORT@ M_FILE = @M_FILE@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ @@ -474,6 +486,7 @@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ +NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ @@ -502,6 +515,8 @@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRE_ALLOC_OBJ = @PRE_ALLOC_OBJ@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ @@ -608,6 +623,8 @@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ TOOLKIT_LIBW = @TOOLKIT_LIBW@ TOOLTIP_SUPPORT = @TOOLTIP_SUPPORT@ +UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ +UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNEXEC_OBJ = @UNEXEC_OBJ@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ @@ -705,32 +722,35 @@ # 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) $(STDBOOL_H) \ - $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h sys/stat.h time.h \ - unistd.h warn-on-use.h +BUILT_SOURCES = arg-nonnull.h c++defs.h $(GETOPT_H) inttypes.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 \ $(top_srcdir)/./c++defs.h careadlinkat.h md5.c md5.h dosname.h \ ftoastr.c ftoastr.h filemode.c filemode.h getloadavg.c \ - getopt.c getopt.in.h getopt1.c getopt_int.h intprops.h lstat.c \ - mktime-internal.h mktime.c readlink.c stat.c stdbool.in.h \ - stddef.in.h stdint.in.h stdio.in.h stdlib.in.h strftime.c \ - strftime.h symlink.c sys_stat.in.h time.in.h time_r.c \ - unistd.in.h $(top_srcdir)/./warn-on-use.h + getopt.c getopt.in.h getopt1.c getopt_int.h intprops.h \ + inttypes.in.h lstat.c mktime-internal.h mktime.c readlink.c \ + stat.c stdbool.in.h stddef.in.h stdint.in.h stdio.in.h \ + stdlib.in.h strftime.c strftime.h strtol.c strtoul.c \ + strtoull.c strtoimax.c strtoumax.c symlink.c sys_stat.in.h \ + time.in.h time_r.c unistd.in.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 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 + c++defs.h c++defs.h-t getopt.h getopt.h-t inttypes.h \ + inttypes.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 dtoastr.c gettext.h \ - ignore-value.h + ignore-value.h verify.h libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) EXTRA_libgnu_a_SOURCES = md5.c ftoastr.c filemode.c getloadavg.c \ getopt.c getopt1.c lstat.c mktime.c readlink.c stat.c \ - strftime.c symlink.c time_r.c + strftime.c strtol.c strtoul.c strtoull.c strtoimax.c \ + strtoumax.c symlink.c time_r.c ARG_NONNULL_H = arg-nonnull.h CXXDEFS_H = c++defs.h WARN_ON_USE_H = warn-on-use.h @@ -797,6 +817,11 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strftime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoimax.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtol.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoul.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoull.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoumax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Po@am__quote@ @@ -1046,6 +1071,39 @@ } > $@-t && \ mv -f $@-t $@ +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ + -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ + -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ + -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ + -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ + -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ + -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ + -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ + -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ + -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ + -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ + -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ + -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ + -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ + -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ + -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ + -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ + -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/inttypes.in.h; \ + } > $@-t && \ + mv $@-t $@ + # We need the following in order to create when the system # doesn't have one that works. @GL_GENERATE_STDBOOL_H_TRUE@stdbool.h: stdbool.in.h $(top_builddir)/config.status === modified file 'autogen/aclocal.m4' --- autogen/aclocal.m4 2011-04-07 10:18:28 +0000 +++ autogen/aclocal.m4 2011-04-27 06:48:35 +0000 @@ -993,6 +993,7 @@ m4_include([m4/gl-comp.m4]) m4_include([m4/gnulib-common.m4]) m4_include([m4/include_next.m4]) +m4_include([m4/inttypes.m4]) m4_include([m4/longlong.m4]) m4_include([m4/lstat.m4]) m4_include([m4/md5.m4]) @@ -1009,6 +1010,8 @@ m4_include([m4/stdio_h.m4]) m4_include([m4/stdlib_h.m4]) m4_include([m4/strftime.m4]) +m4_include([m4/strtoull.m4]) +m4_include([m4/strtoumax.m4]) m4_include([m4/symlink.m4]) m4_include([m4/sys_stat_h.m4]) m4_include([m4/time_h.m4]) === modified file 'autogen/config.in' --- autogen/config.in 2011-04-25 10:18:22 +0000 +++ autogen/config.in 2011-04-27 06:48:35 +0000 @@ -92,6 +92,9 @@ /* Define to 1 if gettimeofday accepts only one argument. */ #undef GETTIMEOFDAY_ONE_ARGUMENT +/* Define to make the limit macros in visible. */ +#undef GL_TRIGGER_STDC_LIMIT_MACROS + /* Define to 1 if you want to use the GNU memory allocator. */ #undef GNU_MALLOC @@ -156,6 +159,14 @@ don't. */ #undef HAVE_DECL_STRMODE +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#undef HAVE_DECL_STRTOULL + +/* Define to 1 if you have the declaration of `strtoumax', and to 0 if you + don't. */ +#undef HAVE_DECL_STRTOUMAX + /* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you don't. */ #undef HAVE_DECL_SYS_SIGLIST @@ -646,9 +657,6 @@ /* Define to 1 if 'wint_t' is a signed integer type. */ #undef HAVE_SIGNED_WINT_T -/* Define to 1 if the system has the type `size_t'. */ -#undef HAVE_SIZE_T - /* Define to 1 if you have sound support. */ #undef HAVE_SOUND @@ -685,6 +693,12 @@ /* Define to 1 if you have the `strsignal' function. */ #undef HAVE_STRSIGNAL +/* Define to 1 if you have the `strtoull' function. */ +#undef HAVE_STRTOULL + +/* Define to 1 if you have the `strtoumax' function. */ +#undef HAVE_STRTOUMAX + /* Define to 1 if `ifr_addr' is a member of `struct ifreq'. */ #undef HAVE_STRUCT_IFREQ_IFR_ADDR @@ -1161,6 +1175,13 @@ /* Define like PROTOTYPES; this can be used by system headers. */ #undef __PROTOTYPES +/* Ensure that defines the limit macros, since gnulib's + relies on them. */ +#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS +# define __STDC_LIMIT_MACROS 1 +#endif + + /* Define to compiler's equivalent of C99 restrict keyword in array declarations. Define as empty for no equivalent. */ #undef __restrict_arr @@ -1344,10 +1365,6 @@ void *alloca (size_t); #endif -#ifndef HAVE_SIZE_T -typedef unsigned size_t; -#endif - #ifndef HAVE_STRCHR #define strchr(a, b) index (a, b) #endif === modified file 'autogen/configure' --- autogen/configure 2011-04-25 10:18:22 +0000 +++ autogen/configure 2011-04-27 06:48:35 +0000 @@ -772,32 +772,6 @@ GNULIB_FFLUSH GNULIB_FCLOSE GNULIB_DPRINTF -GL_GENERATE_STDINT_H_FALSE -GL_GENERATE_STDINT_H_TRUE -STDINT_H -WINT_T_SUFFIX -WCHAR_T_SUFFIX -SIG_ATOMIC_T_SUFFIX -SIZE_T_SUFFIX -PTRDIFF_T_SUFFIX -HAVE_SIGNED_WINT_T -HAVE_SIGNED_WCHAR_T -HAVE_SIGNED_SIG_ATOMIC_T -BITSIZEOF_WINT_T -BITSIZEOF_WCHAR_T -BITSIZEOF_SIG_ATOMIC_T -BITSIZEOF_SIZE_T -BITSIZEOF_PTRDIFF_T -HAVE_SYS_BITYPES_H -HAVE_SYS_INTTYPES_H -HAVE_STDINT_H -NEXT_AS_FIRST_DIRECTIVE_STDINT_H -NEXT_STDINT_H -HAVE_SYS_TYPES_H -HAVE_INTTYPES_H -HAVE_WCHAR_H -HAVE_UNSIGNED_LONG_LONG_INT -HAVE_LONG_LONG_INT NEXT_AS_FIRST_DIRECTIVE_STDDEF_H NEXT_STDDEF_H GL_GENERATE_STDDEF_H_FALSE @@ -809,7 +783,6 @@ GL_GENERATE_STDBOOL_H_FALSE GL_GENERATE_STDBOOL_H_TRUE STDBOOL_H -APPLE_UNIVERSAL_BUILD REPLACE_TIMEGM REPLACE_NANOSLEEP REPLACE_MKTIME @@ -855,6 +828,49 @@ GNULIB_FUTIMENS GNULIB_FSTATAT GNULIB_FCHMODAT +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H +NEXT_INTTYPES_H +UINT64_MAX_EQ_ULONG_MAX +UINT32_MAX_LT_UINTMAX_MAX +PRIPTR_PREFIX +PRI_MACROS_BROKEN +INT64_MAX_EQ_LONG_MAX +INT32_MAX_LT_INTMAX_MAX +HAVE_DECL_STRTOUMAX +HAVE_DECL_STRTOIMAX +HAVE_DECL_IMAXDIV +HAVE_DECL_IMAXABS +GNULIB_STRTOUMAX +GNULIB_STRTOIMAX +GNULIB_IMAXDIV +GNULIB_IMAXABS +GL_GENERATE_STDINT_H_FALSE +GL_GENERATE_STDINT_H_TRUE +STDINT_H +WINT_T_SUFFIX +WCHAR_T_SUFFIX +SIG_ATOMIC_T_SUFFIX +SIZE_T_SUFFIX +PTRDIFF_T_SUFFIX +HAVE_SIGNED_WINT_T +HAVE_SIGNED_WCHAR_T +HAVE_SIGNED_SIG_ATOMIC_T +BITSIZEOF_WINT_T +BITSIZEOF_WCHAR_T +BITSIZEOF_SIG_ATOMIC_T +BITSIZEOF_SIZE_T +BITSIZEOF_PTRDIFF_T +APPLE_UNIVERSAL_BUILD +HAVE_SYS_BITYPES_H +HAVE_SYS_INTTYPES_H +HAVE_STDINT_H +NEXT_AS_FIRST_DIRECTIVE_STDINT_H +NEXT_STDINT_H +HAVE_SYS_TYPES_H +HAVE_INTTYPES_H +HAVE_WCHAR_H +HAVE_UNSIGNED_LONG_LONG_INT +HAVE_LONG_LONG_INT LTLIBINTL LIBINTL GETOPT_H @@ -2529,60 +2545,6 @@ } # ac_fn_c_check_func -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_type - # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes @@ -2760,6 +2722,60 @@ as_fn_set_status $ac_retval } # ac_fn_c_compute_int + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -3049,12 +3065,13 @@ as_fn_append ac_func_list " readlinkat" gl_getopt_required=GNU as_fn_append ac_header_list " getopt.h" +as_fn_append ac_header_list " wchar.h" +as_fn_append ac_header_list " stdint.h" +as_fn_append ac_header_list " inttypes.h" as_fn_append ac_func_list " lstat" as_fn_append ac_func_list " alarm" as_fn_append ac_func_list " readlink" as_fn_append ac_header_list " sys/socket.h" -as_fn_append ac_header_list " wchar.h" -as_fn_append ac_header_list " stdint.h" as_fn_append ac_func_list " tzset" as_fn_append ac_func_list " symlink" as_fn_append ac_header_list " sys/stat.h" @@ -4108,7 +4125,7 @@ $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h fi -if test x$ac_gc_check_stringoverrun != x ; then +if test x$ac_gc_check_string_overrun != x ; then $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h @@ -6228,6 +6245,7 @@ # Code from module ignore-value: # Code from module include_next: # Code from module intprops: + # Code from module inttypes-incomplete: # Code from module lstat: # Code from module mktime: # Code from module multiarch: @@ -6241,11 +6259,14 @@ # Code from module stdio: # Code from module stdlib: # Code from module strftime: + # Code from module strtoull: + # Code from module strtoumax: # Code from module symlink: # Code from module sys_stat: # Code from module time: # Code from module time_r: # Code from module unistd: + # Code from module verify: # Code from module warn-on-use: @@ -7099,6 +7120,9 @@ CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" fi +# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better. + + # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; @@ -14694,6 +14718,899 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +$as_echo_n "checking for unsigned long long int... " >&6; } +if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main () +{ +/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 +$as_echo_n "checking for long long int... " >&6; } +if test "${ac_cv_type_long_long_int+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif +int +main () +{ +long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_type_long_long_int=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 +$as_echo "$ac_cv_type_long_long_int" >&6; } + if test $ac_cv_type_long_long_int = yes; then + +$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h + + fi + + + + + + + gl_cv_c_multiarch=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + arch= + prev= + for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do + if test -n "$prev"; then + case $word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$arch" || test "$arch" = "$word"; then + arch="$word" + else + gl_cv_c_multiarch=yes + fi + ;; + esac + prev= + else + if test "x$word" = "x-arch"; then + prev=arch + fi + fi + done + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $gl_cv_c_multiarch = yes; then + APPLE_UNIVERSAL_BUILD=1 + else + APPLE_UNIVERSAL_BUILD=0 + fi + + + + + + if test $ac_cv_type_long_long_int = yes; then + HAVE_LONG_LONG_INT=1 + else + HAVE_LONG_LONG_INT=0 + fi + + + if test $ac_cv_type_unsigned_long_long_int = yes; then + HAVE_UNSIGNED_LONG_LONG_INT=1 + else + HAVE_UNSIGNED_LONG_LONG_INT=0 + fi + + + + if test $ac_cv_header_wchar_h = yes; then + HAVE_WCHAR_H=1 + else + HAVE_WCHAR_H=0 + fi + + + if test $ac_cv_header_inttypes_h = yes; then + HAVE_INTTYPES_H=1 + else + HAVE_INTTYPES_H=0 + fi + + + if test $ac_cv_header_sys_types_h = yes; then + HAVE_SYS_TYPES_H=1 + else + HAVE_SYS_TYPES_H=0 + fi + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdint_h='<'stdint.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_stdint_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_stdint_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/stdint.h#{ + s#.*"\(.*/stdint.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_stdint_h='<'stdint.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 +$as_echo "$gl_cv_next_stdint_h" >&6; } + fi + NEXT_STDINT_H=$gl_cv_next_stdint_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdint.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdint_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_stdint_h = yes; then + HAVE_STDINT_H=1 + else + HAVE_STDINT_H=0 + fi + + + if test $ac_cv_header_stdint_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 +$as_echo_n "checking whether stdint.h conforms to C99... " >&6; } +if test "${gl_cv_header_working_stdint_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + gl_cv_header_working_stdint_h=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ +#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ +#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#include +/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ +#if !(defined WCHAR_MIN && defined WCHAR_MAX) +#error "WCHAR_MIN, WCHAR_MAX not defined in " +#endif + + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + +#ifdef INT8_MAX +int8_t a1 = INT8_MAX; +int8_t a1min = INT8_MIN; +#endif +#ifdef INT16_MAX +int16_t a2 = INT16_MAX; +int16_t a2min = INT16_MIN; +#endif +#ifdef INT32_MAX +int32_t a3 = INT32_MAX; +int32_t a3min = INT32_MIN; +#endif +#ifdef INT64_MAX +int64_t a4 = INT64_MAX; +int64_t a4min = INT64_MIN; +#endif +#ifdef UINT8_MAX +uint8_t b1 = UINT8_MAX; +#else +typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; +#endif +#ifdef UINT16_MAX +uint16_t b2 = UINT16_MAX; +#endif +#ifdef UINT32_MAX +uint32_t b3 = UINT32_MAX; +#endif +#ifdef UINT64_MAX +uint64_t b4 = UINT64_MAX; +#endif +int_least8_t c1 = INT8_C (0x7f); +int_least8_t c1max = INT_LEAST8_MAX; +int_least8_t c1min = INT_LEAST8_MIN; +int_least16_t c2 = INT16_C (0x7fff); +int_least16_t c2max = INT_LEAST16_MAX; +int_least16_t c2min = INT_LEAST16_MIN; +int_least32_t c3 = INT32_C (0x7fffffff); +int_least32_t c3max = INT_LEAST32_MAX; +int_least32_t c3min = INT_LEAST32_MIN; +int_least64_t c4 = INT64_C (0x7fffffffffffffff); +int_least64_t c4max = INT_LEAST64_MAX; +int_least64_t c4min = INT_LEAST64_MIN; +uint_least8_t d1 = UINT8_C (0xff); +uint_least8_t d1max = UINT_LEAST8_MAX; +uint_least16_t d2 = UINT16_C (0xffff); +uint_least16_t d2max = UINT_LEAST16_MAX; +uint_least32_t d3 = UINT32_C (0xffffffff); +uint_least32_t d3max = UINT_LEAST32_MAX; +uint_least64_t d4 = UINT64_C (0xffffffffffffffff); +uint_least64_t d4max = UINT_LEAST64_MAX; +int_fast8_t e1 = INT_FAST8_MAX; +int_fast8_t e1min = INT_FAST8_MIN; +int_fast16_t e2 = INT_FAST16_MAX; +int_fast16_t e2min = INT_FAST16_MIN; +int_fast32_t e3 = INT_FAST32_MAX; +int_fast32_t e3min = INT_FAST32_MIN; +int_fast64_t e4 = INT_FAST64_MAX; +int_fast64_t e4min = INT_FAST64_MIN; +uint_fast8_t f1 = UINT_FAST8_MAX; +uint_fast16_t f2 = UINT_FAST16_MAX; +uint_fast32_t f3 = UINT_FAST32_MAX; +uint_fast64_t f4 = UINT_FAST64_MAX; +#ifdef INTPTR_MAX +intptr_t g = INTPTR_MAX; +intptr_t gmin = INTPTR_MIN; +#endif +#ifdef UINTPTR_MAX +uintptr_t h = UINTPTR_MAX; +#endif +intmax_t i = INTMAX_MAX; +uintmax_t j = UINTMAX_MAX; + +#include /* for CHAR_BIT */ +#define TYPE_MINIMUM(t) \ + ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) +#define TYPE_MAXIMUM(t) \ + ((t) ((t) 0 < (t) -1 \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) +struct s { + int check_PTRDIFF: + PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) + && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) + ? 1 : -1; + /* Detect bug in FreeBSD 6.0 / ia64. */ + int check_SIG_ATOMIC: + SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) + && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) + ? 1 : -1; + int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; + int check_WCHAR: + WCHAR_MIN == TYPE_MINIMUM (wchar_t) + && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) + ? 1 : -1; + /* Detect bug in mingw. */ + int check_WINT: + WINT_MIN == TYPE_MINIMUM (wint_t) + && WINT_MAX == TYPE_MAXIMUM (wint_t) + ? 1 : -1; + + /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ + int check_UINT8_C: + (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; + int check_UINT16_C: + (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; + + /* Detect bugs in OpenBSD 3.9 stdint.h. */ +#ifdef UINT8_MAX + int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; +#endif +#ifdef UINT16_MAX + int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; +#endif +#ifdef UINT32_MAX + int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; +#endif +#ifdef UINT64_MAX + int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; +#endif + int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; + int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; + int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; + int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; + int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; + int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; + int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; + int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; + int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; + int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; + int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; +}; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if test "$cross_compiling" = yes; then : + gl_cv_header_working_stdint_h=yes + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ +#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ +#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#include + + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + +#include +#include +#define MVAL(macro) MVAL1(macro) +#define MVAL1(expression) #expression +static const char *macro_values[] = + { +#ifdef INT8_MAX + MVAL (INT8_MAX), +#endif +#ifdef INT16_MAX + MVAL (INT16_MAX), +#endif +#ifdef INT32_MAX + MVAL (INT32_MAX), +#endif +#ifdef INT64_MAX + MVAL (INT64_MAX), +#endif +#ifdef UINT8_MAX + MVAL (UINT8_MAX), +#endif +#ifdef UINT16_MAX + MVAL (UINT16_MAX), +#endif +#ifdef UINT32_MAX + MVAL (UINT32_MAX), +#endif +#ifdef UINT64_MAX + MVAL (UINT64_MAX), +#endif + NULL + }; + +int +main () +{ + + const char **mv; + for (mv = macro_values; *mv != NULL; mv++) + { + const char *value = *mv; + /* Test whether it looks like a cast expression. */ + if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 + || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 + || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 + || strncmp (value, "((int)"/*)*/, 6) == 0 + || strncmp (value, "((signed short)"/*)*/, 15) == 0 + || strncmp (value, "((signed char)"/*)*/, 14) == 0) + return mv - macro_values + 1; + } + return 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_header_working_stdint_h=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 +$as_echo "$gl_cv_header_working_stdint_h" >&6; } + fi + if test "$gl_cv_header_working_stdint_h" = yes; then + STDINT_H= + else + for ac_header in sys/inttypes.h sys/bitypes.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + if test $ac_cv_header_sys_inttypes_h = yes; then + HAVE_SYS_INTTYPES_H=1 + else + HAVE_SYS_INTTYPES_H=0 + fi + + if test $ac_cv_header_sys_bitypes_h = yes; then + HAVE_SYS_BITYPES_H=1 + else + HAVE_SYS_BITYPES_H=0 + fi + + + + + if test $APPLE_UNIVERSAL_BUILD = 0; then + + + for gltype in ptrdiff_t size_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 +$as_echo_n "checking for bit size of $gltype... " >&6; } +if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include "; then : + +else + result=unknown +fi + + eval gl_cv_bitsizeof_${gltype}=\$result + +fi +eval ac_res=\$gl_cv_bitsizeof_${gltype} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval result=\$gl_cv_bitsizeof_${gltype} + if test $result = unknown; then + result=0 + fi + GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + cat >>confdefs.h <<_ACEOF +#define BITSIZEOF_${GLTYPE} $result +_ACEOF + + eval BITSIZEOF_${GLTYPE}=\$result + done + + + fi + + + for gltype in sig_atomic_t wchar_t wint_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 +$as_echo_n "checking for bit size of $gltype... " >&6; } +if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include "; then : + +else + result=unknown +fi + + eval gl_cv_bitsizeof_${gltype}=\$result + +fi +eval ac_res=\$gl_cv_bitsizeof_${gltype} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval result=\$gl_cv_bitsizeof_${gltype} + if test $result = unknown; then + result=0 + fi + GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + cat >>confdefs.h <<_ACEOF +#define BITSIZEOF_${GLTYPE} $result +_ACEOF + + eval BITSIZEOF_${GLTYPE}=\$result + done + + + + + for gltype in sig_atomic_t wchar_t wint_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 +$as_echo_n "checking whether $gltype is signed... " >&6; } +if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + result=yes +else + result=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + eval gl_cv_type_${gltype}_signed=\$result + +fi +eval ac_res=\$gl_cv_type_${gltype}_signed + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval result=\$gl_cv_type_${gltype}_signed + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + if test "$result" = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_SIGNED_${GLTYPE} 1 +_ACEOF + + eval HAVE_SIGNED_${GLTYPE}=1 + else + eval HAVE_SIGNED_${GLTYPE}=0 + fi + done + + + gl_cv_type_ptrdiff_t_signed=yes + gl_cv_type_size_t_signed=no + if test $APPLE_UNIVERSAL_BUILD = 0; then + + + for gltype in ptrdiff_t size_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 +$as_echo_n "checking for $gltype integer literal suffix... " >&6; } +if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval gl_cv_type_${gltype}_suffix=no + eval result=\$gl_cv_type_${gltype}_signed + if test "$result" = yes; then + glsufu= + else + glsufu=u + fi + for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do + case $glsuf in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + i64) gltype1='__int64';; + u) gltype1='unsigned int';; + ul) gltype1='unsigned long int';; + ull) gltype1='unsigned long long int';; + ui64)gltype1='unsigned __int64';; + esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + extern $gltype foo; + extern $gltype1 foo; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval gl_cv_type_${gltype}_suffix=\$glsuf +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" != no && break + done +fi +eval ac_res=\$gl_cv_type_${gltype}_suffix + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" = no && result= + eval ${GLTYPE}_SUFFIX=\$result + cat >>confdefs.h <<_ACEOF +#define ${GLTYPE}_SUFFIX $result +_ACEOF + + done + + + fi + + + for gltype in sig_atomic_t wchar_t wint_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 +$as_echo_n "checking for $gltype integer literal suffix... " >&6; } +if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval gl_cv_type_${gltype}_suffix=no + eval result=\$gl_cv_type_${gltype}_signed + if test "$result" = yes; then + glsufu= + else + glsufu=u + fi + for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do + case $glsuf in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + i64) gltype1='__int64';; + u) gltype1='unsigned int';; + ul) gltype1='unsigned long int';; + ull) gltype1='unsigned long long int';; + ui64)gltype1='unsigned __int64';; + esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + extern $gltype foo; + extern $gltype1 foo; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval gl_cv_type_${gltype}_suffix=\$glsuf +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" != no && break + done +fi +eval ac_res=\$gl_cv_type_${gltype}_suffix + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" = no && result= + eval ${GLTYPE}_SUFFIX=\$result + cat >>confdefs.h <<_ACEOF +#define ${GLTYPE}_SUFFIX $result +_ACEOF + + done + + + + STDINT_H=stdint.h + fi + + if test -n "$STDINT_H"; then + GL_GENERATE_STDINT_H_TRUE= + GL_GENERATE_STDINT_H_FALSE='#' +else + GL_GENERATE_STDINT_H_TRUE='#' + GL_GENERATE_STDINT_H_FALSE= +fi + + + + + + GNULIB_IMAXABS=0; + GNULIB_IMAXDIV=0; + GNULIB_STRTOIMAX=0; + GNULIB_STRTOUMAX=0; + HAVE_DECL_IMAXABS=1; + HAVE_DECL_IMAXDIV=1; + HAVE_DECL_STRTOIMAX=1; + HAVE_DECL_STRTOUMAX=1; + INT32_MAX_LT_INTMAX_MAX=1; + INT64_MAX_EQ_LONG_MAX='defined _LP64'; + PRI_MACROS_BROKEN=0; + PRIPTR_PREFIX=__PRIPTR_PREFIX; + UINT32_MAX_LT_UINTMAX_MAX=1; + UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; + + GNULIB_FCHMODAT=0; GNULIB_FSTATAT=0; GNULIB_FUTIMENS=0; @@ -14817,48 +15734,6 @@ - gl_cv_c_multiarch=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - arch= - prev= - for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do - if test -n "$prev"; then - case $word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$arch" || test "$arch" = "$word"; then - arch="$word" - else - gl_cv_c_multiarch=yes - fi - ;; - esac - prev= - else - if test "x$word" = "x-arch"; then - prev=arch - fi - fi - done - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $gl_cv_c_multiarch = yes; then - APPLE_UNIVERSAL_BUILD=1 - else - APPLE_UNIVERSAL_BUILD=0 - fi - - - @@ -15003,127 +15878,6 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 -$as_echo_n "checking for unsigned long long int... " >&6; } -if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_type_unsigned_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; -int -main () -{ -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - ac_cv_type_unsigned_long_long_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 -$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } - if test $ac_cv_type_unsigned_long_long_int = yes; then - -$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h - - fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 -$as_echo_n "checking for long long int... " >&6; } -if test "${ac_cv_type_long_long_int+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_type_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int - if test $ac_cv_type_long_long_int = yes; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif -int -main () -{ -long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_type_long_long_int=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 -$as_echo "$ac_cv_type_long_long_int" >&6; } - if test $ac_cv_type_long_long_int = yes; then - -$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h - - fi - - - - - - GNULIB_DPRINTF=0; GNULIB_FCLOSE=0; GNULIB_FFLUSH=0; @@ -15234,6 +15988,17 @@ +ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" +if test "x$ac_cv_have_decl_strtoumax" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRTOUMAX $ac_have_decl +_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 @@ -16151,6 +16916,82 @@ # Code from module include_next: # Code from module intprops: + # Code from module inttypes-incomplete: + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_inttypes_h='<'inttypes.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_inttypes_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_inttypes_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/inttypes.h#{ + s#.*"\(.*/inttypes.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_inttypes_h='<'inttypes.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 +$as_echo "$gl_cv_next_inttypes_h" >&6; } + fi + NEXT_INTTYPES_H=$gl_cv_next_inttypes_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'inttypes.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_inttypes_h + fi + NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive + + + + + + + + +$as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h + + + + + # Code from module lstat: @@ -17784,6 +18625,106 @@ + # Code from module strtoull: + + + + if test "$ac_cv_type_unsigned_long_long_int" = yes; then + + + + + + + + + for ac_func in strtoull +do : + ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" +if test "x$ac_cv_func_strtoull" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOULL 1 +_ACEOF + +else + + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + +fi +done + + + if test $ac_cv_func_strtoull = no; then + HAVE_STRTOULL=0 + + : + + fi + fi + + + + + GNULIB_STRTOULL=1 + + + + # Code from module strtoumax: + + + + + if test "$ac_cv_have_decl_strtoumax" != yes; then + HAVE_DECL_STRTOUMAX=0 + + + + + + + + + + for ac_func in strtoumax +do : + ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax" +if test "x$ac_cv_func_strtoumax" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOUMAX 1 +_ACEOF + +else + + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + +fi +done + + + if test $ac_cv_func_strtoumax = no; then + + ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" +if test "x$ac_cv_have_decl_strtoull" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRTOULL $ac_have_decl +_ACEOF + + + + fi + fi + + + + + GNULIB_STRTOUMAX=1 + + # Code from module symlink: @@ -18106,6 +19047,7 @@ + # Code from module verify: # Code from module warn-on-use: # End of code from modules @@ -19596,17 +20538,6 @@ fi -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SIZE_T 1 -_ACEOF - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 $as_echo_n "checking for mbstate_t... " >&6; } if test "${ac_cv_type_mbstate_t+set}" = set; then : @@ -20297,6 +21228,10 @@ 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. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.