ac61fba116
inttypes.h. Fixes builds on SunOS-5.9.
35 lines
1,002 B
Text
35 lines
1,002 B
Text
$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"
|