[openssl] master update
tmraz at fedoraproject.org
tmraz at fedoraproject.org
Mon May 25 10:02:28 UTC 2020
The branch master has been updated
via 8069bf585453c96d1d14c1c0f53f3592bf057453 (commit)
via 2bd928a1bff7e39070992df1876b8d9ea9634301 (commit)
from e91916692724ee7042b17d287dfbb91e20eb6128 (commit)
- Log -----------------------------------------------------------------
commit 8069bf585453c96d1d14c1c0f53f3592bf057453
Author: Tomas Mraz <tmraz at fedoraproject.org>
Date: Fri May 22 10:14:04 2020 +0200
Drop special case of time interval calculation for VMS
The existing special case code is broken and it is not needed
anymore as times() and _SC_CLK_TCK should be supported
on the supported VMS versions.
Reviewed-by: Richard Levitte <levitte at openssl.org>
Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
Reviewed-by: David von Oheimb <david.von.oheimb at siemens.com>
(Merged from https://github.com/openssl/openssl/pull/11905)
commit 2bd928a1bff7e39070992df1876b8d9ea9634301
Author: Tomas Mraz <tmraz at fedoraproject.org>
Date: Fri May 22 10:07:43 2020 +0200
Revert "Guard use of struct tms with #ifdef __TMS"
The __TMS might be necessary on VMS however there is no such
define on glibc even though the times() function is fully
supported.
Fixes #11903
This reverts commit db71d315479762eefbf2bcda8be3b44b1867133f.
Reviewed-by: Richard Levitte <levitte at openssl.org>
Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
Reviewed-by: David von Oheimb <david.von.oheimb at siemens.com>
(Merged from https://github.com/openssl/openssl/pull/11905)
-----------------------------------------------------------------------
Summary of changes:
apps/lib/apps.c | 53 +++--------------------------------------------------
1 file changed, 3 insertions(+), 50 deletions(-)
diff --git a/apps/lib/apps.c b/apps/lib/apps.c
index 4337cc6c87..dbc9be344d 100644
--- a/apps/lib/apps.c
+++ b/apps/lib/apps.c
@@ -2230,70 +2230,23 @@ double app_tminterval(int stop, int usertime)
return ret;
}
-#elif defined(OPENSSL_SYSTEM_VMS)
-# include <time.h>
-# include <times.h>
-
-double app_tminterval(int stop, int usertime)
-{
- static clock_t tmstart;
- double ret = 0;
- clock_t now;
-# ifdef __TMS
- struct tms rus;
-
- now = times(&rus);
- if (usertime)
- now = rus.tms_utime;
-# else
- if (usertime)
- now = clock(); /* sum of user and kernel times */
- else {
- struct timeval tv;
- gettimeofday(&tv, NULL);
- now = (clock_t)((unsigned long long)tv.tv_sec * CLK_TCK +
- (unsigned long long)tv.tv_usec * (1000000 / CLK_TCK)
- );
- }
-# endif
- if (stop == TM_START)
- tmstart = now;
- else
- ret = (now - tmstart) / (double)(CLK_TCK);
-
- return ret;
-}
-
#elif defined(_SC_CLK_TCK) /* by means of unistd.h */
# include <sys/times.h>
double app_tminterval(int stop, int usertime)
{
double ret = 0;
- clock_t now;
- static clock_t tmstart;
- long int tck = sysconf(_SC_CLK_TCK);
-# ifdef __TMS
struct tms rus;
+ clock_t now = times(&rus);
+ static clock_t tmstart;
- now = times(&rus);
if (usertime)
now = rus.tms_utime;
-# else
- if (usertime)
- now = clock(); /* sum of user and kernel times */
- else {
- struct timeval tv;
- gettimeofday(&tv, NULL);
- now = (clock_t)((unsigned long long)tv.tv_sec * tck +
- (unsigned long long)tv.tv_usec * (1000000 / tck)
- );
- }
-# endif
if (stop == TM_START) {
tmstart = now;
} else {
+ long int tck = sysconf(_SC_CLK_TCK);
ret = (now - tmstart) / (double)tck;
}
More information about the openssl-commits
mailing list