summaryrefslogtreecommitdiff
path: root/devel/hdf/patches/patch-ao
blob: 025d8f44c423098036dd91ba01505cc6ca4cd73f (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
$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 <sys/file.h>               /* for unbuffered i/o stuff */
+#include <sys/stat.h>
+#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