Skip to content

Commit 9b11f77

Browse files
author
Colin Robertson
committed
Part 2 of the POSIX changes
1 parent 00bb4dd commit 9b11f77

File tree

7 files changed

+66
-94
lines changed

7 files changed

+66
-94
lines changed

.openpublishing.redirection.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,16 @@
835835
"redirect_url": "/cpp/c-runtime-library/c-run-time-library-reference",
836836
"redirect_document_id": false
837837
},
838+
{
839+
"source_path": "docs/c-runtime-library/inp-inpw.md",
840+
"redirect_url": "/cpp/c-runtime-library/inp-inpw-inpd",
841+
"redirect_document_id": true
842+
},
843+
{
844+
"source_path": "docs/c-runtime-library/outp-outpw.md",
845+
"redirect_url": "/cpp/c-runtime-library/outp-outpw-outpd",
846+
"redirect_document_id": true
847+
},
838848
{
839849
"source_path": "docs/c-runtime-library/precision-specification.md",
840850
"redirect_url": "/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions#precision",

docs/c-runtime-library/compatibility.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
---
22
title: "Compatibility"
3-
ms.date: "11/04/2016"
3+
description: "Describes the compatibility of the Microsoft Universal C runtime library (UCRT) with the Standard C library, POSIX, the Safe CRT, and Store apps."
4+
ms.date: "12/06/2019"
45
f1_keywords: ["c.programs"]
56
helpviewer_keywords: ["CRT, compatibility", "compatibility, C run-time libraries", "compatibility"]
67
ms.assetid: 346709cb-edda-4909-9a19-3d253eddb6b7
78
---
89
# Compatibility
910

10-
The Universal C Run-Time Library (UCRT) supports most of the C standard library required for C++ conformance. It implements the C99 (ISO/IEC 9899:1999) library, with the exceptions of the type-generic macros defined in \<tgmath.h>, and strict type compatibility in \<complex.h>. The UCRT also implements a large subset of the POSIX.1 (ISO/IEC 9945-1:1996, the POSIX System Application Program Interface) C library, but is not fully conformant to any specific POSIX standard. In addition, the UCRT implements several Microsoft-specific functions and macros that are not part of a standard.
11+
The Universal C Run-Time Library (UCRT) supports most of the C standard library required for C++ conformance. It implements the C99 (ISO/IEC 9899:1999) library, with certain exceptions: The type-generic macros defined in \<tgmath.h>, and strict type compatibility in \<complex.h>. The UCRT also implements a large subset of the POSIX.1 (ISO/IEC 9945-1:1996, the POSIX System Application Program Interface) C library. However, it's not fully conformant to any specific POSIX standard. The UCRT also implements several Microsoft-specific functions and macros that aren't part of a standard.
1112

12-
Functions specific to the Microsoft implementation of Visual C++ are found in the vcruntime library. Many of these functions are for internal use and cannot be called by user code. Some are documented for use in debugging and implementation compatibility.
13+
Functions specific to the Microsoft implementation of Visual C++ are found in the vcruntime library. Many of these functions are for internal use and can't be called by user code. Some are documented for use in debugging and implementation compatibility.
1314

14-
The C++ standard reserves names that begin with an underscore in the global namespace to the implementation. Because the POSIX functions are in the global namespace, but are not part of the standard C runtime library, the Microsoft-specific implementations of these functions have a leading underscore. For portability, the UCRT also supports the default names, but the Microsoft C++ compiler issues a deprecation warning when code that uses them is compiled. Only the default POSIX names are deprecated, not the functions. To suppress the warning, define `_CRT_NONSTDC_NO_WARNINGS` before including any headers in code that uses the original POSIX names.
15+
The C++ standard reserves names that begin with an underscore in the global namespace to the implementation. Both the POSIX functions and Microsoft-specific runtime library functions are in the global namespace, but aren't part of the standard C runtime library. That's why the preferred Microsoft implementations of these functions have a leading underscore. For portability, the UCRT also supports the default names, but the Microsoft C++ compiler issues a deprecation warning when code that uses them is compiled. Only the default names are deprecated, not the functions themselves. To suppress the warning, define `_CRT_NONSTDC_NO_WARNINGS` before including any headers in code that uses the original POSIX names.
1516

16-
Certain functions in the standard C library have a history of unsafe usage, because of misused parameters and unchecked buffers. These functions are often the source of security issues in code. Microsoft created a set of safer versions of these functions that verify parameter usage and invoke the invalid parameter handler when an issue is detected at runtime. By default, the Microsoft C++ compiler issues a deprecation warning when a function is used that has a safer variant available. When you compile your code as C++ , you can define `_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES` as 1 to eliminate most warnings. This uses template overloads to call the safer variants while maintaining portable source code. To suppress the warning, define `_CRT_SECURE_NO_WARNINGS` before including any headers in code that uses these functions. For more information, see [Security Features in the CRT](../c-runtime-library/security-features-in-the-crt.md).
17+
Certain functions in the standard C library have a history of unsafe usage, because of misused parameters and unchecked buffers. These functions are often the source of security issues in code. Microsoft created a set of safer versions of these functions that verify parameter usage. They invoke the invalid parameter handler when an issue is detected at runtime. By default, the Microsoft C++ compiler issues a deprecation warning when a function is used that has a safer variant available. When you compile your code as C++, you can define `_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES` as 1 to eliminate most warnings. This macro enables template overloads to call the safer variants while maintaining portable source code. To suppress the warning, define `_CRT_SECURE_NO_WARNINGS` before including any headers in code that uses these functions. For more information, see [Security Features in the CRT](../c-runtime-library/security-features-in-the-crt.md).
1718

18-
Except as noted within the documentation for specific functions, the UCRT is compatible with the Windows API. Certain functions are not supported in Windows 8 Store apps or in Universal Windows Platform (UWP) apps on Windows 10. These functions are listed in [CRT functions not supported in Universal Windows Platform apps](../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md), which enumerates the functions not supported by the Windows Runtime and [UWP](/uwp).
19+
Except as noted within the documentation for specific functions, the UCRT is compatible with the Windows API. Certain functions aren't supported in Windows Store or Universal Windows Platform ([UWP](/uwp)) apps. These functions are listed in [CRT functions not supported in Universal Windows Platform apps](../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).
1920

2021
## Related Articles
2122

2223
|Title|Description|
2324
|-----------|-----------------|
24-
|[UWP Apps, the Windows Runtime, and the C Run-Time](../c-runtime-library/windows-store-apps-the-windows-runtime-and-the-c-run-time.md)|Describes when UCRT routines are not compatible with Universal Windows apps or Microsoft Store apps.|
25+
|[UWP Apps, the Windows Runtime, and the C Run-Time](../c-runtime-library/windows-store-apps-the-windows-runtime-and-the-c-run-time.md)|Describes when UCRT routines aren't compatible with Universal Windows apps or Microsoft Store apps.|
2526
|[ANSI C Compliance](../c-runtime-library/ansi-c-compliance.md)|Describes standard-compliant naming in the UCRT.|
2627
|[UNIX](../c-runtime-library/unix.md)|Provides guidelines for porting programs to UNIX.|
2728
|[Windows Platforms (CRT)](../c-runtime-library/windows-platforms-crt.md)|Lists the operating systems that are the CRT supports.|

docs/c-runtime-library/inp-inpw-inpd.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
---
2-
title: "_inp, _inpw, _inpd"
3-
ms.date: "11/04/2016"
4-
api_name: ["_inp", "_inpw", "_inpd"]
2+
title: "inp, _inp, inpw, _inpw, _inpd"
3+
description: "Describes the obsolete and removed inp, _inp, inpw, _inpw, and _inpd functions of the Microsoft C runtime library (CRT)."
4+
ms.date: "12/09/2019"
5+
api_name: ["inp", "inpw", "_inp", "_inpw", "_inpd"]
56
api_location: ["msvcrt.dll", "msvcr120.dll", "msvcr110_clr0400.dll", "msvcr110.dll", "msvcr80.dll", "msvcr100.dll", "msvcr90.dll"]
67
api_type: ["DLLExport"]
78
topic_type: ["apiref"]
8-
f1_keywords: ["inpd", "_inp", "_inpw", "_inpd"]
9+
f1_keywords: ["inp", "inpw", "_inp", "_inpw", "_inpd"]
910
helpviewer_keywords: ["inp function", "inpw function", "ports, I/O routines", "inpd function", "_inp function", "_inpd function", "I/O [CRT], port", "_inpw function"]
1011
ms.assetid: 5d9c2e38-fc85-4294-86d5-7282cc02d1b3
1112
---
12-
# _inp, _inpw, _inpd
13+
# inp, _inp, inpw, _inpw, _inpd
1314

14-
Inputs, from a port, a byte (`_inp`), a word (`_inpw`), or a double word (`_inpd`).
15+
Inputs, from a port, a byte (`inp`, `_inp`), a word (`inpw`, `_inpw`), or a double word (`_inpd`).
1516

1617
> [!IMPORTANT]
17-
> These functions are obsolete. Beginning in Visual Studio 2015, they are not available in the CRT.
18-
19-
> [!IMPORTANT]
20-
> This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).
18+
> These functions are obsolete. Beginning in Visual Studio 2015, they are not available in the CRT.
19+
> This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).
2120
2221
## Syntax
2322

