2f9b7c5a0e
declare fnmatch if _POSIX_SOURCE is defined.
27 lines
884 B
Text
27 lines
884 B
Text
$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;
|