[pdiff] Make stdint.h inclusion portable (#10441)

by copying magic bits from cairo-wideint-private.h.
This commit is contained in:
Behdad Esfahbod 2007-04-03 16:04:04 -04:00
parent c2b1908f9b
commit 17f5706d17

View file

@ -16,11 +16,46 @@
#define _GNU_SOURCE
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include "lpyramid.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#if HAVE_STDINT_H
# include <stdint.h>
#elif HAVE_INTTYPES_H
# include <inttypes.h>
#elif 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;
# ifndef HAVE_UINT64_T
# define HAVE_UINT64_T 1
# endif
# ifndef INT16_MIN
# define INT16_MIN (-32767-1)
# endif
# ifndef INT16_MAX
# define INT16_MAX (32767)
# endif
# ifndef UINT16_MAX
# define UINT16_MAX (65535)
# endif
#else
#error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, etc.)
#endif
#include "pdiff.h"
#ifndef M_PI