Back to index

cell-binutils  2.17cvs20070401
alphavms.h
Go to the documentation of this file.
00001 /* alphavms.h -- BFD definitions for an openVMS host
00002    Copyright 1996, 2000, 2001 Free Software Foundation, Inc.
00003    Written by Klaus Kämpf (kkaempf@progis.de)
00004    of proGIS Softwareentwicklung, Aachen, Germany
00005 
00006 This file is part of BFD, the Binary File Descriptor library.
00007 
00008 This program is free software; you can redistribute it and/or modify
00009 it under the terms of the GNU General Public License as published by
00010 the Free Software Foundation; either version 2 of the License, or
00011 (at your option) any later version.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License for more details.
00017 
00018 You should have received a copy of the GNU General Public License
00019 along with this program; if not, write to the Free Software
00020 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00021 
00022 #include <stddef.h>
00023 #include <fcntl.h>
00024 #include <errno.h>
00025 #include <stdio.h>
00026 #include <sys/types.h>
00027 #include <sys/stat.h>
00028 #include <string.h>
00029 #include <sys/file.h>
00030 #include <stdlib.h>
00031 #include <unixlib.h>
00032 #include <unixio.h>
00033 #include <time.h>
00034 
00035 #include "bfd.h"
00036 
00037 #ifndef BFD_HOST_64_BIT
00038 /* Make the basic types 64-bit quantities on the host.
00039    Also provide the support macros BFD needs.  */
00040 # ifdef __GNUC__
00041 #  define     BFD_HOST_64_BIT      long long
00042 # else
00043 #  define     BFD_HOST_64_BIT      long
00044 # endif
00045 typedef unsigned BFD_HOST_64_BIT uint64_type;
00046 typedef BFD_HOST_64_BIT int64_type;
00047 
00048 # define sprintf_vma(s,x) sprintf (s, "%016lx", x) /* BFD_HOST_64_BIT */
00049 # define fprintf_vma(f,x) fprintf (f, "%016lx", x) /* BFD_HOST_64_BIT */
00050 
00051 # define BYTES_IN_PRINTF_INT 4
00052 
00053 /* These must have type unsigned long because they are used as
00054    arguments in printf functions.  */
00055 # define uint64_typeLOW(x) ((unsigned long) (((x) & 0xffffffff))) /* BFD_HOST_64_BIT */
00056 # define uint64_typeHIGH(x) ((unsigned long) (((x) >> 32) & 0xffffffff)) /* BFD_HOST_64_BIT */
00057 
00058 #endif /* BFD_HOST_64_BIT */
00059 
00060 #include "fopen-vms.h"
00061 
00062 #define NO_FCNTL 1
00063 
00064 #ifndef O_ACCMODE
00065 #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
00066 #endif
00067 
00068 extern int getpagesize PARAMS ((void));