From: Nathanael Nerode Date: Wed, 2 Oct 2002 19:17:30 +0000 (+0000) Subject: vms.texi: Blow away false include file section. X-Git-Tag: releases/gcc-3.3.0~2489 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;h=854ef3909dcc16b363d5300d096823fa4c6afdc5;p=gcc.git vms.texi: Blow away false include file section. 2002-10-02 Nathanael Nerode * doc/vms.texi: Blow away false include file section. From-SVN: r57747 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 346cb9b39a13..fc2b1455f657 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2002-10-02 Nathanael Nerode + + * doc/vms.texi: Blow away false include file section. + 2002-10-02 Roger Sayle PR optimization/6627 diff --git a/gcc/doc/vms.texi b/gcc/doc/vms.texi index 5ab266695a84..080d4522bedf 100644 --- a/gcc/doc/vms.texi +++ b/gcc/doc/vms.texi @@ -10,117 +10,11 @@ Here is how to use GCC on VMS@. @menu -* Include Files and VMS:: Where the preprocessor looks for the include files. * Global Declarations:: How to do globaldef, globalref and globalvalue with GCC. * VMS Misc:: Misc information. @end menu -@node Include Files and VMS -@section Include Files and VMS - -@cindex include files and VMS -@cindex VMS and include files -@cindex header files and VMS -Due to the differences between the filesystems of Unix and VMS, GCC -attempts to translate file names in @samp{#include} into names that VMS -will understand. The basic strategy is to prepend a prefix to the -specification of the include file, convert the whole filename to a VMS -filename, and then try to open the file. GCC tries various prefixes -one by one until one of them succeeds: - -@enumerate -@item -The first prefix is the @samp{GNU_CC_INCLUDE:} logical name: this is -where GNU C header files are traditionally stored. If you wish to store -header files in non-standard locations, then you can assign the logical -@samp{GNU_CC_INCLUDE} to be a search list, where each element of the -list is suitable for use with a rooted logical. - -@item -The next prefix tried is @samp{SYS$SYSROOT:[SYSLIB.]}. This is where -VAX-C header files are traditionally stored. - -@item -If the include file specification by itself is a valid VMS filename, the -preprocessor then uses this name with no prefix in an attempt to open -the include file. - -@item -If the file specification is not a valid VMS filename (i.e.@: does not -contain a device or a directory specifier, and contains a @samp{/} -character), the preprocessor tries to convert it from Unix syntax to -VMS syntax. - -Conversion works like this: the first directory name becomes a device, -and the rest of the directories are converted into VMS-format directory -names. For example, the name @file{X11/foobar.h} is -translated to @file{X11:[000000]foobar.h} or @file{X11:foobar.h}, -whichever one can be opened. This strategy allows you to assign a -logical name to point to the actual location of the header files. - -@item -If none of these strategies succeeds, the @samp{#include} fails. -@end enumerate - -Include directives of the form: - -@example -#include foobar -@end example - -@noindent -are a common source of incompatibility between VAX-C and GCC@. VAX-C -treats this much like a standard @code{#include } directive. -That is incompatible with the ISO C behavior implemented by GCC: to -expand the name @code{foobar} as a macro. Macro expansion should -eventually yield one of the two standard formats for @code{#include}: - -@example -#include "@var{file}" -#include <@var{file}> -@end example - -If you have this problem, the best solution is to modify the source to -convert the @code{#include} directives to one of the two standard forms. -That will work with either compiler. If you want a quick and dirty fix, -define the file names as macros with the proper expansion, like this: - -@example -#define stdio -@end example - -@noindent -This will work, as long as the name doesn't conflict with anything else -in the program. - -Another source of incompatibility is that VAX-C assumes that: - -@example -#include "foobar" -@end example - -@noindent -is actually asking for the file @file{foobar.h}. GCC does not -make this assumption, and instead takes what you ask for literally; -it tries to read the file @file{foobar}. The best way to avoid this -problem is to always specify the desired file extension in your include -directives. - -GCC for VMS is distributed with a set of include files that is -sufficient to compile most general purpose programs. Even though the -GCC distribution does not contain header files to define constants -and structures for some VMS system-specific functions, there is no -reason why you cannot use GCC with any of these functions. You first -may have to generate or create header files, either by using the public -domain utility @code{UNSDL} (which can be found on a DECUS tape), or by -extracting the relevant modules from one of the system macro libraries, -and using an editor to construct a C header file. - -A @code{#include} file name cannot contain a DECNET node name. The -preprocessor reports an I/O error if you attempt to use a node name, -whether explicitly, or implicitly via a logical name. - @node Global Declarations @section Global Declarations and VMS