Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
a4a8f7b3
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
12 个月 前同步成功
通知
8
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a4a8f7b3
编写于
9月 28, 2001
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change HZ in speed to rely on sysconf() if the clock tick is available
that way. Synchronise s_time with these changes.
上级
34c66925
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
31 addition
and
19 deletion
+31
-19
apps/s_time.c
apps/s_time.c
+16
-7
apps/speed.c
apps/speed.c
+15
-12
未找到文件。
apps/s_time.c
浏览文件 @
a4a8f7b3
...
@@ -67,20 +67,21 @@
...
@@ -67,20 +67,21 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#define USE_SOCKETS
#include "apps.h"
#ifdef OPENSSL_NO_STDIO
#ifdef OPENSSL_NO_STDIO
#define APPS_WIN16
#define APPS_WIN16
#endif
#endif
#define USE_SOCKETS
#include <openssl/x509.h>
#include <openssl/x509.h>
#include <openssl/ssl.h>
#include <openssl/ssl.h>
#include <openssl/pem.h>
#include <openssl/pem.h>
#include "apps.h"
#include "s_apps.h"
#include "s_apps.h"
#include <openssl/err.h>
#include <openssl/err.h>
#ifdef WIN32_STUFF
#ifdef WIN32_STUFF
#include "winmain.h"
#include "winmain.h"
#include "wintext.h"
#include "wintext.h"
#endif
#endif
#include OPENSSL_UNISTD
#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX)
#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX)
#define TIMES
#define TIMES
...
@@ -119,11 +120,19 @@
...
@@ -119,11 +120,19 @@
/* The following if from times(3) man page. It may need to be changed
/* The following if from times(3) man page. It may need to be changed
*/
*/
#ifndef HZ
#ifndef HZ
#ifndef CLK_TCK
# ifdef _SC_CLK_TCK
#define HZ 100.0
# define HZ ((double)sysconf(_SC_CLK_TCK))
#else
/* CLK_TCK */
# else
#define HZ ((double)CLK_TCK)
# ifndef CLK_TCK
#endif
# ifndef _BSD_CLK_TCK_
/* FreeBSD hack */
# define HZ 100.0
# else
/* _BSD_CLK_TCK_ */
# define HZ ((double)_BSD_CLK_TCK_)
# endif
# else
/* CLK_TCK */
# define HZ ((double)CLK_TCK)
# endif
# endif
#endif
#endif
#undef PROG
#undef PROG
...
...
apps/speed.c
浏览文件 @
a4a8f7b3
...
@@ -83,6 +83,7 @@
...
@@ -83,6 +83,7 @@
#include <openssl/err.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/objects.h>
#include OPENSSL_UNISTD
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(OPENSSL_SYS_MACOSX)
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(OPENSSL_SYS_MACOSX)
# define USE_TOD
# define USE_TOD
...
@@ -181,17 +182,16 @@
...
@@ -181,17 +182,16 @@
/* The following if from times(3) man page. It may need to be changed */
/* The following if from times(3) man page. It may need to be changed */
#ifndef HZ
#ifndef HZ
# ifndef CLK_TCK
# ifdef _SC_CLK_TCK
# ifndef _BSD_CLK_TCK_
/* FreeBSD hack */
# define HZ ((double)sysconf(_SC_CLK_TCK))
# define HZ 100.0
# else
# else
/* _BSD_CLK_TCK_ */
# ifndef CLK_TCK
# define HZ ((double)_BSD_CLK_TCK_)
# ifndef _BSD_CLK_TCK_
/* FreeBSD hack */
# endif
# define HZ 100.0
# else
/* CLK_TCK */
# else
/* _BSD_CLK_TCK_ */
# ifdef OPENSSL_SYS_LINUX
/* Because it seems like some Linuxen
# define HZ ((double)_BSD_CLK_TCK_)
have weird values here... */
# endif
# define HZ 100.0
# else
/* CLK_TCK */
# else
# define HZ ((double)CLK_TCK)
# define HZ ((double)CLK_TCK)
# endif
# endif
# endif
# endif
...
@@ -1446,7 +1446,10 @@ int MAIN(int argc, char **argv)
...
@@ -1446,7 +1446,10 @@ int MAIN(int argc, char **argv)
#endif
#endif
#ifdef HZ
#ifdef HZ
#define as_string(s) (#s)
#define as_string(s) (#s)
printf
(
"HZ=%g"
,
(
double
)
HZ
);
printf
(
"HZ=%g"
,
HZ
);
# ifdef _SC_CLK_TCK
printf
(
" [sysconf value]"
);
# endif
#endif
#endif
printf
(
"
\n
"
);
printf
(
"
\n
"
);
printf
(
"timing function used: %s%s%s%s%s%s%s
\n
"
,
printf
(
"timing function used: %s%s%s%s%s%s%s
\n
"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录