Now on revision 108729. ------------------------------------------------------------ revno: 108729 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2012-06-25 08:05:48 +0400 message: * xmenu.c (xmenu_show, xdialog_show): Explicit cast from `const char *' to `char *' to avoid compiler warning. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-24 23:14:39 +0000 +++ src/ChangeLog 2012-06-25 04:05:48 +0000 @@ -1,3 +1,8 @@ +2012-06-25 Dmitry Antipov + + * xmenu.c (xmenu_show, xdialog_show): Explicit cast from + `const char *' to `char *' to avoid compiler warning. + 2012-06-24 Paul Eggert * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string === modified file 'src/xmenu.c' --- src/xmenu.c 2012-06-23 10:47:00 +0000 +++ src/xmenu.c 2012-06-25 04:05:48 +0000 @@ -1729,7 +1729,7 @@ save_wv->next = wv; else first_wv->contents = wv; - wv->name = pane_string; + wv->name = (char *) pane_string; if (keymaps && !NILP (prefix)) wv->name++; wv->value = 0; @@ -2060,7 +2060,7 @@ pane_string = (NILP (pane_name) ? "" : SSDATA (pane_name)); prev_wv = xmalloc_widget_value (); - prev_wv->value = pane_string; + prev_wv->value = (char *) pane_string; if (keymaps && !NILP (prefix)) prev_wv->name++; prev_wv->enabled = 1; ------------------------------------------------------------ revno: 108728 committer: Paul Eggert branch nick: trunk timestamp: Sun 2012-06-24 16:14:39 -0700 message: * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string instead of truncating it to 63 (admittedly a generous limit). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-24 20:34:48 +0000 +++ src/ChangeLog 2012-06-24 23:14:39 +0000 @@ -1,5 +1,8 @@ 2012-06-24 Paul Eggert + * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string + instead of truncating it to 63 (admittedly a generous limit). + * process.c: Fix spelling and caps in comments. 2012-06-24 Dan Nicolaescu === modified file 'src/xterm.c' --- src/xterm.c 2012-06-24 17:39:14 +0000 +++ src/xterm.c 2012-06-24 23:14:39 +0000 @@ -10375,14 +10375,16 @@ const int total_atom_count = 1 + atom_count; Atom *atoms_return = xmalloc (sizeof (Atom) * total_atom_count); char **atom_names = xmalloc (sizeof (char *) * total_atom_count); - char xsettings_atom_name[64]; + static char const xsettings_fmt[] = "_XSETTINGS_S%d"; + char xsettings_atom_name[sizeof xsettings_fmt - 2 + + INT_STRLEN_BOUND (int)]; for (i = 0; i < atom_count; i++) atom_names[i] = (char *) atom_refs[i].name; /* Build _XSETTINGS_SN atom name */ - snprintf (xsettings_atom_name, sizeof (xsettings_atom_name), - "_XSETTINGS_S%d", XScreenNumberOfScreen (dpyinfo->screen)); + sprintf (xsettings_atom_name, xsettings_fmt, + XScreenNumberOfScreen (dpyinfo->screen)); atom_names[i] = xsettings_atom_name; XInternAtoms (dpyinfo->display, atom_names, total_atom_count, ------------------------------------------------------------ revno: 108727 committer: Paul Eggert branch nick: trunk timestamp: Sun 2012-06-24 13:34:48 -0700 message: * process.c: Fix spelling and caps in comments. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-24 20:22:22 +0000 +++ src/ChangeLog 2012-06-24 20:34:48 +0000 @@ -1,3 +1,7 @@ +2012-06-24 Paul Eggert + + * process.c: Fix spelling and caps in comments. + 2012-06-24 Dan Nicolaescu * emacs.c (setpgrp): Remove definition, unused. === modified file 'src/process.c' --- src/process.c 2012-06-24 17:39:14 +0000 +++ src/process.c 2012-06-24 20:34:48 +0000 @@ -4259,7 +4259,7 @@ an additional duration to wait, measured in nanoseconds If TIME_LIMIT is zero, then: If NSECS == 0, there is no limit. - If NSECS > 0, the timeout consists of NSEC only. + If NSECS > 0, the timeout consists of NSECS only. If NSECS < 0, gobble data immediately, as if TIME_LIMIT were negative. READ_KBD is a lisp value: @@ -6832,18 +6832,18 @@ Wait for timeout to elapse and/or keyboard input to be available. - time_limit is: + TIME_LIMIT is: timeout in seconds If negative, gobble data immediately available but don't wait for any. - nsec is: + NSECS is: an additional duration to wait, measured in nanoseconds If TIME_LIMIT is zero, then: - If NSEC == 0, there is no limit. - If NSEC > 0, the timeout consists of NSEC only. + If NSECS == 0, there is no limit. + If NSECS > 0, the timeout consists of NSECS only. If NSECS < 0, gobble data immediately, as if TIME_LIMIT were negative. - read_kbd is a Lisp_Object: + READ_KBD is a Lisp_Object: 0 to ignore keyboard input, or 1 to return when input is available, or -1 means caller will actually read the input, so don't throw to @@ -6852,7 +6852,7 @@ see full version for other parameters. We know that wait_proc will always be NULL, since `subprocesses' isn't defined. - do_display != 0 means redisplay should be done to show subprocess + DO_DISPLAY != 0 means redisplay should be done to show subprocess output that arrives. Return true if we received input from any process. */ ------------------------------------------------------------ revno: 108726 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2012-06-24 14:22:22 -0600 message: * emacs.c (setpgrp): Remove definition, unused. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-24 20:13:15 +0000 +++ src/ChangeLog 2012-06-24 20:22:22 +0000 @@ -1,5 +1,6 @@ 2012-06-24 Dan Nicolaescu + * emacs.c (setpgrp): Remove definition, unused. * sysdep.c (setpgrp): Remove definition, not used in this file. 2012-06-24 Juanma Barranquero === modified file 'src/emacs.c' --- src/emacs.c 2012-06-16 12:24:15 +0000 +++ src/emacs.c 2012-06-24 20:22:22 +0000 @@ -93,13 +93,6 @@ #define O_RDWR 2 #endif -#ifdef HAVE_SETPGID -#if !defined (USG) -#undef setpgrp -#define setpgrp setpgid -#endif -#endif - static const char emacs_version[] = VERSION; static const char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc."; ------------------------------------------------------------ revno: 108725 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2012-06-24 14:13:15 -0600 message: * sysdep.c (setpgrp): Remove definition, not used in this file. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-24 17:57:06 +0000 +++ src/ChangeLog 2012-06-24 20:13:15 +0000 @@ -1,3 +1,7 @@ +2012-06-24 Dan Nicolaescu + + * sysdep.c (setpgrp): Remove definition, not used in this file. + 2012-06-24 Juanma Barranquero * makefile.w32-in: Update dependencies. === modified file 'src/sysdep.c' --- src/sysdep.c 2012-06-24 17:39:14 +0000 +++ src/sysdep.c 2012-06-24 20:13:15 +0000 @@ -59,13 +59,6 @@ #include #include -#ifdef HAVE_SETPGID -#if !defined (USG) -#undef setpgrp -#define setpgrp setpgid -#endif -#endif - /* Get SI_SRPC_DOMAIN, if it is available. */ #ifdef HAVE_SYS_SYSTEMINFO_H #include ------------------------------------------------------------ revno: 108724 fixes bug(s): http://debbugs.gnu.org/11750 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2012-06-24 21:31:31 +0300 message: nt/config.nt (_Noreturn): Don't reference __SUNPRO_C. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2012-06-24 17:39:14 +0000 +++ nt/ChangeLog 2012-06-24 18:31:31 +0000 @@ -1,3 +1,7 @@ +2012-06-24 Eli Zaretskii + + * config.nt (_Noreturn): Don't reference __SUNPRO_C. + 2012-06-24 Paul Eggert Switch from NO_RETURN to C11's _Noreturn (Bug#11750). === modified file 'nt/config.nt' --- nt/config.nt 2012-06-24 17:39:14 +0000 +++ nt/config.nt 2012-06-24 18:31:31 +0000 @@ -498,8 +498,7 @@ /* The _Noreturn keyword of C11. */ #if ! (defined _Noreturn \ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) -# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ - || 0x5110 <= __SUNPRO_C) +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__)) # define _Noreturn __attribute__ ((__noreturn__)) # elif defined _MSC_VER && 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) ------------------------------------------------------------ revno: 108723 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2012-06-24 19:57:06 +0200 message: src/makefile.w32-in: Update dependencies. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-24 17:39:14 +0000 +++ src/ChangeLog 2012-06-24 17:57:06 +0000 @@ -1,3 +1,7 @@ +2012-06-24 Juanma Barranquero + + * makefile.w32-in: Update dependencies. + 2012-06-24 Eli Zaretskii * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h. === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2012-06-24 17:21:20 +0000 +++ src/makefile.w32-in 2012-06-24 17:57:06 +0000 @@ -390,10 +390,9 @@ GNU_LIB = $(EMACS_ROOT)/lib NT_INC = $(EMACS_ROOT)/nt/inc -TIMESPEC_H = $(GNU_LIB)/timespec.h SYSTIME_H = $(SRC)/systime.h \ - $(TIMESPEC_H) \ - $(NT_INC)/sys/time.h + $(NT_INC)/sys/time.h \ + $(GNU_LIB)/timespec.h ATIMER_H = $(SRC)/atimer.h \ $(SYSTIME_H) BLOCKINPUT_H = $(SRC)/blockinput.h \ @@ -461,15 +460,12 @@ SOCKET_H = $(NT_INC)/sys/socket.h \ $(SRC)/w32.h STAT_TIME_H = $(GNU_LIB)/stat-time.h \ - $(NT_INC)/sys/stat.h \ - $(NT_INC)/sys/time.h + $(NT_INC)/sys/stat.h SYSTTY_H = $(SRC)/systty.h \ $(NT_INC)/sys/ioctl.h \ $(NT_INC)/unistd.h TERMHOOKS_H = $(SRC)/termhooks.h \ $(SYSTIME_H) -UTIMENS_H = $(GNU_LIB)/utimens.h \ - $(NT_INC)/sys/time.h W32TERM_H = $(SRC)/w32term.h \ $(W32GUI_H) WINDOW_H = $(SRC)/window.h \ @@ -1353,6 +1349,7 @@ $(NT_INC)/unistd.h \ $(GNU_LIB)/allocator.h \ $(GNU_LIB)/ignore-value.h \ + $(GNU_LIB)/utimens.h \ $(BLOCKINPUT_H) \ $(CAREADLINKAT_H) \ $(CONFIG_H) \ @@ -1366,7 +1363,6 @@ $(SYSTIME_H) \ $(SYSTTY_H) \ $(TERMHOOKS_H) \ - $(UTIMENS_H) \ $(WINDOW_H) $(BLD)/term.$(O) : \ ------------------------------------------------------------ revno: 108722 fixes bug(s): http://debbugs.gnu.org/11750 committer: Paul Eggert branch nick: trunk timestamp: Sun 2012-06-24 10:39:14 -0700 message: Switch from NO_RETURN to C11's _Noreturn. diff: === modified file 'ChangeLog' --- ChangeLog 2012-06-24 17:21:20 +0000 +++ ChangeLog 2012-06-24 17:39:14 +0000 @@ -1,3 +1,10 @@ +2012-06-24 Paul Eggert + + Switch from NO_RETURN to C11's _Noreturn (Bug#11750). + We might as well use the spelling standardized by C11, + as in the long run that should simplify maintenance. + * configure.in (NO_RETURN): Remove. All uses replaced by _Noreturn. + 2012-06-24 Eli Zaretskii * lib/makefile.w32-in ($(BLD)/dtotimespec.$(O)): === modified file 'configure.in' --- configure.in 2012-06-23 09:55:13 +0000 +++ configure.in 2012-06-24 17:39:14 +0000 @@ -3536,13 +3536,6 @@ #include #include -#if defined __GNUC__ && (__GNUC__ > 2 \ - || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) -#define NO_RETURN __attribute__ ((__noreturn__)) -#else -#define NO_RETURN /* nothing */ -#endif - #if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */ #define NO_INLINE __attribute__((noinline)) #else === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-06-24 09:43:09 +0000 +++ lib-src/ChangeLog 2012-06-24 17:39:14 +0000 @@ -1,3 +1,18 @@ +2012-06-24 Paul Eggert + + Switch from NO_RETURN to C11's _Noreturn (Bug#11750). + * ebrowse.c (usage, version): + * emacsclient.c (print_help_and_exit, fail): + * etags.c (suggest_asking_for_help, fatal, pfatal): + * hexl.c (usage): + * make-docfile.c (fatal): + * movemail.c (fatal, pfatal_with_name, pfatal_and_delete): + * update-game-score.c (usage): + * ebrowse.c (usage, version): + * emacsclient.c (print_help_and_exit, fail): + Use _Noreturn rather than NO_RETURN. + No need for separate decl merely because of _Noreturn. + 2012-06-24 Samuel Bronson (tiny change) * emacsclient.c (set_local_socket): Fix compiler warning (Bug#7838). === modified file 'lib-src/ebrowse.c' --- lib-src/ebrowse.c 2012-01-19 07:21:25 +0000 +++ lib-src/ebrowse.c 2012-06-24 17:39:14 +0000 @@ -463,10 +463,6 @@ static void class_definition (struct sym *, int, int, int); static char *operator_name (int *); static void parse_qualified_param_ident_or_type (char **); -static void usage (int) NO_RETURN; -static void version (void) NO_RETURN; - - /*********************************************************************** Utilities @@ -3507,7 +3503,7 @@ --version display version info\n\ " -static void +static _Noreturn void usage (int error) { puts (USAGE); @@ -3522,7 +3518,7 @@ # define VERSION "21" #endif -static void +static _Noreturn void version (void) { /* Makes it easier to update automatically. */ === modified file 'lib-src/emacsclient.c' --- lib-src/emacsclient.c 2012-06-24 09:43:09 +0000 +++ lib-src/emacsclient.c 2012-06-24 17:39:14 +0000 @@ -169,8 +169,7 @@ be used for the new frame */ const char *frame_parameters = NULL; -static void print_help_and_exit (void) NO_RETURN; -static void fail (void) NO_RETURN; +static _Noreturn void print_help_and_exit (void); struct option longopts[] = @@ -670,7 +669,7 @@ } -static void +static _Noreturn void print_help_and_exit (void) { /* Spaces and tabs are significant in this message; they're chosen so the @@ -718,7 +717,7 @@ defined-- exit with an errorcode. Uses argv, but gets it from the global variable main_argv. */ -static void +static _Noreturn void fail (void) { if (alternate_editor) === modified file 'lib-src/etags.c' --- lib-src/etags.c 2012-05-21 15:36:54 +0000 +++ lib-src/etags.c 2012-06-24 17:39:14 +0000 @@ -366,9 +366,9 @@ static void free_regexps (void); static void regex_tag_multiline (void); static void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); -static void suggest_asking_for_help (void) NO_RETURN; -void fatal (const char *, const char *) NO_RETURN; -static void pfatal (const char *) NO_RETURN; +static _Noreturn void suggest_asking_for_help (void); +_Noreturn void fatal (const char *, const char *); +static _Noreturn void pfatal (const char *); static void add_node (node *, node **); static void init (void); === modified file 'lib-src/hexl.c' --- lib-src/hexl.c 2012-01-19 07:21:25 +0000 +++ lib-src/hexl.c 2012-06-24 17:39:14 +0000 @@ -48,7 +48,7 @@ int group_by = DEFAULT_GROUPING; char *progname; -void usage (void) NO_RETURN; +_Noreturn void usage (void); int main (int argc, char **argv) === modified file 'lib-src/make-docfile.c' --- lib-src/make-docfile.c 2012-06-08 21:33:58 +0000 +++ lib-src/make-docfile.c 2012-06-24 17:39:14 +0000 @@ -76,7 +76,6 @@ static int scan_file (char *filename); static int scan_lisp_file (const char *filename, const char *mode); static int scan_c_file (char *filename, const char *mode); -static void fatal (const char *s1, const char *s2) NO_RETURN; static void start_globals (void); static void write_globals (void); @@ -111,7 +110,7 @@ /* Print error message and exit. */ /* VARARGS1 */ -static void +static _Noreturn void fatal (const char *s1, const char *s2) { error (s1, s2); === modified file 'lib-src/movemail.c' --- lib-src/movemail.c 2012-01-19 07:21:25 +0000 +++ lib-src/movemail.c 2012-06-24 17:39:14 +0000 @@ -137,10 +137,10 @@ char *strerror (int); #endif -static void fatal (const char *s1, const char *s2, const char *s3) NO_RETURN; +static _Noreturn void fatal (const char *s1, const char *s2, const char *s3); static void error (const char *s1, const char *s2, const char *s3); -static void pfatal_with_name (char *name) NO_RETURN; -static void pfatal_and_delete (char *name) NO_RETURN; +static _Noreturn void pfatal_with_name (char *name); +static _Noreturn void pfatal_and_delete (char *name); static char *concat (const char *s1, const char *s2, const char *s3); static long *xmalloc (unsigned int size); #ifdef MAIL_USE_POP === modified file 'lib-src/update-game-score.c' --- lib-src/update-game-score.c 2012-04-16 00:41:01 +0000 +++ lib-src/update-game-score.c 2012-06-24 17:39:14 +0000 @@ -48,8 +48,6 @@ #include #include -static int usage (int err) NO_RETURN; - #define MAX_ATTEMPTS 5 #define MAX_SCORES 200 #define MAX_DATA_LEN 1024 @@ -59,7 +57,7 @@ #define difftime(t1, t0) (double)((t1) - (t0)) #endif -static int +static _Noreturn void usage (int err) { fprintf (stdout, "Usage: update-game-score [-m MAX] [-r] [-d DIR] game/scorefile SCORE DATA\n"); @@ -89,17 +87,13 @@ static int write_scores (const char *filename, const struct score_entry *scores, int count); -static void lose (const char *msg) NO_RETURN; - -static void +static _Noreturn void lose (const char *msg) { fprintf (stderr, "%s\n", msg); exit (EXIT_FAILURE); } -static void lose_syserr (const char *msg) NO_RETURN; - /* Taken from sysdep.c. */ #ifndef HAVE_STRERROR #ifndef WINDOWSNT @@ -116,7 +110,7 @@ #endif /* not WINDOWSNT */ #endif /* ! HAVE_STRERROR */ -static void +static _Noreturn void lose_syserr (const char *msg) { fprintf (stderr, "%s: %s\n", msg, strerror (errno)); === modified file 'lwlib/ChangeLog' --- lwlib/ChangeLog 2012-06-10 13:20:58 +0000 +++ lwlib/ChangeLog 2012-06-24 17:39:14 +0000 @@ -1,3 +1,10 @@ +2012-06-24 Paul Eggert + + Switch from NO_RETURN to C11's _Noreturn (Bug#11750). + * xlwmenu.c (abort_gracefully): + Use _Noreturn rather than NO_RETURN. + No need for separate decl merely because of _Noreturn. + 2012-05-31 Paul Eggert Remove obsolete '#define static' cruft. === modified file 'lwlib/xlwmenu.c' --- lwlib/xlwmenu.c 2012-05-31 05:08:37 +0000 +++ lwlib/xlwmenu.c 2012-06-24 17:39:14 +0000 @@ -190,7 +190,6 @@ static void Nothing(Widget w, XEvent *ev, String *params, Cardinal *num_params); static int separator_height (enum menu_separator); static void pop_up_menu (XlwMenuWidget, XButtonPressedEvent *); -static void abort_gracefully (Widget w) NO_RETURN; static XtActionsRec xlwMenuActionsList [] = @@ -273,7 +272,7 @@ /* Like abort, but remove grabs from widget W before. */ -static void +static _Noreturn void abort_gracefully (Widget w) { if (XtIsShell (XtParent (w))) === modified file 'nt/ChangeLog' --- nt/ChangeLog 2012-06-24 17:21:20 +0000 +++ nt/ChangeLog 2012-06-24 17:39:14 +0000 @@ -1,3 +1,10 @@ +2012-06-24 Paul Eggert + + Switch from NO_RETURN to C11's _Noreturn (Bug#11750). + * config.nt (_Noreturn): New macro. + (NO_RETURN): Remove. All uses replaced with _Noreturn. + (w32_abort) [HAVE_NTGUI]: Use _Noreturn rather than NO_RETURN. + 2012-06-24 Eli Zaretskii * inc/sys/time.h (struct timespec): Don't define it here, it is === modified file 'nt/config.nt' --- nt/config.nt 2012-06-11 23:17:11 +0000 +++ nt/config.nt 2012-06-24 17:39:14 +0000 @@ -495,18 +495,23 @@ #endif #include -#ifndef NO_RETURN -#if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR >= 5)) -#define NO_RETURN __attribute__ ((__noreturn__)) -#else -#define NO_RETURN /* nothing */ -#endif +/* The _Noreturn keyword of C11. */ +#if ! (defined _Noreturn \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif #endif /* Redefine abort. */ #ifdef HAVE_NTGUI #define abort w32_abort -void w32_abort (void) NO_RETURN; +_Noreturn void w32_abort (void); #endif /* Prevent accidental use of features unavailable in === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-24 17:21:20 +0000 +++ src/ChangeLog 2012-06-24 17:39:14 +0000 @@ -10,6 +10,38 @@ 2012-06-24 Paul Eggert + Switch from NO_RETURN to C11's _Noreturn (Bug#11750). + * buffer.h (buffer_slot_type_mismatch): + * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]: + * eval.c (unwind_to_catch): + * image.c (my_png_error, my_error_exit): + * keyboard.c (quit_throw_to_read_char, user_error) + (Fexit_recursive_edit, Fabort_recursive_edit): + * lisp.h (die, args_out_of_range, args_out_of_range_3) + (wrong_type_argument, buffer_overflow, __executable_start) + (memory_full, buffer_memory_full, string_overflow, Fthrow) + (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error) + (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs) + (fatal): + (child_setup) [!DOS_NT]: + * lread.c (end_of_file_error, invalid_syntax): + * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]: + * puresize.h (pure_write_error): + * search.c (matcher_overflow): + * sound.c (sound_perror, alsa_sound_perror): + * sysdep.c, syssignal.h (croak): + * term.c (maybe_fatal, vfatal): + * textprop.c (text_read_only): + * undo.c (user_error): + * unexmacosx.c (unexec_error): + * xterm.c (x_ins_del_lines, x_delete_glyphs): + Use _Noreturn rather than NO_RETURN. + No need for separate decl merely because of _Noreturn. + * sound.c (sound_warning, parse_sound): + Remove unnecessary forward decls. + +2012-06-24 Paul Eggert + Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000). * lisp.h (WAIT_READING_MAX): New macro. * dispnew.c (Fsleep_for, sit_for): === modified file 'src/buffer.h' --- src/buffer.h 2012-06-22 21:17:42 +0000 +++ src/buffer.h 2012-06-24 17:39:14 +0000 @@ -886,7 +886,7 @@ extern void set_buffer_temp (struct buffer *); extern Lisp_Object buffer_local_value_1 (Lisp_Object, Lisp_Object); extern void record_buffer (Lisp_Object); -extern void buffer_slot_type_mismatch (Lisp_Object, int) NO_RETURN; +extern _Noreturn void buffer_slot_type_mismatch (Lisp_Object, int); extern void fix_overlays_before (struct buffer *, ptrdiff_t, ptrdiff_t); extern void mmap_set_vars (int); === modified file 'src/data.c' --- src/data.c 2012-06-19 16:56:28 +0000 +++ src/data.c 2012-06-24 17:39:14 +0000 @@ -3213,9 +3213,8 @@ } #ifndef FORWARD_SIGNAL_TO_MAIN_THREAD -static void arith_error (int) NO_RETURN; +_Noreturn #endif - static void arith_error (int signo) { === modified file 'src/eval.c' --- src/eval.c 2012-06-08 13:18:26 +0000 +++ src/eval.c 2012-06-24 17:39:14 +0000 @@ -131,7 +131,6 @@ Lisp_Object inhibit_lisp_code; static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *); -static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; static int interactive_p (int); static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); static Lisp_Object Ffetch_bytecode (Lisp_Object); @@ -1111,10 +1110,10 @@ This is used for correct unwinding in Fthrow and Fsignal. */ -static void +static _Noreturn void unwind_to_catch (struct catchtag *catch, Lisp_Object value) { - register int last_time; + int last_time; /* Save the value in the tag. */ catch->val = value; === modified file 'src/image.c' --- src/image.c 2012-06-22 21:17:42 +0000 +++ src/image.c 2012-06-24 17:39:14 +0000 @@ -5548,8 +5548,7 @@ /* Error and warning handlers installed when the PNG library is initialized. */ -static void my_png_error (png_struct *, const char *) NO_RETURN; -static void +static _Noreturn void my_png_error (png_struct *png_ptr, const char *msg) { xassert (png_ptr != NULL); @@ -6130,8 +6129,7 @@ }; -static void my_error_exit (j_common_ptr) NO_RETURN; -static void +static _Noreturn void my_error_exit (j_common_ptr cinfo) { struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err; === modified file 'src/keyboard.c' --- src/keyboard.c 2012-06-24 04:11:19 +0000 +++ src/keyboard.c 2012-06-24 17:39:14 +0000 @@ -462,7 +462,7 @@ static Lisp_Object (Fcommand_execute) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); static void handle_interrupt (void); -static void quit_throw_to_read_char (int) NO_RETURN; +static _Noreturn void quit_throw_to_read_char (int); static void process_special_events (void); static void timer_start_idle (void); static void timer_stop_idle (void); @@ -1195,13 +1195,13 @@ Fthrow (Qtop_level, Qnil); } -static void user_error (const char*) NO_RETURN; -static void user_error (const char *msg) +static _Noreturn void +user_error (const char *msg) { xsignal1 (Quser_error, build_string (msg)); } -static Lisp_Object Fexit_recursive_edit (void) NO_RETURN; +_Noreturn DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "", doc: /* Exit from the innermost recursive edit or minibuffer. */) (void) @@ -1212,7 +1212,7 @@ user_error ("No recursive edit is in progress"); } -static Lisp_Object Fabort_recursive_edit (void) NO_RETURN; +_Noreturn DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, 0, "", doc: /* Abort the command that requested this recursive edit or minibuffer input. */) (void) === modified file 'src/lisp.h' --- src/lisp.h 2012-06-24 04:11:19 +0000 +++ src/lisp.h 2012-06-24 17:39:14 +0000 @@ -113,7 +113,7 @@ # define eassert(X) ((void) (0 && (X))) /* Check that X compiles. */ #else /* ENABLE_CHECKING */ -extern void die (const char *, const char *, int) NO_RETURN; +extern _Noreturn void die (const char *, const char *, int); /* The suppress_checking variable is initialized to 0 in alloc.c. Set it to 1 using a debugger to temporarily disable aborting on @@ -2388,10 +2388,10 @@ extern uintmax_t cons_to_unsigned (Lisp_Object, uintmax_t); extern struct Lisp_Symbol *indirect_variable (struct Lisp_Symbol *); -extern void args_out_of_range (Lisp_Object, Lisp_Object) NO_RETURN; -extern void args_out_of_range_3 (Lisp_Object, Lisp_Object, - Lisp_Object) NO_RETURN; -extern Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object) NO_RETURN; +extern _Noreturn void args_out_of_range (Lisp_Object, Lisp_Object); +extern _Noreturn void args_out_of_range_3 (Lisp_Object, Lisp_Object, + Lisp_Object); +extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); extern Lisp_Object do_symval_forwarding (union Lisp_Fwd *); extern void set_internal (Lisp_Object, Lisp_Object, Lisp_Object, int); extern void syms_of_data (void); @@ -2554,7 +2554,7 @@ extern Lisp_Object Qinhibit_modification_hooks; extern void move_gap (ptrdiff_t); extern void move_gap_both (ptrdiff_t, ptrdiff_t); -extern void buffer_overflow (void) NO_RETURN; +extern _Noreturn void buffer_overflow (void); extern void make_gap (ptrdiff_t); extern ptrdiff_t copy_text (const unsigned char *, unsigned char *, ptrdiff_t, int, int); @@ -2599,7 +2599,7 @@ /* Defined in dispnew.c */ #if (defined PROFILING \ && (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__)) -void __executable_start (void) NO_RETURN; +_Noreturn void __executable_start (void); #endif extern Lisp_Object selected_frame; extern Lisp_Object Vwindow_system; @@ -2675,8 +2675,8 @@ extern void reset_malloc_hooks (void); extern void uninterrupt_malloc (void); extern void malloc_warning (const char *); -extern void memory_full (size_t) NO_RETURN; -extern void buffer_memory_full (ptrdiff_t) NO_RETURN; +extern _Noreturn void memory_full (size_t); +extern _Noreturn void buffer_memory_full (ptrdiff_t); extern int survives_gc_p (Lisp_Object); extern void mark_object (Lisp_Object); #if defined REL_ALLOC && !defined SYSTEM_MALLOC @@ -2698,7 +2698,7 @@ EXFUN (Fvector, MANY); EXFUN (Fmake_symbol, 1); EXFUN (Fmake_marker, 0); -extern void string_overflow (void) NO_RETURN; +extern _Noreturn void string_overflow (void); EXFUN (Fmake_string, 2); extern Lisp_Object build_string (const char *); extern Lisp_Object make_string (const char *, ptrdiff_t); @@ -2872,14 +2872,15 @@ (ptrdiff_t nargs, Lisp_Object *args)); EXFUN (Fprogn, UNEVALLED); EXFUN (Finteractive_p, 0); -EXFUN (Fthrow, 2) NO_RETURN; +_Noreturn EXFUN (Fthrow, 2); EXFUN (Fsignal, 2); -extern void xsignal (Lisp_Object, Lisp_Object) NO_RETURN; -extern void xsignal0 (Lisp_Object) NO_RETURN; -extern void xsignal1 (Lisp_Object, Lisp_Object) NO_RETURN; -extern void xsignal2 (Lisp_Object, Lisp_Object, Lisp_Object) NO_RETURN; -extern void xsignal3 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object) NO_RETURN; -extern void signal_error (const char *, Lisp_Object) NO_RETURN; +extern _Noreturn void xsignal (Lisp_Object, Lisp_Object); +extern _Noreturn void xsignal0 (Lisp_Object); +extern _Noreturn void xsignal1 (Lisp_Object, Lisp_Object); +extern _Noreturn void xsignal2 (Lisp_Object, Lisp_Object, Lisp_Object); +extern _Noreturn void xsignal3 (Lisp_Object, Lisp_Object, Lisp_Object, + Lisp_Object); +extern _Noreturn void signal_error (const char *, Lisp_Object); EXFUN (Fcommandp, 2); EXFUN (Ffunctionp, 1); EXFUN (Feval, 2); @@ -2905,9 +2906,9 @@ extern void specbind (Lisp_Object, Lisp_Object); extern void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object); extern Lisp_Object unbind_to (ptrdiff_t, Lisp_Object); -extern void error (const char *, ...) NO_RETURN ATTRIBUTE_FORMAT_PRINTF (1, 2); -extern void verror (const char *, va_list) - NO_RETURN ATTRIBUTE_FORMAT_PRINTF (1, 0); +extern _Noreturn void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); +extern _Noreturn void verror (const char *, va_list) + ATTRIBUTE_FORMAT_PRINTF (1, 0); extern void do_autoload (Lisp_Object, Lisp_Object); extern Lisp_Object un_autoload (Lisp_Object); extern void init_eval_once (void); @@ -2954,7 +2955,7 @@ EXFUN (Fwiden, 0); EXFUN (Fuser_login_name, 1); EXFUN (Fsystem_name, 0); -extern void time_overflow (void) NO_RETURN; +extern _Noreturn void time_overflow (void); EXFUN (Fcurrent_time, 0); EXFUN (Fget_internal_run_time, 0); extern Lisp_Object make_buffer_string (ptrdiff_t, ptrdiff_t, int); @@ -2969,7 +2970,7 @@ /* Defined in buffer.c */ extern int mouse_face_overlay_overlaps (Lisp_Object); -extern void nsberror (Lisp_Object) NO_RETURN; +extern _Noreturn void nsberror (Lisp_Object); EXFUN (Fset_buffer_multibyte, 1); EXFUN (Foverlay_start, 1); EXFUN (Foverlay_end, 1); @@ -3052,7 +3053,7 @@ EXFUN (Fread_file_name, 6); extern Lisp_Object close_file_unwind (Lisp_Object); extern Lisp_Object restore_point_unwind (Lisp_Object); -extern void report_file_error (const char *, Lisp_Object) NO_RETURN; +extern _Noreturn void report_file_error (const char *, Lisp_Object); extern int internal_delete_file (Lisp_Object); extern void syms_of_fileio (void); extern Lisp_Object make_temp_name (Lisp_Object, int); @@ -3140,7 +3141,7 @@ extern int input_pending; EXFUN (Fdiscard_input, 0); EXFUN (Frecursive_edit, 0); -EXFUN (Ftop_level, 0) NO_RETURN; +_Noreturn EXFUN (Ftop_level, 0); extern Lisp_Object menu_bar_items (Lisp_Object); extern Lisp_Object tool_bar_items (Lisp_Object, int *); extern void discard_mouse_events (void); @@ -3209,7 +3210,7 @@ extern void fatal_error_signal (int); #endif extern Lisp_Object Qkill_emacs; -EXFUN (Fkill_emacs, 1) NO_RETURN; +_Noreturn EXFUN (Fkill_emacs, 1); #if HAVE_SETLOCALE void fixup_locale (void); void synchronize_system_messages_locale (void); @@ -3269,11 +3270,10 @@ extern void setup_process_coding_systems (Lisp_Object); EXFUN (Fcall_process, MANY); -extern int child_setup (int, int, int, char **, int, Lisp_Object) #ifndef DOS_NT - NO_RETURN + _Noreturn #endif - ; +extern int child_setup (int, int, int, char **, int, Lisp_Object); extern void init_callproc_1 (void); extern void init_callproc (void); extern void set_initial_environment (void); @@ -3406,8 +3406,8 @@ extern int *char_ins_del_vector; extern void mark_ttys (void); extern void syms_of_term (void); -extern void fatal (const char *msgid, ...) - NO_RETURN ATTRIBUTE_FORMAT_PRINTF (1, 2); +extern _Noreturn void fatal (const char *msgid, ...) + ATTRIBUTE_FORMAT_PRINTF (1, 2); /* Defined in terminal.c */ EXFUN (Fframe_terminal, 1); === modified file 'src/lread.c' --- src/lread.c 2012-06-22 21:17:42 +0000 +++ src/lread.c 2012-06-24 17:39:14 +0000 @@ -154,10 +154,6 @@ Lisp_Object, Lisp_Object); static Lisp_Object load_unwind (Lisp_Object); static Lisp_Object load_descriptor_unwind (Lisp_Object); - -static void invalid_syntax (const char *) NO_RETURN; -static void end_of_file_error (void) NO_RETURN; - /* Functions that read one byte from the current source READCHARFUN or unreads one byte. If the integer argument C is -1, it returns @@ -1656,7 +1652,7 @@ /* Signal an `end-of-file' error, if possible with file name information. */ -static void +static _Noreturn void end_of_file_error (void) { if (STRINGP (Vload_file_name)) @@ -2024,7 +2020,7 @@ /* Signal Qinvalid_read_syntax error. S is error string of length N (if > 0) */ -static void +static _Noreturn void invalid_syntax (const char *s) { xsignal1 (Qinvalid_read_syntax, build_string (s)); === modified file 'src/process.c' --- src/process.c 2012-06-24 04:11:19 +0000 +++ src/process.c 2012-06-24 17:39:14 +0000 @@ -5372,7 +5372,7 @@ static Lisp_Object process_sent_to; #ifndef FORWARD_SIGNAL_TO_MAIN_THREAD -static void send_process_trap (int) NO_RETURN; +static _Noreturn void send_process_trap (int); #endif static void === modified file 'src/puresize.h' --- src/puresize.h 2012-05-25 18:19:24 +0000 +++ src/puresize.h 2012-06-24 17:39:14 +0000 @@ -75,7 +75,7 @@ { if (PURE_P (obj)) \ pure_write_error (); } -extern void pure_write_error (void) NO_RETURN; +extern _Noreturn void pure_write_error (void); /* Define PURE_P. */ === modified file 'src/search.c' --- src/search.c 2012-06-16 12:24:15 +0000 +++ src/search.c 2012-06-24 17:39:14 +0000 @@ -101,9 +101,8 @@ static EMACS_INT search_buffer (Lisp_Object, ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, EMACS_INT, int, Lisp_Object, Lisp_Object, int); -static void matcher_overflow (void) NO_RETURN; -static void +static _Noreturn void matcher_overflow (void) { error ("Stack overflow in regexp matcher"); === modified file 'src/sound.c' --- src/sound.c 2012-05-25 18:19:24 +0000 +++ src/sound.c 2012-06-24 17:39:14 +0000 @@ -109,13 +109,6 @@ SOUND_ATTR_SENTINEL }; -#ifdef HAVE_ALSA -static void alsa_sound_perror (const char *, int) NO_RETURN; -#endif -static void sound_perror (const char *) NO_RETURN; -static void sound_warning (const char *); -static int parse_sound (Lisp_Object, Lisp_Object *); - /* END: Common Definitions */ /* BEGIN: Non Windows Definitions */ @@ -320,7 +313,7 @@ /* Like perror, but signals an error. */ -static void +static _Noreturn void sound_perror (const char *msg) { int saved_errno = errno; @@ -909,7 +902,7 @@ #define DEFAULT_ALSA_SOUND_DEVICE "default" #endif -static void +static _Noreturn void alsa_sound_perror (const char *msg, int err) { error ("%s: %s", msg, snd_strerror (err)); === modified file 'src/sysdep.c' --- src/sysdep.c 2012-06-23 16:44:45 +0000 +++ src/sysdep.c 2012-06-24 17:39:14 +0000 @@ -114,7 +114,7 @@ static int emacs_get_tty (int, struct emacs_tty *); static int emacs_set_tty (int, struct emacs_tty *, int); #if defined TIOCNOTTY || defined USG5 || defined CYGWIN -static void croak (char *) NO_RETURN; +static _Noreturn void croak (char *); #endif /* Declare here, including term.h is problematic on some systems. */ === modified file 'src/syssignal.h' --- src/syssignal.h 2012-05-01 03:45:39 +0000 +++ src/syssignal.h 2012-06-24 17:39:14 +0000 @@ -76,7 +76,7 @@ sigset_t sys_sigunblock (sigset_t new_mask); sigset_t sys_sigsetmask (sigset_t new_mask); #if ! (defined TIOCNOTTY || defined USG5 || defined CYGWIN) -void croak (char *) NO_RETURN; +_Noreturn void croak (char *); #endif #define sys_sigdel(MASK,SIG) sigdelset (&MASK,SIG) === modified file 'src/term.c' --- src/term.c 2012-06-22 21:17:42 +0000 +++ src/term.c 2012-06-24 17:39:14 +0000 @@ -86,11 +86,11 @@ static void set_tty_hooks (struct terminal *terminal); static void dissociate_if_controlling_tty (int fd); static void delete_tty (struct terminal *); -static void maybe_fatal (int must_succeed, struct terminal *terminal, - const char *str1, const char *str2, ...) - NO_RETURN ATTRIBUTE_FORMAT_PRINTF (3, 5) ATTRIBUTE_FORMAT_PRINTF (4, 5); -static void vfatal (const char *str, va_list ap) - NO_RETURN ATTRIBUTE_FORMAT_PRINTF (1, 0); +static _Noreturn void maybe_fatal (int must_succeed, struct terminal *terminal, + const char *str1, const char *str2, ...) + ATTRIBUTE_FORMAT_PRINTF (3, 5) ATTRIBUTE_FORMAT_PRINTF (4, 5); +static _Noreturn void vfatal (const char *str, va_list ap) + ATTRIBUTE_FORMAT_PRINTF (1, 0); #define OUTPUT(tty, a) \ === modified file 'src/textprop.c' --- src/textprop.c 2012-06-16 12:24:15 +0000 +++ src/textprop.c 2012-06-24 17:39:14 +0000 @@ -72,7 +72,6 @@ static Lisp_Object interval_insert_behind_hooks; static Lisp_Object interval_insert_in_front_hooks; -static void text_read_only (Lisp_Object) NO_RETURN; static Lisp_Object Fprevious_property_change (Lisp_Object, Lisp_Object, Lisp_Object); @@ -80,7 +79,7 @@ /* Signal a `text-read-only' error. This function makes it easier to capture that error in GDB by putting a breakpoint on it. */ -static void +static _Noreturn void text_read_only (Lisp_Object propval) { if (STRINGP (propval)) === modified file 'src/undo.c' --- src/undo.c 2012-06-22 21:17:42 +0000 +++ src/undo.c 2012-06-24 17:39:14 +0000 @@ -438,8 +438,8 @@ unbind_to (count, Qnil); } -static void user_error (const char*) NO_RETURN; -static void user_error (const char *msg) +static _Noreturn void +user_error (const char *msg) { xsignal1 (Quser_error, build_string (msg)); } === modified file 'src/unexmacosx.c' --- src/unexmacosx.c 2012-05-27 12:18:35 +0000 +++ src/unexmacosx.c 2012-06-24 17:39:14 +0000 @@ -197,8 +197,6 @@ static struct segment_command *data_segment_scp; -static void unexec_error (const char *format, ...) NO_RETURN; - /* Read N bytes from infd into memory starting at address DEST. Return true if successful, false otherwise. */ static int @@ -275,7 +273,7 @@ /* Debugging and informational messages routines. */ -static void +static _Noreturn void unexec_error (const char *format, ...) { va_list ap; === modified file 'src/xterm.c' --- src/xterm.c 2012-06-22 21:17:42 +0000 +++ src/xterm.c 2012-06-24 17:39:14 +0000 @@ -316,7 +316,7 @@ static void XTset_terminal_modes (struct terminal *); static void XTreset_terminal_modes (struct terminal *); static void x_clear_frame (struct frame *); -static void x_ins_del_lines (struct frame *, int, int) NO_RETURN; +static _Noreturn void x_ins_del_lines (struct frame *, int, int); static void frame_highlight (struct frame *); static void frame_unhighlight (struct frame *); static void x_new_focus_frame (struct x_display_info *, struct frame *); @@ -349,7 +349,7 @@ #ifdef USE_GTK static int x_dispatch_event (XEvent *, Display *); #endif -/* Don't declare this NO_RETURN because we want no +/* Don't declare this _Noreturn because we want no interference with debugging failing X calls. */ static void x_connection_closed (Display *, const char *); static void x_wm_set_window_state (struct frame *, int); @@ -908,7 +908,7 @@ static void x_draw_composite_glyph_string_foreground (struct glyph_string *); static void x_draw_glyph_string_box (struct glyph_string *); static void x_draw_glyph_string (struct glyph_string *); -static void x_delete_glyphs (struct frame *, int) NO_RETURN; +static _Noreturn void x_delete_glyphs (struct frame *, int); static void x_compute_glyph_string_overhangs (struct glyph_string *); static void x_set_cursor_gc (struct glyph_string *); static void x_set_mode_line_face_gc (struct glyph_string *); ------------------------------------------------------------ revno: 108721 fixes bug(s): http://debbugs.gnu.org/9000 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2012-06-24 20:21:20 +0300 message: Improve port of struct timespec to MS-Windows. lib/makefile.w32-in ($(BLD)/dtotimespec.$(O)): ($(BLD)/timespec-add.$(O)): ($(BLD)/timespec-sub.$(O)): Don't depend on $(EMACS_ROOT)/nt/inc/sys/time.h. lib/stat-time.h: lib/timespec.h: lib/utimens.h: Revert last change. src/makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h. (SYSTIME_H): Add nt/inc/sys/time.h. src/systime.h [WINDOWSNT]: Include sys/time.h. src/s/ms-w32.h (struct timespec): Definition moved from nt/inc/sys/time.h. Suggested by Paul Eggert . nt/inc/sys/time.h (struct timespec): Don't define it here, it is now defined in src/s/ms-w32.h. diff: === modified file 'ChangeLog' --- ChangeLog 2012-06-23 17:25:56 +0000 +++ ChangeLog 2012-06-24 17:21:20 +0000 @@ -1,3 +1,14 @@ +2012-06-24 Eli Zaretskii + + * lib/makefile.w32-in ($(BLD)/dtotimespec.$(O)): + ($(BLD)/timespec-add.$(O)): + ($(BLD)/timespec-sub.$(O)): Don't depend on + $(EMACS_ROOT)/nt/inc/sys/time.h. + + * lib/stat-time.h: + * lib/timespec.h: + * lib/utimens.h: Revert last change. + 2012-06-23 Paul Eggert Merge from gnulib. === modified file 'lib/makefile.w32-in' --- lib/makefile.w32-in 2012-06-23 10:22:59 +0000 +++ lib/makefile.w32-in 2012-06-24 17:21:20 +0000 @@ -77,7 +77,6 @@ $(SRC)/dtotimespec.c \ $(SRC)/intprops.h \ $(SRC)/timespec.h \ - $(EMACS_ROOT)/nt/inc/sys/time.h \ $(EMACS_ROOT)/nt/inc/sys/stat.h \ $(EMACS_ROOT)/src/s/ms-w32.h \ $(EMACS_ROOT)/src/config.h @@ -126,7 +125,6 @@ $(SRC)/timespec-add.c \ $(SRC)/intprops.h \ $(SRC)/timespec.h \ - $(EMACS_ROOT)/nt/inc/sys/time.h \ $(EMACS_ROOT)/nt/inc/sys/stat.h \ $(EMACS_ROOT)/src/s/ms-w32.h \ $(EMACS_ROOT)/src/config.h @@ -135,7 +133,6 @@ $(SRC)/timespec-sub.c \ $(SRC)/intprops.h \ $(SRC)/timespec.h \ - $(EMACS_ROOT)/nt/inc/sys/time.h \ $(EMACS_ROOT)/nt/inc/sys/stat.h \ $(EMACS_ROOT)/src/s/ms-w32.h \ $(EMACS_ROOT)/src/config.h === modified file 'lib/stat-time.h' --- lib/stat-time.h 2012-06-23 10:22:59 +0000 +++ lib/stat-time.h 2012-06-24 17:21:20 +0000 @@ -22,7 +22,6 @@ #include #include -#include /* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST, === modified file 'lib/timespec.h' --- lib/timespec.h 2012-06-23 10:22:59 +0000 +++ lib/timespec.h 2012-06-24 17:21:20 +0000 @@ -20,7 +20,6 @@ # define TIMESPEC_H # include -# include /* Return negative, zero, positive if A < B, A == B, A > B, respectively. === modified file 'lib/utimens.h' --- lib/utimens.h 2012-06-23 10:22:59 +0000 +++ lib/utimens.h 2012-06-24 17:21:20 +0000 @@ -1,5 +1,4 @@ #include -#include int fdutimens (int, char const *, struct timespec const [2]); int utimens (char const *, struct timespec const [2]); int lutimens (char const *, struct timespec const [2]); === modified file 'nt/ChangeLog' --- nt/ChangeLog 2012-06-23 10:22:59 +0000 +++ nt/ChangeLog 2012-06-24 17:21:20 +0000 @@ -1,3 +1,8 @@ +2012-06-24 Eli Zaretskii + + * inc/sys/time.h (struct timespec): Don't define it here, it is + now defined in src/s/ms-w32.h. + 2012-06-23 Eli Zaretskii Fix the MS-Windows build broken by revno 108687. === modified file 'nt/inc/sys/time.h' --- nt/inc/sys/time.h 2012-06-23 10:22:59 +0000 +++ nt/inc/sys/time.h 2012-06-24 17:21:20 +0000 @@ -17,12 +17,6 @@ int tz_dsttime; /* type of dst correction */ }; -struct timespec -{ - time_t tv_sec; /* seconds */ - long int tv_nsec; /* nanoseconds */ -}; - void gettimeofday (struct timeval *, struct timezone *); #endif /* SYS_TIME_H_INCLUDED */ === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-24 04:11:19 +0000 +++ src/ChangeLog 2012-06-24 17:21:20 +0000 @@ -1,3 +1,13 @@ +2012-06-24 Eli Zaretskii + + * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h. + (SYSTIME_H): Add nt/inc/sys/time.h. + + * systime.h [WINDOWSNT]: Include sys/time.h. + + * s/ms-w32.h (struct timespec): Definition moved from + nt/inc/sys/time.h. Suggested by Paul Eggert . + 2012-06-24 Paul Eggert Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000). === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2012-06-23 19:28:01 +0000 +++ src/makefile.w32-in 2012-06-24 17:21:20 +0000 @@ -390,10 +390,10 @@ GNU_LIB = $(EMACS_ROOT)/lib NT_INC = $(EMACS_ROOT)/nt/inc -TIMESPEC_H = $(GNU_LIB)/timespec.h \ - $(NT_INC)/sys/time.h +TIMESPEC_H = $(GNU_LIB)/timespec.h SYSTIME_H = $(SRC)/systime.h \ - $(TIMESPEC_H) + $(TIMESPEC_H) \ + $(NT_INC)/sys/time.h ATIMER_H = $(SRC)/atimer.h \ $(SYSTIME_H) BLOCKINPUT_H = $(SRC)/blockinput.h \ === modified file 'src/s/ms-w32.h' --- src/s/ms-w32.h 2012-06-23 10:22:59 +0000 +++ src/s/ms-w32.h 2012-06-24 17:21:20 +0000 @@ -296,6 +296,15 @@ #define utime _utime #endif +/* 'struct timespec' is used by time-related functions in lib/ and + elsewhere, but we don't use lib/time.h where the structure is + defined. */ +struct timespec +{ + time_t tv_sec; /* seconds */ + long int tv_nsec; /* nanoseconds */ +}; + /* This is hacky, but is necessary to avoid warnings about macro redefinitions using the SDK compilers. */ #ifndef __STDC__ === modified file 'src/systime.h' --- src/systime.h 2012-06-22 21:17:42 +0000 +++ src/systime.h 2012-06-24 17:21:20 +0000 @@ -38,6 +38,10 @@ #endif #endif #endif + +#ifdef WINDOWSNT +#include /* for 'struct timeval' */ +#endif /* The type to use to represent temporal intervals. It can be passed as the timeout argument to the pselect system call. */ ------------------------------------------------------------ revno: 108720 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11686 author: Lawrence Mitchell committer: Stefan Monnier branch nick: trunk timestamp: Sun 2012-06-24 13:07:26 -0400 message: * etc/NEWS: Move and improve the defun/defalias changes. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2012-06-22 21:17:42 +0000 +++ etc/ChangeLog 2012-06-24 17:07:26 +0000 @@ -1,3 +1,7 @@ +2012-06-24 Lawrence Mitchell + + * NEWS: Move and improve the defun/defalias changes (bug#11686). + 2012-06-22 Paul Eggert Support higher-resolution time stamps (Bug#9000). @@ -48,8 +52,8 @@ 2012-04-27 Jambunathan K - * org/OrgOdtStyles.xml (OrgDescriptionList): Modify style. With - this change, in a description list, if the description paragraph + * org/OrgOdtStyles.xml (OrgDescriptionList): Modify style. + With this change, in a description list, if the description paragraph spawns multiple lines then it will correctly indented. 2012-04-20 Glenn Morris @@ -71,8 +75,8 @@ * org/OrgOdtContentTemplate.xml (OrgIndentedSection-Level-*): New section styles. These sections are indented to the same level as the corresponding list entries. These sections hold - tables that occur within a list. (OrgTable): Increased - relative width from 90% to 96% for aesthetic reasons. + tables that occur within a list. (OrgTable): + Increased relative width from 90% to 96% for aesthetic reasons. 2012-03-16 Glenn Morris @@ -130,8 +134,8 @@ 2012-01-10 Chong Yidong * tutorials/TUTORIAL: Don't give instructions for old-style X - scrollbars. Use DEL terminology instead of DelBack. Improve - description of graphical continuation lines and mode-line. + scrollbars. Use DEL terminology instead of DelBack. + Improve description of graphical continuation lines and mode-line. Promote use of C-/ and C-SPC. Remove discussion of flow control. 2012-01-05 Glenn Morris @@ -504,11 +508,11 @@ POSIX does not allow "-" in Makefile variable names. Reported by Bruno Haible in . - * refcards/Makefile (DIRED_REFCARDS_PDF): Renamed from + * refcards/Makefile (DIRED_REFCARDS_PDF): Rename from DIRED-REFCARDS_PDF. - (MISC_REFCARDS_PDF): Renamed from MISC-REFCARDS_PDF. - (SURVIVAL_CARDS_PDF): Renamed from SURVIVAL-CARDS_PDF. - (VIPER_CARDS_PDF): Renamed from VIPER-CARDS_PDF. + (MISC_REFCARDS_PDF): Rename from MISC-REFCARDS_PDF. + (SURVIVAL_CARDS_PDF): Rename from SURVIVAL-CARDS_PDF. + (VIPER_CARDS_PDF): Rename from VIPER-CARDS_PDF. 2011-01-18 Glenn Morris @@ -1972,7 +1976,7 @@ * refcards/refcard.tex: Updates for printing. (\versionyear): Update to 2007. - (\copyrightnotice): Modified or unmodified ok. + (\copyrightnotice): Modify or unmodified ok. (Simple Customization): Don't use goto-line, since now it's bound. Also, use now-preferred (kbd ...) syntax. @@ -2646,7 +2650,7 @@ 2006-09-03 Diane Murray - * erc.texi (Getting Started, Connecting): Changed erc-select to erc. + * erc.texi (Getting Started, Connecting): Change erc-select to erc. 2006-09-02 Juri Linkov @@ -2763,8 +2767,8 @@ 2006-07-05 Kenichi Handa - * HELLO: Add a paragraph for non-ASCII examples at the head. Add - Bulgarian and Hungarian. Add more "hello"s to Danish and Swedish. + * HELLO: Add a paragraph for non-ASCII examples at the head. + Add Bulgarian and Hungarian. Add more "hello"s to Danish and Swedish. 2006-07-03 Bill Wohler @@ -2910,7 +2914,7 @@ 2006-05-24 Carsten Dominik - * orgcard.tex (section{Motion}): Added the item navigation commands. + * orgcard.tex (section{Motion}): Add the item navigation commands. (section{Publishing}): New section. (section{Links}): Documented elisp and shell links. @@ -3046,8 +3050,8 @@ New bitmaps for new images. * images/refresh.xpm, images/sort-ascending.xpm, - * images/sort-descending.xpm: Update with GTK 2.x images. Note - that the default GTK icons are not overridden by the GNOME theme + * images/sort-descending.xpm: Update with GTK 2.x images. + Note that the default GTK icons are not overridden by the GNOME theme due to a bug which was fixed in GNOME 2.15. Once GNOME 2.16 is in wide circulation, then the GTK icons should be replaced with the equivalent GNOME icons. Until then, we should be consistent with @@ -4317,8 +4321,8 @@ 2001-11-22 Colin Walters - * PROBLEMS: Remove already applied calc info patches. Clarify - that there is no such thing as Debian GNU/Linux 2.4.3. ftpd is + * PROBLEMS: Remove already applied calc info patches. + Clarify that there is no such thing as Debian GNU/Linux 2.4.3. ftpd is not handled by alternatives in Debian, the reporter surely meant just "--config ftp". @@ -4435,8 +4439,8 @@ * ps-prin1.ps: Footer implementation. Doc fix. (doLineNumber): Code fix for line number color. - (BeginPage, BeginSheet, HeaderFramePath, HeaderFrame, HeaderText): Code - fix for footer implementation. + (BeginPage, BeginSheet, HeaderFramePath, HeaderFrame, HeaderText): + Code fix for footer implementation. (TextStart, SetFooterLines, FooterFrameStart, doFramePath) (FooterFramePath, doFrame, FooterFrame, FooterStart) (HeaderOrFooterTextLines, HeaderOrFooterText, FooterText): New funs. @@ -4624,8 +4628,8 @@ * ps-prin0.ps: Insert a version number comment (5.2.2). Indentation fix. - * ps-prin1.ps: Insert a version number comment (5.2.2). Can - select page size with/without giving an error if PostScript + * ps-prin1.ps: Insert a version number comment (5.2.2). + Can select page size with/without giving an error if PostScript printer doesn't have this kind of page size. Zebra Stripe continues or restarts on next page. Indentation fix. (BeginSheet): If necessary, rescale n-up to fit on the sheet of @@ -4836,8 +4840,8 @@ * termcap.dat, termcap.ucb: Deleted and replaced. * termcap: New termcap file from the ncurses project; bigger, - better, brighter, does away with waxy yellow buildup. Email - me at terminfo@ccil.org if you have any trouble with this. + better, brighter, does away with waxy yellow buildup. + Email me at terminfo@ccil.org if you have any trouble with this. * README: Changed to track above change. @@ -4847,7 +4851,7 @@ 1995-04-26 Karl Heuer - * Makefile (maintainer-clean): Renamed from realclean. + * Makefile (maintainer-clean): Rename from realclean. 1995-04-09 Richard Stallman @@ -5044,8 +5048,8 @@ * DISTRIB: The actual domestic order form is now ORDERS.USA. The DISTRIB text now mentions 19. - * ORDERS.USA: Created. This is just the order form. DISTRIB - has a pointer to it at the beginning. + * ORDERS.USA: Created. This is just the order form. + DISTRIB has a pointer to it at the beginning. * EUROPE: Renamed to ORDERS.EUROPE. DISTRIB now has a pointer to it at the beginning. @@ -5126,7 +5130,7 @@ 1992-04-06 Jim Blandy (jimb@pogo.cs.oberlin.edu) - * etags.c (C_entries): Removed comment saying that \" in a string + * etags.c (C_entries): Remove comment saying that \" in a string isn't recognized as magic, because it is correctly handled. * getopt.c, getopt.h: New files, from GNU C library. @@ -5136,8 +5140,8 @@ optind. (main): Argument processing loop rewritten to call getopt to get next option. Options which take parameters (-o and -i) rewritten - to get parameter from optarg instead of argv[1]. Filename - preprocessing loop and update command changed similarly. + to get parameter from optarg instead of argv[1]. + Filename preprocessing loop and update command changed similarly. * Makefile (etags, ctags): Depend on and link with getopt.h, getopt.o, and getopt1.o. (getopt.o, getopt1.o): New targets for the GNU getopt routines. @@ -5278,8 +5282,8 @@ 1991-01-25 Jim Blandy (jimb@churchy.ai.mit.edu) * make-docfile: Find the arguments to a C function correctly, - by not ignoring the character that read_c_string returns. Don't - even try to find argument names for functions that take MANY + by not ignoring the character that read_c_string returns. + Don't even try to find argument names for functions that take MANY or UNEVALLED arguments, since they're a figment of the docstring's imagination. === modified file 'etc/NEWS' --- etc/NEWS 2012-06-22 21:17:42 +0000 +++ etc/NEWS 2012-06-24 17:07:26 +0000 @@ -425,6 +425,12 @@ The function `user-variable-p' is now an obsolete alias for `custom-variable-p'. ++++ +** The return values of `defalias', `defun' and `defmacro' have changed, +and are now undefined. For backwards compatibility, defun and +defmacro currently return the name of the newly defined function/macro +but this should not be relied upon. + ** `face-spec-set' no longer sets frame-specific attributes when the third argument is a frame (that usage was obsolete since Emacs 22.2). @@ -444,8 +450,6 @@ ** CL-style generalized variables are now in core Elisp. `setf' is autoloaded and `push' and `pop' accept generalized variables. -** The return value of `defalias' has changed and is now undefined. - ** `defun' also accepts a (declare DECLS) form, like `defmacro'. The interpretation of the DECLS is determined by `defun-declarations-alist'. ------------------------------------------------------------ revno: 108719 committer: Dmitry Antipov branch nick: trunk timestamp: Sun 2012-06-24 20:18:41 +0400 message: First Coccinelle semantic patch. * coccinelle: New subdirectory * coccinelle/README: Documentation stub. * coccinelle/vector_contents.cocci: Semantic patch to replace direct access to `contents' member of Lisp_Vector objects with AREF and ASET where appropriate. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2012-06-22 21:17:42 +0000 +++ admin/ChangeLog 2012-06-24 16:18:41 +0000 @@ -1,3 +1,12 @@ +2012-06-24 Dmitry Antipov + + First Coccinelle semantic patch. + * coccinelle: New subdirectory + * coccinelle/README: Documentation stub. + * coccinelle/vector_contents.cocci: Semantic patch to replace direct + access to `contents' member of Lisp_Vector objects with AREF and ASET + where appropriate. + 2012-06-22 Paul Eggert Support higher-resolution time stamps (Bug#9000). === added directory 'admin/coccinelle' === added file 'admin/coccinelle/README' --- admin/coccinelle/README 1970-01-01 00:00:00 +0000 +++ admin/coccinelle/README 2012-06-24 16:18:41 +0000 @@ -0,0 +1,3 @@ +This directory contains semantic patches for Coccinelle, a program matching +and transformation tool for programs written in C. For more details, see +http://coccinelle.lip6.fr. === added file 'admin/coccinelle/vector_contents.cocci' --- admin/coccinelle/vector_contents.cocci 1970-01-01 00:00:00 +0000 +++ admin/coccinelle/vector_contents.cocci 2012-06-24 16:18:41 +0000 @@ -0,0 +1,16 @@ +// Avoid direct access to `contents' member of +// Lisp_Vector, use AREF and ASET where possible. +@expression@ +identifier I1, I2; +expression E1, E2; +@@ +( +- XVECTOR (I1)->contents[I2++] = E1 ++ ASET (I1, I2, E1), I2++ +| +- XVECTOR (I1)->contents[E1] = E2 ++ ASET (I1, E1, E2) +| +-XVECTOR (I1)->contents[E1] ++AREF (I1, E1) +) ------------------------------------------------------------ revno: 108718 committer: Chong Yidong branch nick: trunk timestamp: Sun 2012-06-24 23:06:24 +0800 message: * xml.el (xml-parse-tag): Corrrectly handle comment embedded in non-tag text. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-23 16:58:13 +0000 +++ lisp/ChangeLog 2012-06-24 15:06:24 +0000 @@ -1,3 +1,8 @@ +2012-06-24 Chong Yidong + + * xml.el (xml-parse-tag): Correctly handle comment embedded in + non-tag text. + 2012-06-23 Juanma Barranquero * makefile.w32-in (COMPILE_FIRST): Synch with changes in revno:108688. === modified file 'lisp/xml.el' --- lisp/xml.el 2012-04-21 09:53:37 +0000 +++ lisp/xml.el 2012-06-24 15:06:24 +0000 @@ -424,7 +424,8 @@ (search-forward "-->") (skip-syntax-forward " ") (unless (eobp) - (xml-parse-tag parse-dtd xml-ns))) + (let ((xml-sub-parser t)) + (xml-parse-tag parse-dtd xml-ns)))) ;; end tag ((looking-at " branch nick: trunk timestamp: Sun 2012-06-24 06:17:34 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2012-06-23 10:17:30 +0000 +++ autogen/configure 2012-06-24 10:17:34 +0000 @@ -9695,6 +9695,69 @@ $as_echo "$gl_cv_func_getopt_gnu" >&6; } if test "$gl_cv_func_getopt_gnu" = "no"; then gl_replace_getopt=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5 +$as_echo_n "checking for working GNU getopt_long function... " >&6; } +if test "${gl_cv_func_getopt_long_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; + *) gl_cv_func_getopt_long_gnu="guessing yes";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + +int +main () +{ +static const struct option long_options[] = + { + { "xtremely-",no_argument, NULL, 1003 }, + { "xtra", no_argument, NULL, 1001 }, + { "xtreme", no_argument, NULL, 1002 }, + { "xtremely", no_argument, NULL, 1003 }, + { NULL, 0, NULL, 0 } + }; + /* This code fails on OpenBSD 5.0. */ + { + static char program[] = "program"; + static char xtremel[] = "--xtremel"; + char *argv[] = { program, xtremel, NULL }; + int option_index; + optind = 1; opterr = 0; + if (getopt_long (2, argv, "", long_options, &option_index) != 1003) + return 1; + } + return 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_long_gnu=yes +else + gl_cv_func_getopt_long_gnu=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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5 +$as_echo "$gl_cv_func_getopt_long_gnu" >&6; } + case "$gl_cv_func_getopt_long_gnu" in + *yes) ;; + *) gl_replace_getopt=yes ;; + esac fi fi ------------------------------------------------------------ revno: 108716 fixes bug(s): http://debbugs.gnu.org/7838 author: Samuel Bronson committer: Chong Yidong branch nick: trunk timestamp: Sun 2012-06-24 17:43:09 +0800 message: * emacsclient.c (set_local_socket): Fix a compiler warning. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-06-23 17:32:27 +0000 +++ lib-src/ChangeLog 2012-06-24 09:43:09 +0000 @@ -1,3 +1,7 @@ +2012-06-24 Samuel Bronson (tiny change) + + * emacsclient.c (set_local_socket): Fix compiler warning (Bug#7838). + 2012-06-22 Paul Eggert Support higher-resolution time stamps (Bug#9000). === modified file 'lib-src/emacsclient.c' --- lib-src/emacsclient.c 2012-05-05 04:32:58 +0000 +++ lib-src/emacsclient.c 2012-06-24 09:43:09 +0000 @@ -1278,7 +1278,7 @@ if (n > 0) { tmpdir = tmpdir_storage = xmalloc (n); - confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir, n); + confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir_storage, n); } else #endif ------------------------------------------------------------ revno: 108715 author: Thien-Thi Nguyen committer: Chong Yidong branch nick: trunk timestamp: Sun 2012-06-24 17:30:35 +0800 message: Lisp manual -- improve discussion of ptys vs pipes. * processes.texi (Asynchronous Processes): Make the pty vs pipe discussion more prominent. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-06-23 12:39:23 +0000 +++ doc/lispref/ChangeLog 2012-06-24 09:30:35 +0000 @@ -1,3 +1,8 @@ +2012-06-24 Thien-Thi Nguyen + + * processes.texi (Asynchronous Processes): Make the pty vs pipe + discussion more prominent. + 2012-06-23 Eli Zaretskii * commands.texi (Misc Events): Document the language-change event. === modified file 'doc/lispref/processes.texi' --- doc/lispref/processes.texi 2012-06-22 21:17:42 +0000 +++ doc/lispref/processes.texi 2012-06-24 09:30:35 +0000 @@ -541,16 +541,29 @@ @section Creating an Asynchronous Process @cindex asynchronous subprocess - After an @dfn{asynchronous process} is created, Emacs and the subprocess -both continue running immediately. The process thereafter runs -in parallel with Emacs, and the two can communicate with each other -using the functions described in the following sections. However, + In this section, we describe how to create an @dfn{asynchronous +process}. After an asynchronous process is created, it runs in +parallel with Emacs, and Emacs can communicate with it using the +functions described in the following sections (@pxref{Input to +Processes}, and @pxref{Output from Processes}). Note that process communication is only partially asynchronous: Emacs sends data to the process only when certain functions are called, and Emacs accepts data -from the process only when Emacs is waiting for input or for a time -delay. +from the process only while waiting for input or for a time delay. - Here we describe how to create an asynchronous process. +@cindex pty +@cindex pipe + An asynchronous process is controlled either via a @dfn{pty} +(pseudo-terminal) or a @dfn{pipe}. The choice of pty or pipe is made +when creating the process, based on the value of the variable +@code{process-connection-type} (see below). Ptys are usually +preferable for processes visible to the user, as in Shell mode, +because they allow for job control (@kbd{C-c}, @kbd{C-z}, etc.) +between the process and its children, whereas pipes do not. For +subprocesses used for internal purposes by programs, it is often +better to use a pipe, because they are more efficient, and because +they are immune to stray character injections that ptys introduce for +large (around 500 byte) messages. Also, the total number of ptys is +limited on many systems and it is good not to waste them. @defun start-process name buffer-or-name program &rest args This function creates a new asynchronous subprocess and starts the @@ -652,20 +665,10 @@ @end defun @defvar process-connection-type -@cindex pipes -@cindex @acronym{PTY}s This variable controls the type of device used to communicate with asynchronous subprocesses. If it is non-@code{nil}, then @acronym{PTY}s are used, when available. Otherwise, pipes are used. -@acronym{PTY}s are usually preferable for processes visible to the user, as -in Shell mode, because they allow job control (@kbd{C-c}, @kbd{C-z}, -etc.) to work between the process and its children, whereas pipes do -not. For subprocesses used for internal purposes by programs, it is -often better to use a pipe, because they are more efficient. In -addition, the total number of @acronym{PTY}s is limited on many systems and -it is good not to waste them. - The value of @code{process-connection-type} takes effect when @code{start-process} is called. So you can specify how to communicate with one subprocess by binding the variable around the call to ------------------------------------------------------------ revno: 108714 fixes bug(s): http://debbugs.gnu.org/9000 committer: Paul Eggert branch nick: trunk timestamp: Sat 2012-06-23 21:11:19 -0700 message: Fix bug when time_t is unsigned and as wide as intmax_t. * lisp.h (WAIT_READING_MAX): New macro. * dispnew.c (Fsleep_for, sit_for): * keyboard.c (kbd_buffer_get_event): * process.c (Faccept_process_output): Use it to avoid bogus compiler warnings with obsolescent GCC versions. This improves on the previous patch, which introduced a bug when time_t is unsigned and as wide as intmax_t. See . diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-23 19:40:50 +0000 +++ src/ChangeLog 2012-06-24 04:11:19 +0000 @@ -1,3 +1,15 @@ +2012-06-24 Paul Eggert + + Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000). + * lisp.h (WAIT_READING_MAX): New macro. + * dispnew.c (Fsleep_for, sit_for): + * keyboard.c (kbd_buffer_get_event): + * process.c (Faccept_process_output): + Use it to avoid bogus compiler warnings with obsolescent GCC versions. + This improves on the previous patch, which introduced a bug + when time_t is unsigned and as wide as intmax_t. + See . + 2012-06-23 Eli Zaretskii * dispnew.c (sit_for, Fsleep_for): === modified file 'src/dispnew.c' --- src/dispnew.c 2012-06-23 19:40:50 +0000 +++ src/dispnew.c 2012-06-24 04:11:19 +0000 @@ -5957,9 +5957,7 @@ if (0 < duration) { EMACS_TIME t = EMACS_TIME_FROM_DOUBLE (duration); - intmax_t secs = EMACS_SECS (t); - - wait_reading_process_output (min (secs, INTMAX_MAX), + wait_reading_process_output (min (EMACS_SECS (t), WAIT_READING_MAX), EMACS_NSECS (t), 0, 0, Qnil, NULL, 0); } @@ -6007,8 +6005,7 @@ else { EMACS_TIME t = EMACS_TIME_FROM_DOUBLE (seconds); - sec = EMACS_SECS (t); - sec = min (sec, INTMAX_MAX); + sec = min (EMACS_SECS (t), WAIT_READING_MAX); nsec = EMACS_NSECS (t); } } === modified file 'src/keyboard.c' --- src/keyboard.c 2012-06-23 19:40:50 +0000 +++ src/keyboard.c 2012-06-24 04:11:19 +0000 @@ -3857,11 +3857,9 @@ return Qnil; /* finished waiting */ else { - intmax_t secs; - EMACS_SUB_TIME (duration, *end_time, duration); - secs = EMACS_SECS (duration); - wait_reading_process_output (min (secs, INTMAX_MAX), + wait_reading_process_output (min (EMACS_SECS (duration), + WAIT_READING_MAX), EMACS_NSECS (duration), -1, 1, Qnil, NULL, 0); } === modified file 'src/lisp.h' --- src/lisp.h 2012-06-22 21:17:42 +0000 +++ src/lisp.h 2012-06-24 04:11:19 +0000 @@ -3249,6 +3249,14 @@ Lisp_Object, struct Lisp_Process *, int); +/* Max value for the first argument of wait_reading_process_output. */ +#if __GNUC__ == 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 5) +/* Work around a bug in GCC 3.4.2, known to be fixed in GCC 4.6.3. + The bug merely causes a bogus warning, but the warning is annoying. */ +# define WAIT_READING_MAX min (TYPE_MAXIMUM (time_t), INTMAX_MAX) +#else +# define WAIT_READING_MAX INTMAX_MAX +#endif extern void add_keyboard_wait_descriptor (int); extern void delete_keyboard_wait_descriptor (int); #ifdef HAVE_GPM === modified file 'src/process.c' --- src/process.c 2012-06-23 19:40:50 +0000 +++ src/process.c 2012-06-24 04:11:19 +0000 @@ -3996,9 +3996,7 @@ if (0 < XFLOAT_DATA (seconds)) { EMACS_TIME t = EMACS_TIME_FROM_DOUBLE (XFLOAT_DATA (seconds)); - - secs = EMACS_SECS (t); - secs = min (secs, INTMAX_MAX); + secs = min (EMACS_SECS (t), WAIT_READING_MAX); nsecs = EMACS_NSECS (t); } }