24-
```
23+
```cpp
2524
int _inp(
2625
unsigned short port
2726
);
@@ -33,9 +32,9 @@ unsigned long _inpd(
3332
);
3433
```
3534

36-
#### Parameters
35+
### Parameters
3736

38-
*port*<br/>
37+
*port*\
3938
I/O port number.
4039

4140
## Return Value
@@ -48,6 +47,8 @@ The `_inp`, `_inpw`, and `_inpd` functions read a byte, a word, and a double wor
4847

4948
Because these functions read directly from an I/O port, they cannot be used in user code.
5049

50+
The `inp` and `inpw` names are older, deprecated names for the `_inp` and `_inpw` functions. For more information, see [POSIX function names](../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names).
51+
5152
## Requirements
5253

5354
|Routine|Required header|
@@ -64,5 +65,5 @@ All versions of the [C run-time libraries](../c-runtime-library/crt-library-feat
6465

6566
## See also
6667

67-
[Console and Port I/O](../c-runtime-library/console-and-port-i-o.md)<br/>
68-
[_outp, _outpw, _outpd](../c-runtime-library/outp-outpw-outpd.md)
68+
[Console and Port I/O](../c-runtime-library/console-and-port-i-o.md)\
69+
[outp, outpw, _outp, _outpw, _outpd](../c-runtime-library/outp-outpw-outpd.md)

docs/c-runtime-library/inp-inpw.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/c-runtime-library/obsolete-functions.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
title: "Obsolete Functions"
3-
ms.date: "01/22/2019"
2+
title: "Obsolete functions"
3+
description: "Lists the obsolete functions that have been deprecated and removed from the Microsoft C runtime library (CRT)."
4+
ms.date: "12/09/2019"
45
api_name: ["_beep", "_sleep", "_loaddll", "_getdllprocaddr", "_seterrormode", "is_wctype", "_getsystime", "_setsystime"]
56
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-process-l1-1-0.dll", "api-ms-win-crt-runtime-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll", "api-ms-win-crt-time-l1-1-0.dll"]
67
api_type: ["DLLExport"]
@@ -11,7 +12,7 @@ ms.assetid: 8e14c2d4-1481-4240-8586-47eb43db02b0
1112
---
1213
# Obsolete Functions
1314

14-
Certain library functions are obsolete and have more recent equivalents. We recommend you change these to the updated versions. Other obsolete functions have been removed from the CRT. This topic lists the functions deprecated as obsolete, and the functions removed in a particular version of Visual Studio.
15+
Certain library functions are obsolete and have more recent equivalents. We recommend you change these functions to the updated versions. Other obsolete functions have been removed from the CRT. This article lists the functions deprecated as obsolete, and the functions removed in a particular version of Visual Studio.
1516

1617
## Deprecated as obsolete in Visual Studio 2015
1718

@@ -36,14 +37,12 @@ Certain library functions are obsolete and have more recent equivalents. We reco
3637
|[_get_output_format](../c-runtime-library/get-output-format.md)|None|
3738
|[_heapadd](../c-runtime-library/heapadd.md)|None|
3839
|[_heapset](../c-runtime-library/heapset.md)|None|
39-
|[inp, inpw](../c-runtime-library/inp-inpw.md)|None|
40-
|[_inp, _inpw, _inpd](../c-runtime-library/inp-inpw-inpd.md)|None|
41-
|[outp, outpw](../c-runtime-library/outp-outpw.md)|None|
42-
|[_outp, _outpw, _outpd](../c-runtime-library/outp-outpw-outpd.md)|None|
40+
|[inp, inpw, _inp, _inpw, _inpd](../c-runtime-library/inp-inpw-inpd.md)|None|
41+
|[outp, outpw, _outp, _outpw, _outpd](../c-runtime-library/outp-outpw-outpd.md)|None|
4342
|[_set_output_format](../c-runtime-library/set-output-format.md)|None|
4443

4544
## Removed from the CRT in earlier versions of Visual Studio
4645

4746
[_lock](../c-runtime-library/lock.md)
4847

49-
[_unlock](../c-runtime-library/unlock.md)
48+
[_unlock](../c-runtime-library/unlock.md)
Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,46 @@
11
---
2-
title: "_outp, _outpw, _outpd"
3-
ms.date: "11/04/2016"
4-
api_name: ["_outpd", "_outp", "_outpw"]
2+
title: "outp, outpw, _outp, _outpw, _outpd"
3+
description: "Describes the obsolete and removed outp, outpw, _outp, _outpw, and _outpd functions of the Microsoft C runtime library (CRT)."
4+
ms.date: "12/09/2019"
5+
api_name: ["_outpd", "_outp", "_outpw", "outp", "outpw"]
56
api_location: ["msvcrt.dll", "msvcr100.dll", "msvcr120.dll", "msvcr90.dll", "msvcr110_clr0400.dll", "msvcr110.dll", "msvcr80.dll"]
67
api_type: ["DLLExport"]
78
topic_type: ["apiref"]
8-
f1_keywords: ["_outpw", "_outpd", "_outp", "outpd"]
9+
f1_keywords: ["_outpw", "_outpd", "_outp", "outp", "outpw", "outpd"]
910
helpviewer_keywords: ["outpw function", "words", "_outpd function", "outpd function", "outp function", "ports, writing bytes at", "bytes, writing to ports", "words, writing to ports", "double words", "double words, writing to ports", "_outpw function", "_outp function"]
1011
ms.assetid: c200fe22-41f6-46fd-b0be-ebb805b35181
1112
---
12-
# _outp, _outpw, _outpd
13+
# outp, outpw, _outp, _outpw, _outpd
1314

14-
Outputs, at a port, a byte (`_outp`), a word (`_outpw`), or a double word (`_outpd`).
15+
Outputs, at a port, a byte (`outp`, `_outp`), a word (`outpw`, `_outpw`), or a double word (`_outpd`).
1516

1617
> [!IMPORTANT]
17-
> These functions are obsolete. Beginning in Visual Studio 2015, they are not available in the CRT.
18-
19-
> [!IMPORTANT]
20-
> This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).
18+
> These functions are obsolete. Beginning in Visual Studio 2015, they are not available in the CRT.
19+
> This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).
2120
2221
## Syntax
2322

24-
```
25-
26-
int _outp(
27-
unsigned short port,
28-
int databyte
23+
```cpp
24+
int _outp(
25+
unsigned short port,
26+
int databyte
2927
);
3028
unsigned short _outpw(
31-
unsigned short port,
32-
unsigned short dataword
29+
unsigned short port,
30+
unsigned short dataword
3331
);
3432
unsigned long _outpd(
35-
unsigned short port,
36-
unsigned long dataword
33+
unsigned short port,
34+
unsigned long dataword
3735
);
3836
```
3937

40-
#### Parameters
41-
*port*<br/>
38+
### Parameters
39+
40+
*port*\
4241
Port number.
4342

44-
*databyte, dataword*<br/>
43+
*databyte, dataword*\
4544
Output values.
4645

4746
## Return Value
@@ -54,6 +53,8 @@ The `_outp`, `_outpw`, and `_outpd` functions write a byte, a word, and a double
5453

5554
Because these functions write directly to an I/O port, they cannot be used in user code. For information about using I/O ports in these operating systems, search for "Serial Communications in Win32" at MSDN.
5655

56+
The `outp` and `outpw` names are older, deprecated names for the `_outp` and `_outpw` functions. For more information, see [POSIX function names](../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names).
57+
5758
## Requirements
5859

5960
|Routine|Required header|
@@ -70,5 +71,5 @@ All versions of the [C run-time libraries](../c-runtime-library/crt-library-feat
7071

7172
## See also
7273

73-
[Console and Port I/O](../c-runtime-library/console-and-port-i-o.md)<br/>
74-
[_inp, _inpw, _inpd](../c-runtime-library/inp-inpw-inpd.md)
74+
[Console and Port I/O](../c-runtime-library/console-and-port-i-o.md)\
75+
[inp, inpw, _inp, _inpw, _inpd](../c-runtime-library/inp-inpw-inpd.md)

docs/c-runtime-library/outp-outpw.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)