14361b62eSniklas /* alphavms.h -- BFD definitions for an openVMS host 2*d2201f2fSdrahn Copyright 1996, 2000 Free Software Foundation, Inc. 34361b62eSniklas Written by Klaus K�mpf (kkaempf@progis.de) 44361b62eSniklas of proGIS Softwareentwicklung, Aachen, Germany 54361b62eSniklas 64361b62eSniklas This file is part of BFD, the Binary File Descriptor library. 74361b62eSniklas 84361b62eSniklas This program is free software; you can redistribute it and/or modify 94361b62eSniklas it under the terms of the GNU General Public License as published by 104361b62eSniklas the Free Software Foundation; either version 2 of the License, or 114361b62eSniklas (at your option) any later version. 124361b62eSniklas 134361b62eSniklas This program is distributed in the hope that it will be useful, 144361b62eSniklas but WITHOUT ANY WARRANTY; without even the implied warranty of 154361b62eSniklas MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 164361b62eSniklas GNU General Public License for more details. 174361b62eSniklas 184361b62eSniklas You should have received a copy of the GNU General Public License 194361b62eSniklas along with this program; if not, write to the Free Software 204361b62eSniklas Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 214361b62eSniklas 224361b62eSniklas #include <stddef.h> 234361b62eSniklas #include <fcntl.h> 244361b62eSniklas #include <errno.h> 254361b62eSniklas #include <stdio.h> 264361b62eSniklas #include <sys/types.h> 274361b62eSniklas #include <sys/stat.h> 284361b62eSniklas #include <string.h> 294361b62eSniklas #include <sys/file.h> 304361b62eSniklas #include <stdlib.h> 314361b62eSniklas #include <unixlib.h> 324361b62eSniklas #include <unixio.h> 334361b62eSniklas #include <time.h> 344361b62eSniklas 354361b62eSniklas #include "bfd.h" 364361b62eSniklas 374361b62eSniklas #ifndef BFD_HOST_64_BIT 384361b62eSniklas /* Make the basic types 64-bit quantities on the host. 394361b62eSniklas Also provide the support macros BFD needs. */ 404361b62eSniklas # ifdef __GNUC__ 414361b62eSniklas # define BFD_HOST_64_BIT long long 424361b62eSniklas # else 434361b62eSniklas # define BFD_HOST_64_BIT long 444361b62eSniklas # endif 454361b62eSniklas typedef unsigned BFD_HOST_64_BIT uint64_type; 464361b62eSniklas typedef BFD_HOST_64_BIT int64_type; 474361b62eSniklas 484361b62eSniklas # define sprintf_vma(s,x) sprintf (s, "%016lx", x) /* BFD_HOST_64_BIT */ 494361b62eSniklas # define fprintf_vma(f,x) fprintf (f, "%016lx", x) /* BFD_HOST_64_BIT */ 504361b62eSniklas 514361b62eSniklas # define BYTES_IN_PRINTF_INT 4 524361b62eSniklas 534361b62eSniklas /* These must have type unsigned long because they are used as 544361b62eSniklas arguments in printf functions. */ 554361b62eSniklas # define uint64_typeLOW(x) ((unsigned long) (((x) & 0xffffffff))) /* BFD_HOST_64_BIT */ 564361b62eSniklas # define uint64_typeHIGH(x) ((unsigned long) (((x) >> 32) & 0xffffffff)) /* BFD_HOST_64_BIT */ 574361b62eSniklas 584361b62eSniklas #endif /* BFD_HOST_64_BIT */ 594361b62eSniklas 604361b62eSniklas #include "fopen-vms.h" 614361b62eSniklas 624361b62eSniklas #define NO_FCNTL 1 634361b62eSniklas 644361b62eSniklas #ifndef O_ACCMODE 654361b62eSniklas #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) 664361b62eSniklas #endif 674361b62eSniklas 684361b62eSniklas extern int getpagesize PARAMS ((void)); 69