acl: Fix test failure on AIX 7.
authorBruno Haible <bruno@clisp.org>
Sun, 5 Jun 2011 18:08:15 +0000 (20:08 +0200)
committerIan Beckwith <ianb@erislabs.net>
Thu, 9 Jun 2011 23:40:57 +0000 (00:40 +0100)
* tests/test-sameacls.c (main) [AIX]: Fix aclx_printStr invocation.
Based on a patch by Jørn Amundsen <Jorn.Amundsen@ntnu.no>.
(cherry picked from commit e7754b0a383576a87dd6805cfd1df8fdc9cb2ba9)

ChangeLog
tests/test-sameacls.c

index 11fb3ee..ed28a44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2011-06-05  Bruno Haible  <bruno@clisp.org>
 
+       acl: Fix test failure on AIX 7.
+       * tests/test-sameacls.c (main) [AIX]: Fix aclx_printStr invocation.
+       Based on a patch by Jørn Amundsen <Jorn.Amundsen@ntnu.no>.
+
+2011-06-05  Bruno Haible  <bruno@clisp.org>
+
        pipe-filter-ii: Fix test failure on AIX and IRIX.
        * lib/pipe-filter-ii.c (pipe_filter_ii_execute): When write() fails
        with EAGAIN, retry with a smaller buffer size.
index 23a777e..557b27d 100644 (file)
@@ -430,11 +430,13 @@ main (int argc, char *argv[])
   size_t aclsize1 = sizeof (acl1);
   mode_t mode1;
   char text1[1000];
+  size_t textsize1 = sizeof (text1);
   acl_type_t type2;
   char acl2[1000];
   size_t aclsize2 = sizeof (acl2);
   mode_t mode2;
   char text2[1000];
+  size_t textsize2 = sizeof (text2);
 
   /* The docs say that type1 being 0 is equivalent to ACL_ANY, but it is not
      true, in AIX 5.3.  */
@@ -445,7 +447,7 @@ main (int argc, char *argv[])
       fflush (stderr);
       abort ();
     }
-  if (aclx_printStr (text1, sizeof (text1), acl1, aclsize1, type1, file1, 0) < 0)
+  if (aclx_printStr (text1, &textsize1, acl1, aclsize1, type1, file1, 0) < 0)
     {
       fprintf (stderr, "cannot convert the ACLs of file %s to text\n", file1);
       fflush (stderr);
@@ -461,7 +463,7 @@ main (int argc, char *argv[])
       fflush (stderr);
       abort ();
     }
-  if (aclx_printStr (text2, sizeof (text2), acl2, aclsize2, type2, file2, 0) < 0)
+  if (aclx_printStr (text2, &textsize2, acl2, aclsize2, type2, file2, 0) < 0)
     {
       fprintf (stderr, "cannot convert the ACLs of file %s to text\n", file2);
       fflush (stderr);