apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/test testfileinfo.c
Date Sun, 05 Oct 2003 10:48:26 GMT
jorton      2003/10/05 03:48:26

  Modified:    test     testfileinfo.c
  Log:
  * test/testfileinfo.c (finfo_equal, test_stat_eq_finfo): Avoid
  triggering a gcc 2.9x structure passing bug on IA64 Linux by
  passing pointers to structures
  
  Revision  Changes    Path
  1.12      +30 -30    apr/test/testfileinfo.c
  
  Index: testfileinfo.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testfileinfo.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -u -r1.11 -r1.12
  --- testfileinfo.c	7 Jul 2003 22:44:11 -0000	1.11
  +++ testfileinfo.c	5 Oct 2003 10:48:26 -0000	1.12
  @@ -86,59 +86,59 @@
       {0,                NULL}
   }; 
   
  -static void finfo_equal(CuTest *tc, apr_finfo_t f1, apr_finfo_t f2)
  +static void finfo_equal(CuTest *tc, apr_finfo_t *f1, apr_finfo_t *f2)
   {
       /* Minimum supported flags across all platforms (APR_FINFO_MIN) */
       CuAssert(tc, "apr_stat and apr_getfileinfo must return APR_FINFO_TYPE",
  -             (f1.valid & f2.valid & APR_FINFO_TYPE));
  +             (f1->valid & f2->valid & APR_FINFO_TYPE));
       CuAssert(tc, "apr_stat and apr_getfileinfo differ in filetype",
  -             f1.filetype == f2.filetype);
  +             f1->filetype == f2->filetype);
       CuAssert(tc, "apr_stat and apr_getfileinfo must return APR_FINFO_SIZE",
  -             (f1.valid & f2.valid & APR_FINFO_SIZE));
  +             (f1->valid & f2->valid & APR_FINFO_SIZE));
       CuAssert(tc, "apr_stat and apr_getfileinfo differ in size",
  -             f1.size == f2.size);
  +             f1->size == f2->size);
       CuAssert(tc, "apr_stat and apr_getfileinfo must return APR_FINFO_ATIME",
  -             (f1.valid & f2.valid & APR_FINFO_ATIME));
  +             (f1->valid & f2->valid & APR_FINFO_ATIME));
       CuAssert(tc, "apr_stat and apr_getfileinfo differ in atime",
  -             f1.atime == f2.atime);
  +             f1->atime == f2->atime);
       CuAssert(tc, "apr_stat and apr_getfileinfo must return APR_FINFO_MTIME",
  -             (f1.valid & f2.valid & APR_FINFO_MTIME));
  +             (f1->valid & f2->valid & APR_FINFO_MTIME));
       CuAssert(tc, "apr_stat and apr_getfileinfo differ in mtime",
  -             f1.mtime == f2.mtime);
  +             f1->mtime == f2->mtime);
       CuAssert(tc, "apr_stat and apr_getfileinfo must return APR_FINFO_CTIME",
  -             (f1.valid & f2.valid & APR_FINFO_CTIME));
  +             (f1->valid & f2->valid & APR_FINFO_CTIME));
       CuAssert(tc, "apr_stat and apr_getfileinfo differ in ctime",
  -             f1.ctime == f2.ctime);
  +             f1->ctime == f2->ctime);
   
  -    if (f1.valid & f2.valid & APR_FINFO_NAME)
  +    if (f1->valid & f2->valid & APR_FINFO_NAME)
           CuAssert(tc, "apr_stat and apr_getfileinfo differ in name",
  -                 !strcmp(f1.name, f2.name));
  -    if (f1.fname && f2.fname)
  +                 !strcmp(f1->name, f2->name));
  +    if (f1->fname && f2->fname)
           CuAssert(tc, "apr_stat and apr_getfileinfo differ in fname",
  -                 !strcmp(f1.fname, f2.fname));
  +                 !strcmp(f1->fname, f2->fname));
   
       /* Additional supported flags not supported on all platforms */
  -    if (f1.valid & f2.valid & APR_FINFO_USER)
  +    if (f1->valid & f2->valid & APR_FINFO_USER)
           CuAssert(tc, "apr_stat and apr_getfileinfo differ in user",
  -                 !apr_uid_compare(f1.user, f2.user));
  -    if (f1.valid & f2.valid & APR_FINFO_GROUP)
  +                 !apr_uid_compare(f1->user, f2->user));
  +    if (f1->valid & f2->valid & APR_FINFO_GROUP)
           CuAssert(tc, "apr_stat and apr_getfileinfo differ in group",
  -                 !apr_gid_compare(f1.group, f2.group));
  -    if (f1.valid & f2.valid & APR_FINFO_INODE)
  +                 !apr_gid_compare(f1->group, f2->group));
  +    if (f1->valid & f2->valid & APR_FINFO_INODE)
           CuAssert(tc, "apr_stat and apr_getfileinfo differ in inode",
  -                 f1.inode == f2.inode);
  -    if (f1.valid & f2.valid & APR_FINFO_DEV)
  +                 f1->inode == f2->inode);
  +    if (f1->valid & f2->valid & APR_FINFO_DEV)
           CuAssert(tc, "apr_stat and apr_getfileinfo differ in device",
  -                 f1.device == f2.device);
  -    if (f1.valid & f2.valid & APR_FINFO_NLINK)
  +                 f1->device == f2->device);
  +    if (f1->valid & f2->valid & APR_FINFO_NLINK)
           CuAssert(tc, "apr_stat and apr_getfileinfo differ in nlink",
  -                 f1.nlink == f2.nlink);
  -    if (f1.valid & f2.valid & APR_FINFO_CSIZE)
  +                 f1->nlink == f2->nlink);
  +    if (f1->valid & f2->valid & APR_FINFO_CSIZE)
           CuAssert(tc, "apr_stat and apr_getfileinfo differ in csize",
  -                 f1.csize == f2.csize);
  -    if (f1.valid & f2.valid & APR_FINFO_PROT)
  +                 f1->csize == f2->csize);
  +    if (f1->valid & f2->valid & APR_FINFO_PROT)
           CuAssert(tc, "apr_stat and apr_getfileinfo differ in protection",
  -                 f1.protection == f2.protection);
  +                 f1->protection == f2->protection);
   }
   
   static void test_info_get(CuTest *tc)
  @@ -206,7 +206,7 @@
   
       apr_file_close(thefile);
   
  -    finfo_equal(tc, stat_finfo, finfo);
  +    finfo_equal(tc, &stat_finfo, &finfo);
   }
   
   static void test_buffered_write_size(CuTest *tc)
  
  
  

Mime
View raw message