summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5f90i.h
blob: b19a3c5f2738367a4f527c2307dfd5bd60ea81ad (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
#ifndef _H5f90i_H
#define _H5f90i_H

#ifdef GOT_MACHINE
#undef GOT_MACHINE
#endif

#define  DFMT_IRIX         0x1111

/* 
 * Standard header files needed all the time 
 */

#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>

#if (defined (UNICOS) || (defined (_UNICOS)))

#ifndef UNICOS 
#define UNICOS 
#endif

#include <memory.h>
#include <fortran.h>
#ifndef O_RDONLY
#include <fcntl.h>              /* for unbuffered i/o stuff */
#define L_INCR  1
#include <sys/stat.h>
#endif /*O_RDONLY*/

#ifdef _CRAYIEEE
#define DF_MT   DFMT_UNICOSIEEE
#else
#define DF_MT   DFMT_UNICOS
#endif
/*typedef char*              _fcd;*/
typedef long               hsize_t_f;
typedef long               hssize_t_f;
typedef long               size_t_f;
typedef long               int_f;
typedef long               hid_t_f;
typedef double             real_f;
#define DF_CAPFNAMES 
/*#define _fcdtocp(desc) (desc)*/

#endif /* UNICOS */


/* LINUX definitions */
#if defined(i386) && defined(linux)
#define DF_MT             DFMT_LINIX
typedef char              *_fcd;
typedef long long         hsize_t_f;
typedef long long         hssize_t_f;
typedef int               size_t_f;
typedef int               int_f;
typedef int               hid_t_f;
typedef float             real_f;
#define FNAME_POST_UNDERSCORE
#define _fcdtocp(desc) (desc)

#endif /*LINUX*/

#if defined(IRIX) || defined(IRIS4) || defined(sgi) || defined(__sgi__) || defined(__sgi)

#ifndef IRIX
#define IRIX
#endif

#if (_MIPS_SZLONG == 64)
/* IRIX 64 bits objects.  It is nearly the same as the conventional
 * 32 bits objects.  Let them share IRIX definitions for now.
 */
#define IRIX64
#endif


#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 1

#   define BSD
#ifndef __GNUC__
#include <memory.h>
#endif /* __GNUC__ */
#include <sys/file.h>               /* for unbuffered i/o stuff */
#include <sys/stat.h>
#define DF_MT         DFMT_IRIX
typedef char          *_fcd;

typedef long          hsize_t_f;
typedef long          hssize_t_f;
typedef long          size_t_f;
typedef int           int_f;
typedef int           hid_t_f;
typedef float         real_f;
#define FNAME_POST_UNDERSCORE
#define _fcdtocp(desc) (desc)
#ifdef IRIX64
#define BIG_LONGS
#endif


#define HAVE_STDC
#define INCLUDES_ARE_ANSI

#endif /* IRIX */

#if (defined(SUN) || defined(sun) || defined(__sun__) || defined(__SUNPRO_C)) & !defined(__i386)
#ifdef __STDC__
#define ANSISUN
#else /* __STDC__ */
#define KNRSUN
#endif /* __STDC__ */
#endif /* SUN || sun */

#if defined(ANSISUN)

#if !defined(SUN)
#define SUN
#endif

#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 <unistd.h>                 /* for some file I/O stuff */
#include <sys/time.h>
#include <sys/file.h>               /* for unbuffered i/o stuff */
#include <sys/stat.h>
#define DF_MT             DFMT_SUN
typedef char              *_fcd;
typedef int               hsize_t_f;
typedef int               hssize_t_f;
typedef int               size_t_f;
typedef int               int_f;
typedef int               hid_t_f;
typedef float             real_f;
#define FNAME_POST_UNDERSCORE
#define _fcdtocp(desc) (desc)

#endif     /*SUN*/


#if defined DEC_ALPHA || (defined __alpha && defined __unix__)

#ifndef DEC_ALPHA
#define DEC_ALPHA
#endif

#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>
#define DF_MT            DFMT_ALPHA
typedef char             *_fcd;
typedef long             hsize_t_f;
typedef long             hssize_t_f;
typedef long             size_t_f;
typedef int              int_f;
typedef int              hid_t_f;
typedef float            real_f;
#define FNAME_POST_UNDERSCORE
#define _fcdtocp(desc) (desc)

#endif /* DEC_ALPHA */


#if defined(HP9000) || (!defined(__convexc__) && (defined(hpux) || defined(__hpux)))

#ifndef HP9000
#define HP9000
#endif

#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

#ifndef HAVE_UNISTD_H
#define HAVE_UNISTD_H  /* unistd.h - close, fork,..etc */
#endif

#   define BSD
#ifndef __GNUC__
#include <memory.h>
#endif /* __GNUC__ */
#include <sys/file.h>               /* for unbuffered i/o stuff */
#include <sys/stat.h>
#define DF_MT          DFMT_HP9000
typedef char           *_fcd;
typedef long long           hsize_t_f;
typedef long long          hssize_t_f;
typedef long           size_t_f;
typedef int            int_f;
typedef int            hid_t_f;
typedef float          real_f;
#define _fcdtocp(desc) (desc)
#ifdef  HAVE_FMPOOL
#define FILELIB PAGEBUFIO  /* enable page buffering */
#else
#define FILELIB UNIXBUFIO
#endif

#endif /* HP9000 */


#if defined _WINDOWS || defined WIN32
#define GOT_MACHINE 1

#pragma comment( lib, "oldnames" )
#include <fcntl.h>
#include <sys\types.h>
#include <sys\stat.h>
#include <io.h>
#include <conio.h> 
#include <malloc.h>
#include <ctype.h>          /* for character macros */
#ifdef __WATCOMC__
#include <stddef.h>         /* for the 'fortran' pragma */
#endif

#define DF_MT             DFMT_PC

typedef char              *_fcd;
typedef int               hsize_t_f;
typedef int               hssize_t_f;
typedef int               size_t_f;
typedef int               int_f;
typedef int               hid_t_f;
typedef float             real_f;

#if defined _M_ALPHA
#define FNAME_PRE_UNDERSCORE
#endif

#define DF_CAPFNAMES
#define _fcdtocp(desc) (desc)

#ifdef  HAVE_FMPOOL
#define FILELIB PAGEBUFIO  /* enable page buffering */
#else
#define FILELIB UNIXBUFIO
#endif

#endif /*WINDOWS */

/*----------------------------------------------------------------
** MACRO FNAME for any fortran callable routine name.
**
**  This macro prepends, appends, or does not modify a name
**  passed as a macro parameter to it based on the FNAME_PRE_UNDERSCORE,
**  FNAME_POST_UNDERSCORE macros set for a specific system.
**
**---------------------------------------------------------------*/
#if defined(FNAME_PRE_UNDERSCORE) && defined(FNAME_POST_UNDERSCORE)
#   define FNAME(x)     _##x##_
#endif
#if defined(FNAME_PRE_UNDERSCORE) && !defined(FNAME_POST_UNDERSCORE)
#   define FNAME(x)     _##x
#endif
#if !defined(FNAME_PRE_UNDERSCORE) && defined(FNAME_POST_UNDERSCORE)
#   define FNAME(x)     x##_
#endif
#if !defined(FNAME_PRE_UNDERSCORE) && !defined(FNAME_POST_UNDERSCORE)
#   define FNAME(x)     x
#endif

#  define HDfree(p)        (free((void*)p))
#  define HDmalloc(s)      (malloc((size_t)s))
#  define HDstrlen(s)       (strlen((const char *)(s))) 
#  define HDmemcpy(dst,src,n)   (memcpy((void *)(dst),(const void *)(src),(size_t)(n)))


#endif /* _H5f90i_H */