aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2015-07-05 08:22:26 -0700
committerPaul Eggert2015-07-05 08:23:11 -0700
commit1323c13978b7280ddf034e8f527f48d17487b5a2 (patch)
tree969cb5381db64e141d0b55ddea68f6e3751a1817
parentb9e14de6cf08a19fa5d98742b71c5580a50a40d8 (diff)
downloademacs-1323c13978b7280ddf034e8f527f48d17487b5a2.tar.gz
emacs-1323c13978b7280ddf034e8f527f48d17487b5a2.zip
Merge from gnulib
This incorporates: 2015-07-04 file-has-acl, acl-permissions: fix HP-UX typos 2015-07-03 set-permissions.c: adjust acl_from_mode's cpp guard 2015-07-02 update-copyright: fix test failure with perl >= 5.22 2015-07-01 gnulib-common.m4: change the ARFLAGS default to 'cr' 2015-07-01 acl: fix definition of acl_from_mode on FreeBSD * build-aux/update-copyright, doc/misc/texinfo.tex, lib/acl-internal.h: * lib/set-permissions.c, m4/gnulib-common.m4: Copy from gnulib.
-rwxr-xr-xbuild-aux/update-copyright2
-rw-r--r--doc/misc/texinfo.tex58
-rw-r--r--lib/acl-internal.h6
-rw-r--r--lib/set-permissions.c58
-rw-r--r--m4/gnulib-common.m44
5 files changed, 72 insertions, 56 deletions
diff --git a/build-aux/update-copyright b/build-aux/update-copyright
index 4eb4b93ea6c..8cc36e22d59 100755
--- a/build-aux/update-copyright
+++ b/build-aux/update-copyright
@@ -124,7 +124,7 @@ use strict;
124use warnings; 124use warnings;
125 125
126my $copyright_re = 'Copyright'; 126my $copyright_re = 'Copyright';
127my $circle_c_re = '(?:\([cC]\)|@copyright{}|\\\\\(co|©)'; 127my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©)';
128my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER}; 128my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
129$holder ||= 'Free Software Foundation, Inc.'; 129$holder ||= 'Free Software Foundation, Inc.';
130my $prefix_max = 5; 130my $prefix_max = 5;
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 60951102f3f..f773c90b8d5 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
3% Load plain if necessary, i.e., if running under initex. 3% Load plain if necessary, i.e., if running under initex.
4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi 4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5% 5%
6\def\texinfoversion{2015-06-14.15} 6\def\texinfoversion{2015-07-01.07}
7% 7%
8% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 8% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
9% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 9% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -277,6 +277,7 @@
277% described on page 260 of The TeXbook. It involves outputting two 277% described on page 260 of The TeXbook. It involves outputting two
278% marks for the sectioning macros, one before the section break, and 278% marks for the sectioning macros, one before the section break, and
279% one after. I won't pretend I can describe this better than DEK... 279% one after. I won't pretend I can describe this better than DEK...
280%
280\def\domark{% 281\def\domark{%
281 \toks0=\expandafter{\lastchapterdefs}% 282 \toks0=\expandafter{\lastchapterdefs}%
282 \toks2=\expandafter{\lastsectiondefs}% 283 \toks2=\expandafter{\lastsectiondefs}%
@@ -6881,7 +6882,7 @@ end
6881% typesetting commands (@smallbook, font changes, etc.) have to be done 6882% typesetting commands (@smallbook, font changes, etc.) have to be done
6882% beforehand -- and a) we want @copying to be done first in the source 6883% beforehand -- and a) we want @copying to be done first in the source
6883% file; b) letting users define the frontmatter in as flexible order as 6884% file; b) letting users define the frontmatter in as flexible order as
6884% possible is very desirable. 6885% possible is desirable.
6885% 6886%
6886\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} 6887\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
6887\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} 6888\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
@@ -7449,6 +7450,12 @@ end
7449% 7450%
7450% \anythingelse will almost certainly be an error of some kind. 7451% \anythingelse will almost certainly be an error of some kind.
7451 7452
7453\def\macrolineargctxt{% used for whole-line arguments without braces
7454 \scanctxt
7455 \catcode`\{=\other
7456 \catcode`\}=\other
7457}
7458
7452% \mbodybackslash is the definition of \ in @macro bodies. 7459% \mbodybackslash is the definition of \ in @macro bodies.
7453% It maps \foo\ => \csname macarg.foo\endcsname => #N 7460% It maps \foo\ => \csname macarg.foo\endcsname => #N
7454% where N is the macro parameter number. 7461% where N is the macro parameter number.
@@ -7522,12 +7529,14 @@ end
7522% This makes use of the obscure feature that if the last token of a 7529% This makes use of the obscure feature that if the last token of a
7523% <parameter list> is #, then the preceding argument is delimited by 7530% <parameter list> is #, then the preceding argument is delimited by
7524% an opening brace, and that opening brace is not consumed. 7531% an opening brace, and that opening brace is not consumed.
7532%
7525\def\getargs#1{\getargsxxx#1{}} 7533\def\getargs#1{\getargsxxx#1{}}
7526\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} 7534\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
7527\def\getmacname#1 #2\relax{\macname={#1}} 7535\def\getmacname#1 #2\relax{\macname={#1}}
7528\def\getmacargs#1{\def\argl{#1}} 7536\def\getmacargs#1{\def\argl{#1}}
7529 7537
7530% For macro processing make @ a letter so that we can make Texinfo private macro names. 7538% For macro processing make @ a letter so that we can make
7539% private-to-Texinfo macro names.
7531\edef\texiatcatcode{\the\catcode`\@} 7540\edef\texiatcatcode{\the\catcode`\@}
7532\catcode `@=11\relax 7541\catcode `@=11\relax
7533 7542
@@ -7558,6 +7567,7 @@ end
7558% 7567%
7559% If you compile with TeX (not eTeX), and you have macros with 10 or more 7568% If you compile with TeX (not eTeX), and you have macros with 10 or more
7560% arguments, no macro can have more than 256 arguments (else error). 7569% arguments, no macro can have more than 256 arguments (else error).
7570%
7561\def\parsemargdef#1;{% 7571\def\parsemargdef#1;{%
7562 \paramno=0\def\paramlist{}% 7572 \paramno=0\def\paramlist{}%
7563 \let\hash\relax 7573 \let\hash\relax
@@ -7601,7 +7611,6 @@ end
7601% These two commands read recursive and nonrecursive macro bodies. 7611% These two commands read recursive and nonrecursive macro bodies.
7602% (They're different since rec and nonrec macros end differently.) 7612% (They're different since rec and nonrec macros end differently.)
7603% 7613%
7604
7605\catcode `\@\texiatcatcode 7614\catcode `\@\texiatcatcode
7606\long\def\parsemacbody#1@end macro% 7615\long\def\parsemacbody#1@end macro%
7607{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% 7616{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
@@ -7637,7 +7646,8 @@ end
7637 \fi 7646 \fi
7638} 7647}
7639 7648
7640% 7649% Internal for \getargsval@.
7650%
7641\def\getargvals@@{% 7651\def\getargvals@@{%
7642 \ifx\paramlist\nilm@ 7652 \ifx\paramlist\nilm@
7643 % Some sanity check needed here that \argvaluelist is also empty. 7653 % Some sanity check needed here that \argvaluelist is also empty.
@@ -7681,7 +7691,8 @@ end
7681} 7691}
7682 7692
7683% Replace arguments by their values in the macro body, and place the result 7693% Replace arguments by their values in the macro body, and place the result
7684% in macro \@tempa 7694% in macro \@tempa.
7695%
7685\def\macvalstoargs@{% 7696\def\macvalstoargs@{%
7686 % To do this we use the property that token registers that are \the'ed 7697 % To do this we use the property that token registers that are \the'ed
7687 % within an \edef expand only once. So we are going to place all argument 7698 % within an \edef expand only once. So we are going to place all argument
@@ -7705,8 +7716,9 @@ end
7705 \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% 7716 \expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
7706 } 7717 }
7707 7718
7719% Define the named-macro outside of this group and then close this group.
7720%
7708\def\macargexpandinbody@{% 7721\def\macargexpandinbody@{%
7709 %% Define the named-macro outside of this group and then close this group.
7710 \expandafter 7722 \expandafter
7711 \endgroup 7723 \endgroup
7712 \macargdeflist@ 7724 \macargdeflist@
@@ -7743,14 +7755,17 @@ end
7743 \next 7755 \next
7744} 7756}
7745 7757
7746% Save the token stack pointer into macro #1 7758% Save the token stack pointer into macro #1:
7747\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} 7759\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}}
7748% Restore the token stack pointer from number in macro #1 7760%
7749\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} 7761% Restore the token stack pointer from number in macro #1:
7750% newtoks that can be used non \outer . 7762\def\texirestoretoksstackpoint#1{\expandafter\mathchardef
7763 \expandafter\@cclvi#1\relax}
7764% Variant \newtoks that can be used non-\outer:
7751\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} 7765\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi}
7752 7766
7753% Tailing missing arguments are set to empty 7767% Tailing missing arguments are set to empty.
7768%
7754\def\setemptyargvalues@{% 7769\def\setemptyargvalues@{%
7755 \ifx\paramlist\nilm@ 7770 \ifx\paramlist\nilm@
7756 \let\next\macargexpandinbody@ 7771 \let\next\macargexpandinbody@
@@ -7795,7 +7810,7 @@ end
7795 \noexpand\scanmacro{\temp}}% 7810 \noexpand\scanmacro{\temp}}%
7796 \or % 1 7811 \or % 1
7797 \expandafter\xdef\csname\the\macname\endcsname{% 7812 \expandafter\xdef\csname\the\macname\endcsname{%
7798 \bgroup\noexpand\macroargctxt 7813 \bgroup
7799 \noexpand\braceorline 7814 \noexpand\braceorline
7800 \expandafter\noexpand\csname\the\macname xxx\endcsname}% 7815 \expandafter\noexpand\csname\the\macname xxx\endcsname}%
7801 \expandafter\xdef\csname\the\macname xxx\endcsname##1{% 7816 \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
@@ -7828,7 +7843,7 @@ end
7828 \noexpand\scanmacro{\temp}\egroup}% 7843 \noexpand\scanmacro{\temp}\egroup}%
7829 \or % 1 7844 \or % 1
7830 \expandafter\xdef\csname\the\macname\endcsname{% 7845 \expandafter\xdef\csname\the\macname\endcsname{%
7831 \bgroup\noexpand\macroargctxt 7846 \bgroup
7832 \noexpand\braceorline 7847 \noexpand\braceorline
7833 \expandafter\noexpand\csname\the\macname xxx\endcsname}% 7848 \expandafter\noexpand\csname\the\macname xxx\endcsname}%
7834 \expandafter\xdef\csname\the\macname xxx\endcsname##1{% 7849 \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
@@ -7860,19 +7875,20 @@ end
7860 \fi 7875 \fi
7861 \fi} 7876 \fi}
7862 7877
7863\catcode `\@\texiatcatcode\relax 7878\catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes
7864 7879
7865\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} 7880\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
7866 7881
7867% \braceorline decides whether the next nonwhitespace character is a 7882% \braceorline MAC is used for a one-argument macro MAC. It checks
7868% {. If so it reads up to the closing }, if not, it reads the whole 7883% whether the next non-whitespace character is a {. It sets the context
7869% line. Whatever was read is then fed to the next control sequence 7884% for reading the argument (slightly different in the two cases). Then,
7870% as an argument (by \parsebrace or \parsearg). 7885% to read the argument, in the whole-line case, it then calls the
7886% regular \parsearg MAC; in the lbrace case, it just calls MAC itself.
7871% 7887%
7872\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} 7888\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
7873\def\braceorlinexxx{% 7889\def\braceorlinexxx{%
7874 \ifx\nchar\bgroup\else 7890 \ifx\nchar\bgroup\macroargctxt
7875 \expandafter\parsearg 7891 \else\macrolineargctxt\expandafter\parsearg
7876 \fi \macnamexxx} 7892 \fi \macnamexxx}
7877 7893
7878 7894
diff --git a/lib/acl-internal.h b/lib/acl-internal.h
index d592a7559f0..4f042adc96b 100644
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -127,10 +127,8 @@ rpl_acl_set_fd (int fd, acl_t acl)
127# define acl_extended_file(name) (-1) 127# define acl_extended_file(name) (-1)
128# endif 128# endif
129 129
130/* Linux-specific */ 130# if ! defined HAVE_ACL_FROM_MODE && ! defined HAVE_ACL_FROM_TEXT
131# ifndef HAVE_ACL_FROM_MODE 131# define acl_from_mode (NULL)
132# define HAVE_ACL_FROM_MODE false
133# define acl_from_mode(mode) (NULL)
134# endif 132# endif
135 133
136/* Set to 0 if a file's mode is stored independently from the ACL. */ 134/* Set to 0 if a file's mode is stored independently from the ACL. */
diff --git a/lib/set-permissions.c b/lib/set-permissions.c
index 3bcfd31530e..25c463d966d 100644
--- a/lib/set-permissions.c
+++ b/lib/set-permissions.c
@@ -25,6 +25,8 @@
25 25
26#if USE_ACL 26#if USE_ACL
27# if ! defined HAVE_ACL_FROM_MODE && defined HAVE_ACL_FROM_TEXT /* FreeBSD, IRIX, Tru64 */ 27# if ! defined HAVE_ACL_FROM_MODE && defined HAVE_ACL_FROM_TEXT /* FreeBSD, IRIX, Tru64 */
28# if HAVE_ACL_GET_FILE && !HAVE_ACL_TYPE_EXTENDED
29
28static acl_t 30static acl_t
29acl_from_mode (mode_t mode) 31acl_from_mode (mode_t mode)
30{ 32{
@@ -46,6 +48,7 @@ acl_from_mode (mode_t mode)
46 48
47 return acl_from_text (acl_text); 49 return acl_from_text (acl_text);
48} 50}
51# endif
49# endif 52# endif
50 53
51# if HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */ 54# if HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
@@ -269,7 +272,7 @@ set_acls_from_mode (const char *name, int desc, mode_t mode, bool *must_chmod)
269 } 272 }
270} 273}
271 274
272#elif HAVE_GETACL /* HP-UX */ 275# elif HAVE_GETACL /* HP-UX */
273static int 276static int
274context_acl_from_mode (struct permission_context *ctx, const char *name, int desc) 277context_acl_from_mode (struct permission_context *ctx, const char *name, int desc)
275{ 278{
@@ -285,13 +288,13 @@ context_acl_from_mode (struct permission_context *ctx, const char *name, int des
285 288
286 ctx->entries[0].uid = statbuf.st_uid; 289 ctx->entries[0].uid = statbuf.st_uid;
287 ctx->entries[0].gid = ACL_NSGROUP; 290 ctx->entries[0].gid = ACL_NSGROUP;
288 ctx->entries[0].mode = (mode >> 6) & 7; 291 ctx->entries[0].mode = (ctx->mode >> 6) & 7;
289 ctx->entries[1].uid = ACL_NSUSER; 292 ctx->entries[1].uid = ACL_NSUSER;
290 ctx->entries[1].gid = statbuf.st_gid; 293 ctx->entries[1].gid = statbuf.st_gid;
291 ctx->entries[1].mode = (mode >> 3) & 7; 294 ctx->entries[1].mode = (ctx->mode >> 3) & 7;
292 ctx->entries[2].uid = ACL_NSUSER; 295 ctx->entries[2].uid = ACL_NSUSER;
293 ctx->entries[2].gid = ACL_NSGROUP; 296 ctx->entries[2].gid = ACL_NSGROUP;
294 ctx->entries[2].mode = mode & 7; 297 ctx->entries[2].mode = ctx->mode & 7;
295 ctx->count = 3; 298 ctx->count = 3;
296 return 0; 299 return 0;
297} 300}
@@ -304,24 +307,24 @@ context_aclv_from_mode (struct permission_context *ctx)
304 307
305 ctx->aclv_entries[0].a_type = USER_OBJ; 308 ctx->aclv_entries[0].a_type = USER_OBJ;
306 ctx->aclv_entries[0].a_id = 0; /* irrelevant */ 309 ctx->aclv_entries[0].a_id = 0; /* irrelevant */
307 ctx->aclv_entries[0].a_perm = (mode >> 6) & 7; 310 ctx->aclv_entries[0].a_perm = (ctx->mode >> 6) & 7;
308 ctx->aclv_entries[1].a_type = GROUP_OBJ; 311 ctx->aclv_entries[1].a_type = GROUP_OBJ;
309 ctx->aclv_entries[1].a_id = 0; /* irrelevant */ 312 ctx->aclv_entries[1].a_id = 0; /* irrelevant */
310 ctx->aclv_entries[1].a_perm = (mode >> 3) & 7; 313 ctx->aclv_entries[1].a_perm = (ctx->mode >> 3) & 7;
311 ctx->aclv_entries[2].a_type = CLASS_OBJ; 314 ctx->aclv_entries[2].a_type = CLASS_OBJ;
312 ctx->aclv_entries[2].a_id = 0; 315 ctx->aclv_entries[2].a_id = 0;
313 ctx->aclv_entries[2].a_perm = (mode >> 3) & 7; 316 ctx->aclv_entries[2].a_perm = (ctx->mode >> 3) & 7;
314 ctx->aclv_entries[3].a_type = OTHER_OBJ; 317 ctx->aclv_entries[3].a_type = OTHER_OBJ;
315 ctx->aclv_entries[3].a_id = 0; 318 ctx->aclv_entries[3].a_id = 0;
316 ctx->aclv_entries[3].a_perm = mode & 7; 319 ctx->aclv_entries[3].a_perm = ctx->mode & 7;
317 ctx->aclv_count = 4; 320 ctx->aclv_count = 4;
318 321
319 ret = aclsort (sizeof (entries) / sizeof (struct acl), 1, entries); 322 ret = aclsort (ctx->aclv_count, 1, ctx->aclv_entries);
320 if (ret > 0) 323 if (ret > 0)
321 abort (); 324 abort ();
322 return ret; 325 return ret;
323} 326}
324#endif 327# endif
325 328
326# elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */ 329# elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */
327static int 330static int
@@ -458,19 +461,19 @@ context_acl_from_mode (struct permission_context *ctx)
458 461
459 ctx->entries[0].a_type = USER_OBJ; 462 ctx->entries[0].a_type = USER_OBJ;
460 ctx->entries[0].a_id = 0; /* irrelevant */ 463 ctx->entries[0].a_id = 0; /* irrelevant */
461 ctx->entries[0].a_perm = (mode >> 6) & 7; 464 ctx->entries[0].a_perm = (ctx->mode >> 6) & 7;
462 ctx->entries[1].a_type = GROUP_OBJ; 465 ctx->entries[1].a_type = GROUP_OBJ;
463 ctx->entries[1].a_id = 0; /* irrelevant */ 466 ctx->entries[1].a_id = 0; /* irrelevant */
464 ctx->entries[1].a_perm = (mode >> 3) & 7; 467 ctx->entries[1].a_perm = (ctx->mode >> 3) & 7;
465 ctx->entries[2].a_type = CLASS_OBJ; 468 ctx->entries[2].a_type = CLASS_OBJ;
466 ctx->entries[2].a_id = 0; 469 ctx->entries[2].a_id = 0;
467 ctx->entries[2].a_perm = (mode >> 3) & 7; 470 ctx->entries[2].a_perm = (ctx->mode >> 3) & 7;
468 ctx->entries[3].a_type = OTHER_OBJ; 471 ctx->entries[3].a_type = OTHER_OBJ;
469 ctx->entries[3].a_id = 0; 472 ctx->entries[3].a_id = 0;
470 ctx->entries[3].a_perm = mode & 7; 473 ctx->entries[3].a_perm = ctx->mode & 7;
471 ctx->count = 4; 474 ctx->count = 4;
472 475
473 ret = aclsort (sizeof (entries) / sizeof (struct acl), 1, entries); 476 ret = aclsort (ctx->count, 1, entries);
474 if (ret > 0) 477 if (ret > 0)
475 abort (); 478 abort ();
476 return ret; 479 return ret;
@@ -483,18 +486,18 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
483{ 486{
484 int ret = 0; 487 int ret = 0;
485 488
486#if HAVE_ACL_GET_FILE 489# if HAVE_ACL_GET_FILE
487 /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */ 490 /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
488 /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */ 491 /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
489# if !HAVE_ACL_TYPE_EXTENDED 492# if !HAVE_ACL_TYPE_EXTENDED
490 /* Linux, FreeBSD, IRIX, Tru64 */ 493 /* Linux, FreeBSD, IRIX, Tru64 */
491 494
492# ifndef HAVE_ACL_FROM_TEXT 495# ifndef HAVE_ACL_FROM_TEXT
493# error Must have acl_from_text (see POSIX 1003.1e draft 17). 496# error Must have acl_from_text (see POSIX 1003.1e draft 17).
494# endif 497# endif
495# ifndef HAVE_ACL_DELETE_DEF_FILE 498# ifndef HAVE_ACL_DELETE_DEF_FILE
496# error Must have acl_delete_def_file (see POSIX 1003.1e draft 17). 499# error Must have acl_delete_def_file (see POSIX 1003.1e draft 17).
497# endif 500# endif
498 501
499 if (! ctx->acls_not_supported) 502 if (! ctx->acls_not_supported)
500 { 503 {
@@ -641,9 +644,9 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
641 else 644 else
642 *acls_set = true; 645 *acls_set = true;
643 } 646 }
644# endif 647# endif
645 648
646#elif HAVE_GETACL /* HP-UX */ 649# elif HAVE_GETACL /* HP-UX */
647 650
648 if (from_mode) 651 if (from_mode)
649 ret = context_acl_from_mode (ctx, name, desc); 652 ret = context_acl_from_mode (ctx, name, desc);
@@ -657,7 +660,7 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
657 if (ret < 0) 660 if (ret < 0)
658 { 661 {
659 if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP) 662 if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
660 && (from_mode || !acl_nontrivial (ctx->count, ctx->entries, &source_statbuf))) 663 && (from_mode || !acl_nontrivial (ctx->count, ctx->entries)))
661 ret = 0; 664 ret = 0;
662 } 665 }
663 else 666 else
@@ -730,7 +733,7 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
730 733
731 /* Nothing to do. */ 734 /* Nothing to do. */
732 735
733#endif 736# endif
734 737
735 return ret; 738 return ret;
736} 739}
@@ -801,10 +804,9 @@ set_permissions (struct permission_context *ctx, const char *name, int desc)
801 int saved_errno = ret ? errno : 0; 804 int saved_errno = ret ? errno : 0;
802 805
803 /* If we can't set an acl which we expect to be able to set, try setting 806 /* If we can't set an acl which we expect to be able to set, try setting
804 the permissions to ctx->mode. Doe to possible inherited permissions, 807 the permissions to ctx->mode. Due to possible inherited permissions,
805 we cannot simply chmod. */ 808 we cannot simply chmod. */
806 809
807 acls_set = false;
808 ret = set_acls (ctx, name, desc, true, &must_chmod, &acls_set); 810 ret = set_acls (ctx, name, desc, true, &must_chmod, &acls_set);
809 if (! acls_set) 811 if (! acls_set)
810 must_chmod = true; 812 must_chmod = true;
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index b301abeda05..40e82f6e27f 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -278,12 +278,12 @@ Amsterdam
278 dnl but prefer ${host}-ar over ar (useful for cross-compiling). 278 dnl but prefer ${host}-ar over ar (useful for cross-compiling).
279 AC_CHECK_TOOL([AR], [ar], [ar]) 279 AC_CHECK_TOOL([AR], [ar], [ar])
280 if test -z "$ARFLAGS"; then 280 if test -z "$ARFLAGS"; then
281 ARFLAGS='cru' 281 ARFLAGS='cr'
282 fi 282 fi
283 fi 283 fi
284 else 284 else
285 if test -z "$ARFLAGS"; then 285 if test -z "$ARFLAGS"; then
286 ARFLAGS='cru' 286 ARFLAGS='cr'
287 fi 287 fi
288 fi 288 fi
289 AC_SUBST([AR]) 289 AC_SUBST([AR])