Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 94025 invoked by uid 500); 22 Jun 2001 17:45:24 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 94011 invoked by uid 1121); 22 Jun 2001 17:45:23 -0000 Date: 22 Jun 2001 17:45:23 -0000 Message-ID: <20010622174523.94010.qmail@apache.org> From: trawick@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/test testtime.c trawick 01/06/22 10:45:23 Modified: test testtime.c Log: use 64-bit int for conversion of gmt offset to microseconds... this was broken on Solaris Intel w/ gcc previously This change also gets rid of a warning due to the mismatch of apr_int32_t and APR_TIME_T_FMT. Revision Changes Path 1.20 +4 -3 apr/test/testtime.c Index: testtime.c =================================================================== RCS file: /home/cvs/apr/test/testtime.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- testtime.c 2001/06/06 19:19:43 1.19 +++ testtime.c 2001/06/22 17:45:23 1.20 @@ -73,6 +73,7 @@ char *str, *str2; apr_size_t sz; apr_int32_t hr_off = -5 * 3600; /* 5 hours in seconds */ + apr_int64_t hr_off_64; fprintf(stdout, "Testing Time functions.\n"); @@ -177,11 +178,11 @@ printf("\tChecking imploded time after offset............."); apr_implode_time(&imp, &xt2); - hr_off *= APR_USEC_PER_SEC; /* microseconds */ - if (imp != now + hr_off){ + hr_off_64 = (apr_int64_t)hr_off * APR_USEC_PER_SEC; /* microseconds */ + if (imp != now + hr_off_64){ printf("Failed! :(\n"); printf("Difference is %" APR_TIME_T_FMT " (should be %" - APR_TIME_T_FMT ")\n", imp - now, hr_off); + APR_INT64_T_FMT ")\n", imp - now, hr_off_64); exit(-1); } printf("OK\n");