1 | /* alphavms.h -- BFD definitions for an openVMS host
|
---|
2 | Copyright 1996, 2000 Free Software Foundation, Inc.
|
---|
3 | Written by Klaus Kämpf (kkaempf@progis.de)
|
---|
4 | of proGIS Softwareentwicklung, Aachen, Germany
|
---|
5 |
|
---|
6 | This file is part of BFD, the Binary File Descriptor library.
|
---|
7 |
|
---|
8 | This program is free software; you can redistribute it and/or modify
|
---|
9 | it under the terms of the GNU General Public License as published by
|
---|
10 | the Free Software Foundation; either version 2 of the License, or
|
---|
11 | (at your option) any later version.
|
---|
12 |
|
---|
13 | This program is distributed in the hope that it will be useful,
|
---|
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
16 | GNU General Public License for more details.
|
---|
17 |
|
---|
18 | You should have received a copy of the GNU General Public License
|
---|
19 | along with this program; if not, write to the Free Software
|
---|
20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
---|
21 |
|
---|
22 | #include <stddef.h>
|
---|
23 | #include <fcntl.h>
|
---|
24 | #include <errno.h>
|
---|
25 | #include <stdio.h>
|
---|
26 | #include <sys/types.h>
|
---|
27 | #include <sys/stat.h>
|
---|
28 | #include <string.h>
|
---|
29 | #include <sys/file.h>
|
---|
30 | #include <stdlib.h>
|
---|
31 | #include <unixlib.h>
|
---|
32 | #include <unixio.h>
|
---|
33 | #include <time.h>
|
---|
34 |
|
---|
35 | #include "bfd.h"
|
---|
36 |
|
---|
37 | #ifndef BFD_HOST_64_BIT
|
---|
38 | /* Make the basic types 64-bit quantities on the host.
|
---|
39 | Also provide the support macros BFD needs. */
|
---|
40 | # ifdef __GNUC__
|
---|
41 | # define BFD_HOST_64_BIT long long
|
---|
42 | # else
|
---|
43 | # define BFD_HOST_64_BIT long
|
---|
44 | # endif
|
---|
45 | typedef unsigned BFD_HOST_64_BIT uint64_type;
|
---|
46 | typedef BFD_HOST_64_BIT int64_type;
|
---|
47 |
|
---|
48 | # define sprintf_vma(s,x) sprintf (s, "%016lx", x) /* BFD_HOST_64_BIT */
|
---|
49 | # define fprintf_vma(f,x) fprintf (f, "%016lx", x) /* BFD_HOST_64_BIT */
|
---|
50 |
|
---|
51 | # define BYTES_IN_PRINTF_INT 4
|
---|
52 |
|
---|
53 | /* These must have type unsigned long because they are used as
|
---|
54 | arguments in printf functions. */
|
---|
55 | # define uint64_typeLOW(x) ((unsigned long) (((x) & 0xffffffff))) /* BFD_HOST_64_BIT */
|
---|
56 | # define uint64_typeHIGH(x) ((unsigned long) (((x) >> 32) & 0xffffffff)) /* BFD_HOST_64_BIT */
|
---|
57 |
|
---|
58 | #endif /* BFD_HOST_64_BIT */
|
---|
59 |
|
---|
60 | #include "fopen-vms.h"
|
---|
61 |
|
---|
62 | #define NO_FCNTL 1
|
---|
63 |
|
---|
64 | #ifndef O_ACCMODE
|
---|
65 | #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
|
---|
66 | #endif
|
---|
67 |
|
---|
68 | extern int getpagesize PARAMS ((void));
|
---|