]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - bfd/hosts/alphavms.h
2009-09-01 Tristan Gingold <gingold@adacore.com>
[thirdparty/binutils-gdb.git] / bfd / hosts / alphavms.h
1 /* alphavms.h -- BFD definitions for an openVMS host
2 Copyright 1996, 2000, 2001, 2007 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 3 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., 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
22
23 #include <stddef.h>
24 #include <fcntl.h>
25 #include <errno.h>
26 #include <stdio.h>
27 #include <sys/types.h>
28 #include <sys/stat.h>
29 #include <string.h>
30 #include <sys/file.h>
31 #include <stdlib.h>
32 #include <unixlib.h>
33 #include <unixio.h>
34 #include <time.h>
35
36 #include "bfd.h"
37 #include "filenames.h"
38
39 #ifndef BFD_HOST_64_BIT
40 /* Make the basic types 64-bit quantities on the host.
41 Also provide the support macros BFD needs. */
42 # ifdef __GNUC__
43 # define BFD_HOST_64_BIT long long
44 # else
45 # define BFD_HOST_64_BIT long
46 # endif
47 typedef unsigned BFD_HOST_64_BIT uint64_type;
48 typedef BFD_HOST_64_BIT int64_type;
49
50 # define sprintf_vma(s,x) sprintf (s, "%016lx", x) /* BFD_HOST_64_BIT */
51 # define fprintf_vma(f,x) fprintf (f, "%016lx", x) /* BFD_HOST_64_BIT */
52
53 # define BYTES_IN_PRINTF_INT 4
54
55 /* These must have type unsigned long because they are used as
56 arguments in printf functions. */
57 # define uint64_typeLOW(x) ((unsigned long) (((x) & 0xffffffff))) /* BFD_HOST_64_BIT */
58 # define uint64_typeHIGH(x) ((unsigned long) (((x) >> 32) & 0xffffffff)) /* BFD_HOST_64_BIT */
59
60 #endif /* BFD_HOST_64_BIT */
61
62 #include "fopen-vms.h"
63
64 #define NO_FCNTL 1
65
66 #ifndef O_ACCMODE
67 #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
68 #endif
69
70 extern int getpagesize (void);
71 extern char *stpcpy (char *, const char *);
72
73 /* No intl. */
74 #define gettext(Msgid) (Msgid)
75 #define dgettext(Domainname, Msgid) (Msgid)
76 #define dcgettext(Domainname, Msgid, Category) (Msgid)
77 #define textdomain(Domainname) while (0) /* nothing */
78 #define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
79 #define _(String) (String)
80 #define N_(String) (String)