$NetBSD: patch-ao,v 1.5 2001/04/19 00:56:34 jtb Exp $ --- hdf/src/hdfi.h.orig Tue Aug 22 20:26:57 2000 +++ hdf/src/hdfi.h @@ -151,6 +151,8 @@ * Define options for each platform *-------------------------------------------------------------------------*/ +#ifndef __NetBSD__ + /* * Meaning of each defined macros (not completed yet) * @@ -1253,6 +1255,71 @@ #endif #endif /* IA64 */ + +#endif /* ! NetBSD */ + +#ifdef __NetBSD__ + +#ifdef GOT_MACHINE +If you get an error on this line more than one machine type has been defined. +Please check your Makefile. +#endif +#define GOT_MACHINE + +#include /* for unbuffered i/o stuff */ +#include +#ifdef __vax__ +#define DF_MT 0x2221 +#elif defined(__m68k__) || defined(__sparc__) || defined(__sparc64__) || defined(__powerpc__) +#define DF_MT 0x1111 +#else +#define DF_MT 0x4441 +#endif +typedef void VOID; +typedef void *VOIDP; +typedef char *_fcd; +typedef char char8; +typedef unsigned char uchar8; +typedef char int8; +typedef unsigned char uint8; +typedef short int int16; +typedef unsigned short int uint16; +#ifndef __rpc_types_h +typedef int int32; +typedef unsigned int uint32; +#endif /* __rpc_types_h */ +typedef int intn; +typedef unsigned int uintn; +typedef int intf; /* size of INTEGERs in Fortran compiler */ +typedef float float32; +typedef double float64; +#if defined(__alpha__) || defined(__sparc64__) +typedef long hdf_pint_t; /* an integer the same size as a pointer */ +#else +typedef int hdf_pint_t; /* an integer the same size as a pointer */ +#endif +#define FNAME_POST_UNDERSCORE +#define _fcdtocp(desc) (desc) +#ifdef HAVE_FMPOOL +#define FILELIB PAGEBUFIO /* enable page buffering */ +#else +#define FILELIB UNIXBUFIO +#endif + +/* JPEG #define's - Look in the JPEG docs before changing - (Q) */ + +/* Determine the memory manager we are going to use. Valid values are: */ +/* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */ +/* what each does */ +#define JMEMSYS MEM_ANSI + +#ifdef __GNUC__ +#define HAVE_STDC +#define INCLUDES_ARE_ANSI +#endif + +#endif /* NetBSD */ + #ifndef GOT_MACHINE No machine type has been defined. Your Makefile needs to have someing like