Page MenuHome GnuPG

D450.diff
No OneTemporary

D450.diff

Index: agent/protect.c
===================================================================
--- agent/protect.c
+++ agent/protect.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <ctype.h>
#include <assert.h>
#include <unistd.h>
@@ -104,11 +105,14 @@
&data->creation_time, &data->exit_time,
&data->kernel_time, &data->user_time);
# endif
-#else
- struct tms tmp;
+#elif defined (CLOCK_THREAD_CPUTIME_ID)
+ struct timespec tmp;
- times (&tmp);
- data->ticks = tmp.tms_utime;
+ clock_gettime (CLOCK_THREAD_CPUTIME_ID, &tmp);
+ data->ticks = (clock_t)(((unsigned long long)tmp.tv_sec * 1000000000 +
+ tmp.tv_nsec) * CLOCKS_PER_SEC / 1000000000);
+#else
+ data->ticks = clock ();
#endif
}
@@ -135,7 +139,7 @@
}
#else
return (unsigned long)((((double) (stoptime.ticks - starttime->ticks))
- /CLOCKS_PER_SEC)*10000000);
+ /CLOCKS_PER_SEC)*1000);
#endif
}
Index: agent/t-protect.c
===================================================================
--- agent/t-protect.c
+++ agent/t-protect.c
@@ -322,9 +322,9 @@
int
main (int argc, char **argv)
{
- (void)argc;
(void)argv;
+ opt.verbose = argc - 1; /* We can do "./t-protect -v -v" */
gcry_control (GCRYCTL_DISABLE_SECMEM);
test_agent_protect ();

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 7, 4:43 AM (9 h, 5 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f6/ff/95ba8b728f3b873530dfec8f650a

Event Timeline