blob: 32e87e89c92c97a204d1742a0af6100a6dee2d69 (
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
28
29
30
31
32
33
34
35
|
$NetBSD: patch-ac,v 1.4 2007/10/03 20:42:50 dmcmahill Exp $
--- tests/pdiff/perceptualdiff.c.orig 2007-04-23 18:45:34.000000000 -0400
+++ tests/pdiff/perceptualdiff.c
@@ -16,8 +16,29 @@
if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "config.h"
+
#include <stdio.h>
-#include <stdint.h>
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#elif defined(HAVE_INTTYPES_H)
+# include <inttypes.h>
+#elif defined(HAVE_SYS_INT_TYPES_H)
+# include <sys/int_types.h>
+#elif defined(_MSC_VER)
+ typedef __int8 int8_t;
+ typedef unsigned __int8 uint8_t;
+ typedef __int16 int16_t;
+ typedef unsigned __int16 uint16_t;
+ typedef __int32 int32_t;
+ typedef unsigned __int32 uint32_t;
+ typedef __int64 int64_t;
+ typedef unsigned __int64 uint64_t;
+#else
+# error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, etc.)
+#endif
+
#include <string.h>
#include <math.h>
#include "lpyramid.h"
|