xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/config/vms/xm-vms.h (revision b7b7574d3bf8eeb51a1fa3977b59142ec6434a55)
1 /* Configuration for GCC for hosting on VMS
2    using a Unix style C library.
3    Copyright (C) 1996, 1997, 2001, 2004, 2007, 2009
4    Free Software Foundation, Inc.
5 
6 This file is part of GCC.
7 
8 GCC 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, or (at your option)
11 any later version.
12 
13 GCC 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 GCC; see the file COPYING3.  If not see
20 <http://www.gnu.org/licenses/>.  */
21 
22 /* A couple of conditionals for execution machine are controlled here.  */
23 #ifndef VMS
24 #define VMS
25 #endif
26 
27 /* Causes exit() to be redefined to __posix_exit() and
28    Posix compatible failure and success codes to be used.  */
29 #define _POSIX_EXIT 1
30 
31 /* Open files in stream mode if not otherwise explicitly specified.  */
32 #define __UNIX_FOPEN 1
33 
34 /* Write to stdout using fputc to avoid record terminators in pipes.  */
35 #define __UNIX_FWRITE 1
36 
37 #define STDC_HEADERS 1
38 
39 #define HOST_EXECUTABLE_SUFFIX ".exe"
40 #define HOST_OBJECT_SUFFIX ".obj"
41 
42 #define DUMPFILE_FORMAT "_%02d_"
43 
44 #define DELETE_IF_ORDINARY(NAME,ST,VERBOSE_FLAG)           \
45 do                                                         \
46   {                                                        \
47     while (stat (NAME, &ST) >= 0 && S_ISREG (ST.st_mode))  \
48       if (unlink (NAME) < 0)                               \
49 	{                                                  \
50 	  if (VERBOSE_FLAG)                                \
51 	    perror_with_name (NAME);                       \
52 	  break;                                           \
53 	}                                                  \
54   } while (0)
55 
56 #define STANDARD_EXEC_PREFIX "/gnu/libexec/gcc/"
57 #define STANDARD_STARTFILE_PREFIX "/gnu/lib/"
58 #define STANDARD_INCLUDE_DIR "/gnu/include"
59