Skip to content

Commit 971f463

Browse files
authored
Merge branch 'live' into master
2 parents 2f9ff86 + 67d2d31 commit 971f463

File tree

5 files changed

+80
-69
lines changed

5 files changed

+80
-69
lines changed

docs/build/reference/cl-environment-variables.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,56 +17,59 @@ ms.author: "corob"
1717
manager: "ghogen"
1818
---
1919
# CL Environment Variables
20+
2021
The CL tool uses the following environment variables:
2122

22-
- CL and _CL\_, if defined. The CL tool prepends the options and arguments defined in the CL environment variable to the command line arguments, and appends the options and arguments defined in _CL\_, before processing.
23+
- CL and \_CL\_, if defined. The CL tool inserts the options and arguments defined in the CL environment variable at the beginning of the command line arguments, and adds the options and arguments defined in \_CL\_ to the end of the command line arguments, before processing.
2324

24-
- INCLUDE, which must point to the \include subdirectory of your Visual C++ installation.
25+
- INCLUDE, which must point to the \include subdirectory of your Visual C++ installation.
2526

26-
- LIBPATH, which specifies directories to search for metadata files referenced with [#using](../../preprocessor/hash-using-directive-cpp.md). See `#using` for more information on LIBPATH.
27+
- LIBPATH, which specifies directories to search for metadata files referenced by a `#using` directive. See [#using](../../preprocessor/hash-using-directive-cpp.md) for more information on LIBPATH.
2728

28-
You can set the CL or _CL\_ environment variable using the following syntax:
29+
You can set the CL or \_CL\_ environment variables using the following syntax:
2930

3031
```
3132
SET CL=[ [option] ... [file] ...] [/link link-opt ...]
3233
SET _CL_=[ [option] ... [file] ...] [/link link-opt ...]
3334
```
3435

35-
For details on the arguments to the CL and _CL\_ environment variables, see [Compiler Command-Line Syntax](../../build/reference/compiler-command-line-syntax.md).
36+
For details on the arguments to the CL and \_CL\_ environment variables, see [Compiler Command-Line Syntax](../../build/reference/compiler-command-line-syntax.md).
3637

37-
You can use these environment variables to define the files and options you use most often and use the command line to define specific files and options for specific purposes. The CL and _CL\_ environment variables are limited to 1024 characters (the command-line input limit).
38+
You can use these environment variables to define the files and options you use most often and use the command line to define specific files and options for specific purposes. The CL and \_CL\_ environment variables are limited to 1024 characters (the command-line input limit).
3839

39-
You cannot use the /D option to define a symbol that uses an equal sign (=). You can substitute the number sign (#) for an equal sign. In this way, you can use the CL or _CL_environment variables to define preprocessor constants with explicit valuesfor example, `/DDEBUG#1` to define `DEBUG=1`.
40+
You cannot use the /D option to define a symbol that uses an equal sign (=). You can substitute the number sign (#) for an equal sign. In this way, you can use the CL or \_CL\_ environment variables to define preprocessor constants with explicit values; for example, `/DDEBUG#1` to define `DEBUG=1`.
4041

41-
For related information, see [Set Environment Variables](../../build/setting-the-path-and-environment-variables-for-command-line-builds.md).
42+
For related information, see [Set Environment Variables](../../build/setting-the-path-and-environment-variables-for-command-line-builds.md).
4243

43-
## Examples
44-
The following is an example of setting the CL environment variable:
44+
## Examples
45+
46+
The following is an example of setting the CL environment variable:
4547

4648
```
4749
SET CL=/Zp2 /Ox /I\INCLUDE\MYINCLS \LIB\BINMODE.OBJ
4850
```
4951

50-
When this environment variable is set, if you enter `CL INPUT.C` at the command line, this is the effective command:
52+
When this environment variable is set, if you enter `CL INPUT.C` at the command line, this is the effective command:
5153

5254
```
5355
CL /Zp2 /Ox /I\INCLUDE\MYINCLS \LIB\BINMODE.OBJ INPUT.C
5456
```
5557

56-
The following example causes a plain CL command to compile the source files FILE1.c and FILE2.c, and then link the object files FILE1.obj, FILE2.obj, and FILE3.obj:
58+
The following example causes a plain CL command to compile the source files FILE1.c and FILE2.c, and then link the object files FILE1.obj, FILE2.obj, and FILE3.obj:
5759

5860
```
5961
SET CL=FILE1.C FILE2.C
6062
SET _CL_=FILE3.OBJ
6163
CL
6264
```
6365

64-
This has the same effect as the following command line:
66+
This has the same effect as the following command line:
6567

6668
```
6769
CL FILE1.C FILE2.C FILE3.OBJ
6870
```
6971

70-
## See Also
71-
[Setting Compiler Options](../../build/reference/setting-compiler-options.md)
72-
[Compiler Options](../../build/reference/compiler-options.md)
72+
## See Also
73+
74+
[Setting Compiler Options](../../build/reference/setting-compiler-options.md)
75+
[Compiler Options](../../build/reference/compiler-options.md)

docs/build/reference/driver-windows-nt-kernel-mode-driver.md

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,39 +17,40 @@ ms.author: "corob"
1717
manager: "ghogen"
1818
---
1919
# /DRIVER (Windows NT Kernel Mode Driver)
20-
```
21-
/DRIVER[:UPONLY | :WDM]
22-
```
23-
24-
## Remarks
25-
Use the /DRIVER linker option to build a Windows NT kernel mode driver.
26-
27-
**/DRIVER:UPONLY** causes the linker to add the **IMAGE_FILE_UP_SYSTEM_ONLY** bit to the characteristics in the output header to specify that it is a uniprocessor (UP) driver. The operating system will refuse to load a UP driver on a multiprocessor (MP) system.
28-
29-
**/DRIVER:WDM** causes the linker to set the **IMAGE_DLLCHARACTERISTICS_WDM_DRIVER** bit in the optional header's DllCharacteristics field.
30-
31-
If **/DRIVER** is not specified, these bits are not set by the linker.
32-
33-
If **/DRIVER** is specified:
34-
35-
- /FIXED:NO is in effect ([/FIXED (Fixed Base Address)](../../build/reference/fixed-fixed-base-address.md)).
36-
37-
- The extension of the output file will be .sys. Use **/OUT** to change the default filename and extension ([/OUT (Output File Name)](../../build/reference/out-output-file-name.md)).
38-
39-
### To set this linker option in the Visual Studio development environment
40-
41-
1. Open the project's **Property Pages** dialog box. For details, see [Setting Visual C++ Project Properties](../../ide/working-with-project-properties.md).
42-
43-
2. Click the **Linker** folder.
44-
45-
3. Click the **System** property page.
46-
47-
4. Modify the **Driver** property.
48-
49-
### To set this linker option programmatically
50-
51-
1. See `P:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.driver`.
52-
53-
## See Also
54-
[Setting Linker Options](../../build/reference/setting-linker-options.md)
55-
[Linker Options](../../build/reference/linker-options.md)
20+
21+
>/DRIVER[:UPONLY |:WDM]
22+
23+
## Remarks
24+
25+
Use the **/DRIVER** linker option to build a Windows NT kernel mode driver.
26+
27+
**/DRIVER:UPONLY** causes the linker to add the **IMAGE_FILE_UP_SYSTEM_ONLY** bit to the characteristics in the output header to specify that it is a uniprocessor (UP) driver. The operating system will refuse to load a UP driver on a multiprocessor (MP) system.
28+
29+
**/DRIVER:WDM** causes the linker to set the **IMAGE_DLLCHARACTERISTICS_WDM_DRIVER** bit in the optional header's DllCharacteristics field.
30+
31+
If **/DRIVER** is not specified, these bits are not set by the linker.
32+
33+
If **/DRIVER** is specified:
34+
35+
- **/FIXED:NO** is in effect. For more information, see [/FIXED (Fixed Base Address)](../../build/reference/fixed-fixed-base-address.md).
36+
37+
- The extension of the output file is set to .sys. Use **/OUT** to change the default filename and extension. For more information, see [/OUT (Output File Name)](../../build/reference/out-output-file-name.md).
38+
39+
### To set this linker option in the Visual Studio development environment
40+
41+
1. Open the project's **Property Pages** dialog box. For details, see [Setting Visual C++ Project Properties](../../ide/working-with-project-properties.md).
42+
43+
2. Click the **Linker** folder.
44+
45+
3. Click the **System** property page.
46+
47+
4. Modify the **Driver** property.
48+
49+
### To set this linker option programmatically
50+
51+
1. See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.driver>.
52+
53+
## See Also
54+
55+
[Setting Linker Options](../../build/reference/setting-linker-options.md)
56+
[Linker Options](../../build/reference/linker-options.md)

docs/build/reference/std-specify-language-standard-version.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ The **/std:c++17** option enables the full set of C++17 features implemented by
5050

5151
The **/std:c++latest** option enables the set of C++ language and library features implemented by Visual C++ to track the most recent Working Draft and defect updates of the C++ Standard. Use this switch to get the latest language features supported by the compiler. For a list of supported language and library features, see [What's New for Visual C++](../../what-s-new-for-visual-cpp-in-visual-studio.md). The **/std:c++latest** option does not enable features guarded by the **/experimental** switch.
5252

53+
The **/std** option in effect during a C++ compilation can be detected by use of the [\_MSVC\_LANG](../preprocessor/predefined-macros.md) preprocessor macro. For more information, see [Preprocessor Macros](../preprocessor/predefined-macros.md).
54+
5355
The **/std:c++14** and **/std:c++latest** options are available beginning in Visual C++ 2015 Update 3. The **/std:c++17** option is available beginning in Visual C++ 2017 Update Version 15.3.
5456

55-
> [!NOTE]
56-
> Depending on the Visual C++ compiler version or update level, certain C++14 features may not be fully implemented or fully conformant when you specify the **/std:c++14** option. For example, the Visual C++ 2017 RTM compiler does not fully support C++14-conformant `constexpr`, expression SFINAE, or 2-phase name lookup. For an overview of C++ language conformance in Visual C++, see [Visual C++ Language Conformance](../../visual-cpp-language-conformance.md).
57+
[!NOTE]
58+
> Depending on the Visual C++ compiler version or update level, certain C++14 features may not be fully implemented or fully conformant when you specify the **/std:c++14** option. For example, the Visual C++ 2017 RTM compiler does not fully support C++14-conformant `constexpr`, expression SFINAE, or 2-phase name lookup. For an overview of C++ language conformance in Visual C++, see [Visual C++ Language Conformance](../../visual-cpp-language-conformance.md).
5759
5860
### To set this compiler option in the Visual Studio development environment
5961

docs/c-runtime-library/reference/get-osfhandle.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "_get_osfhandle | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/04/2016"
4+
ms.date: "09/11/2017"
55
ms.reviewer: ""
66
ms.suite: ""
77
ms.technology: ["cpp-standard-libraries"]
@@ -20,6 +20,7 @@ ms.author: "corob"
2020
manager: "ghogen"
2121
---
2222
# _get_osfhandle
23+
2324
Retrieves the operating-system file handle that is associated with the specified file descriptor.
2425

2526
## Syntax
@@ -30,15 +31,18 @@ intptr_t _get_osfhandle(
3031
);
3132
```
3233

33-
#### Parameters
34-
`fd`
35-
An existing file descriptor.
34+
### Parameters
35+
36+
*fd*
37+
An existing file descriptor.
3638

37-
## Return Value
38-
An operating-system file handle if `fd` is valid. Otherwise, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns `INVALID_HANDLE_VALUE` (-1) and sets `errno` to `EBADF`, indicating an invalid file handle.
39+
## Return Value
40+
41+
An operating-system file handle if *fd* is valid. Otherwise, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns `INVALID_HANDLE_VALUE` (-1) and sets `errno` to `EBADF`, indicating an invalid file handle.
3942

40-
## Remarks
41-
To close a file opened with `_get_osfhandle`, call `_close`. The underlying handle is also closed by a call to `_close`, so it is not necessary to call the Win32 function `CloseHandle` on the original handle.
43+
## Remarks
44+
45+
To close a file whose operating-system file handle is obtained by `_get_osfhandle`, call [\_close](../../c-runtime-library/reference/close.md) on the file descriptor *fd*. The underlying handle is also closed by a call to `_close`, so it is not necessary to call the Win32 function `CloseHandle` on the original handle.
4246

4347
## Requirements
4448

@@ -48,9 +52,10 @@ intptr_t _get_osfhandle(
4852

4953
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md) in the Introduction.
5054

51-
## See Also
52-
[File Handling](../../c-runtime-library/file-handling.md)
53-
[_close](../../c-runtime-library/reference/close.md)
54-
[_creat, _wcreat](../../c-runtime-library/reference/creat-wcreat.md)
55-
[_dup, _dup2](../../c-runtime-library/reference/dup-dup2.md)
56-
[_open, _wopen](../../c-runtime-library/reference/open-wopen.md)
55+
## See Also
56+
57+
[File Handling](../../c-runtime-library/file-handling.md)
58+
[_close](../../c-runtime-library/reference/close.md)
59+
[_creat, _wcreat](../../c-runtime-library/reference/creat-wcreat.md)
60+
[_dup, _dup2](../../c-runtime-library/reference/dup-dup2.md)
61+
[_open, _wopen](../../c-runtime-library/reference/open-wopen.md)

docs/porting/overview-of-potential-upgrade-issues-visual-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Over the years, the Visual C++ compiler has undergone many changes, along with c
3535

3636
For the CRT, mixing-and-matching was never supported, but it often just worked, at least until Visual Studio 2015 and the Universal CRT, because the API surface did not change much over time. The Universal CRT broke backwards compatibility so that in the future we can maintain backwards compatibility. In other words, we have no plans to introduce new, versioned Universal CRT binaries in the future. Instead, the existing Universal CRT is now updated in-place.
3737

38-
To provide partial link compatibility with object files (and libraries) compiled with older versions of the Microsoft C Runtime headers, we provide a library, legacy_stdio_definitions.lib, with Visual Studio 2015 and later. This library provides compatibility symbols for most of the functions and data exports that were removed from the Universal CRT. The set of compatibility symbols provided by legacy_stdio_definitions.lib is sufficient to satisfy most dependencies, including all of the dependencies in libraries included in the Windows SDK. However, there are some symbols that were removed from the Universal CRT for which it is not possible to provide compatibility symbols like this. These symbols include some functions (e.g., \__iob_func) and the data exports (e.g., \__imp\_\__iob, \__imp\_\__pctype, \__imp\_\__mb_cur_max).
38+
To provide partial link compatibility with object files (and libraries) compiled with older versions of the Microsoft C Runtime headers, we provide a library, legacy_stdio_definitions.lib, with Visual Studio 2015 and later. This library provides compatibility symbols for most of the functions and data exports that were removed from the Universal CRT. The set of compatibility symbols provided by legacy_stdio_definitions.lib is sufficient to satisfy most dependencies, including all of the dependencies in libraries included in the Windows SDK. However, there are some symbols that were removed from the Universal CRT for which it is not possible to provide compatibility symbols like this. These symbols include some functions (e.g., \_\_iob\_func) and the data exports (e.g., \_\_imp\_\_\_iob, \_\_imp\_\_\_pctype, \_\_imp\_\_\_mb_cur_max).
3939

4040
If you have a static library that was built with an older version of the C Runtime headers, we recommend the following actions (in this order):
4141

0 commit comments

Comments
 (0)