Skip to content

Commit 31dbd48

Browse files
authored
Merge pull request #1623 from MicrosoftDocs/FromPublicMasterBranch
Confirm merge from FromPublicMasterBranch to master to sync with https://github.com/MicrosoftDocs/cpp-docs (branch master)
2 parents b0d9786 + 9537cbf commit 31dbd48

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

docs/preprocessor/include-alias.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
22
title: "include_alias"
3-
ms.date: "11/04/2016"
3+
ms.date: "12/16/2018"
44
f1_keywords: ["vc-pragma.include_alias", "include_alias_CPP"]
55
helpviewer_keywords: ["pragmas, include_alias", "include_alias pragma"]
66
ms.assetid: 3256d589-12b3-4af0-a586-199e96eabacc
77
---
88
# include_alias
99

10-
Specifies that *short_filename* is to be used as an alias for *long_filename*.
10+
Specifies that when *alias_filename* is found in a `#include` directive, the compiler substitutes *actual_filename* in its place.
1111

1212
## Syntax
1313

14-
> #pragma include_alias("*long_filename*", "*short_filename*")
15-
> #pragma include_alias(*long_filename*, *short_filename*)
14+
> #pragma include_alias("*alias_filename*", "*actual_filename*")
15+
> #pragma include_alias(\<*alias_filename*>, \<*actual_filename*>)
1616
1717
## Remarks
1818

19-
Some file systems allow longer header filenames than the 8.3 FAT file system limit. The compiler cannot simply truncate the longer names to 8.3, because the first eight characters of the longer header filenames may not be unique. Whenever the compiler encounters the *long_filename* string, it substitutes *short_filename*, and looks for the header file *short_filename* instead. This pragma must appear before the corresponding `#include` directives. For example:
19+
The **include_alias** pragma directive allows you to substitute files that have different names or paths for the file names included by source files. For example, some file systems allow longer header filenames than the 8.3 FAT file system limit. The compiler cannot simply truncate the longer names to 8.3, because the first eight characters of the longer header filenames may not be unique. Whenever the compiler encounters the *alias_filename* string, it substitutes *actual_filename*, and looks for the header file *actual_filename* instead. This pragma must appear before the corresponding `#include` directives. For example:
2020

2121
```cpp
2222
// First eight characters of these two files not unique.
@@ -73,8 +73,8 @@ Furthermore, the following directive generates an error:
7373
Note that the filename reported in error messages, or as the value of the predefined `__FILE__` macro, is the name of the file after the substitution has been performed. For example, see the output after the following directives:
7474

7575
```cpp
76-
#pragma include_alias( "VeryLongFileName.H", "myfile.h" )
77-
#include "VeryLongFileName.H"
76+
#pragma include_alias( "VERYLONGFILENAME.H", "myfile.h" )
77+
#include "VERYLONGFILENAME.H"
7878
```
7979

8080
An error in VERYLONGFILENAME.H produces the following error message:
@@ -91,8 +91,8 @@ Also note that transitivity is not supported. Given the following directives,
9191
#include "one.h"
9292
```
9393

94-
the compiler searches for the file TWO.H rather than THREE.H.
94+
the compiler searches for the file two.h rather than three.h.
9595

9696
## See Also
9797

98-
[Pragma Directives and the __Pragma Keyword](../preprocessor/pragma-directives-and-the-pragma-keyword.md)
98+
[Pragma Directives and the __Pragma Keyword](../preprocessor/pragma-directives-and-the-pragma-keyword.md)

0 commit comments

Comments
 (0)