blob: fd08e4e9319ba922f8ba33b9d658c7c1c6720712 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
$NetBSD: patch-ac,v 1.2 2005/04/02 16:24:40 minskim Exp $
--- PPMd.cpp.orig Sat Apr 2 09:39:52 2005
+++ PPMd.cpp
@@ -107,7 +107,13 @@ struct ENV_FILE_FINDER {
#include <utime.h>
#include <dirent.h>
#include <unistd.h>
+#ifdef __APPLE__
+#undef _POSIX_SOURCE
+#endif
#include <fnmatch.h>
+#ifdef __APPLE__
+#define _POSIX_SOURCE
+#endif
#if defined(__DJGPP__)
#include <crt0.h>
char **__crt0_glob_function (char *arg) { return 0; }
@@ -215,7 +221,7 @@ void _STDCALL PrintInfo(_PPMD_FILE* Deco
UINT n1=(8U*NEnc)/NDec;
UINT n2=(100U*(8U*NEnc-NDec*n1)+NDec/2U)/NDec;
if (n2 == 100) { n1++; n2=0; }
- int RunTime=((clock()-StartClock) << 10)/int(CLK_TCK);
+ int RunTime=((clock()-StartClock) << 10)/int(CLOCKS_PER_SEC);
UINT Speed=NDec/(RunTime+(RunTime == 0));
UINT UsedMemory=GetUsedMemory() >> 10;
UINT m1=UsedMemory >> 10;
|