Annotation of gcc/config/xm-vms.h, revision 1.1.1.1

1.1       root        1: /* Configuration for GNU C-compiler for Vax.
                      2:    Copyright (C) 1987 Free Software Foundation, Inc.
                      3: 
                      4: This file is part of GNU CC.
                      5: 
                      6: GNU CC is free software; you can redistribute it and/or modify
                      7: it under the terms of the GNU General Public License as published by
                      8: the Free Software Foundation; either version 2, or (at your option)
                      9: any later version.
                     10: 
                     11: GNU CC is distributed in the hope that it will be useful,
                     12: but WITHOUT ANY WARRANTY; without even the implied warranty of
                     13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     14: GNU General Public License for more details.
                     15: 
                     16: You should have received a copy of the GNU General Public License
                     17: along with GNU CC; see the file COPYING.  If not, write to
                     18: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
                     19: 
                     20: /* #defines that need visibility everywhere.  */
                     21: #define FALSE 0
                     22: #define TRUE 1
                     23: 
                     24: /* target machine dependencies.
                     25:    tm.h is a symbolic link to the actual target specific file.   */
                     26: #include "tm.h"
                     27: 
                     28: /* This describes the machine the compiler is hosted on.  */
                     29: #define HOST_BITS_PER_CHAR 8
                     30: #define HOST_BITS_PER_SHORT 16
                     31: #define HOST_BITS_PER_INT 32
                     32: #define HOST_BITS_PER_LONG 32
                     33: #define HOST_BITS_PER_LONGLONG 64
                     34: 
                     35: #define SUCCESS_EXIT_CODE 1
                     36: #define FATAL_EXIT_CODE (44 | 0x10000000)  /* Failure, and no DCL message.  */
                     37: 
                     38: 
                     39: /* A couple of conditionals for execution machine are controlled here.  */
                     40: #ifndef VMS
                     41: #define VMS
                     42: #endif
                     43: 
                     44: #ifndef __GNUC__
                     45: /* not present, at least in VAX-11 C (VMS) v2.2 */
                     46: #define R_OK 4
                     47: #define W_OK 2
                     48: #define X_OK 1
                     49: #define F_OK 0
                     50: 
                     51: #define unlink delete
                     52: #endif
                     53: 
                     54: /* If compiled with GNU C, use the built-in alloca */
                     55: #ifdef __GNUC__
                     56: #define alloca __builtin_alloca
                     57: #endif
                     58: 
                     59: #define GCC_INCLUDE_DIR "///not used with VMS///"      /* nonsense string for now */
                     60: 
                     61: /* and define a local equivalent (sort of) for unlink */
                     62: #define unlink remove
                     63: 
                     64: /* Specify the list of include file directories.  */
                     65: #define INCLUDE_DEFAULTS \
                     66: {                                                                      \
                     67:   { "GNU_GXX_INCLUDE:", 1},                                            \
                     68:   { "GNU_CC_INCLUDE:", 0},     /* GNU includes */                      \
                     69:   { "SYS$SYSROOT:[SYSLIB.]", 0}, /* VAX-11 "C" includes */             \
                     70:   { ".", 0},                   /* Make normal VMS filespecs work.  */  \
                     71:   { 0, 0}                                                              \
                     72: }
                     73: 
                     74: /* Under VMS a directory specification can be enclosed either in square
                     75:    brackets or in angle brackets.  Thus we need to check both.  This
                     76:    macro is used to help compare filenames in cp-lex.c.
                     77: 
                     78:    We also need to make sure that the names are all lower case, becuse
                     79:    we must be able to compare filenames to determine if a file implements
                     80:    a class.  */
                     81: 
                     82: #define FILE_NAME_NONDIRECTORY(C)                              \
                     83: ({                                                             \
                     84:    char * pnt_ = (C), * pnt1_;                                 \
                     85:    pnt1_ = pnt_ - 1;                                           \
                     86:    while (*++pnt1_)                                            \
                     87:      if ((*pnt1_ >= 'A' && *pnt1_ <= 'Z')) *pnt1_ |= 0x20;     \
                     88:    pnt1_ = rindex (pnt_, ']');                                         \
                     89:    pnt1_ = (pnt1_ == 0 ? rindex (pnt_, '>') : pnt1_);          \
                     90:    pnt1_ = (pnt1_ == 0 ? rindex (pnt_, ':') : pnt1_);          \
                     91:    (pnt1_ == 0 ? pnt_ : pnt1_ + 1);                            \
                     92:  })
                     93: 
                     94: /* Macro to generate the name of the cross reference file.  The standard
                     95:    one does not work, since it was written assuming that the conventions
                     96:    of a unix style filesystem will work on the host system.  */
                     97: 
                     98: #define XREF_FILE_NAME(BUFF, NAME)     \
                     99:   s = FILE_NAME_NONDIRECTORY (NAME);                   \
                    100:   if (s == NAME) sprintf(BUFF, "%s_gxref", NAME);      \
                    101:   else {                                               \
                    102:     strcpy(BUFF, NAME);                                        \
                    103:     strcat(t, "_gxref");                               \
                    104:   }
                    105: 
                    106: /* Macro that is used in cp-xref.c to determine whether a file name is
                    107:    absolute or not.  */
                    108: 
                    109: #define FILE_NAME_ABSOLUTE_P(NAME)     \
                    110:        (FILE_NAME_NONDIRECTORY (NAME) != (&NAME[1]))
                    111: 
                    112: /* FILE_NAME_JOINER is defined to be the characters that are inserted between 
                    113:    a directory name and a filename in order to make an absolute file
                    114:    specification.  Under VMS the directory specification contains all of the
                    115:    required characters, so we define this to be a null string.  */
                    116: 
                    117: #define FILE_NAME_JOINER ""
                    118: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.