commit e1626257ab984c129aaeb8de6a1e4ec5ef1d2e13 (HEAD, refs/remotes/origin/master) Author: Po Lu Date: Wed Jan 5 14:53:57 2022 +0800 Make sure mouse face doesn't stay on the cursor after it is cleared cursor_in_mouse_face_p will still return true when the phys cursor is drawn inside show_mouse_face when called by clear_mouse_face, since that drawing happens before hlinfo->mouse_face_window can be set to nil. However, the row's mouse_face_p will be adjusted before the cursor is drawn in show_mouse_face, so it can be used to determine if the cursor is actually under mouse face. * src/xdisp.c (fill_composite_glyph_string): (fill_gstring_glyph_string): (fill_glyphless_glyph_string): (fill_glyph_string): (fill_xwidget_glyph_string): (fill_stretch_glyph_string): Only apply mouse face when DRAW_CURSOR if the row is also mouse_face_p. (set_glyph_string_background_width): Only adjust width if the row holding the cursor is also mouse_face_p. diff --git a/src/xdisp.c b/src/xdisp.c index 0635cad0d1..2326df4300 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -28549,7 +28549,10 @@ fill_composite_glyph_string (struct glyph_string *s, struct face *base_face, } if (s->hl == DRAW_MOUSE_FACE - || (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w))) + || (s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p + && cursor_in_mouse_face_p (s->w))) { int c = COMPOSITION_GLYPH (s->cmp, 0); Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (s->f); @@ -28598,7 +28601,10 @@ fill_gstring_glyph_string (struct glyph_string *s, int face_id, s->cmp_from = glyph->slice.cmp.from; s->cmp_to = glyph->slice.cmp.to + 1; if (s->hl == DRAW_MOUSE_FACE - || (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w))) + || (s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p + && cursor_in_mouse_face_p (s->w))) { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (s->f); s->face = FACE_FROM_ID_OR_NULL (s->f, hlinfo->mouse_face_face_id); @@ -28664,7 +28670,10 @@ fill_glyphless_glyph_string (struct glyph_string *s, int face_id, s->face = FACE_FROM_ID (s->f, face_id); s->font = s->face->font ? s->face->font : FRAME_FONT (s->f); if (s->hl == DRAW_MOUSE_FACE - || (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w))) + || (s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p + && cursor_in_mouse_face_p (s->w))) { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (s->f); s->face = FACE_FROM_ID_OR_NULL (s->f, hlinfo->mouse_face_face_id); @@ -28736,7 +28745,10 @@ fill_glyph_string (struct glyph_string *s, int face_id, s->font = s->face->font; if (s->hl == DRAW_MOUSE_FACE - || (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w))) + || (s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p + && cursor_in_mouse_face_p (s->w))) { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (s->f); s->face = FACE_FROM_ID_OR_NULL (s->f, hlinfo->mouse_face_face_id); @@ -28778,7 +28790,10 @@ fill_image_glyph_string (struct glyph_string *s) s->face = FACE_FROM_ID (s->f, s->first_glyph->face_id); s->font = s->face->font; if (s->hl == DRAW_MOUSE_FACE - || (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w))) + || (s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p + && cursor_in_mouse_face_p (s->w))) { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (s->f); s->face = FACE_FROM_ID_OR_NULL (s->f, hlinfo->mouse_face_face_id); @@ -28801,7 +28816,10 @@ fill_xwidget_glyph_string (struct glyph_string *s) s->face = FACE_FROM_ID (s->f, s->first_glyph->face_id); s->font = s->face->font; if (s->hl == DRAW_MOUSE_FACE - || (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w))) + || (s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p + && cursor_in_mouse_face_p (s->w))) { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (s->f); s->face = FACE_FROM_ID_OR_NULL (s->f, hlinfo->mouse_face_face_id); @@ -28835,7 +28853,10 @@ fill_stretch_glyph_string (struct glyph_string *s, int start, int end) s->face = FACE_FROM_ID (s->f, face_id); s->font = s->face->font; if (s->hl == DRAW_MOUSE_FACE - || (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w))) + || (s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p + && cursor_in_mouse_face_p (s->w))) { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (s->f); s->face = FACE_FROM_ID_OR_NULL (s->f, hlinfo->mouse_face_face_id); @@ -29122,6 +29143,8 @@ set_glyph_string_background_width (struct glyph_string *s, int start, int last_x #ifdef HAVE_WINDOW_SYSTEM if (FRAME_WINDOW_P (s->f) && s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p && cursor_in_mouse_face_p (s->w)) { /* Adjust the background width of the glyph string, because commit 8875ae70a435358824e7f39b0c769c459e6a067e Author: Po Lu Date: Wed Jan 5 06:26:31 2022 +0000 Simply conditions for mouse face display when drawing cursor on Haiku * src/haikuterm.c (haiku_draw_stretch_glyph_string): Simplify conditions for mouse face display. diff --git a/src/haikuterm.c b/src/haikuterm.c index 65c91bbd38..b8cb57a8fb 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -1057,10 +1057,8 @@ haiku_draw_stretch_glyph_string (struct glyph_string *s) if (!face->stipple) { uint32_t bkg; - if (s->hl == DRAW_MOUSE_FACE || (s->hl == DRAW_CURSOR - && s->row->mouse_face_p - && cursor_in_mouse_face_p (s->w))) - haiku_mouse_face_colors (s, NULL, &bkg); + if (s->row->mouse_face_p && cursor_in_mouse_face_p (s->w)) + haiku_mouse_face_colors (s, NULL, &bkg); else bkg = face->background; @@ -1087,9 +1085,7 @@ haiku_draw_stretch_glyph_string (struct glyph_string *s) { void *view = FRAME_HAIKU_VIEW (s->f); uint32_t bkg; - if (s->hl == DRAW_MOUSE_FACE) - haiku_mouse_face_colors (s, NULL, &bkg); - else if (s->hl == DRAW_CURSOR) + if (s->hl == DRAW_CURSOR) bkg = FRAME_CURSOR_COLOR (s->f).pixel; else bkg = s->face->background; commit f090c25113995eeac5c2f84ee78a63ed2fb91638 Author: Po Lu Date: Wed Jan 5 06:05:05 2022 +0000 Remove some unnecessary graphics state saves on Haiku * src/haikufont.c (haikufont_draw): * src/haikuterm.c (haiku_draw_box_rect): (haiku_draw_relief_rect): (haiku_draw_underwave): (haiku_draw_text_decoration): (haiku_draw_plain_background): (haiku_draw_glyph_string_foreground): (haiku_draw_glyphless_glyph_string_foreground): (haiku_draw_stretch_glyph_string): (haiku_draw_composite_glyph_string_foreground): (haiku_draw_image_glyph_string): Remove unnecessary calls to BView_StartClip and BView_EndClip. diff --git a/src/haikufont.c b/src/haikufont.c index 1e5c1cb352..e1a09f407c 100644 --- a/src/haikufont.c +++ b/src/haikufont.c @@ -956,7 +956,6 @@ haikufont_draw (struct glyph_string *s, int from, int to, prepare_face_for_display (s->f, face); BView_draw_lock (view); - BView_StartClip (view); if (with_background) { int height = FONT_HEIGHT (s->font), ascent = FONT_BASE (s->font); @@ -1022,7 +1021,6 @@ haikufont_draw (struct glyph_string *s, int from, int to, BView_DrawString (view, b, b_len); xfree (b); } - BView_EndClip (view); BView_draw_unlock (view); unblock_input (); return 1; diff --git a/src/haikuterm.c b/src/haikuterm.c index 5447683a6e..65c91bbd38 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -413,6 +413,7 @@ haiku_draw_box_rect (struct glyph_string *s, struct face *face = s->face; BView_StartClip (view); + haiku_clip_to_string (s); BView_SetHighColor (view, face->box_color); if (clip_rect) BView_ClipToRect (view, clip_rect->x, clip_rect->y, clip_rect->width, @@ -468,7 +469,7 @@ haiku_draw_relief_rect (struct glyph_string *s, void *view = FRAME_HAIKU_VIEW (s->f); BView_StartClip (view); - + haiku_clip_to_string (s); BView_SetHighColor (view, raised_p ? color_white : color_black); if (clip_rect) BView_ClipToRect (view, clip_rect->x, clip_rect->y, clip_rect->width, @@ -550,6 +551,7 @@ haiku_draw_underwave (struct glyph_string *s, int width, int x) void *view = FRAME_HAIKU_VIEW (s->f); BView_StartClip (view); + haiku_clip_to_string (s); BView_ClipToRect (view, x, y, width, wave_height); ax = x - ((int) (x) % dx) + (float) 0.5; bx = ax + dx; @@ -581,6 +583,7 @@ haiku_draw_text_decoration (struct glyph_string *s, struct face *face, void *view = FRAME_HAIKU_VIEW (s->f); BView_draw_lock (view); BView_StartClip (view); + haiku_clip_to_string (s); if (face->underline) { @@ -805,7 +808,6 @@ haiku_draw_plain_background (struct glyph_string *s, struct face *face, int box_line_hwidth, int box_line_vwidth) { void *view = FRAME_HAIKU_VIEW (s->f); - BView_StartClip (view); if (s->hl == DRAW_CURSOR) BView_SetHighColor (view, FRAME_CURSOR_COLOR (s->f).pixel); else @@ -817,7 +819,6 @@ haiku_draw_plain_background (struct glyph_string *s, struct face *face, s->y + box_line_hwidth, s->background_width, s->height - 2 * box_line_hwidth); - BView_EndClip (view); } static void @@ -893,7 +894,6 @@ haiku_draw_glyph_string_foreground (struct glyph_string *s) if (s->font_not_found_p) { - BView_StartClip (view); if (s->hl == DRAW_CURSOR) BView_SetHighColor (view, FRAME_OUTPUT_DATA (s->f)->cursor_fg); else @@ -905,7 +905,6 @@ haiku_draw_glyph_string_foreground (struct glyph_string *s) s->height); x += g->pixel_width; } - BView_EndClip (view); } else { @@ -996,13 +995,11 @@ haiku_draw_glyphless_glyph_string_foreground (struct glyph_string *s) s->ybase + glyph->slice.glyphless.lower_yoff, false); } - BView_StartClip (FRAME_HAIKU_VIEW (s->f)); if (glyph->u.glyphless.method != GLYPHLESS_DISPLAY_THIN_SPACE) BView_FillRectangle (FRAME_HAIKU_VIEW (s->f), x, s->ybase - glyph->ascent, glyph->pixel_width - 1, glyph->ascent + glyph->descent - 1); - BView_EndClip (FRAME_HAIKU_VIEW (s->f)); x += glyph->pixel_width; } } @@ -1044,10 +1041,8 @@ haiku_draw_stretch_glyph_string (struct glyph_string *s) x -= width; void *view = FRAME_HAIKU_VIEW (s->f); - BView_StartClip (view); BView_SetHighColor (view, FRAME_CURSOR_COLOR (s->f).pixel); BView_FillRectangle (view, x, s->y, width, s->height); - BView_EndClip (view); if (width < background_width) { @@ -1069,10 +1064,8 @@ haiku_draw_stretch_glyph_string (struct glyph_string *s) else bkg = face->background; - BView_StartClip (view); BView_SetHighColor (view, bkg); BView_FillRectangle (view, x, y, w, h); - BView_EndClip (view); } } } @@ -1093,7 +1086,6 @@ haiku_draw_stretch_glyph_string (struct glyph_string *s) if (background_width > 0) { void *view = FRAME_HAIKU_VIEW (s->f); - BView_StartClip (view); uint32_t bkg; if (s->hl == DRAW_MOUSE_FACE) haiku_mouse_face_colors (s, NULL, &bkg); @@ -1104,7 +1096,6 @@ haiku_draw_stretch_glyph_string (struct glyph_string *s) BView_SetHighColor (view, bkg); BView_FillRectangle (view, x, s->y, background_width, s->height); - BView_EndClip (view); } } s->background_filled_p = 1; @@ -1183,13 +1174,11 @@ haiku_draw_composite_glyph_string_foreground (struct glyph_string *s) if (s->font_not_found_p && !s->cmp_from) { - BView_StartClip (view); if (s->hl == DRAW_CURSOR) BView_SetHighColor (view, FRAME_OUTPUT_DATA (s->f)->cursor_fg); else BView_SetHighColor (view, s->face->foreground); BView_StrokeRectangle (view, s->x, s->y, s->width - 1, s->height - 1); - BView_EndClip (view); } else if (!s->first_glyph->u.cmp.automatic) { @@ -1379,12 +1368,8 @@ haiku_draw_image_glyph_string (struct glyph_string *s) s->stippled_p = face->stipple != 0; - BView_draw_lock (view); - BView_StartClip (view); BView_SetHighColor (view, face->background); BView_FillRectangle (view, x, y, width, height); - BView_EndClip (view); - BView_draw_unlock (view); if (bitmap) { @@ -1416,10 +1401,6 @@ haiku_draw_image_glyph_string (struct glyph_string *s) if (gui_intersect_rectangles (&cr, &ir, &r)) { - BView_draw_lock (view); - BView_StartClip (view); - - haiku_clip_to_string (s); if (s->img->have_be_transforms_p) { bitmap = BBitmap_transform_bitmap (bitmap, @@ -1448,19 +1429,13 @@ haiku_draw_image_glyph_string (struct glyph_string *s) if (s->img->have_be_transforms_p) BBitmap_free (bitmap); - BView_EndClip (view); - BView_draw_unlock (view); } if (s->hl == DRAW_CURSOR) { - BView_draw_lock (view); - BView_StartClip (view); BView_SetPenSize (view, 1); BView_SetHighColor (view, FRAME_CURSOR_COLOR (s->f).pixel); BView_StrokeRectangle (view, r.x, r.y, r.width, r.height); - BView_EndClip (view); - BView_draw_unlock (view); } } commit d763c12796ae13d5acd3c48c180981538d4318a8 Merge: ad63bdf05a e7aa3ece52 Author: Stefan Kangas Date: Wed Jan 5 06:30:39 2022 +0100 Merge from origin/emacs-28 e7aa3ece52 Fix vc-git with old Git over Tramp and cygwin-mount.el c0cfbca311 * lisp/emacs-lisp/checkdoc.el (bytecomp): Add missing require # Conflicts: # etc/NEWS commit ad63bdf05aa4a0e66139c24fbac8b08b22fc4542 Author: Po Lu Date: Wed Jan 5 10:36:40 2022 +0800 Fix xwidgets setting their own signal handlers * src/xgselect.c (release_select_lock): (acquire_select_lock): Fix coding style. (xg_select): Call `catch_child_signal' if xwidgets are enabled. * src/xwidget.c (kill_xwidget): (kill_buffer_xwidgets): Call `catch_child_signal'. (bug#53013) diff --git a/src/xgselect.c b/src/xgselect.c index 8afd3f238f..674c259db7 100644 --- a/src/xgselect.c +++ b/src/xgselect.c @@ -28,11 +28,13 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "blockinput.h" #include "systime.h" +#include "process.h" static ptrdiff_t threads_holding_glib_lock; static GMainContext *glib_main_context; -void release_select_lock (void) +void +release_select_lock (void) { #if GNUC_PREREQ (4, 7, 0) if (__atomic_sub_fetch (&threads_holding_glib_lock, 1, __ATOMIC_ACQ_REL) == 0) @@ -43,7 +45,8 @@ void release_select_lock (void) #endif } -static void acquire_select_lock (GMainContext *context) +static void +acquire_select_lock (GMainContext *context) { #if GNUC_PREREQ (4, 7, 0) if (__atomic_fetch_add (&threads_holding_glib_lock, 1, __ATOMIC_ACQ_REL) == 0) @@ -181,6 +184,21 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, #else need_to_dispatch = true; #endif + + /* xwidgets make heavy use of GLib subprocesses, which add their own + SIGCHLD handler at arbitrary locations. That doesn't play well + with Emacs's own handler, so once GLib does its thing with its + subprocesses we restore our own SIGCHLD handler (which chains the + GLib handler) here. + + There is an obvious race condition, but we can't really do + anything about that, except hope a SIGCHLD arrives soon to clear + up the situation. */ + +#ifdef HAVE_XWIDGETS + catch_child_signal (); +#endif + if (need_to_dispatch) { acquire_select_lock (context); diff --git a/src/xwidget.c b/src/xwidget.c index 24dafa7d3c..7d6d256a19 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -3610,6 +3610,8 @@ kill_xwidget (struct xwidget *xw) xw->widget_osr = NULL; xw->widgetwindow_osr = NULL; xw->find_text = NULL; + + catch_child_signal (); #elif defined NS_IMPL_COCOA nsxwidget_kill (xw); #endif @@ -3630,4 +3632,6 @@ kill_buffer_xwidgets (Lisp_Object buffer) kill_xwidget (xw); } } + + catch_child_signal (); } commit a7dbbcac571ebf07ec89a09cc8d9bc4fdf2ae063 Author: Po Lu Date: Wed Jan 5 10:16:06 2022 +0800 Fix display of internal border in child frames on pgtk * src/pgtkfns.c (Fx_create_frame): Fix child frame border resource names. * src/pgtkterm.c (pgtk_clear_under_internal_border): Fix test for child frames. (bug#53018) diff --git a/src/pgtkfns.c b/src/pgtkfns.c index 5d596861b8..e94c2dfb30 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c @@ -1454,9 +1454,6 @@ This function is an internal primitive--use `make-frame' instead. */ ) gui_default_parameter (f, parms, Qborder_width, make_fixnum (0), "borderWidth", "BorderWidth", RES_TYPE_NUMBER); - /* This defaults to 1 in order to match xterm. We recognize either - internalBorderWidth or internalBorder (which is what xterm calls - it). */ if (NILP (Fassq (Qinternal_border_width, parms))) { Lisp_Object value; @@ -1468,13 +1465,18 @@ This function is an internal primitive--use `make-frame' instead. */ ) parms = Fcons (Fcons (Qinternal_border_width, value), parms); } + gui_default_parameter (f, parms, Qinternal_border_width, + make_fixnum (0), + "internalBorderWidth", "internalBorderWidth", + RES_TYPE_NUMBER); + /* Same for child frames. */ if (NILP (Fassq (Qchild_frame_border_width, parms))) { Lisp_Object value; value = gui_display_get_arg (dpyinfo, parms, Qchild_frame_border_width, - "childFrameBorderWidth", "childFrameBorderWidth", + "childFrameBorder", "childFrameBorder", RES_TYPE_NUMBER); if (! EQ (value, Qunbound)) parms = Fcons (Fcons (Qchild_frame_border_width, value), @@ -1486,10 +1488,6 @@ This function is an internal primitive--use `make-frame' instead. */ ) make_fixnum (0), "childFrameBorderWidth", "childFrameBorderWidth", RES_TYPE_NUMBER); - gui_default_parameter (f, parms, Qinternal_border_width, - make_fixnum (0), - "internalBorderWidth", "internalBorderWidth", - RES_TYPE_NUMBER); gui_default_parameter (f, parms, Qright_divider_width, make_fixnum (0), NULL, NULL, RES_TYPE_NUMBER); gui_default_parameter (f, parms, Qbottom_divider_width, make_fixnum (0), diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 3093083a82..736fce09c4 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -4957,7 +4957,8 @@ void pgtk_clear_under_internal_border (struct frame *f) { if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0 - && gtk_widget_get_realized (FRAME_GTK_OUTER_WIDGET (f))) + && (!FRAME_GTK_OUTER_WIDGET (f) + || gtk_widget_get_realized (FRAME_GTK_OUTER_WIDGET (f)))) { int border = FRAME_INTERNAL_BORDER_WIDTH (f); int width = FRAME_PIXEL_WIDTH (f); commit e7aa3ece52d26cc7e4d3f3990aff56127389779f (refs/remotes/origin/emacs-28) Author: Dmitry Gutov Date: Wed Jan 5 04:08:10 2022 +0200 Fix vc-git with old Git over Tramp and cygwin-mount.el * lisp/vc/vc-git.el (vc-git-use-literal-pathspecs): New variable. (vc-git-command, vc-git--call): Use it to determine whether to set GIT_LITERAL_PATHSPECS=1 (bug#51497). (vc-git--literal-pathspec, vc-git--literal-pathspecs): Remove. Update all callers. This reverts the previous solution for bug#39452. * lisp/progmodes/project.el (project--vc-list-files): Use the new variable. diff --git a/etc/NEWS b/etc/NEWS index f007c00b89..1e882883b5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1949,6 +1949,13 @@ String or list of strings specifying switches for Git log under VC. If you are still using it with any regularity, please file a bug report with some details. +--- +*** New variable 'vc-git-use-literal-pathspecs'. +The Git backend's function now treat all file names "literally", where +some of them previously could interpret file names (pathspecs) as +globs when they contain appropriate characters. Functions can bind +the aforementioned variable to nil locally to avoid this. + ** Gnus +++ diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index bd2ca421ae..1000e8c87f 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -494,10 +494,12 @@ backend implementation of `project-external-roots'.") (declare-function vc-hg-command "vc-hg") (defun project--vc-list-files (dir backend extra-ignores) + (defvar vc-git-use-literal-pathspecs) (pcase backend (`Git (let ((default-directory (expand-file-name (file-name-as-directory dir))) (args '("-z")) + (vc-git-use-literal-pathspecs nil) files) ;; Include unregistered. (setq args (append args '("-c" "-o" "--exclude-standard"))) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 3519f08646..7072b8e483 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -223,6 +223,12 @@ included in the completions." ;; History of Git commands. (defvar vc-git-history nil) +;; Default to t because commands which don't support literal pathspecs +;; ignore the environment variable silently. +(defvar vc-git-use-literal-pathspecs t + "Non-nil to treat pathspecs in commands literally. +Good example of file name that needs this: \"test[56].xx\".") + ;; Clear up the cache to force vc-call to check again and discover ;; new functions when we reload this file. (put 'Git 'vc-functions nil) @@ -242,20 +248,6 @@ included in the completions." ;;;###autoload (load "vc-git" nil t) ;;;###autoload (vc-git-registered file)))) -;; Good example of file name that needs this: "test[56].xx". -(defun vc-git--literal-pathspec (file) - "Prepend :(literal) path magic to FILE." - (when file - ;; Expand abbreviated file names. - (when (file-name-absolute-p file) - (setq file (expand-file-name file))) - (concat ":(literal)" (file-local-name file)))) - -(defun vc-git--literal-pathspecs (files) - "Prepend :(literal) path magic to FILES." - (unless (vc-git--file-list-is-rootdir files) - (mapcar #'vc-git--literal-pathspec files))) - (defun vc-git-registered (file) "Check whether FILE is registered with git." (let ((dir (vc-git-root file))) @@ -269,12 +261,12 @@ included in the completions." (name (file-relative-name file dir)) (str (with-demoted-errors "Error: %S" (cd dir) - (vc-git--out-ok "ls-files" "-c" "-z" "--" (vc-git--literal-pathspec name)) + (vc-git--out-ok "ls-files" "-c" "-z" "--" name) ;; If result is empty, use ls-tree to check for deleted ;; file. (when (eq (point-min) (point-max)) (vc-git--out-ok "ls-tree" "--name-only" "-z" "HEAD" - "--" (vc-git--literal-pathspec name))) + "--" name)) (buffer-string)))) (and str (> (length str) (length name)) @@ -356,7 +348,7 @@ in the order given by `git status'." ,@(when (version<= "1.7.6.3" (vc-git--program-version)) '("--ignored")) "--")) - (status (apply #'vc-git--run-command-string (vc-git--literal-pathspec file) args))) + (status (apply #'vc-git--run-command-string file args))) (if (null status) ;; If status is nil, there was an error calling git, likely because ;; the file is not in a git repo. @@ -634,28 +626,28 @@ or an empty string if none." (pcase (vc-git-dir-status-state->stage git-state) ('update-index (if files - (vc-git-command (current-buffer) 'async (vc-git--literal-pathspecs files) "add" "--refresh" "--") + (vc-git-command (current-buffer) 'async files "add" "--refresh" "--") (vc-git-command (current-buffer) 'async nil "update-index" "--refresh"))) ('ls-files-added - (vc-git-command (current-buffer) 'async (vc-git--literal-pathspecs files) + (vc-git-command (current-buffer) 'async files "ls-files" "-z" "-c" "-s" "--")) ('ls-files-up-to-date - (vc-git-command (current-buffer) 'async (vc-git--literal-pathspecs files) + (vc-git-command (current-buffer) 'async files "ls-files" "-z" "-c" "-s" "--")) ('ls-files-conflict - (vc-git-command (current-buffer) 'async (vc-git--literal-pathspecs files) + (vc-git-command (current-buffer) 'async files "ls-files" "-z" "-u" "--")) ('ls-files-unknown - (vc-git-command (current-buffer) 'async (vc-git--literal-pathspecs files) + (vc-git-command (current-buffer) 'async files "ls-files" "-z" "-o" "--exclude-standard" "--")) ('ls-files-ignored - (vc-git-command (current-buffer) 'async (vc-git--literal-pathspecs files) + (vc-git-command (current-buffer) 'async files "ls-files" "-z" "-o" "-i" "--directory" "--no-empty-directory" "--exclude-standard" "--")) ;; --relative added in Git 1.5.5. ('diff-index - (vc-git-command (current-buffer) 'async (vc-git--literal-pathspecs files) + (vc-git-command (current-buffer) 'async files "diff-index" "--relative" "-z" "-M" "HEAD" "--"))) (vc-run-delayed (vc-git-after-dir-status-stage git-state)))) @@ -883,12 +875,12 @@ The car of the list is the current branch." (when flist (vc-git-command nil 0 flist "update-index" "--add" "--")) (when dlist - (vc-git-command nil 0 (vc-git--literal-pathspecs dlist) "add")))) + (vc-git-command nil 0 dlist "add")))) (defalias 'vc-git-responsible-p #'vc-git-root) (defun vc-git-unregister (file) - (vc-git-command nil 0 (vc-git--literal-pathspec file) "rm" "-f" "--cached" "--")) + (vc-git-command nil 0 file "rm" "-f" "--cached" "--")) (declare-function log-edit-mode "log-edit" ()) (declare-function log-edit-toggle-header "log-edit" (header value)) @@ -954,7 +946,7 @@ It is based on `log-edit-mode', and has Git-specific extensions.") (lambda (value) (when (equal value "yes") (list argument))))) ;; When operating on the whole tree, better pass "-a" than ".", since "." ;; fails when we're committing a merge. - (apply #'vc-git-command nil 0 (if only (vc-git--literal-pathspecs files)) + (apply #'vc-git-command nil 0 (if only files) (nconc (if msg-file (list "commit" "-F" (file-local-name msg-file)) (list "commit" "-m")) @@ -981,7 +973,7 @@ It is based on `log-edit-mode', and has Git-specific extensions.") (coding-system-for-write 'binary) (fullname (let ((fn (vc-git--run-command-string - (vc-git--literal-pathspec file) "ls-files" "-z" "--full-name" "--"))) + file "ls-files" "-z" "--full-name" "--"))) ;; ls-files does not return anything when looking for a ;; revision of a file that has been renamed or removed. (if (string= fn "") @@ -998,14 +990,14 @@ It is based on `log-edit-mode', and has Git-specific extensions.") (vc-git-root file))) (defun vc-git-checkout (file &optional rev) - (vc-git-command nil 0 (vc-git--literal-pathspec file) "checkout" (or rev "HEAD"))) + (vc-git-command nil 0 file "checkout" (or rev "HEAD"))) (defun vc-git-revert (file &optional contents-done) "Revert FILE to the version stored in the git repository." (if contents-done (vc-git-command nil 0 file "update-index" "--") - (vc-git-command nil 0 (vc-git--literal-pathspec file) "reset" "-q" "--") - (vc-git-command nil nil (vc-git--literal-pathspec file) "checkout" "-q" "--"))) + (vc-git-command nil 0 file "reset" "-q" "--") + (vc-git-command nil nil file "checkout" "-q" "--"))) (defvar vc-git-error-regexp-alist '(("^ \\(.+\\)\\> *|" 1 nil nil 0)) @@ -1089,7 +1081,7 @@ This prompts for a branch to merge from." (defun vc-git-conflicted-files (directory) "Return the list of files with conflicts in DIRECTORY." (let* ((status - (vc-git--run-command-string (vc-git--literal-pathspec directory) "status" "--porcelain" "--")) + (vc-git--run-command-string directory "status" "--porcelain" "--")) (lines (when status (split-string status "\n" 'omit-nulls))) files) (dolist (line lines files) @@ -1178,7 +1170,7 @@ If LIMIT is a revision string, use it as an end-revision." (let ((inhibit-read-only t)) (with-current-buffer buffer (apply #'vc-git-command buffer - 'async (vc-git--literal-pathspecs files) + 'async files (append '("log" "--no-color") (when (and vc-git-print-log-follow @@ -1432,7 +1424,7 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." (if vc-git-diff-switches (apply #'vc-git-command (or buffer "*vc-diff*") 1 ; bug#21969 - (vc-git--literal-pathspecs files) + files command "--exit-code" (append (vc-switches 'git 'diff) @@ -1517,7 +1509,7 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." (let* ((fname (file-relative-name file)) (prev-rev (with-temp-buffer (and - (vc-git--out-ok "rev-list" "-2" rev "--" (vc-git--literal-pathspec fname)) + (vc-git--out-ok "rev-list" "-2" rev "--" fname) (goto-char (point-max)) (bolp) (zerop (forward-line -1)) @@ -1545,7 +1537,7 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." (current-rev (with-temp-buffer (and - (vc-git--out-ok "rev-list" "-1" rev "--" (vc-git--literal-pathspec file)) + (vc-git--out-ok "rev-list" "-1" rev "--" file) (goto-char (point-max)) (bolp) (zerop (forward-line -1)) @@ -1557,7 +1549,7 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." (and current-rev (with-temp-buffer (and - (vc-git--out-ok "rev-list" "HEAD" "--" (vc-git--literal-pathspec file)) + (vc-git--out-ok "rev-list" "HEAD" "--" file) (goto-char (point-min)) (search-forward current-rev nil t) (zerop (forward-line -1)) @@ -1567,13 +1559,13 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." (or (vc-git-symbolic-commit next-rev) next-rev))) (defun vc-git-delete-file (file) - (vc-git-command nil 0 (vc-git--literal-pathspec file) "rm" "-f" "--")) + (vc-git-command nil 0 file "rm" "-f" "--")) (defun vc-git-rename-file (old new) (vc-git-command nil 0 (list old new) "mv" "-f" "--")) (defun vc-git-mark-resolved (files) - (vc-git-command nil 0 (vc-git--literal-pathspecs files) "add")) + (vc-git-command nil 0 files "add")) (defvar vc-git-extra-menu-map (let ((map (make-sparse-keymap))) @@ -1796,6 +1788,8 @@ The difference to vc-do-command is that this function always invokes (process-environment (append `("GIT_DIR" + ,@(when vc-git-use-literal-pathspecs + '("GIT_LITERAL_PATHSPECS=1")) ;; Avoid repository locking during background operations ;; (bug#21559). ,@(when revert-buffer-in-progress-p @@ -1833,6 +1827,8 @@ The difference to vc-do-command is that this function always invokes (process-environment (append `("GIT_DIR" + ,@(when vc-git-use-literal-pathspecs + '("GIT_LITERAL_PATHSPECS=1")) ;; Avoid repository locking during background operations ;; (bug#21559). ,@(when revert-buffer-in-progress-p commit 6719a3ccabec33e010aa4a42be2ee07e4e219b3c Author: Po Lu Date: Wed Jan 5 09:39:57 2022 +0800 Correctly set up XI key input mask on X Toolkit builds * src/xfns.c (setup_xi_event_mask): Also set the key event mask on the outer window, which might also have the input focus. (x_window) [USE_X_TOOLKIT]: Set up XI event mask a bit later. diff --git a/src/xfns.c b/src/xfns.c index d1b0b72b7f..b94fe17922 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -2934,15 +2934,11 @@ setup_xi_event_mask (struct frame *f) XISetMask (m, XI_ButtonPress); XISetMask (m, XI_ButtonRelease); - XISetMask (m, XI_KeyPress); - XISetMask (m, XI_KeyRelease); XISetMask (m, XI_Motion); XISetMask (m, XI_Enter); XISetMask (m, XI_Leave); -#if 0 - XISetMask (m, XI_FocusIn); - XISetMask (m, XI_FocusOut); -#endif + XISetMask (m, XI_KeyPress); + XISetMask (m, XI_KeyRelease); XISelectEvents (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &mask, 1); @@ -2950,6 +2946,16 @@ setup_xi_event_mask (struct frame *f) memset (m, 0, l); #endif /* !USE_GTK */ +#ifdef USE_X_TOOLKIT + XISetMask (m, XI_KeyPress); + XISetMask (m, XI_KeyRelease); + + XISelectEvents (FRAME_X_DISPLAY (f), + FRAME_OUTER_WINDOW (f), + &mask, 1); + memset (m, 0, l); +#endif + mask.deviceid = XIAllDevices; XISetMask (m, XI_PropertyEvent); @@ -3140,11 +3146,6 @@ x_window (struct frame *f, long window_prompting) class_hints.res_class = SSDATA (Vx_resource_class); XSetClassHint (FRAME_X_DISPLAY (f), XtWindow (shell_widget), &class_hints); -#ifdef HAVE_XINPUT2 - if (FRAME_DISPLAY_INFO (f)->supports_xi2) - setup_xi_event_mask (f); -#endif - #ifdef HAVE_X_I18N FRAME_XIC (f) = NULL; if (use_xim) @@ -3232,6 +3233,11 @@ x_window (struct frame *f, long window_prompting) /* This is a no-op, except under Motif. Make sure main areas are set to something reasonable, in case we get an error later. */ lw_set_main_areas (pane_widget, 0, frame_widget); + +#ifdef HAVE_XINPUT2 + if (FRAME_DISPLAY_INFO (f)->supports_xi2) + setup_xi_event_mask (f); +#endif } #else /* not USE_X_TOOLKIT */ commit c0cfbca311e6e07e9f8b9c1c9d0e2fe9792cd08c Author: Philipp Stephani Date: Wed Jan 5 01:41:46 2022 +0100 * lisp/emacs-lisp/checkdoc.el (bytecomp): Add missing require diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 3a2ded7c78..660b7062d1 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -161,6 +161,7 @@ ;;; Code: +(require 'bytecomp) ;; for byte-compile-docstring-max-column (require 'cl-lib) (require 'help-mode) ;; for help-xref-info-regexp (require 'thingatpt) ;; for handy thing-at-point-looking-at commit 30d4cfc0806ee1de5a8e5091f0cc5bce22830460 Author: Daniel Mendler Date: Tue Jan 4 21:08:04 2022 +0100 completion--nth-completion: Throw meaningful error If a configured completion style does not exist, throw a meaningful error. Also make completion-styles-alist a defvar, since completion styles like orderless extend it. * lisp/minibuffer.el (completion-styles-alist): Make it a defvar. (completion--nth-completion): Give a more meaningful error. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 1d596694e4..ab760a42d1 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -900,7 +900,7 @@ If the value is `lazy', the *Completions* buffer is only displayed after the second failed attempt to complete." :type '(choice (const nil) (const t) (const lazy))) -(defconst completion-styles-alist +(defvar completion-styles-alist '((emacs21 completion-emacs21-try-completion completion-emacs21-all-completions "Simple prefix-based completion. @@ -1076,9 +1076,10 @@ This overrides the defaults specified in `completion-category-defaults'." (result-and-style (completion--some (lambda (style) - (let ((probe (funcall (nth n (assq style - completion-styles-alist)) - string table pred point))) + (let ((probe (funcall + (or (nth n (assq style completion-styles-alist)) + (error "Invalid completion style %s" style)) + string table pred point))) (and probe (cons probe style)))) (completion--styles md))) (adjust-fn (get (cdr result-and-style) 'completion--adjust-metadata))) commit c899d9742a3dee2069eb3a4ee9380833b5574a95 Author: Paul Eggert Date: Tue Jan 4 13:13:25 2022 -0800 Update from gnulib diff --git a/build-aux/config.guess b/build-aux/config.guess index 4fd569269c..1105a74983 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -1,6 +1,6 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2021 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale diff --git a/build-aux/config.sub b/build-aux/config.sub index a4812cb695..5ba9a97d2c 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2021 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2021-10-27' +timestamp='2021-12-25' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -1020,6 +1020,11 @@ case $cpu-$vendor in ;; # Here we normalize CPU types with a missing or matching vendor + armh-unknown | armh-alt) + cpu=armv7l + vendor=alt + basic_os=${basic_os:-linux-gnueabihf} + ;; dpx20-unknown | dpx20-bull) cpu=rs6000 vendor=bull @@ -1121,7 +1126,7 @@ case $cpu-$vendor in xscale-* | xscalee[bl]-*) cpu=`echo "$cpu" | sed 's/^xscale/arm/'` ;; - arm64-*) + arm64-* | aarch64le-*) cpu=aarch64 ;; diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 2e21a211aa..58b6abee78 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,9 +3,9 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2021-11-01.16} +\def\texinfoversion{2022-01-02.12} % -% Copyright 1985--1986, 1988, 1990--2022 Free Software Foundation, Inc. +% Copyright 1985, 1986, 1988, 1990-2021 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -3193,14 +3193,9 @@ % \kern-0.4pt\hrule}% % \kern-.06em\raise0.4pt\hbox{\angleright}}}} -% definition of @key with no lozenge. If the current font is already -% monospace, don't change it; that way, we respect @kbdinputstyle. But -% if it isn't monospace, then use \tt. +% definition of @key with no lozenge. % -\def\key#1{{\setregularquotes - \nohyphenation - \ifmonospace\else\tt\fi - #1}\null} +\def\key#1{{\setregularquotes \nohyphenation \tt #1}\null} % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} @@ -11248,23 +11243,6 @@ \defbodyindent = .5cm }} -% Use @smallerbook to reset parameters for 6x9 trim size. -% (Just testing, parameters still in flux.) -\def\smallerbook{{\globaldefs = 1 - \parskip = 1.5pt plus 1pt - \textleading = 12pt - % - \internalpagesizes{7.4in}{4.8in}% - {-.2in}{-.4in}% - {0pt}{14pt}% - {9in}{6in}% - % - \lispnarrowing = 0.25in - \tolerance = 700 - \contentsrightmargin = 0pt - \defbodyindent = .4cm -}} - % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt diff --git a/lib/alloca.in.h b/lib/alloca.in.h index 71c8e42df8..e2b146138d 100644 --- a/lib/alloca.in.h +++ b/lib/alloca.in.h @@ -1,7 +1,7 @@ /* Memory allocation on the stack. - Copyright (C) 1995, 1999, 2001-2004, 2006-2022 Free Software - Foundation, Inc. + Copyright (C) 1995, 1999, 2001-2004, 2006-2022 Free Software Foundation, + Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/binary-io.h b/lib/binary-io.h index 7cff70e804..5b7661e233 100644 --- a/lib/binary-io.h +++ b/lib/binary-io.h @@ -1,6 +1,5 @@ /* Binary mode I/O. - Copyright (C) 2001, 2003, 2005, 2008-2022 Free Software Foundation, - Inc. + Copyright (C) 2001, 2003, 2005, 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/c-ctype.h b/lib/c-ctype.h index b0f3bc719d..1a4f603898 100644 --- a/lib/c-ctype.h +++ b/lib/c-ctype.h @@ -5,8 +5,7 @@ functions' behaviour depends on the current locale set via setlocale. - Copyright (C) 2000-2003, 2006, 2008-2022 Free Software Foundation, - Inc. + Copyright (C) 2000-2003, 2006, 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c index 000c849799..87b993cb2f 100644 --- a/lib/c-strcasecmp.c +++ b/lib/c-strcasecmp.c @@ -1,6 +1,5 @@ /* c-strcasecmp.c -- case insensitive string comparator in C locale - Copyright (C) 1998-1999, 2005-2006, 2009-2022 Free Software - Foundation, Inc. + Copyright (C) 1998-1999, 2005-2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c index 054b7a8e0e..5a5d30b6e5 100644 --- a/lib/c-strncasecmp.c +++ b/lib/c-strncasecmp.c @@ -1,6 +1,5 @@ /* c-strncasecmp.c -- case insensitive string comparator in C locale - Copyright (C) 1998-1999, 2005-2006, 2009-2022 Free Software - Foundation, Inc. + Copyright (C) 1998-1999, 2005-2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c index 38db29ace8..6ddc35f798 100644 --- a/lib/careadlinkat.c +++ b/lib/careadlinkat.c @@ -1,7 +1,7 @@ /* Read symbolic links into a buffer without size limitation, relative to fd. - Copyright (C) 2001, 2003-2004, 2007, 2009-2022 Free Software - Foundation, Inc. + Copyright (C) 2001, 2003-2004, 2007, 2009-2022 Free Software Foundation, + Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/cloexec.c b/lib/cloexec.c index 4c0912003e..812be01a06 100644 --- a/lib/cloexec.c +++ b/lib/cloexec.c @@ -1,7 +1,6 @@ /* cloexec.c - set or clear the close-on-exec descriptor flag - Copyright (C) 1991, 2004-2006, 2009-2022 Free Software Foundation, - Inc. + Copyright (C) 1991, 2004-2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/close-stream.c b/lib/close-stream.c index e2891db6eb..54f3e3c3d0 100644 --- a/lib/close-stream.c +++ b/lib/close-stream.c @@ -1,7 +1,6 @@ /* Close a stream, with nicer error checking than fclose's. - Copyright (C) 1998-2002, 2004, 2006-2022 Free Software Foundation, - Inc. + Copyright (C) 1998-2002, 2004, 2006-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/diffseq.h b/lib/diffseq.h index eb646b58cc..0c901a6ecf 100644 --- a/lib/diffseq.h +++ b/lib/diffseq.h @@ -1,7 +1,7 @@ /* Analyze differences between two vectors. - Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2022 Free - Software Foundation, Inc. + Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2022 Free Software + Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/dup2.c b/lib/dup2.c index 87d828727a..1c766ab38e 100644 --- a/lib/dup2.c +++ b/lib/dup2.c @@ -1,7 +1,6 @@ /* Duplicate an open file descriptor to a specified file descriptor. - Copyright (C) 1999, 2004-2007, 2009-2022 Free Software Foundation, - Inc. + Copyright (C) 1999, 2004-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/filemode.h b/lib/filemode.h index 58ed4bc987..7c645c16b5 100644 --- a/lib/filemode.h +++ b/lib/filemode.h @@ -1,7 +1,7 @@ /* Make a string describing file modes. - Copyright (C) 1998-1999, 2003, 2006, 2009-2022 Free Software - Foundation, Inc. + Copyright (C) 1998-1999, 2003, 2006, 2009-2022 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/filename.h b/lib/filename.h index 7c7d4edee3..ab77ca2df9 100644 --- a/lib/filename.h +++ b/lib/filename.h @@ -1,5 +1,5 @@ /* Basic filename support macros. - Copyright (C) 2001-2004, 2007-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/lib/fpending.c b/lib/fpending.c index 323da99c20..617f3977f8 100644 --- a/lib/fpending.c +++ b/lib/fpending.c @@ -1,6 +1,6 @@ /* fpending.c -- return the number of pending output bytes on a stream - Copyright (C) 2000, 2004, 2006-2007, 2009-2022 Free Software - Foundation, Inc. + Copyright (C) 2000, 2004, 2006-2007, 2009-2022 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/fpending.h b/lib/fpending.h index a14cea9b76..2b45e9031b 100644 --- a/lib/fpending.h +++ b/lib/fpending.h @@ -1,7 +1,7 @@ /* Declare __fpending. - Copyright (C) 2000, 2003, 2005-2006, 2009-2022 Free Software - Foundation, Inc. + Copyright (C) 2000, 2003, 2005-2006, 2009-2022 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/fsusage.c b/lib/fsusage.c index 96c404f7be..734f0fc746 100644 --- a/lib/fsusage.c +++ b/lib/fsusage.c @@ -1,7 +1,7 @@ /* fsusage.c -- return space usage of mounted file systems - Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2022 Free - Software Foundation, Inc. + Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2022 Free Software + Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/getgroups.c b/lib/getgroups.c index f0f36c6104..f7abd72667 100644 --- a/lib/getgroups.c +++ b/lib/getgroups.c @@ -1,7 +1,6 @@ /* provide consistent interface to getgroups for systems that don't allow N==0 - Copyright (C) 1996, 1999, 2003, 2006-2022 Free Software Foundation, - Inc. + Copyright (C) 1996, 1999, 2003, 2006-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/getloadavg.c b/lib/getloadavg.c index 254abdc06c..53d1b81a3b 100644 --- a/lib/getloadavg.c +++ b/lib/getloadavg.c @@ -1,7 +1,7 @@ /* Get the system load averages. - Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2022 Free - Software Foundation, Inc. + Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2022 Free Software + Foundation, Inc. NOTE: The canonical source of this file is maintained with gnulib. Bugs can be reported to bug-gnulib@gnu.org. diff --git a/lib/gettext.h b/lib/gettext.h index e88c4ab703..b3577a043f 100644 --- a/lib/gettext.h +++ b/lib/gettext.h @@ -1,6 +1,6 @@ /* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2022 Free - Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2022 Free Software + Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/gettime.c b/lib/gettime.c index 4415156611..a44a69dfc4 100644 --- a/lib/gettime.c +++ b/lib/gettime.c @@ -1,7 +1,6 @@ /* gettime -- get the system clock - Copyright (C) 2002, 2004-2007, 2009-2022 Free Software Foundation, - Inc. + Copyright (C) 2002, 2004-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -31,6 +30,8 @@ gettime (struct timespec *ts) { #if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME clock_gettime (CLOCK_REALTIME, ts); +#elif defined HAVE_TIMESPEC_GET + timespec_get (ts, TIME_UTC); #else struct timeval tv; gettimeofday (&tv, NULL); diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c index b4f55b9cdf..36c7920afe 100644 --- a/lib/gettimeofday.c +++ b/lib/gettimeofday.c @@ -1,7 +1,6 @@ /* Provide gettimeofday for systems that don't have it or for which it's broken. - Copyright (C) 2001-2003, 2005-2007, 2009-2022 Free Software - Foundation, Inc. + Copyright (C) 2001-2003, 2005-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 237bfed50f..a8a6cd782d 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -247,7 +247,6 @@ GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ GETOPT_H = @GETOPT_H@ GFILENOTIFY_CFLAGS = @GFILENOTIFY_CFLAGS@ GFILENOTIFY_LIBS = @GFILENOTIFY_LIBS@ -GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@ GL_COND_LIBTOOL_CONDITION = @GL_COND_LIBTOOL_CONDITION@ GL_GENERATE_ALLOCA_H_CONDITION = @GL_GENERATE_ALLOCA_H_CONDITION@ GL_GENERATE_BYTESWAP_H_CONDITION = @GL_GENERATE_BYTESWAP_H_CONDITION@ @@ -267,6 +266,7 @@ GL_GNULIB_ACCESS = @GL_GNULIB_ACCESS@ GL_GNULIB_ALIGNED_ALLOC = @GL_GNULIB_ALIGNED_ALLOC@ GL_GNULIB_ALPHASORT = @GL_GNULIB_ALPHASORT@ GL_GNULIB_ATOLL = @GL_GNULIB_ATOLL@ +GL_GNULIB_CALLOC_GNU = @GL_GNULIB_CALLOC_GNU@ GL_GNULIB_CALLOC_POSIX = @GL_GNULIB_CALLOC_POSIX@ GL_GNULIB_CANONICALIZE_FILE_NAME = @GL_GNULIB_CANONICALIZE_FILE_NAME@ GL_GNULIB_CHDIR = @GL_GNULIB_CHDIR@ @@ -306,6 +306,7 @@ GL_GNULIB_FFSLL = @GL_GNULIB_FFSLL@ GL_GNULIB_FGETC = @GL_GNULIB_FGETC@ GL_GNULIB_FGETS = @GL_GNULIB_FGETS@ GL_GNULIB_FOPEN = @GL_GNULIB_FOPEN@ +GL_GNULIB_FOPEN_GNU = @GL_GNULIB_FOPEN_GNU@ GL_GNULIB_FPRINTF = @GL_GNULIB_FPRINTF@ GL_GNULIB_FPRINTF_POSIX = @GL_GNULIB_FPRINTF_POSIX@ GL_GNULIB_FPURGE = @GL_GNULIB_FPURGE@ @@ -341,6 +342,7 @@ GL_GNULIB_GETLOGIN_R = @GL_GNULIB_GETLOGIN_R@ GL_GNULIB_GETOPT_POSIX = @GL_GNULIB_GETOPT_POSIX@ GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@ GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@ +GL_GNULIB_GETPASS_GNU = @GL_GNULIB_GETPASS_GNU@ GL_GNULIB_GETRANDOM = @GL_GNULIB_GETRANDOM@ GL_GNULIB_GETSUBOPT = @GL_GNULIB_GETSUBOPT@ GL_GNULIB_GETTIMEOFDAY = @GL_GNULIB_GETTIMEOFDAY@ @@ -358,6 +360,7 @@ GL_GNULIB_LINKAT = @GL_GNULIB_LINKAT@ GL_GNULIB_LOCALTIME = @GL_GNULIB_LOCALTIME@ GL_GNULIB_LSEEK = @GL_GNULIB_LSEEK@ GL_GNULIB_LSTAT = @GL_GNULIB_LSTAT@ +GL_GNULIB_MALLOC_GNU = @GL_GNULIB_MALLOC_GNU@ GL_GNULIB_MALLOC_POSIX = @GL_GNULIB_MALLOC_POSIX@ GL_GNULIB_MBSCASECMP = @GL_GNULIB_MBSCASECMP@ GL_GNULIB_MBSCASESTR = @GL_GNULIB_MBSCASESTR@ @@ -467,6 +470,7 @@ GL_GNULIB_READDIR = @GL_GNULIB_READDIR@ GL_GNULIB_READLINK = @GL_GNULIB_READLINK@ GL_GNULIB_READLINKAT = @GL_GNULIB_READLINKAT@ GL_GNULIB_REALLOCARRAY = @GL_GNULIB_REALLOCARRAY@ +GL_GNULIB_REALLOC_GNU = @GL_GNULIB_REALLOC_GNU@ GL_GNULIB_REALLOC_POSIX = @GL_GNULIB_REALLOC_POSIX@ GL_GNULIB_REALPATH = @GL_GNULIB_REALPATH@ GL_GNULIB_REMOVE = @GL_GNULIB_REMOVE@ @@ -524,6 +528,7 @@ GL_GNULIB_SYMLINKAT = @GL_GNULIB_SYMLINKAT@ GL_GNULIB_SYSTEM_POSIX = @GL_GNULIB_SYSTEM_POSIX@ GL_GNULIB_TIMEGM = @GL_GNULIB_TIMEGM@ GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@ +GL_GNULIB_TIMESPEC_GETRES = @GL_GNULIB_TIMESPEC_GETRES@ GL_GNULIB_TIME_R = @GL_GNULIB_TIME_R@ GL_GNULIB_TIME_RZ = @GL_GNULIB_TIME_RZ@ GL_GNULIB_TMPFILE = @GL_GNULIB_TMPFILE@ @@ -563,9 +568,7 @@ GOBJECT_CFLAGS = @GOBJECT_CFLAGS@ GOBJECT_LIBS = @GOBJECT_LIBS@ GREP = @GREP@ GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@ -GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@ GSETTINGS_LIBS = @GSETTINGS_LIBS@ -GSETTINGS_RULES = @GSETTINGS_RULES@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTK_OBJ = @GTK_OBJ@ @@ -666,6 +669,7 @@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GETUMASK = @HAVE_GETUMASK@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_GSETTINGS = @HAVE_GSETTINGS@ HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ HAVE_INITSTATE = @HAVE_INITSTATE@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ @@ -699,6 +703,7 @@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PDUMPER = @HAVE_PDUMPER@ +HAVE_PGTK = @HAVE_PGTK@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ @@ -778,6 +783,7 @@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_TIMESPEC_GET = @HAVE_TIMESPEC_GET@ +HAVE_TIMESPEC_GETRES = @HAVE_TIMESPEC_GETRES@ HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ @@ -962,7 +968,8 @@ RALLOC_OBJ = @RALLOC_OBJ@ RANLIB = @RANLIB@ REPLACE_ACCESS = @REPLACE_ACCESS@ REPLACE_ALIGNED_ALLOC = @REPLACE_ALIGNED_ALLOC@ -REPLACE_CALLOC = @REPLACE_CALLOC@ +REPLACE_CALLOC_FOR_CALLOC_GNU = @REPLACE_CALLOC_FOR_CALLOC_GNU@ +REPLACE_CALLOC_FOR_CALLOC_POSIX = @REPLACE_CALLOC_FOR_CALLOC_POSIX@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ @@ -990,6 +997,7 @@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FFSLL = @REPLACE_FFSLL@ REPLACE_FOPEN = @REPLACE_FOPEN@ +REPLACE_FOPEN_FOR_FOPEN_GNU = @REPLACE_FOPEN_FOR_FOPEN_GNU@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREE = @REPLACE_FREE@ @@ -1011,6 +1019,7 @@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETPASS = @REPLACE_GETPASS@ +REPLACE_GETPASS_FOR_GETPASS_GNU = @REPLACE_GETPASS_FOR_GETPASS_GNU@ REPLACE_GETRANDOM = @REPLACE_GETRANDOM@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_GMTIME = @REPLACE_GMTIME@ @@ -1023,7 +1032,8 @@ REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ -REPLACE_MALLOC = @REPLACE_MALLOC@ +REPLACE_MALLOC_FOR_MALLOC_GNU = @REPLACE_MALLOC_FOR_MALLOC_GNU@ +REPLACE_MALLOC_FOR_MALLOC_POSIX = @REPLACE_MALLOC_FOR_MALLOC_POSIX@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ @@ -1058,8 +1068,9 @@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_READLINKAT = @REPLACE_READLINKAT@ -REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@ +REPLACE_REALLOC_FOR_REALLOC_GNU = @REPLACE_REALLOC_FOR_REALLOC_GNU@ +REPLACE_REALLOC_FOR_REALLOC_POSIX = @REPLACE_REALLOC_FOR_REALLOC_POSIX@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ @@ -1229,6 +1240,7 @@ gl_GNULIB_ENABLED_cloexec_CONDITION = @gl_GNULIB_ENABLED_cloexec_CONDITION@ gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b_CONDITION = @gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b_CONDITION@ gl_GNULIB_ENABLED_dirfd_CONDITION = @gl_GNULIB_ENABLED_dirfd_CONDITION@ gl_GNULIB_ENABLED_dynarray_CONDITION = @gl_GNULIB_ENABLED_dynarray_CONDITION@ +gl_GNULIB_ENABLED_e80bf6f757095d2e5fc94dafb8f8fc8b_CONDITION = @gl_GNULIB_ENABLED_e80bf6f757095d2e5fc94dafb8f8fc8b_CONDITION@ gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866_CONDITION = @gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866_CONDITION@ gl_GNULIB_ENABLED_euidaccess_CONDITION = @gl_GNULIB_ENABLED_euidaccess_CONDITION@ gl_GNULIB_ENABLED_getdtablesize_CONDITION = @gl_GNULIB_ENABLED_getdtablesize_CONDITION@ @@ -1327,11 +1339,10 @@ BUILT_SOURCES += $(ALLOCA_H) # doesn't have one that works with the given compiler. ifneq (,$(GL_GENERATE_ALLOCA_H_CONDITION)) alloca.h: alloca.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_ALLOCA_H''@|$(HAVE_ALLOCA_H)|g' < $(srcdir)/alloca.in.h; \ - } > $@-t && \ - mv -f $@-t $@ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''HAVE_ALLOCA_H''@|$(HAVE_ALLOCA_H)|g' \ + $(srcdir)/alloca.in.h > $@-t + $(AM_V_at)mv $@-t $@ else alloca.h: $(top_builddir)/config.status rm -f $@ @@ -1389,11 +1400,8 @@ BUILT_SOURCES += $(BYTESWAP_H) # doesn't have one. ifneq (,$(GL_GENERATE_BYTESWAP_H_CONDITION)) byteswap.h: byteswap.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/byteswap.in.h; \ - } > $@-t && \ - mv -f $@-t $@ + $(gl_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/byteswap.in.h + $(AM_V_at)mv $@-t $@ else byteswap.h: $(top_builddir)/config.status rm -f $@ @@ -1569,9 +1577,8 @@ BUILT_SOURCES += dirent.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -1601,9 +1608,8 @@ dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/dirent.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/dirent.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += dirent.h dirent.h-t EXTRA_DIST += dirent.in.h @@ -1663,26 +1669,23 @@ BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h malloc/dynarray.gl.h: malloc/dynarray.h $(AM_V_GEN)$(MKDIR_P) 'malloc' - $(AM_V_at)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e '/libc_hidden_proto/d' < $(srcdir)/malloc/dynarray.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e '/libc_hidden_proto/d' \ + $(srcdir)/malloc/dynarray.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c $(AM_V_GEN)$(MKDIR_P) 'malloc' - $(AM_V_at)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|||g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|||g' \ -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \ -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \ -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \ -e 's|__glibc_likely|_GL_LIKELY|g' \ -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \ - < $(srcdir)/malloc/dynarray-skeleton.c; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/malloc/dynarray-skeleton.c > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t libgnu_a_SOURCES += malloc/dynarray_at_failure.c malloc/dynarray_emplace_enlarge.c malloc/dynarray_finalize.c malloc/dynarray_resize.c malloc/dynarray_resize_clear.c @@ -1715,9 +1718,8 @@ BUILT_SOURCES += $(ERRNO_H) # doesn't have one that is POSIX compliant. ifneq (,$(GL_GENERATE_ERRNO_H_CONDITION)) errno.h: errno.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -1728,9 +1730,8 @@ errno.h: errno.in.h $(top_builddir)/config.status -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ - < $(srcdir)/errno.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/errno.in.h > $@-t + $(AM_V_at)mv $@-t $@ else errno.h: $(top_builddir)/config.status rm -f $@ @@ -1764,11 +1765,8 @@ BUILT_SOURCES += $(EXECINFO_H) # doesn't have one that works. ifneq (,$(GL_GENERATE_EXECINFO_H_CONDITION)) execinfo.h: execinfo.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/execinfo.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(gl_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/execinfo.in.h + $(AM_V_at)mv $@-t $@ else execinfo.h: $(top_builddir)/config.status rm -f $@ @@ -1834,9 +1832,8 @@ BUILT_SOURCES += fcntl.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -1857,9 +1854,8 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/fcntl.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/fcntl.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += fcntl.h fcntl.h-t EXTRA_DIST += fcntl.in.h @@ -1992,6 +1988,27 @@ EXTRA_libgnu_a_SOURCES += futimens.c endif ## end gnulib module futimens +## begin gnulib module gen-header +ifeq (,$(OMIT_GNULIB_MODULE_gen-header)) + +# In 'sed', replace the pattern space with a "DO NOT EDIT" comment. +SED_HEADER_NOEDIT = s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */, + +# '$(SED_HEADER_STDOUT) -e "..."' runs 'sed' but first outputs "DO NOT EDIT". +SED_HEADER_STDOUT = sed -e 1h -e '1$(SED_HEADER_NOEDIT)' -e 1G + +# '$(SED_HEADER_TO_AT_t) FILE' copies FILE to $@-t, prepending a leading +# "DO_NOT_EDIT". Although this could be done more simply via: +# SED_HEADER_TO_AT_t = $(SED_HEADER_STDOUT) > $@-t +# the -n and 'w' avoid a fork+exec, at least when GNU Make is used. +SED_HEADER_TO_AT_t = $(SED_HEADER_STDOUT) -n -e 'w $@-t' + +# Use $(gl_V_at) instead of $(AM_V_GEN) or $(AM_V_at) on a line that +gl_V_at = $(AM_V_GEN) + +endif +## end gnulib module gen-header + ## begin gnulib module getdtablesize ifeq (,$(OMIT_GNULIB_MODULE_getdtablesize)) @@ -2038,18 +2055,16 @@ BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H) # doesn't have one that works with the given compiler. ifneq (,$(GL_GENERATE_GETOPT_H_CONDITION)) getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_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_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - < $(srcdir)/getopt.in.h; \ - } > $@-t && \ - mv -f $@-t $@ + $(srcdir)/getopt.in.h > $@-t + $(AM_V_at)mv $@-t $@ else getopt.h: $(top_builddir)/config.status rm -f $@ @@ -2057,12 +2072,10 @@ endif ifneq (,$(GL_GENERATE_GETOPT_CDEFS_H_CONDITION)) getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ - < $(srcdir)/getopt-cdefs.in.h; \ - } > $@-t && \ - mv -f $@-t $@ + $(AM_V_GEN)$(SED_HEADER_STDOUT) \ + -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ + $(srcdir)/getopt-cdefs.in.h > $@-t + $(AM_V_at)mv $@-t $@ else getopt-cdefs.h: $(top_builddir)/config.status rm -f $@ @@ -2156,12 +2169,10 @@ BUILT_SOURCES += $(IEEE754_H) # doesn't have one that works with the given compiler. ifneq (,$(GL_GENERATE_IEEE754_H_CONDITION)) ieee754.h: ieee754.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/ifndef _GL_GNULIB_HEADER/if 0/g' \ - $(srcdir)/ieee754.in.h; \ - } > $@-t && \ - mv -f $@-t $@ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's/ifndef _GL_GNULIB_HEADER/if 0/g' \ + $(srcdir)/ieee754.in.h > $@-t + $(AM_V_at)mv $@-t $@ else ieee754.h: $(top_builddir)/config.status rm -f $@ @@ -2199,9 +2210,8 @@ BUILT_SOURCES += inttypes.h # 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 $(CXXDEFS_H) $(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' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -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' \ @@ -2226,9 +2236,8 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -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 $@ + $(srcdir)/inttypes.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += inttypes.h inttypes.h-t EXTRA_DIST += inttypes.in.h @@ -2267,14 +2276,12 @@ ifneq (,$(GL_GENERATE_GMP_H_CONDITION)) ifneq (,$(GL_GENERATE_MINI_GMP_H_CONDITION)) # Build gmp.h as a wrapper for mini-gmp.h when using mini-gmp. gmp.h: $(top_builddir)/config.status - $(MKDIR_P) '.' echo '#include "mini-gmp.h"' > $@-t mv $@-t $@ endif ifneq (,$(GL_GENERATE_GMP_GMP_H_CONDITION)) # Build gmp.h as a wrapper for gmp/gmp.h. gmp.h: $(top_builddir)/config.status - $(MKDIR_P) '.' echo '#include ' > $@-t mv $@-t $@ endif @@ -2300,16 +2307,14 @@ BUILT_SOURCES += $(LIMITS_H) # doesn't have one that is compatible with GNU. ifneq (,$(GL_GENERATE_LIMITS_H_CONDITION)) limits.h: limits.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|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_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \ - < $(srcdir)/limits.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/limits.in.h > $@-t + $(AM_V_at)mv $@-t $@ else limits.h: $(top_builddir)/config.status rm -f $@ @@ -2332,6 +2337,19 @@ EXTRA_libgnu_a_SOURCES += lstat.c endif ## end gnulib module lstat +## begin gnulib module malloc-gnu +ifeq (,$(OMIT_GNULIB_MODULE_malloc-gnu)) + +ifneq (,$(gl_GNULIB_ENABLED_e80bf6f757095d2e5fc94dafb8f8fc8b_CONDITION)) + +endif +EXTRA_DIST += malloc.c + +EXTRA_libgnu_a_SOURCES += malloc.c + +endif +## end gnulib module malloc-gnu + ## begin gnulib module malloc-posix ifeq (,$(OMIT_GNULIB_MODULE_malloc-posix)) @@ -2603,15 +2621,13 @@ BUILT_SOURCES += malloc/scratch_buffer.gl.h malloc/scratch_buffer.gl.h: malloc/scratch_buffer.h $(AM_V_GEN)$(MKDIR_P) 'malloc' - $(AM_V_at)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \ -e 's|__glibc_likely|_GL_LIKELY|g' \ -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \ -e '/libc_hidden_proto/d' \ - < $(srcdir)/malloc/scratch_buffer.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/malloc/scratch_buffer.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += malloc/scratch_buffer.gl.h malloc/scratch_buffer.gl.h-t libgnu_a_SOURCES += malloc/scratch_buffer_dupfree.c malloc/scratch_buffer_grow.c malloc/scratch_buffer_grow_preserve.c malloc/scratch_buffer_set_array_size.c @@ -2652,9 +2668,8 @@ BUILT_SOURCES += signal.h # We need the following in order to create when the system # doesn't have a complete one. signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -2678,9 +2693,8 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/signal.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/signal.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += signal.h signal.h-t EXTRA_DIST += signal.in.h @@ -2763,11 +2777,8 @@ BUILT_SOURCES += $(STDALIGN_H) # doesn't have one that works. ifneq (,$(GL_GENERATE_STDALIGN_H_CONDITION)) stdalign.h: stdalign.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/stdalign.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(gl_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/stdalign.in.h + $(AM_V_at)mv $@-t $@ else stdalign.h: $(top_builddir)/config.status rm -f $@ @@ -2788,9 +2799,8 @@ BUILT_SOURCES += $(STDDEF_H) # doesn't have one that works with the given compiler. ifneq (,$(GL_GENERATE_STDDEF_H_CONDITION)) stddef.h: stddef.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -2798,9 +2808,8 @@ stddef.h: stddef.in.h $(top_builddir)/config.status -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ - < $(srcdir)/stddef.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/stddef.in.h > $@-t + $(AM_V_at)mv $@-t $@ else stddef.h: $(top_builddir)/config.status rm -f $@ @@ -2821,9 +2830,8 @@ BUILT_SOURCES += $(STDINT_H) # doesn't have one that works with the given compiler. ifneq (,$(GL_GENERATE_STDINT_H_CONDITION)) stdint.h: stdint.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -2850,9 +2858,8 @@ stdint.h: stdint.in.h $(top_builddir)/config.status -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \ - < $(srcdir)/stdint.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/stdint.in.h > $@-t + $(AM_V_at)mv $@-t $@ else stdint.h: $(top_builddir)/config.status rm -f $@ @@ -2872,9 +2879,8 @@ BUILT_SOURCES += stdio.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -2886,6 +2892,7 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's/@''GNULIB_FGETC''@/$(GL_GNULIB_FGETC)/g' \ -e 's/@''GNULIB_FGETS''@/$(GL_GNULIB_FGETS)/g' \ -e 's/@''GNULIB_FOPEN''@/$(GL_GNULIB_FOPEN)/g' \ + -e 's/@''GNULIB_FOPEN_GNU''@/$(GL_GNULIB_FOPEN_GNU)/g' \ -e 's/@''GNULIB_FPRINTF''@/$(GL_GNULIB_FPRINTF)/g' \ -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GL_GNULIB_FPRINTF_POSIX)/g' \ -e 's/@''GNULIB_FPURGE''@/$(GL_GNULIB_FPURGE)/g' \ @@ -2961,6 +2968,7 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ + -e 's|@''REPLACE_FOPEN_FOR_FOPEN_GNU''@|$(REPLACE_FOPEN_FOR_FOPEN_GNU)|g' \ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ @@ -2991,9 +2999,9 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += stdio.h stdio.h-t EXTRA_DIST += stdio.in.h @@ -3010,9 +3018,8 @@ BUILT_SOURCES += stdlib.h # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -3020,12 +3027,14 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's/@''GNULIB__EXIT''@/$(GL_GNULIB__EXIT)/g' \ -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GL_GNULIB_ALIGNED_ALLOC)/g' \ -e 's/@''GNULIB_ATOLL''@/$(GL_GNULIB_ATOLL)/g' \ + -e 's/@''GNULIB_CALLOC_GNU''@/$(GL_GNULIB_CALLOC_GNU)/g' \ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GL_GNULIB_CALLOC_POSIX)/g' \ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GL_GNULIB_CANONICALIZE_FILE_NAME)/g' \ -e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \ -e 's/@''GNULIB_GETLOADAVG''@/$(GL_GNULIB_GETLOADAVG)/g' \ -e 's/@''GNULIB_GETSUBOPT''@/$(GL_GNULIB_GETSUBOPT)/g' \ -e 's/@''GNULIB_GRANTPT''@/$(GL_GNULIB_GRANTPT)/g' \ + -e 's/@''GNULIB_MALLOC_GNU''@/$(GL_GNULIB_MALLOC_GNU)/g' \ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GL_GNULIB_MALLOC_POSIX)/g' \ -e 's/@''GNULIB_MBTOWC''@/$(GL_GNULIB_MBTOWC)/g' \ -e 's/@''GNULIB_MKDTEMP''@/$(GL_GNULIB_MKDTEMP)/g' \ @@ -3041,6 +3050,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's/@''GNULIB_QSORT_R''@/$(GL_GNULIB_QSORT_R)/g' \ -e 's/@''GNULIB_RANDOM''@/$(GL_GNULIB_RANDOM)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GL_GNULIB_RANDOM_R)/g' \ + -e 's/@''GNULIB_REALLOC_GNU''@/$(GL_GNULIB_REALLOC_GNU)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GL_GNULIB_REALLOC_POSIX)/g' \ -e 's/@''GNULIB_REALLOCARRAY''@/$(GL_GNULIB_REALLOCARRAY)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GL_GNULIB_REALPATH)/g' \ @@ -3107,11 +3117,13 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ -e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \ - -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ + -e 's|@''REPLACE_CALLOC_FOR_CALLOC_GNU''@|$(REPLACE_CALLOC_FOR_CALLOC_GNU)|g' \ + -e 's|@''REPLACE_CALLOC_FOR_CALLOC_POSIX''@|$(REPLACE_CALLOC_FOR_CALLOC_POSIX)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \ -e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \ - -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ + -e 's|@''REPLACE_MALLOC_FOR_MALLOC_GNU''@|$(REPLACE_MALLOC_FOR_MALLOC_GNU)|g' \ + -e 's|@''REPLACE_MALLOC_FOR_MALLOC_POSIX''@|$(REPLACE_MALLOC_FOR_MALLOC_POSIX)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \ @@ -3121,7 +3133,8 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \ -e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ - -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ + -e 's|@''REPLACE_REALLOC_FOR_REALLOC_GNU''@|$(REPLACE_REALLOC_FOR_REALLOC_GNU)|g' \ + -e 's|@''REPLACE_REALLOC_FOR_REALLOC_POSIX''@|$(REPLACE_REALLOC_FOR_REALLOC_POSIX)|g' \ -e 's|@''REPLACE_REALLOCARRAY''@|$(REPLACE_REALLOCARRAY)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ @@ -3137,9 +3150,9 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _Noreturn/r $(_NORETURN_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += stdlib.h stdlib.h-t EXTRA_DIST += stdlib.in.h @@ -3166,9 +3179,8 @@ BUILT_SOURCES += string.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -3262,10 +3274,9 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - < $(srcdir)/string.in.h; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += string.h string.h-t EXTRA_DIST += string.in.h @@ -3328,9 +3339,8 @@ BUILT_SOURCES += sys/random.h # doesn't have one. sys/random.h: sys_random.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)$(MKDIR_P) 'sys' - $(AM_V_at)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -3342,9 +3352,8 @@ sys/random.h: sys_random.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_random.in.h; \ - } > $@-t && \ - mv -f $@-t $@ + $(srcdir)/sys_random.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/random.h sys/random.h-t MOSTLYCLEANDIRS += sys @@ -3362,9 +3371,8 @@ BUILT_SOURCES += sys/select.h # doesn't have one that works with the given compiler. sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)$(MKDIR_P) 'sys' - $(AM_V_at)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -3378,9 +3386,8 @@ sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_select.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_select.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/select.h sys/select.h-t MOSTLYCLEANDIRS += sys @@ -3398,9 +3405,8 @@ BUILT_SOURCES += sys/stat.h # has one that is incomplete. sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)$(MKDIR_P) 'sys' - $(AM_V_at)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -3453,9 +3459,8 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_stat.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_stat.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t MOSTLYCLEANDIRS += sys @@ -3473,9 +3478,8 @@ BUILT_SOURCES += sys/time.h # doesn't have one that works with the given compiler. sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)$(MKDIR_P) 'sys' - $(AM_V_at)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -3490,9 +3494,8 @@ sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_time.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_time.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/time.h sys/time.h-t EXTRA_DIST += sys_time.in.h @@ -3509,18 +3512,16 @@ BUILT_SOURCES += sys/types.h # doesn't have one that works with the given compiler. sys/types.h: sys_types.in.h $(top_builddir)/config.status $(AM_V_GEN)$(MKDIR_P) 'sys' - $(AM_V_at)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|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_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \ - < $(srcdir)/sys_types.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_types.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/types.h sys/types.h-t EXTRA_DIST += sys_types.in.h @@ -3546,9 +3547,8 @@ BUILT_SOURCES += time.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -3561,6 +3561,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's/@''GNULIB_STRPTIME''@/$(GL_GNULIB_STRPTIME)/g' \ -e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \ -e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \ + -e 's/@''GNULIB_TIMESPEC_GETRES''@/$(GL_GNULIB_TIMESPEC_GETRES)/g' \ -e 's/@''GNULIB_TIME_R''@/$(GL_GNULIB_TIME_R)/g' \ -e 's/@''GNULIB_TIME_RZ''@/$(GL_GNULIB_TIME_RZ)/g' \ -e 's/@''GNULIB_TZSET''@/$(GL_GNULIB_TZSET)/g' \ @@ -3570,6 +3571,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -e 's|@''HAVE_TIMESPEC_GET''@|$(HAVE_TIMESPEC_GET)|g' \ + -e 's|@''HAVE_TIMESPEC_GETRES''@|$(HAVE_TIMESPEC_GETRES)|g' \ -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \ -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \ -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ @@ -3588,9 +3590,8 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/time.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/time.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += time.h time.h-t EXTRA_DIST += time.in.h @@ -3676,9 +3677,8 @@ libgnu_a_SOURCES += unistd.c # We need the following in order to create an empty placeholder for # when the system doesn't have one. unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -3719,6 +3719,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's/@''GNULIB_GETOPT_POSIX''@/$(GL_GNULIB_GETOPT_POSIX)/g' \ -e 's/@''GNULIB_GETPAGESIZE''@/$(GL_GNULIB_GETPAGESIZE)/g' \ -e 's/@''GNULIB_GETPASS''@/$(GL_GNULIB_GETPASS)/g' \ + -e 's/@''GNULIB_GETPASS_GNU''@/$(GL_GNULIB_GETPASS_GNU)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GL_GNULIB_GETUSERSHELL)/g' \ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GL_GNULIB_GROUP_MEMBER)/g' \ -e 's/@''GNULIB_ISATTY''@/$(GL_GNULIB_ISATTY)/g' \ @@ -3839,6 +3840,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \ + -e 's|@''REPLACE_GETPASS_FOR_GETPASS_GNU''@|$(REPLACE_GETPASS_FOR_GETPASS_GNU)|g' \ -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ @@ -3864,9 +3866,9 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += unistd.h unistd.h-t EXTRA_DIST += unistd.in.h diff --git a/lib/group-member.c b/lib/group-member.c index 4651ab980a..480a12616a 100644 --- a/lib/group-member.c +++ b/lib/group-member.c @@ -1,7 +1,7 @@ /* group-member.c -- determine whether group id is in calling user's group list - Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2022 Free - Software Foundation, Inc. + Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2022 Free Software + Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/malloc.c b/lib/malloc.c index 858efbc563..f334dd6e96 100644 --- a/lib/malloc.c +++ b/lib/malloc.c @@ -1,7 +1,6 @@ /* malloc() function that is glibc compatible. - Copyright (C) 1997-1998, 2006-2007, 2009-2022 Free Software - Foundation, Inc. + Copyright (C) 1997-1998, 2006-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/md5-stream.c b/lib/md5-stream.c index cbc983b851..07c639fd36 100644 --- a/lib/md5-stream.c +++ b/lib/md5-stream.c @@ -1,7 +1,7 @@ /* Functions to compute MD5 message digest of files or memory blocks. according to the definition of MD5 in RFC 1321 from April 1992. - Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2022 Free - Software Foundation, Inc. + Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2022 Free Software + Foundation, Inc. This file is part of the GNU C Library. This file is free software: you can redistribute it and/or modify diff --git a/lib/md5.c b/lib/md5.c index cd01cb29df..57489ed74c 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -1,7 +1,7 @@ /* Functions to compute MD5 message digest of files or memory blocks. according to the definition of MD5 in RFC 1321 from April 1992. - Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2022 Free - Software Foundation, Inc. + Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2022 Free Software + Foundation, Inc. This file is part of the GNU C Library. This file is free software: you can redistribute it and/or modify diff --git a/lib/md5.h b/lib/md5.h index af576e7da5..5b92eac5ec 100644 --- a/lib/md5.h +++ b/lib/md5.h @@ -1,7 +1,7 @@ /* Declaration of functions and data types used for MD5 sum computing library functions. - Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2022 Free - Software Foundation, Inc. + Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2022 Free Software + Foundation, Inc. This file is part of the GNU C Library. This file is free software: you can redistribute it and/or modify diff --git a/lib/memmem.c b/lib/memmem.c index 8184d8b540..5701052d48 100644 --- a/lib/memmem.c +++ b/lib/memmem.c @@ -1,5 +1,5 @@ -/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2022 Free - Software Foundation, Inc. +/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2022 Free Software + Foundation, Inc. This file is part of the GNU C Library. This file is free software: you can redistribute it and/or modify diff --git a/lib/memrchr.c b/lib/memrchr.c index 87e8122d4c..e853996ad0 100644 --- a/lib/memrchr.c +++ b/lib/memrchr.c @@ -1,7 +1,7 @@ /* memrchr -- find the last occurrence of a byte in a memory block - Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2022 Free - Software Foundation, Inc. + Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2022 Free Software + Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and diff --git a/lib/nstrftime.c b/lib/nstrftime.c index 202381d410..190ff4d8f2 100644 --- a/lib/nstrftime.c +++ b/lib/nstrftime.c @@ -651,6 +651,8 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) #endif /* ! DO_MULTIBYTE */ + char const *percent = f; + /* Check for flags that can modify a format. */ while (1) { @@ -752,8 +754,8 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) while (0) case L_('%'): - if (modifier != 0) - goto bad_format; + if (f - 1 != percent) + goto bad_percent; add1 (*f); break; @@ -1467,6 +1469,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) } case L_('\0'): /* GNU extension: % at end of format. */ + bad_percent: --f; FALLTHROUGH; default: @@ -1474,12 +1477,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) since this is most likely the right thing to do if a multibyte string has been misparsed. */ bad_format: - { - int flen; - for (flen = 1; f[1 - flen] != L_('%'); flen++) - continue; - cpy (flen, &f[1 - flen]); - } + cpy (f - percent + 1, percent); break; } } diff --git a/lib/save-cwd.h b/lib/save-cwd.h index 1953fd05c3..7aa124c42f 100644 --- a/lib/save-cwd.h +++ b/lib/save-cwd.h @@ -1,7 +1,7 @@ /* Save and restore current working directory. - Copyright (C) 1995, 1997-1998, 2003, 2009-2022 Free Software - Foundation, Inc. + Copyright (C) 1995, 1997-1998, 2003, 2009-2022 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/sha1.c b/lib/sha1.c index 850f7272c8..79e50ba0b0 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -1,8 +1,7 @@ /* sha1.c - Functions to compute SHA1 message digest of files or memory blocks according to the NIST specification FIPS-180-1. - Copyright (C) 2000-2001, 2003-2006, 2008-2022 Free Software - Foundation, Inc. + Copyright (C) 2000-2001, 2003-2006, 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/sig2str.c b/lib/sig2str.c index 523d71332b..f2f01d1f6f 100644 --- a/lib/sig2str.c +++ b/lib/sig2str.c @@ -1,7 +1,6 @@ /* sig2str.c -- convert between signal names and numbers - Copyright (C) 2002, 2004, 2006, 2009-2022 Free Software Foundation, - Inc. + Copyright (C) 2002, 2004, 2006, 2009-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 8fcec011d4..7b36dac2f5 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -399,7 +399,8 @@ _GL_CXXALIASWARN (fileno); #endif #if @GNULIB_FOPEN@ -# if @REPLACE_FOPEN@ +# if (@GNULIB_FOPEN@ && @REPLACE_FOPEN@) \ + || (@GNULIB_FOPEN_GNU@ && @REPLACE_FOPEN_FOR_FOPEN_GNU@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fopen # define fopen rpl_fopen diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 01d374b3a8..d52c2f7963 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -1,7 +1,6 @@ /* A GNU-like . - Copyright (C) 1995, 2001-2004, 2006-2022 Free Software Foundation, - Inc. + Copyright (C) 1995, 2001-2004, 2006-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -261,7 +260,8 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - " #endif #if @GNULIB_CALLOC_POSIX@ -# if @REPLACE_CALLOC@ +# if (@GNULIB_CALLOC_POSIX@ && @REPLACE_CALLOC_FOR_CALLOC_POSIX@) \ + || (@GNULIB_CALLOC_GNU@ && @REPLACE_CALLOC_FOR_CALLOC_GNU@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef calloc # define calloc rpl_calloc @@ -475,7 +475,8 @@ _GL_WARN_ON_USE (grantpt, "grantpt is not portable - " by never specifying a zero size), so it does not need malloc or realloc to be redefined. */ #if @GNULIB_MALLOC_POSIX@ -# if @REPLACE_MALLOC@ +# if (@GNULIB_MALLOC_POSIX@ && @REPLACE_MALLOC_FOR_MALLOC_POSIX@) \ + || (@GNULIB_MALLOC_GNU@ && @REPLACE_MALLOC_FOR_MALLOC_GNU@) # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef malloc @@ -829,29 +830,35 @@ _GL_CXXALIASWARN (putenv); /* Sort an array of NMEMB elements, starting at address BASE, each element occupying SIZE bytes, in ascending order according to the comparison function COMPARE. */ +# ifdef __cplusplus +extern "C" { +# endif +# if !GNULIB_defined_qsort_r_fn_types +typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *); +# define GNULIB_defined_qsort_r_fn_types 1 +# endif +# ifdef __cplusplus +} +# endif # if @REPLACE_QSORT_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef qsort_r # define qsort_r rpl_qsort_r # endif _GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg) _GL_ARG_NONNULL ((1, 4))); _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg)); # else # if !@HAVE_QSORT_R@ _GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg) _GL_ARG_NONNULL ((1, 4))); # endif _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg)); # endif _GL_CXXALIASWARN (qsort_r); @@ -1102,7 +1109,8 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " #if @GNULIB_REALLOC_POSIX@ -# if @REPLACE_REALLOC@ +# if (@GNULIB_REALLOC_POSIX@ && @REPLACE_REALLOC_FOR_REALLOC_POSIX@) \ + || (@GNULIB_REALLOC_GNU@ && @REPLACE_REALLOC_FOR_REALLOC_GNU@) # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef realloc diff --git a/lib/string.in.h b/lib/string.in.h index 0c4aefcceb..03e6a17a36 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -112,12 +112,26 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ -/* Declare 'free' if needed for _GL_ATTRIBUTE_DEALLOC_FREE. */ -_GL_EXTERN_C void free (void *); +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ #if @GNULIB_FREE_POSIX@ # if (@REPLACE_FREE@ && !defined free \ && !(defined __cplusplus && defined GNULIB_NAMESPACE)) -# define free rpl_free +/* We can't do '#define free rpl_free' here. */ +_GL_EXTERN_C void rpl_free (void *); +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER +_GL_EXTERN_C void __cdecl free (void *); +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#else +# if defined _MSC_VER +_GL_EXTERN_C void __cdecl free (void *); +# else _GL_EXTERN_C void free (void *); # endif #endif diff --git a/lib/strtoimax.c b/lib/strtoimax.c index f49fae7699..d562746ee7 100644 --- a/lib/strtoimax.c +++ b/lib/strtoimax.c @@ -1,7 +1,7 @@ /* Convert string representation of a number into an intmax_t value. - Copyright (C) 1999, 2001-2004, 2006, 2009-2022 Free Software - Foundation, Inc. + Copyright (C) 1999, 2001-2004, 2006, 2009-2022 Free Software Foundation, + Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/strtol.c b/lib/strtol.c index f70ba5e2f0..457f7a5d64 100644 --- a/lib/strtol.c +++ b/lib/strtol.c @@ -1,7 +1,7 @@ /* Convert string representation of a number into an integer value. - Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2022 Free - Software Foundation, Inc. + Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2022 Free Software + Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. diff --git a/lib/strtoll.c b/lib/strtoll.c index a143af0159..5124168c1b 100644 --- a/lib/strtoll.c +++ b/lib/strtoll.c @@ -1,6 +1,6 @@ /* Function to parse a 'long long int' from text. - Copyright (C) 1995-1997, 1999, 2001, 2009-2022 Free Software - Foundation, Inc. + Copyright (C) 1995-1997, 1999, 2001, 2009-2022 Free Software Foundation, + Inc. This file is part of the GNU C Library. This file is free software: you can redistribute it and/or modify diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index fd9fbe946e..2bd0e0f79a 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h @@ -279,9 +279,13 @@ _GL_FUNCDECL_SYS (pselect, int, (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, struct timespec const *restrict, const sigset_t *restrict)); # endif -_GL_CXXALIAS_SYS (pselect, int, - (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, - struct timespec const *restrict, const sigset_t *restrict)); +/* Need to cast, because on AIX 7, the second, third, fourth argument may be + void *restrict, void *restrict, void *restrict. */ +_GL_CXXALIAS_SYS_CAST (pselect, int, + (int, + fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timespec const *restrict, + const sigset_t *restrict)); # endif _GL_CXXALIASWARN (pselect); #elif defined GNULIB_POSIXCHECK diff --git a/lib/time.in.h b/lib/time.in.h index ba93323ef2..6d4c771963 100644 --- a/lib/time.in.h +++ b/lib/time.in.h @@ -120,6 +120,17 @@ _GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base)); _GL_CXXALIASWARN (timespec_get); # endif +/* Set *TS to the current time resolution, and return BASE. + Upon failure, return 0. */ +# if @GNULIB_TIMESPEC_GETRES@ +# if ! @HAVE_TIMESPEC_GETRES@ +_GL_FUNCDECL_SYS (timespec_getres, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base)); +_GL_CXXALIASWARN (timespec_getres); +# endif + /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See . */ diff --git a/lib/time_r.c b/lib/time_r.c index f0b33989ee..d4b2275545 100644 --- a/lib/time_r.c +++ b/lib/time_r.c @@ -1,7 +1,6 @@ /* Reentrant time functions like localtime_r. - Copyright (C) 2003, 2006-2007, 2010-2022 Free Software Foundation, - Inc. + Copyright (C) 2003, 2006-2007, 2010-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/timespec.h b/lib/timespec.h index dddf898c8e..e130d2c6e2 100644 --- a/lib/timespec.h +++ b/lib/timespec.h @@ -88,6 +88,7 @@ timespectod (struct timespec a) return a.tv_sec + a.tv_nsec / 1e9; } +long int gettime_res (void); struct timespec current_timespec (void); void gettime (struct timespec *) _GL_ARG_NONNULL ((1)); int settime (struct timespec const *) _GL_ARG_NONNULL ((1)); diff --git a/lib/unistd.in.h b/lib/unistd.in.h index b626eb41e4..3386f0b0f7 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -1409,7 +1409,8 @@ _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " Read a password from /dev/tty or stdin. Function getpass() from module 'getpass-gnu': Read a password of arbitrary length from /dev/tty or stdin. */ -# if @REPLACE_GETPASS@ +# if (@GNULIB_GETPASS@ && @REPLACE_GETPASS@) \ + || (@GNULIB_GETPASS_GNU@ && @REPLACE_GETPASS_FOR_GETPASS_GNU@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getpass # define getpass rpl_getpass diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h index 4a0a7d2389..aefa6fd804 100644 --- a/lib/xalloc-oversized.h +++ b/lib/xalloc-oversized.h @@ -1,7 +1,6 @@ /* xalloc-oversized.h -- memory allocation size checking - Copyright (C) 1990-2000, 2003-2004, 2006-2022 Free Software - Foundation, Inc. + Copyright (C) 1990-2000, 2003-2004, 2006-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/m4/clock_time.m4 b/m4/clock_time.m4 index abab3a3e25..2253553313 100644 --- a/m4/clock_time.m4 +++ b/m4/clock_time.m4 @@ -1,10 +1,11 @@ -# clock_time.m4 serial 10 +# clock_time.m4 serial 11 dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -# Check for clock_gettime and clock_settime, and set LIB_CLOCK_GETTIME. +# Check for clock_getres, clock_gettime and clock_settime, +# and set LIB_CLOCK_GETTIME. # For a program named, say foo, you should add a line like the following # in the corresponding Makefile.am file: # foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) @@ -26,6 +27,6 @@ AC_DEFUN([gl_CLOCK_TIME], AC_SEARCH_LIBS([clock_gettime], [rt posix4], [test "$ac_cv_search_clock_gettime" = "none required" || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) - AC_CHECK_FUNCS([clock_gettime clock_settime]) + AC_CHECK_FUNCS([clock_getres clock_gettime clock_settime]) LIBS=$gl_saved_libs ]) diff --git a/m4/d-type.m4 b/m4/d-type.m4 index 121bc64614..b8858b1918 100644 --- a/m4/d-type.m4 +++ b/m4/d-type.m4 @@ -5,8 +5,7 @@ dnl dnl Check whether struct dirent has a member named d_type. dnl -# Copyright (C) 1997, 1999-2004, 2006, 2009-2022 Free Software -# Foundation, Inc. +# Copyright (C) 1997, 1999-2004, 2006, 2009-2022 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/m4/dup2.m4 b/m4/dup2.m4 index fb08263708..7e777cdee6 100644 --- a/m4/dup2.m4 +++ b/m4/dup2.m4 @@ -1,6 +1,5 @@ #serial 27 -dnl Copyright (C) 2002, 2005, 2007, 2009-2022 Free Software Foundation, -dnl Inc. +dnl Copyright (C) 2002, 2005, 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/filemode.m4 b/m4/filemode.m4 index 03fff30a77..902c35e359 100644 --- a/m4/filemode.m4 +++ b/m4/filemode.m4 @@ -1,6 +1,5 @@ # filemode.m4 serial 9 -dnl Copyright (C) 2002, 2005-2006, 2009-2022 Free Software Foundation, -dnl Inc. +dnl Copyright (C) 2002, 2005-2006, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/fsusage.m4 b/m4/fsusage.m4 index f46566082a..06e608866b 100644 --- a/m4/fsusage.m4 +++ b/m4/fsusage.m4 @@ -1,8 +1,7 @@ # serial 35 # Obtaining file system usage information. -# Copyright (C) 1997-1998, 2000-2001, 2003-2022 Free Software -# Foundation, Inc. +# Copyright (C) 1997-1998, 2000-2001, 2003-2022 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/m4/getgroups.m4 b/m4/getgroups.m4 index 60bebe270e..d7a71f5ca6 100644 --- a/m4/getgroups.m4 +++ b/m4/getgroups.m4 @@ -3,8 +3,7 @@ dnl From Jim Meyering. dnl A wrapper around AC_FUNC_GETGROUPS. -# Copyright (C) 1996-1997, 1999-2004, 2008-2022 Free Software -# Foundation, Inc. +# Copyright (C) 1996-1997, 1999-2004, 2008-2022 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 index a719125021..7bb8890bd5 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 @@ -1,7 +1,7 @@ # Check for getloadavg. -# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2022 Free -# Software Foundation, Inc. +# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2022 Free Software +# Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/m4/gettime.m4 b/m4/gettime.m4 index a99c1e6383..f0aeb4d0e4 100644 --- a/m4/gettime.m4 +++ b/m4/gettime.m4 @@ -1,6 +1,5 @@ -# gettime.m4 serial 9 -dnl Copyright (C) 2002, 2004-2006, 2009-2022 Free Software Foundation, -dnl Inc. +# gettime.m4 serial 11 +dnl Copyright (C) 2002, 2004-2006, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -10,5 +9,13 @@ AC_DEFUN([gl_GETTIME], dnl Prerequisites of lib/gettime.c. AC_REQUIRE([gl_CLOCK_TIME]) AC_REQUIRE([gl_TIMESPEC]) - AC_CHECK_FUNCS_ONCE([gettimeofday]) + AC_CHECK_FUNCS_ONCE([timespec_get]) +]) + +AC_DEFUN([gl_GETTIME_RES], +[ + dnl Prerequisites of lib/gettime-res.c. + AC_REQUIRE([gl_CLOCK_TIME]) + AC_REQUIRE([gl_TIMESPEC]) + AC_CHECK_FUNCS_ONCE([timespec_getres]) ]) diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4 index a14c972edc..f729601b1d 100644 --- a/m4/gettimeofday.m4 +++ b/m4/gettimeofday.m4 @@ -1,7 +1,6 @@ # serial 29 -# Copyright (C) 2001-2003, 2005, 2007, 2009-2022 Free Software -# Foundation, Inc. +# Copyright (C) 2001-2003, 2005, 2007, 2009-2022 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 7fd388c7ec..c47ea915f1 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -103,6 +103,7 @@ AC_DEFUN([gl_EARLY], # Code from module fsusage: # Code from module fsync: # Code from module futimens: + # Code from module gen-header: # Code from module getdtablesize: # Code from module getgroups: # Code from module getloadavg: @@ -128,6 +129,7 @@ AC_DEFUN([gl_EARLY], # Code from module libgmp: # Code from module limits-h: # Code from module lstat: + # Code from module malloc-gnu: # Code from module malloc-posix: # Code from module manywarnings: # Code from module memmem-simple: @@ -624,6 +626,7 @@ AC_DEFUN([gl_INIT], gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false gl_gnulib_enabled_lchmod=false + gl_gnulib_enabled_e80bf6f757095d2e5fc94dafb8f8fc8b=false gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866=false gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31=false gl_gnulib_enabled_open=false @@ -759,16 +762,31 @@ AC_DEFUN([gl_INIT], gl_gnulib_enabled_lchmod=true fi } + func_gl_gnulib_m4code_e80bf6f757095d2e5fc94dafb8f8fc8b () + { + if ! $gl_gnulib_enabled_e80bf6f757095d2e5fc94dafb8f8fc8b; then + gl_FUNC_MALLOC_GNU + if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then + AC_LIBOBJ([malloc]) + fi + gl_STDLIB_MODULE_INDICATOR([malloc-gnu]) + gl_gnulib_enabled_e80bf6f757095d2e5fc94dafb8f8fc8b=true + func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866 + if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then + func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec + fi + fi + } func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866 () { if ! $gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866; then AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) - if test $REPLACE_MALLOC = 1; then + if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then AC_LIBOBJ([malloc]) fi gl_STDLIB_MODULE_INDICATOR([malloc-posix]) gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866=true - if test $REPLACE_MALLOC = 1; then + if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec fi fi @@ -821,26 +839,33 @@ AC_DEFUN([gl_INIT], { if ! $gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b; then gl_FUNC_REALLOC_GNU - if test $REPLACE_REALLOC = 1; then + if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then AC_LIBOBJ([realloc]) fi + gl_STDLIB_MODULE_INDICATOR([realloc-gnu]) gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b=true + if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then + func_gl_gnulib_m4code_e80bf6f757095d2e5fc94dafb8f8fc8b + fi func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 + if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then + func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec + fi fi } func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 () { if ! $gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4; then gl_FUNC_REALLOC_POSIX - if test $REPLACE_REALLOC = 1; then + if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then AC_LIBOBJ([realloc]) fi gl_STDLIB_MODULE_INDICATOR([realloc-posix]) gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=true - if test $REPLACE_REALLOC = 1; then + if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866 fi - if test $REPLACE_REALLOC = 1; then + if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec fi fi @@ -975,6 +1000,7 @@ AC_DEFUN([gl_INIT], AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36]) AM_CONDITIONAL([gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1], [$gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1]) AM_CONDITIONAL([gl_GNULIB_ENABLED_lchmod], [$gl_gnulib_enabled_lchmod]) + AM_CONDITIONAL([gl_GNULIB_ENABLED_e80bf6f757095d2e5fc94dafb8f8fc8b], [$gl_gnulib_enabled_e80bf6f757095d2e5fc94dafb8f8fc8b]) AM_CONDITIONAL([gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866], [$gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866]) AM_CONDITIONAL([gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31], [$gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31]) AM_CONDITIONAL([gl_GNULIB_ENABLED_open], [$gl_gnulib_enabled_open]) diff --git a/m4/group-member.m4 b/m4/group-member.m4 index 9204a0eb97..f9bc38b629 100644 --- a/m4/group-member.m4 +++ b/m4/group-member.m4 @@ -1,7 +1,6 @@ # serial 14 -# Copyright (C) 1999-2001, 2003-2007, 2009-2022 Free Software -# Foundation, Inc. +# Copyright (C) 1999-2001, 2003-2007, 2009-2022 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/m4/malloc.m4 b/m4/malloc.m4 index 2a6d3e1e1b..6b76c1e64d 100644 --- a/m4/malloc.m4 +++ b/m4/malloc.m4 @@ -1,4 +1,4 @@ -# malloc.m4 serial 27 +# malloc.m4 serial 28 dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -43,8 +43,9 @@ AC_DEFUN([gl_FUNC_MALLOC_GNU], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) - if test $REPLACE_MALLOC = 0; then - _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC=1]) + REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX" + if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then + _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC_FOR_MALLOC_GNU=1]) fi ]) @@ -56,7 +57,7 @@ AC_DEFUN([gl_FUNC_MALLOC_PTRDIFF], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF]) - test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC=1 + test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1 ]) # Test whether malloc, realloc, calloc refuse to create objects @@ -109,7 +110,7 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX], AC_DEFINE([HAVE_MALLOC_POSIX], [1], [Define if malloc, realloc, and calloc set errno on allocation failure.]) else - REPLACE_MALLOC=1 + REPLACE_MALLOC_FOR_MALLOC_POSIX=1 fi ]) diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4 index f015357732..1107eb4a46 100644 --- a/m4/mempcpy.m4 +++ b/m4/mempcpy.m4 @@ -1,6 +1,6 @@ # mempcpy.m4 serial 12 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2022 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2022 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/memrchr.m4 b/m4/memrchr.m4 index 8daf0ba0fe..ec5e2083bc 100644 --- a/m4/memrchr.m4 +++ b/m4/memrchr.m4 @@ -1,6 +1,6 @@ # memrchr.m4 serial 11 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/mktime.m4 b/m4/mktime.m4 index 5a362a41a5..d48f40d187 100644 --- a/m4/mktime.m4 +++ b/m4/mktime.m4 @@ -1,6 +1,6 @@ # serial 36 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/nstrftime.m4 b/m4/nstrftime.m4 index 3c91ee0bd3..0f613048e3 100644 --- a/m4/nstrftime.m4 +++ b/m4/nstrftime.m4 @@ -1,7 +1,6 @@ # serial 37 -# Copyright (C) 1996-1997, 1999-2007, 2009-2022 Free Software -# Foundation, Inc. +# Copyright (C) 1996-1997, 1999-2007, 2009-2022 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/m4/pathmax.m4 b/m4/pathmax.m4 index 1d1cc30358..44add9905e 100644 --- a/m4/pathmax.m4 +++ b/m4/pathmax.m4 @@ -1,6 +1,6 @@ # pathmax.m4 serial 11 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2022 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2022 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/realloc.m4 b/m4/realloc.m4 index 62c72f88f2..86e57c259f 100644 --- a/m4/realloc.m4 +++ b/m4/realloc.m4 @@ -1,4 +1,4 @@ -# realloc.m4 serial 24 +# realloc.m4 serial 26 dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -43,8 +43,8 @@ AC_DEFUN([gl_FUNC_REALLOC_GNU], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_REALLOC_POSIX]) - if test $REPLACE_REALLOC = 0; then - _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC=1]) + if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 0; then + _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC_FOR_REALLOC_GNU=1]) fi ])# gl_FUNC_REALLOC_GNU @@ -57,7 +57,7 @@ AC_DEFUN([gl_FUNC_REALLOC_POSIX], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) - if test $REPLACE_MALLOC = 1; then - REPLACE_REALLOC=1 + if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then + REPLACE_REALLOC_FOR_REALLOC_POSIX=1 fi ]) diff --git a/m4/sig2str.m4 b/m4/sig2str.m4 index 6961a9b29d..6531606092 100644 --- a/m4/sig2str.m4 +++ b/m4/sig2str.m4 @@ -1,6 +1,5 @@ # serial 7 -dnl Copyright (C) 2002, 2005-2006, 2009-2022 Free Software Foundation, -dnl Inc. +dnl Copyright (C) 2002, 2005-2006, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4 index 4d850fab08..03b2b895b9 100644 --- a/m4/ssize_t.m4 +++ b/m4/ssize_t.m4 @@ -1,6 +1,5 @@ # ssize_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2001-2003, 2006, 2010-2022 Free Software Foundation, -dnl Inc. +dnl Copyright (C) 2001-2003, 2006, 2010-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/stat-time.m4 b/m4/stat-time.m4 index 747d2b3540..342857d39e 100644 --- a/m4/stat-time.m4 +++ b/m4/stat-time.m4 @@ -1,7 +1,7 @@ # Checks for stat-related time functions. -# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2022 Free -# Software Foundation, Inc. +# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2022 Free Software +# Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 index 3180d43f4a..cc80e77365 100644 --- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 @@ -1,4 +1,4 @@ -# stdio_h.m4 serial 56 +# stdio_h.m4 serial 57 dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -119,6 +119,7 @@ AC_DEFUN([gl_STDIO_H_REQUIRE_DEFAULTS], gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETC]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETS]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FOPEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FOPEN_GNU]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF_POSIX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPURGE]) @@ -202,6 +203,7 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], REPLACE_FDOPEN=0; AC_SUBST([REPLACE_FDOPEN]) REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH]) REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) + REPLACE_FOPEN_FOR_FOPEN_GNU=0; AC_SUBST([REPLACE_FOPEN_FOR_FOPEN_GNU]) REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF]) REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE]) REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4 index 66fe0975bd..9e2096976f 100644 --- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 @@ -1,4 +1,4 @@ -# stdlib_h.m4 serial 63 +# stdlib_h.m4 serial 66 dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -68,12 +68,14 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS], gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB__EXIT]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ALIGNED_ALLOC]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ATOLL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CALLOC_GNU]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CALLOC_POSIX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CANONICALIZE_FILE_NAME]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREE_POSIX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOADAVG]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSUBOPT]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GRANTPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_GNU]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_POSIX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBTOWC]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDTEMP]) @@ -90,6 +92,7 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS], gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM_R]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOCARRAY]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_GNU]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_POSIX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALPATH]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RPMATCH]) @@ -164,11 +167,13 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) REPLACE_ALIGNED_ALLOC=0; AC_SUBST([REPLACE_ALIGNED_ALLOC]) - REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) + REPLACE_CALLOC_FOR_CALLOC_GNU=0; AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_GNU]) + REPLACE_CALLOC_FOR_CALLOC_POSIX=0; AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_POSIX]) REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) REPLACE_FREE=0; AC_SUBST([REPLACE_FREE]) REPLACE_INITSTATE=0; AC_SUBST([REPLACE_INITSTATE]) - REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) + REPLACE_MALLOC_FOR_MALLOC_GNU=0; AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_GNU]) + REPLACE_MALLOC_FOR_MALLOC_POSIX=0; AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_POSIX]) REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) REPLACE_POSIX_MEMALIGN=0; AC_SUBST([REPLACE_POSIX_MEMALIGN]) @@ -178,7 +183,8 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], REPLACE_QSORT_R=0; AC_SUBST([REPLACE_QSORT_R]) REPLACE_RANDOM=0; AC_SUBST([REPLACE_RANDOM]) REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R]) - REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) + REPLACE_REALLOC_FOR_REALLOC_GNU=0; AC_SUBST([REPLACE_REALLOC_FOR_REALLOC_GNU]) + REPLACE_REALLOC_FOR_REALLOC_POSIX=0; AC_SUBST([REPLACE_REALLOC_FOR_REALLOC_POSIX]) REPLACE_REALLOCARRAY=0; AC_SUBST([REPLACE_REALLOCARRAY]) REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) diff --git a/m4/strnlen.m4 b/m4/strnlen.m4 index a44e32e6b3..0934274de7 100644 --- a/m4/strnlen.m4 +++ b/m4/strnlen.m4 @@ -1,6 +1,6 @@ # strnlen.m4 serial 14 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4 index 843489240d..08598936b3 100644 --- a/m4/strtoimax.m4 +++ b/m4/strtoimax.m4 @@ -1,6 +1,5 @@ # strtoimax.m4 serial 16 -dnl Copyright (C) 2002-2004, 2006, 2009-2022 Free Software Foundation, -dnl Inc. +dnl Copyright (C) 2002-2004, 2006, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/strtoll.m4 b/m4/strtoll.m4 index 42a243a31e..dc37d9984d 100644 --- a/m4/strtoll.m4 +++ b/m4/strtoll.m4 @@ -1,6 +1,5 @@ # strtoll.m4 serial 9 -dnl Copyright (C) 2002, 2004, 2006, 2008-2022 Free Software Foundation, -dnl Inc. +dnl Copyright (C) 2002, 2004, 2006, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/time_h.m4 b/m4/time_h.m4 index 5a4cc1d609..98d7b6e01b 100644 --- a/m4/time_h.m4 +++ b/m4/time_h.m4 @@ -1,9 +1,8 @@ # Configure a more-standard replacement for . -# Copyright (C) 2000-2001, 2003-2007, 2009-2022 Free Software -# Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2022 Free Software Foundation, Inc. -# serial 18 +# serial 19 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -134,6 +133,7 @@ AC_DEFUN([gl_TIME_H_REQUIRE_DEFAULTS], gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPTIME]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMEGM]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GET]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GETRES]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_R]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_RZ]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TZSET]) @@ -152,6 +152,7 @@ AC_DEFUN([gl_TIME_H_DEFAULTS], HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) HAVE_TIMESPEC_GET=1; AC_SUBST([HAVE_TIMESPEC_GET]) + HAVE_TIMESPEC_GETRES=1; AC_SUBST([HAVE_TIMESPEC_GETRES]) dnl Even GNU libc does not have timezone_t yet. HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T]) dnl If another module says to replace or to not replace, do that. diff --git a/m4/timespec.m4 b/m4/timespec.m4 index d4be110cd3..6a1afef040 100644 --- a/m4/timespec.m4 +++ b/m4/timespec.m4 @@ -1,7 +1,6 @@ #serial 15 -# Copyright (C) 2000-2001, 2003-2007, 2009-2022 Free Software -# Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2022 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4 index d9b34a9322..f93f97a1bd 100644 --- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 89 +# unistd_h.m4 serial 90 dnl Copyright (C) 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -112,6 +112,7 @@ AC_DEFUN([gl_UNISTD_H_REQUIRE_DEFAULTS], gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETOPT_POSIX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAGESIZE]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPASS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPASS_GNU]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUSERSHELL]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GROUP_MEMBER]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISATTY]) @@ -170,98 +171,99 @@ AC_DEFUN([gl_UNISTD_H_REQUIRE_DEFAULTS], AC_DEFUN([gl_UNISTD_H_DEFAULTS], [ dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) - HAVE_COPY_FILE_RANGE=1; AC_SUBST([HAVE_COPY_FILE_RANGE]) - HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) - HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) - HAVE_EXECVPE=1; AC_SUBST([HAVE_EXECVPE]) - HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) - HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) - HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) - HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC]) - HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) - HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) - HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) - HAVE_GETENTROPY=1; AC_SUBST([HAVE_GETENTROPY]) - HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) - HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) - HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) - HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) - HAVE_GETPASS=1; AC_SUBST([HAVE_GETPASS]) - HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) - HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) - HAVE_LINK=1; AC_SUBST([HAVE_LINK]) - HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) - HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) - HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) - HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) - HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) - HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) - HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) - HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME]) - HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) - HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) - HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) - HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) - HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) - HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) - HAVE_DECL_EXECVPE=1; AC_SUBST([HAVE_DECL_EXECVPE]) - HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) - HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC]) - HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) - HAVE_DECL_GETLOGIN=1; AC_SUBST([HAVE_DECL_GETLOGIN]) - HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) - HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) - HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) - HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) - HAVE_DECL_TRUNCATE=1; AC_SUBST([HAVE_DECL_TRUNCATE]) - HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) - HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) - HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) - REPLACE_ACCESS=0; AC_SUBST([REPLACE_ACCESS]) - REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) - REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) - REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) - REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) - REPLACE_EXECL=0; AC_SUBST([REPLACE_EXECL]) - REPLACE_EXECLE=0; AC_SUBST([REPLACE_EXECLE]) - REPLACE_EXECLP=0; AC_SUBST([REPLACE_EXECLP]) - REPLACE_EXECV=0; AC_SUBST([REPLACE_EXECV]) - REPLACE_EXECVE=0; AC_SUBST([REPLACE_EXECVE]) - REPLACE_EXECVP=0; AC_SUBST([REPLACE_EXECVP]) - REPLACE_EXECVPE=0; AC_SUBST([REPLACE_EXECVPE]) - REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT]) - REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) - REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) - REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) - REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) - REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE]) - REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) - REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) - REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) - REPLACE_GETPASS=0; AC_SUBST([REPLACE_GETPASS]) - REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY]) - REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) - REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) - REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) - REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) - REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) - REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) - REPLACE_READ=0; AC_SUBST([REPLACE_READ]) - REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) - REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT]) - REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) - REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) - REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) - REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT]) - REPLACE_TRUNCATE=0; AC_SUBST([REPLACE_TRUNCATE]) - REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) - REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) - REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) - REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) - REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) - UNISTD_H_HAVE_SYS_RANDOM_H=0; AC_SUBST([UNISTD_H_HAVE_SYS_RANDOM_H]) - UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) + HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) + HAVE_COPY_FILE_RANGE=1; AC_SUBST([HAVE_COPY_FILE_RANGE]) + HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) + HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) + HAVE_EXECVPE=1; AC_SUBST([HAVE_EXECVPE]) + HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) + HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) + HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) + HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC]) + HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) + HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) + HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) + HAVE_GETENTROPY=1; AC_SUBST([HAVE_GETENTROPY]) + HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) + HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) + HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) + HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) + HAVE_GETPASS=1; AC_SUBST([HAVE_GETPASS]) + HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) + HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) + HAVE_LINK=1; AC_SUBST([HAVE_LINK]) + HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) + HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) + HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) + HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) + HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) + HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) + HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) + HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME]) + HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) + HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) + HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) + HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) + HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) + HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) + HAVE_DECL_EXECVPE=1; AC_SUBST([HAVE_DECL_EXECVPE]) + HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) + HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC]) + HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) + HAVE_DECL_GETLOGIN=1; AC_SUBST([HAVE_DECL_GETLOGIN]) + HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) + HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) + HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) + HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) + HAVE_DECL_TRUNCATE=1; AC_SUBST([HAVE_DECL_TRUNCATE]) + HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) + HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) + HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) + REPLACE_ACCESS=0; AC_SUBST([REPLACE_ACCESS]) + REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) + REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) + REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) + REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) + REPLACE_EXECL=0; AC_SUBST([REPLACE_EXECL]) + REPLACE_EXECLE=0; AC_SUBST([REPLACE_EXECLE]) + REPLACE_EXECLP=0; AC_SUBST([REPLACE_EXECLP]) + REPLACE_EXECV=0; AC_SUBST([REPLACE_EXECV]) + REPLACE_EXECVE=0; AC_SUBST([REPLACE_EXECVE]) + REPLACE_EXECVP=0; AC_SUBST([REPLACE_EXECVP]) + REPLACE_EXECVPE=0; AC_SUBST([REPLACE_EXECVPE]) + REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT]) + REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) + REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) + REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) + REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) + REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE]) + REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) + REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) + REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) + REPLACE_GETPASS=0; AC_SUBST([REPLACE_GETPASS]) + REPLACE_GETPASS_FOR_GETPASS_GNU=0; AC_SUBST([REPLACE_GETPASS_FOR_GETPASS_GNU]) + REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY]) + REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) + REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) + REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) + REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) + REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) + REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) + REPLACE_READ=0; AC_SUBST([REPLACE_READ]) + REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) + REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT]) + REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) + REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) + REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) + REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT]) + REPLACE_TRUNCATE=0; AC_SUBST([REPLACE_TRUNCATE]) + REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) + REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) + REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) + REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) + REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) + UNISTD_H_HAVE_SYS_RANDOM_H=0; AC_SUBST([UNISTD_H_HAVE_SYS_RANDOM_H]) + UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) ]) commit a0263cfee3cf64f4a77f90591af7ef7d8d78d8db Author: Robert Pluim Date: Tue Jan 4 16:42:03 2022 +0100 Remove ambiguity from key-valid-p docstring * lisp/keymap.el (key-valid-p): Be explicit about the separator being one and only one space. diff --git a/lisp/keymap.el b/lisp/keymap.el index 6feb91a60b..3e9189fba4 100644 --- a/lisp/keymap.el +++ b/lisp/keymap.el @@ -297,7 +297,7 @@ See `kbd' for a descripion of KEYS." (defun key-valid-p (keys) "Say whether KEYS is a valid key. A key is a string consisting of one or more key strokes. -The key strokes are separated by space characters. +The key strokes are separated by single space characters. Each key stroke is either a single character, or the name of an event, surrounded by angle brackets. In addition, any key stroke commit 0d315102fed8cecccbac15232304000df5b66406 Author: Lars Ingebrigtsen Date: Tue Jan 4 15:50:56 2022 +0100 Improve pp-emacs-lisp-code for #' * lisp/emacs-lisp/pp.el (pp--insert-lisp): Format (function ...) as #'. diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index a4dbd63755..d199716b2c 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -24,6 +24,7 @@ ;;; Code: +(require 'cl-lib) (defvar font-lock-verbose) (defgroup pp nil @@ -233,13 +234,14 @@ Use the `pp-max-width' variable to control the desired line length." (cons (cond ((consp (cdr sexp)) (if (and (length= sexp 2) - (eq (car sexp) 'quote)) + (memq (car sexp) '(quote function))) (cond ((symbolp (cadr sexp)) (let ((print-quoted t)) (prin1 sexp (current-buffer)))) ((consp (cadr sexp)) - (insert "'") + (insert (if (eq (car sexp) 'quote) + "'" "#'")) (pp--format-list (cadr sexp) (set-marker (make-marker) (1- (point)))))) (pp--format-list sexp))) diff --git a/test/lisp/emacs-lisp/pp-resources/code-formats.erts b/test/lisp/emacs-lisp/pp-resources/code-formats.erts index 2b2001d096..002a5cf165 100644 --- a/test/lisp/emacs-lisp/pp-resources/code-formats.erts +++ b/test/lisp/emacs-lisp/pp-resources/code-formats.erts @@ -122,3 +122,9 @@ Name: code-formats11 (lambda () [(foo bar) (foo bar)]) =-=-= + +Name: code-formats12 + +=-= +(global-set-key (kbd "s-x") #'kill-region) +=-=-= commit 38b4bbb7e1abaa9f925048840b53290e2011a851 Author: Eli Zaretskii Date: Tue Jan 4 15:37:16 2022 +0200 A cleaner fix for display bug#52947 * src/xdisp.c (tab_bar_height, redisplay_tab_bar): Don't call set_iterator_to_next here... (display_tab_bar_line): ...call it here, even if we exit the loop because we encounter a newline. diff --git a/src/xdisp.c b/src/xdisp.c index 6e94ff5ec6..0635cad0d1 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13745,6 +13745,7 @@ display_tab_bar_line (struct it *it, int height) so there's no need to check the face here. */ it->start_of_box_run_p = true; + bool enough = false; while (it->current_x < max_x) { int x, n_glyphs_before, i, nglyphs; @@ -13791,11 +13792,12 @@ display_tab_bar_line (struct it *it, int height) ++i; } + enough = ITERATOR_AT_END_OF_LINE_P (it); + set_iterator_to_next (it, true); + /* Stop at line end. */ - if (ITERATOR_AT_END_OF_LINE_P (it)) + if (enough) break; - - set_iterator_to_next (it, true); } out:; @@ -13878,10 +13880,6 @@ tab_bar_height (struct frame *f, int *n_rows, bool pixelwise) { it.glyph_row = temp_row; display_tab_bar_line (&it, -1); - /* If the tab-bar string includes newlines, get past it, because - display_tab_bar_line doesn't. */ - if (ITERATOR_AT_END_OF_LINE_P (&it)) - set_iterator_to_next (&it, true); } clear_glyph_row (temp_row); @@ -14007,10 +14005,6 @@ redisplay_tab_bar (struct frame *f) extra -= h; } display_tab_bar_line (&it, height + h); - /* If the tab-bar string includes newlines, get past it, - because display_tab_bar_line doesn't. */ - if (ITERATOR_AT_END_OF_LINE_P (&it)) - set_iterator_to_next (&it, true); } } else commit aa7d0e9a92228e40f63a86718de13ce5842137b3 Author: Jimmy Aguilar Mena Date: Tue Jan 4 14:15:10 2022 +0100 Autoload decorator for windmove-mode diff --git a/lisp/windmove.el b/lisp/windmove.el index b3f881205e..c8ea4fd1e5 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -448,6 +448,7 @@ unless `windmove-create-window' is non-nil and a new window is created." (defvar windmove-mode-map (make-sparse-keymap) "Map used by `windmove-install-defaults'.") +;;;###autoload (define-minor-mode windmove-mode "Global minor mode for default windmove commands." :keymap windmove-mode-map commit c36741f9c5f58f4efd80a1e8918a8356e9d0100f Author: Po Lu Date: Tue Jan 4 19:56:58 2022 +0800 Translate more modifiers to GDK ones in xwidgets * src/xwidget.c (xw_translate_x_modifiers): Also handle Control and ShiftMask. diff --git a/src/xwidget.c b/src/xwidget.c index bfb666e565..24dafa7d3c 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -245,6 +245,10 @@ xw_translate_x_modifiers (struct x_display_info *dpyinfo, mods |= GDK_SUPER_MASK; if (modifiers & dpyinfo->hyper_mod_mask) mods |= GDK_HYPER_MASK; + if (modifiers & ControlMask) + mods |= GDK_CONTROL_MASK; + if (modifiers & ShiftMask) + mods |= GDK_SHIFT_MASK; return mods; } commit 377bf26ebe292d16b26043c566a7c00c452caf27 Author: Po Lu Date: Tue Jan 4 19:30:07 2022 +0800 Stop assuming X kbd state works with GDK when forwarding events to xwidgets * src/xwidget.c (xw_translate_x_modifiers): New function. (Fxwidget_perform_lispy_event): Translate X modifiers to GDK modifiers before sending them to the xwidget. diff --git a/src/xwidget.c b/src/xwidget.c index 3df208034b..bfb666e565 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -222,6 +222,34 @@ xw_forward_event_from_view (GtkWidget *widget, GdkEvent *event, } #endif +#ifdef HAVE_X_WINDOWS +static guint +xw_translate_x_modifiers (struct x_display_info *dpyinfo, + unsigned int modifiers) +{ + guint mods = 0; + + if (modifiers & dpyinfo->meta_mod_mask) + { + /* GDK always assumes Mod1 is alt, but that's no reason for + us to make that mistake as well. */ + if (!dpyinfo->alt_mod_mask) + mods |= GDK_MOD1_MASK; + else + mods |= GDK_META_MASK; + } + + if (modifiers & dpyinfo->alt_mod_mask) + mods |= GDK_MOD1_MASK; + if (modifiers & dpyinfo->super_mod_mask) + mods |= GDK_SUPER_MASK; + if (modifiers & dpyinfo->hyper_mod_mask) + mods |= GDK_HYPER_MASK; + + return mods; +} +#endif + DEFUN ("make-xwidget", Fmake_xwidget, Smake_xwidget, 4, 7, 0, @@ -563,7 +591,13 @@ selected frame is not an X-Windows frame. */) keycode = gdk_unicode_to_keyval (character); xg_event->key.keyval = keycode; +#ifndef HAVE_X_WINDOWS xg_event->key.state = modifiers; +#else + if (f) + xg_event->key.state = xw_translate_x_modifiers (FRAME_DISPLAY_INFO (f), + modifiers); +#endif if (keycode > -1) { commit 4309679742a89fbd1b56a1bdf601e85887d1eadc Author: Po Lu Date: Tue Jan 4 11:15:07 2022 +0000 Make `x-file-dialog' arity match documentation on Haiku * lisp/term/haiku-win.el (x-file-dialog): Fix arity. diff --git a/lisp/term/haiku-win.el b/lisp/term/haiku-win.el index f3c94db6a3..ffd67e9cf0 100644 --- a/lisp/term/haiku-win.el +++ b/lisp/term/haiku-win.el @@ -111,17 +111,17 @@ If TYPE is nil, return \"text/plain\"." (declare-function haiku-read-file-name "haikufns.c") -(defun x-file-dialog (prompt dir default_filename mustmatch only_dir_p) +(defun x-file-dialog (prompt dir &optional default-filename mustmatch only-dir-p) "SKIP: real doc in xfns.c." (if (eq (framep-on-display (selected-frame)) 'haiku) (haiku-read-file-name (if (not (string-suffix-p ": " prompt)) prompt (substring prompt 0 (- (length prompt) 2))) (selected-frame) - (or dir (and default_filename - (file-name-directory default_filename))) - mustmatch only_dir_p - (file-name-nondirectory default_filename)) + (or dir (and default-filename + (file-name-directory default-filename))) + mustmatch only-dir-p + (file-name-nondirectory default-filename)) (error "x-file-dialog on a tty frame"))) (defun haiku-dnd-handle-drag-n-drop-event (event) commit 2d4b2e296b5c13a8b8481e7c0d0c26f52d2de257 Author: Alan Third Date: Tue Dec 28 11:36:46 2021 +0000 Remove macOS drop-shadows on some frames (bug#28512) * src/nsterm.m ([EmacsWindow setParentChildRelationships]): Remove shadows on undecorated child frames. diff --git a/src/nsterm.m b/src/nsterm.m index 2318f7beab..41c311e04d 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -8435,6 +8435,15 @@ - (void)setParentChildRelationships #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 [ourView updateCollectionBehavior]; #endif + + /* Child frames are often used in ways that may mean they should + "disappear" into the contents of the parent frame. macOs's + drop-shadows break this effect, so remove them on undecorated + child frames. */ + if (parentFrame && FRAME_UNDECORATED (ourFrame)) + [self setHasShadow:NO]; + else + [self setHasShadow:YES]; #endif commit 3e247bd34c9dcd6300140efe4534b1f3a7bdc776 Author: Po Lu Date: Tue Jan 4 17:51:05 2022 +0800 ; * configure.ac: Move some AC_SUBSTs to the correct location. diff --git a/configure.ac b/configure.ac index 517a5b5ba5..baf8c8018e 100644 --- a/configure.ac +++ b/configure.ac @@ -2280,6 +2280,7 @@ term_header= HAVE_X_WINDOWS=no HAVE_X11=no USE_X_TOOLKIT=none +HAVE_PGTK=no case "${window_system}" in x11 ) @@ -2318,12 +2319,12 @@ dnl use the toolkit if we have gtk, or X11R5 or newer. USE_X_TOOLKIT=none HAVE_PGTK=yes AC_DEFINE([HAVE_PGTK], 1, [Define to 1 if you have pure Gtk+-3.]) - AC_SUBST(HAVE_PGTK) ;; haiku ) term_header=haikuterm.h ;; esac +AC_SUBST(HAVE_PGTK) if test "$window_system" = none && test "X$with_x" != "Xno"; then AC_CHECK_PROG(HAVE_XSERVER, X, true, false) @@ -3009,7 +3010,6 @@ if test "${HAVE_X11}" = "yes" -o "${window_system}" = "pgtk" && test "${with_gse if test "$emacs_cv_gsettings_in_gio" = "yes"; then AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.]) - AC_SUBST(HAVE_GSETTINGS) SETTINGS_CFLAGS="$GSETTINGS_CFLAGS" SETTINGS_LIBS="$GSETTINGS_LIBS" test "$with_gconf" = "yes" || with_gconf=no @@ -3018,6 +3018,7 @@ if test "${HAVE_X11}" = "yes" -o "${window_system}" = "pgtk" && test "${with_gse LIBS=$old_LIBS fi fi +AC_SUBST(HAVE_GSETTINGS) dnl GConf has been tested under GNU/Linux only. dnl The version is really arbitrary, it is about the same age as Gtk+ 2.6. commit 61b57ec6de41a0b63083b4c95a13b0e18e70ce90 Author: Stefan Kangas Date: Tue Jan 4 09:50:44 2022 +0100 Remove unnecessary autoload cookie in font-core.el * lisp/font-core.el (font-lock-defaults): Remove autoload of risky-local-variable property; this file is preloaded. diff --git a/lisp/font-core.el b/lisp/font-core.el index 21d6f514ab..2b75309ff3 100644 --- a/lisp/font-core.el +++ b/lisp/font-core.el @@ -66,7 +66,6 @@ Other variables include that for syntactic keyword fontification, functions, `font-lock-fontify-buffer-function', `font-lock-unfontify-buffer-function', `font-lock-fontify-region-function', `font-lock-unfontify-region-function', and `font-lock-inhibit-thing-lock'.") -;;;###autoload (put 'font-lock-defaults 'risky-local-variable t) (defvar font-lock-function 'font-lock-default-function commit 183936ee8e5bdf10e969b0d2cb661f81cf7950f9 Author: Yuuki Harano Date: Tue Jan 4 15:27:36 2022 +0900 Remove gsettings.m4 and write directly into Makefile.in * configure.ac (HAVE_PGTK): Declare substitution (HAVE_GSETTINGS): Declare substitution * Makefile.in (HAVE_PGTK): New variable (HAVE_GSETTINGS): New variable (gsettingsschemadir): Don't use value from gsettings.m4 (distclean): Add clean-gsettings-schemas (install-gsettings-schemas): Implement instead of gsettings.m4 (uninstall-gsettings-schemas): Implement instead of gsettings.m4 (clean-gsettings-schemas): Implement instead of gsettings.m4 ($(gsettings_SCHEMAS:.xml=.valid)): Implement instead of gsettings.m4 * m4/gsettings.m4: Remove diff --git a/Makefile.in b/Makefile.in index 5bafe0f140..b72127dde6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -104,6 +104,9 @@ USE_STARTUP_NOTIFICATION = @USE_STARTUP_NOTIFICATION@ HAVE_BE_APP = @HAVE_BE_APP@ +HAVE_PGTK = @HAVE_PGTK@ +HAVE_GSETTINGS = @HAVE_GSETTINGS@ + # ==================== Where To Install Things ==================== # Location to install Emacs.app under GNUstep / macOS. @@ -213,7 +216,7 @@ icondir=$(datarootdir)/icons iconsrcdir=$(srcdir)/etc/images/icons # Where to install the gsettings schema file. -gsettingsschemadir = @gsettingsschemadir@ +gsettingsschemadir = $(datadir)/glib-2.0/schemas # ==================== Emacs-specific directories ==================== @@ -949,7 +952,7 @@ distclean_dirs = $(clean_dirs) leim lisp admin/grammars $(foreach dir,$(distclean_dirs),$(eval $(call submake_template,$(dir),distclean))) -distclean: $(distclean_dirs:=_distclean) +distclean: $(distclean_dirs:=_distclean) clean-gsettings-schemas ${top_distclean} ### 'bootstrap-clean' @@ -1245,9 +1248,30 @@ gitmerge: -l ${srcdir}/admin/gitmerge.el \ --eval '(setq gitmerge-minimum-missing ${GITMERGE_NMIN})' -f gitmerge -@GSETTINGS_RULES@ - install-gsettings-schemas: +ifeq ($(HAVE_PGTK)$(HAVE_GSETTINGS),yesyes) + $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)" + $(INSTALL_DATA) $(srcdir)/$(gsettings_SCHEMAS) "$(DESTDIR)$(gsettingsschemadir)" + if [ -z "$(DESTDIR)" ]; then $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); fi +endif + uninstall-gsettings-schemas: +ifeq ($(HAVE_PGTK)$(HAVE_GSETTINGS),yesyes) + for x in $(gsettings_SCHEMAS); do \ + xx=`echo $$x | sed -e 's|.*/||'`; \ + rm -f "$(DESTDIR)$(gsettingsschemadir)/$${xx}"; \ + done + if [ -z "$(DESTDIR)" ]; then $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); fi +endif + clean-gsettings-schemas: -$(gsettings_SCHEMAS:.xml=.valid): +ifeq ($(HAVE_PGTK)$(HAVE_GSETTINGS),yesyes) + rm -f $(gsettings_SCHEMAS:.xml=.valid) +endif + +$(gsettings_SCHEMAS:.xml=.valid): $(srcdir)/$(gsettings_SCHEMAS) +ifeq ($(HAVE_PGTK)$(HAVE_GSETTINGS),yesyes) + $(GLIB_COMPILE_SCHEMAS) --strict --dry-run --schema-file=$(srcdir)/$(gsettings_SCHEMAS) + $(MKDIR_P) $(@D) + touch $@ +endif diff --git a/configure.ac b/configure.ac index dabc2b425f..517a5b5ba5 100644 --- a/configure.ac +++ b/configure.ac @@ -2318,6 +2318,7 @@ dnl use the toolkit if we have gtk, or X11R5 or newer. USE_X_TOOLKIT=none HAVE_PGTK=yes AC_DEFINE([HAVE_PGTK], 1, [Define to 1 if you have pure Gtk+-3.]) + AC_SUBST(HAVE_PGTK) ;; haiku ) term_header=haikuterm.h @@ -3008,6 +3009,7 @@ if test "${HAVE_X11}" = "yes" -o "${window_system}" = "pgtk" && test "${with_gse if test "$emacs_cv_gsettings_in_gio" = "yes"; then AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.]) + AC_SUBST(HAVE_GSETTINGS) SETTINGS_CFLAGS="$GSETTINGS_CFLAGS" SETTINGS_LIBS="$GSETTINGS_LIBS" test "$with_gconf" = "yes" || with_gconf=no diff --git a/m4/gsettings.m4 b/m4/gsettings.m4 deleted file mode 100644 index 882e6a83e7..0000000000 --- a/m4/gsettings.m4 +++ /dev/null @@ -1,88 +0,0 @@ -# Increment this whenever this file is changed. -#serial 2 - -dnl GLIB_GSETTINGS -dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether -dnl the schema should be compiled -dnl - -AC_DEFUN([GLIB_GSETTINGS], -[ - dnl We can't use PKG_PREREQ because that needs 0.29. - m4_ifndef([PKG_PROG_PKG_CONFIG], - [pkg.m4 version 0.28 or later is required]) - - m4_pattern_allow([AM_V_GEN]) - AC_ARG_ENABLE(schemas-compile, - AS_HELP_STRING([--disable-schemas-compile], - [Disable regeneration of gschemas.compiled on install]), - [case ${enableval} in - yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;; - no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;; - esac]) - AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE]) - PKG_PROG_PKG_CONFIG([0.16]) - AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas]) - AS_IF([test x$cross_compiling != xyes], - [PKG_CHECK_VAR([GLIB_COMPILE_SCHEMAS], [gio-2.0], [glib_compile_schemas])], - [AC_PATH_PROG([GLIB_COMPILE_SCHEMAS], [glib-compile-schemas])]) - AC_SUBST(GLIB_COMPILE_SCHEMAS) - if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then - ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2]) - else - ifelse([$1],,[:],[$1]) - fi - - GSETTINGS_RULES=' -.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas - -mostlyclean-am: clean-gsettings-schemas - -gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE)) - -%.gschema.valid: %.gschema.xml $(gsettings__enum_file) - $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@ - -all-am: $(gsettings_SCHEMAS:.xml=.valid) -uninstall-am: uninstall-gsettings-schemas -install-data-am: install-gsettings-schemas - -.SECONDARY: $(gsettings_SCHEMAS) - -install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file) - @$(NORMAL_INSTALL) - if test -n "$^"; then \ - test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \ - $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \ - test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \ - fi - -uninstall-gsettings-schemas: - @$(NORMAL_UNINSTALL) - @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files - test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir) - -clean-gsettings-schemas: - rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file) - -ifdef gsettings_ENUM_NAMESPACE -$(gsettings__enum_file): $(gsettings_ENUM_FILES) - $(AM_V_GEN) glib-mkenums --comments '\'''\'' --fhead "" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " " --vtail " " --ftail "" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@ -endif -' - _GSETTINGS_SUBST(GSETTINGS_RULES) -]) - -dnl _GSETTINGS_SUBST(VARIABLE) -dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST -AC_DEFUN([_GSETTINGS_SUBST], -[ -AC_SUBST([$1]) -m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) -] -) commit 3eaf3aeec8a23dda8f9a170909bcc052c3d4ab78 Author: Jim Porter Date: Sun Jan 2 22:08:52 2022 -0800 Prevent further cases of duplicated separators in context menus In some cases, context menu items are added before the overall prompt string. This could cause multiple consecutive separators to appear if they "surround" the prompt string. (Bug#52293) * lisp/mouse.el (context-menu-map): Improve the de-duplication logic to ignore non-menu-items when checking for consecutive separators. * test/lisp/mouse-tests.el (context-menu-map-remove-consecutive-separators) (context-menu-map-remove-separators-at-beginning-or-end): New tests. diff --git a/lisp/mouse.el b/lisp/mouse.el index 0071420efc..1a76b9a0b6 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -329,21 +329,29 @@ the function `context-menu-filter-function'." ;; Remove duplicate separators as well as ones at the beginning or ;; end of the menu. - (let ((l menu) saw-first-item) + (let ((l menu) (last-saw-separator t)) (while (and (consp l) (consp (cdr l))) - ;; If the next item is a separator, remove it if 1) we haven't - ;; seen any other items yet, or 2) it's followed by either - ;; another separator or the end of the list. - (if (and (equal (cdr-safe (cadr l)) menu-bar-separator) - (or (not saw-first-item) - (null (caddr l)) - (equal (cdr-safe (caddr l)) menu-bar-separator))) - (setcdr l (cddr l)) - ;; The "first item" is any cons cell; this excludes the - ;; `keymap' symbol and the menu name. - (when (consp (cadr l)) (setq saw-first-item t)) - (setq l (cdr l))))) + (if (equal (cdr-safe (cadr l)) menu-bar-separator) + (progn + ;; The next item is a separator. Remove it if the last + ;; item we saw was a separator too. + (if last-saw-separator + (setcdr l (cddr l)) + ;; If we didn't delete this separator, update the last + ;; separator we saw to this one. + (setq last-saw-separator l + l (cdr l)))) + ;; If the next item is a cons cell, we found a non-separator + ;; item. Don't remove the next separator we see. We + ;; specifically check for cons cells to avoid treating the + ;; overall prompt string as a menu item. + (when (consp (cadr l)) + (setq last-saw-separator nil)) + (setq l (cdr l)))) + ;; If the last item we saw was a separator, remove it. + (when (consp last-saw-separator) + (setcdr last-saw-separator (cddr last-saw-separator)))) (when (functionp context-menu-filter-function) (setq menu (funcall context-menu-filter-function menu click))) diff --git a/test/lisp/mouse-tests.el b/test/lisp/mouse-tests.el index 1cc9f64f04..1be32006a1 100644 --- a/test/lisp/mouse-tests.el +++ b/test/lisp/mouse-tests.el @@ -52,5 +52,167 @@ translate `mouse-1' events into `mouse-2' events." (should (equal (mouse-position) (cons frame (cons 0 0)))))) +(ert-deftest context-menu-map-remove-consecutive-separators () + "Check that `context-menu-map' removes consecutive separators." + ;; Both separators after the overall prompt string. + (let ((context-menu-functions + '((lambda (menu _click) + (define-key-after menu [foo-item] '(menu-item "Foo" identity)) + (define-key-after menu [separator-1] menu-bar-separator) + (define-key-after menu [separator-2] menu-bar-separator) + (define-key-after menu [bar-item] '(menu-item "Bar" identity)) + menu)))) + (should (equal `(keymap + "Context Menu" + (foo-item menu-item "Foo" identity) + (separator-1 . ,menu-bar-separator) + (bar-item menu-item "Bar" identity)) + (context-menu-map)))) + ;; Both separators before the overall prompt string. + (let ((context-menu-functions + '((lambda (menu _click) + (define-key menu [bar-item] '(menu-item "Bar" identity)) + (define-key menu [separator-2] menu-bar-separator) + (define-key menu [separator-1] menu-bar-separator) + (define-key menu [foo-item] '(menu-item "Foo" identity)) + menu)))) + (should (equal `(keymap + (foo-item menu-item "Foo" identity) + (separator-1 . ,menu-bar-separator) + (bar-item menu-item "Bar" identity) + "Context Menu") + (context-menu-map)))) + ;; First separator before and second separator after the overall + ;; prompt string. + (let ((context-menu-functions + '((lambda (menu _click) + (define-key-after menu [separator-2] menu-bar-separator) + (define-key-after menu [bar-item] '(menu-item "Bar" identity)) + (define-key menu [separator-1] menu-bar-separator) + (define-key menu [foo-item] '(menu-item "Foo" identity)) + menu)))) + (should (equal `(keymap + (foo-item menu-item "Foo" identity) + (separator-1 . ,menu-bar-separator) + "Context Menu" + (bar-item menu-item "Bar" identity)) + (context-menu-map)))) + ;; Three consecutive separators. + (let ((context-menu-functions + '((lambda (menu _click) + (define-key-after menu [foo-item] '(menu-item "Foo" identity)) + (define-key-after menu [separator-1] menu-bar-separator) + (define-key-after menu [separator-2] menu-bar-separator) + (define-key-after menu [separator-3] menu-bar-separator) + (define-key-after menu [bar-item] '(menu-item "Bar" identity)) + menu)))) + (should (equal `(keymap + "Context Menu" + (foo-item menu-item "Foo" identity) + (separator-1 . ,menu-bar-separator) + (bar-item menu-item "Bar" identity)) + (context-menu-map))))) + +(ert-deftest context-menu-map-remove-separators-at-beginning-or-end () + "Check that `context-menu-map' removes separators at the +beginning or end of the menu." + ;; Menus with only separators. + (let ((test-functions + '(;; Separator before the overall prompt string. + (lambda (menu _click) + (define-key menu [separator] menu-bar-separator) + menu) + ;; Separator after the overall prompt string. + (lambda (menu _click) + (define-key-after menu [separator] menu-bar-separator) + menu) + ;; Begin and end separators before the overall prompt string. + (lambda (menu _click) + (define-key menu [end-separator] menu-bar-separator) + (define-key menu [begin-separator] menu-bar-separator) + menu) + ;; Begin and end separators after the overall prompt string. + (lambda (menu _click) + (define-key-after menu [begin-separator] menu-bar-separator) + (define-key-after menu [end-separator] menu-bar-separator) + menu) + ;; Begin separator before and end separator after the + ;; overall prompt string. + (lambda (menu _click) + (define-key menu [begin-separator] menu-bar-separator) + (define-key-after menu [end-separator] menu-bar-separator) + menu)))) + (dolist (fun test-functions) + (let ((context-menu-functions (list fun))) + (should (equal '(keymap "Context Menu") + (context-menu-map)))))) + ;; Menus with separators at beginning and/or end with a menu-item + ;; before the prompt string. + (let ((test-functions + '(;; Separator before the overall prompt string and the menu-item. + (lambda (menu _click) + (define-key menu [foo-item] '(menu-item "Foo" identity)) + (define-key menu [separator] menu-bar-separator) + menu) + ;; Separator before the overall prompt string, but after + ;; the menu-item. + (lambda (menu _click) + (define-key menu [separator] menu-bar-separator) + (define-key menu [foo-item] '(menu-item "Foo" identity)) + menu) + ;; Separator at the end. + (lambda (menu _click) + (define-key menu [foo-item] '(menu-item "Foo" identity)) + (define-key-after menu [separator] menu-bar-separator) + menu) + ;; Begin separator before and end separator after the + ;; overall prompt string. + (lambda (menu _click) + (define-key menu [foo-item] '(menu-item "Foo" identity)) + (define-key menu [begin-separator] menu-bar-separator) + (define-key-after menu [end-separator] menu-bar-separator) + menu)))) + (dolist (fun test-functions) + (let ((context-menu-functions (list fun))) + (should (equal '(keymap (foo-item menu-item "Foo" identity) + "Context Menu") + (context-menu-map)))))) + ;; Menus with separators at beginning and/or end with a menu-item + ;; after the prompt string. + (let ((test-functions + '(;; Separator before the overall prompt string. + (lambda (menu _click) + (define-key menu [separator] menu-bar-separator) + (define-key-after menu [foo-item] '(menu-item "Foo" identity)) + menu) + ;; Separator after the overall prompt string, but before + ;; the menu-item. + (lambda (menu _click) + (define-key-after menu [separator] menu-bar-separator) + (define-key-after menu [foo-item] '(menu-item "Foo" identity)) + menu) + ;; Separator at the end. + (lambda (menu _click) + (define-key-after menu [foo-item] '(menu-item "Foo" identity)) + (define-key-after menu [separator] menu-bar-separator) + menu) + ;; Begin and end separators after the overall prompt string. + (lambda (menu _click) + (define-key-after menu [begin-separator] menu-bar-separator) + (define-key-after menu [foo-item] '(menu-item "Foo" identity)) + (define-key-after menu [end-separator] menu-bar-separator) + menu) + ;; Begin separator before and end separator after the + ;; overall prompt string. + (lambda (menu _click) + (define-key menu [begin-separator] menu-bar-separator) + (define-key-after menu [foo-item] '(menu-item "Foo" identity)) + (define-key-after menu [end-separator] menu-bar-separator) + menu)))) + (dolist (fun test-functions) + (let ((context-menu-functions (list fun))) + (should (equal '(keymap "Context Menu" + (foo-item menu-item "Foo" identity)) + (context-menu-map))))))) ;;; mouse-tests.el ends here commit 9651be5b48691ced56230522e10c05a04455e4a3 Author: Po Lu Date: Tue Jan 4 08:14:40 2022 +0000 Fix unused variable warning in last change * src/haiku_draw_support.c (BBitmap_transform_bitmap): Fix unused variable warning. diff --git a/src/haiku_draw_support.cc b/src/haiku_draw_support.cc index 3e17a08811..5d355ac205 100644 --- a/src/haiku_draw_support.cc +++ b/src/haiku_draw_support.cc @@ -421,7 +421,6 @@ BBitmap_transform_bitmap (void *bitmap, void *mask, uint32_t m_color, mk = rotate_bitmap_270 (mk); } - BRect r = bm->Bounds (); BRect n = BRect (0, 0, desw - 1, desh - 1); BView vw (n, NULL, B_FOLLOW_NONE, 0); BBitmap *dst = new BBitmap (n, bm->ColorSpace (), true); commit a851e5a66900fae68e258ad8aaf92321af1db993 Author: Po Lu Date: Tue Jan 4 08:07:53 2022 +0000 Rationalize Haiku rectangle handling * src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp): (BView_DrawMask): (rotate_bitmap_270): (rotate_bitmap_90): (BBitmap_transform_bitmap): * src/haiku_support.cc (UnZoom): (GetParentWidthHeight): (MakeFullscreen): (AttachCairoSurface): (AfterResize): (DrawContent): (BView_cr_dump_clipping): Use new rectangle handling macros. * src/haiku_support.h (BE_RECT_WIDTH, BE_RECT_HEIGHT): New macros. diff --git a/src/haiku_draw_support.cc b/src/haiku_draw_support.cc index 76a5d2e59c..3e17a08811 100644 --- a/src/haiku_draw_support.cc +++ b/src/haiku_draw_support.cc @@ -310,9 +310,10 @@ BView_DrawBitmapWithEraseOp (void *view, void *bitmap, int x, if (bm->ColorSpace () == B_GRAY1) { rgb_color low_color = vw->LowColor (); - for (int y = 0; y <= bc.Bounds ().Height (); ++y) + BRect bounds = bc.Bounds (); + for (int y = 0; y < BE_RECT_HEIGHT (bounds); ++y) { - for (int x = 0; x <= bc.Bounds ().Width (); ++x) + for (int x = 0; x <= BE_RECT_WIDTH (bounds); ++x) { if (bits[y * (stride / 4) + x] == 0xFF000000) bits[y * (stride / 4) + x] = RGB_COLOR_UINT32 (low_color); @@ -336,11 +337,13 @@ BView_DrawMask (void *src, void *view, { BBitmap *source = (BBitmap *) src; BBitmap bm (source->Bounds (), B_RGBA32); + BRect bounds = bm.Bounds (); + if (bm.InitCheck () != B_OK) return; - for (int y = 0; y <= bm.Bounds ().IntegerHeight (); ++y) + for (int y = 0; y < BE_RECT_HEIGHT (bounds); ++y) { - for (int x = 0; x <= bm.Bounds ().IntegerWidth (); ++x) + for (int x = 0; x < BE_RECT_WIDTH (bounds); ++x) { int bit = haiku_get_pixel ((void *) source, x, y); @@ -364,8 +367,8 @@ rotate_bitmap_270 (BBitmap *bmp) bmp->ColorSpace (), true); if (bm->InitCheck () != B_OK) gui_abort ("Failed to init bitmap for rotate"); - int w = bmp->Bounds ().Width () + 1; - int h = bmp->Bounds ().Height () + 1; + int w = BE_RECT_WIDTH (r); + int h = BE_RECT_HEIGHT (r); for (int y = 0; y < h; ++y) for (int x = 0; x < w; ++x) @@ -383,8 +386,8 @@ rotate_bitmap_90 (BBitmap *bmp) bmp->ColorSpace (), true); if (bm->InitCheck () != B_OK) gui_abort ("Failed to init bitmap for rotate"); - int w = bmp->Bounds ().Width () + 1; - int h = bmp->Bounds ().Height () + 1; + int w = BE_RECT_WIDTH (r); + int h = BE_RECT_HEIGHT (r); for (int y = 0; y < h; ++y) for (int x = 0; x < w; ++x) @@ -419,44 +422,42 @@ BBitmap_transform_bitmap (void *bitmap, void *mask, uint32_t m_color, } BRect r = bm->Bounds (); - if (r.Width () != desw || r.Height () != desh) + BRect n = BRect (0, 0, desw - 1, desh - 1); + BView vw (n, NULL, B_FOLLOW_NONE, 0); + BBitmap *dst = new BBitmap (n, bm->ColorSpace (), true); + if (dst->InitCheck () != B_OK) + if (bm->InitCheck () != B_OK) + gui_abort ("Failed to init bitmap for scale"); + dst->AddChild (&vw); + + if (!vw.LockLooper ()) + gui_abort ("Failed to lock offscreen view for scale"); + + if (rot != 90 && rot != 270) { - BRect n = BRect (0, 0, desw - 1, desh - 1); - BView vw (n, NULL, B_FOLLOW_NONE, 0); - BBitmap *dst = new BBitmap (n, bm->ColorSpace (), true); - if (dst->InitCheck () != B_OK) - if (bm->InitCheck () != B_OK) - gui_abort ("Failed to init bitmap for scale"); - dst->AddChild (&vw); - - if (!vw.LockLooper ()) - gui_abort ("Failed to lock offscreen view for scale"); - - if (rot != 90 && rot != 270) - { - BAffineTransform tr; - tr.RotateBy (BPoint (desw / 2, desh / 2), rot * M_PI / 180.0); - vw.SetTransform (tr); - } - - vw.MovePenTo (0, 0); - vw.DrawBitmap (bm, n); - if (mk) - BView_DrawMask ((void *) mk, (void *) &vw, - 0, 0, mk->Bounds ().Width () + 1, - mk->Bounds ().Height () + 1, - 0, 0, desw, desh, m_color); - vw.Sync (); - vw.RemoveSelf (); - - if (copied_p) - delete bm; - if (copied_p && mk) - delete mk; - return dst; + BAffineTransform tr; + tr.RotateBy (BPoint (desw / 2, desh / 2), rot * M_PI / 180.0); + vw.SetTransform (tr); } - return bm; + vw.MovePenTo (0, 0); + vw.DrawBitmap (bm, n); + if (mk) + { + BRect k = mk->Bounds (); + BView_DrawMask ((void *) mk, (void *) &vw, + 0, 0, BE_RECT_WIDTH (k), + BE_RECT_HEIGHT (k), + 0, 0, desw, desh, m_color); + } + vw.Sync (); + vw.RemoveSelf (); + + if (copied_p) + delete bm; + if (copied_p && mk) + delete mk; + return dst; } void diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 84f5756f8c..40f37d577e 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -821,8 +821,8 @@ class EmacsWindow : public BWindow zoomed_p = 0; EmacsMoveTo (pre_zoom_rect.left, pre_zoom_rect.top); - ResizeTo (pre_zoom_rect.Width (), - pre_zoom_rect.Height ()); + ResizeTo (BE_RECT_WIDTH (pre_zoom_rect), + BE_RECT_HEIGHT (pre_zoom_rect)); } void @@ -833,14 +833,17 @@ class EmacsWindow : public BWindow if (parent) { - *width = parent->Frame ().Width (); - *height = parent->Frame ().Height (); + BRect frame = parent->Frame (); + *width = BE_RECT_WIDTH (frame); + *height = BE_RECT_HEIGHT (frame); } else { BScreen s (this); - *width = s.Frame ().Width (); - *height = s.Frame ().Height (); + BRect frame = s.Frame (); + + *width = BE_RECT_WIDTH (frame); + *height = BE_RECT_HEIGHT (frame); } child_frame_lock.Unlock (); @@ -906,8 +909,8 @@ class EmacsWindow : public BWindow flags &= ~(B_NOT_MOVABLE | B_NOT_ZOOMABLE); EmacsMoveTo (pre_fullscreen_rect.left, pre_fullscreen_rect.top); - ResizeTo (pre_fullscreen_rect.Width (), - pre_fullscreen_rect.Height ()); + ResizeTo (BE_RECT_WIDTH (pre_fullscreen_rect), + BE_RECT_HEIGHT (pre_fullscreen_rect)); } SetFlags (flags); } @@ -998,11 +1001,12 @@ class EmacsView : public BView gui_abort ("Could not lock cr surface during attachment"); if (cr_surface) gui_abort ("Trying to attach cr surface when one already exists"); + BRect bounds = offscreen_draw_bitmap_1->Bounds (); + cr_surface = cairo_image_surface_create_for_data ((unsigned char *) offscreen_draw_bitmap_1->Bits (), - CAIRO_FORMAT_ARGB32, - offscreen_draw_bitmap_1->Bounds ().IntegerWidth () + 1, - offscreen_draw_bitmap_1->Bounds ().IntegerHeight () + 1, + CAIRO_FORMAT_ARGB32, BE_RECT_WIDTH (bounds), + BE_RECT_HEIGHT (bounds), offscreen_draw_bitmap_1->BytesPerRow ()); if (!cr_surface) gui_abort ("Cr surface allocation failed for double-buffered view"); @@ -1056,8 +1060,11 @@ class EmacsView : public BView if (offscreen_draw_bitmap_1->InitCheck () != B_OK) gui_abort ("Offscreen draw bitmap initialization failed"); - offscreen_draw_view->MoveTo (Frame ().left, Frame ().top); - offscreen_draw_view->ResizeTo (Frame ().Width (), Frame ().Height ()); + BRect frame = Frame (); + + offscreen_draw_view->MoveTo (frame.left, frame.top); + offscreen_draw_view->ResizeTo (BE_RECT_WIDTH (frame), + BE_RECT_HEIGHT (frame)); offscreen_draw_bitmap_1->AddChild (offscreen_draw_view); #ifdef USE_BE_CAIRO AttachCairoSurface (); @@ -1446,7 +1453,7 @@ class EmacsMenuItem : public BMenuItem { BRect r = menu->Frame (); int w = menu->StringWidth (key); - menu->MovePenTo (BPoint (r.Width () - w - 4, + menu->MovePenTo (BPoint (BE_RECT_WIDTH (r) - w - 4, menu->PenLocation ().y)); menu->DrawString (key); } @@ -2914,8 +2921,9 @@ BView_cr_dump_clipping (void *view, cairo_t *ctx) for (int i = 0; i < cr.CountRects (); ++i) { BRect r = cr.RectAt (i); - cairo_rectangle (ctx, r.left, r.top, r.Width () + 1, - r.Height () + 1); + cairo_rectangle (ctx, r.left, r.top, + BE_RECT_WIDTH (r), + BE_RECT_HEIGHT (r)); } cairo_clip (ctx); diff --git a/src/haiku_support.h b/src/haiku_support.h index ef90374f69..550ebd0050 100644 --- a/src/haiku_support.h +++ b/src/haiku_support.h @@ -32,6 +32,8 @@ along with GNU Emacs. If not, see . */ #include #endif +#include + enum haiku_cursor { CURSOR_ID_NO_CURSOR = 12, @@ -310,6 +312,28 @@ struct haiku_menu_bar_state_event #define HAIKU_BLACK 1000 #define HAIKU_MEDIUM 2000 +#ifdef __cplusplus +/* Haiku's built in Height and Width functions for calculating + rectangle sizes are broken, probably for compatibility with BeOS: + they do not round up in a reasonable fashion, and they return the + numerical difference between the end and start sides in both + directions, instead of the actual size. + + For example: + + BRect (1, 1, 5, 5).IntegerWidth () + + Will return 4, when in reality the rectangle is 5 pixels wide, + since the left corner is also a pixel! + + All code in Emacs should use the macros below to calculate the + dimensions of a BRect, instead of relying on the broken Width and + Height functions. */ + +#define BE_RECT_HEIGHT(rect) (ceil (((rect).bottom - (rect).top) + 1)) +#define BE_RECT_WIDTH(rect) (ceil (((rect).right - (rect).left) + 1)) +#endif /* __cplusplus */ + #ifdef __cplusplus extern "C" {