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