You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/itoa-itow.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ wchar_t * _ultow( unsigned long value, wchar_t *buffer, int radix );
28
28
wchar_t * _i64tow( long long value, wchar_t *buffer, int radix );
29
29
wchar_t * _ui64tow( unsigned long long value, wchar_t *buffer, int radix );
30
30
31
-
// These Posix versions of the functions have deprecated names:
31
+
// These POSIX versions of the functions have deprecated names:
32
32
char * itoa( int value, char *buffer, int radix );
33
33
char * ltoa( long value, char *buffer, int radix );
34
34
char * ultoa( unsigned long value, char *buffer, int radix );
@@ -102,9 +102,9 @@ To use these functions without the deprecation warning, define the **_CRT_SECURE
102
102
103
103
In C++, these functions have template overloads that invoke their safer counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md).
104
104
105
-
The Posix names **itoa**, **ltoa**, and **ultoa** exist as aliases for the **_itoa**, **_ltoa**, and **_ultoa** functions. The Posix names are deprecated because they do not follow the implementation-specific function name conventions of ISO C. By default, these functions cause deprecation warning [C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md): **The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name:***new_name*. We recommend you change your source code to use the safer versions of these functions, **_itoa_s**, **_ltoa_s**, or **_ultoa_s**. For more information, see [_itoa_s, _itow_s functions](itoa-s-itow-s.md).
105
+
The POSIX names **itoa**, **ltoa**, and **ultoa** exist as aliases for the **_itoa**, **_ltoa**, and **_ultoa** functions. The POSIX names are deprecated because they do not follow the implementation-specific global function name conventions of ISO C. By default, these functions cause deprecation warning [C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md): **The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name:***new_name*. We recommend you change your source code to use the safer versions of these functions, **_itoa_s**, **_ltoa_s**, or **_ultoa_s**. For more information, see [_itoa_s, _itow_s functions](itoa-s-itow-s.md).
106
106
107
-
For source code portability, you may prefer to retain the Posix names in your code. To use these functions without the deprecation warning, define both the **_CRT_NONSTDC_NO_WARNINGS** and **_CRT_SECURE_NO_WARNINGS** preprocessor macros before including any CRT headers. You can do this on the command line in a developer command prompt by adding the **/D_CRT_SECURE_NO_WARNINGS** and **/D_CRT_NONSTDC_NO_WARNINGS** compiler options to the **cl** command. Otherwise, define the macros in your source files. If you use precompiled headers, define the macros at the top of the precompiled header include file. To define the macros in your source code, use **#define** directives before you include any CRT header, as in this example:
107
+
For source code portability, you may prefer to retain the POSIX names in your code. To use these functions without the deprecation warning, define both the **_CRT_NONSTDC_NO_WARNINGS** and **_CRT_SECURE_NO_WARNINGS** preprocessor macros before including any CRT headers. You can do this on the command line in a developer command prompt by adding the **/D_CRT_SECURE_NO_WARNINGS** and **/D_CRT_NONSTDC_NO_WARNINGS** compiler options to the **cl** command. Otherwise, define the macros in your source files. If you use precompiled headers, define the macros at the top of the precompiled header include file. To define the macros in your source code, use **#define** directives before you include any CRT header, as in this example:
Copy file name to clipboardExpand all lines: docs/error-messages/compiler-warnings/compiler-warning-level-3-c4996.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Your code uses a function, class member, variable, or typedef that's marked *dep
15
15
16
16
## Remarks
17
17
18
-
Many functions, member functions, template functions, and global variables in Visual Studio libraries are *deprecated*. Some, such as Posix functions, are deprecated because they have a different preferred name. Some C runtime library functions are deprecated because they're insecure and have a more secure variant. Others are deprecated because they're obsolete. The deprecation messages usually include a suggested replacement for the deprecated function or global variable.
18
+
Many functions, member functions, template functions, and global variables in Visual Studio libraries are *deprecated*. Some, such as POSIX and Microsoft-specific functions, are deprecated because they now have a different preferred name. Some C runtime library functions are deprecated because they're insecure and have a more secure variant. Others are deprecated because they're obsolete. The deprecation messages usually include a suggested replacement for the deprecated function or global variable.
19
19
20
20
## Turn off the warning
21
21
@@ -53,9 +53,9 @@ Here are some of the common sources of C4996 warnings and errors:
53
53
54
54
**The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name:***new-name*. **See online help for details.**
55
55
56
-
Microsoft renamed some POSIX functions in the CRT to conform with C99 and C++03 rules for implementation-defined global function names. Only the names are deprecated, not the functions themselves. In most cases, a leading underscore was added to the POSIX function name to create a standards conformant name. The compiler issues a deprecation warning for the original function name, and suggests the preferred name.
56
+
Microsoft renamed some POSIX and Microsoft-specific library functions in the CRT to conform with C99 and C++03 constraints on reserved and global implementation-defined names. *Only the names are deprecated, not the functions themselves*. In most cases, a leading underscore was added to the function name to create a conforming name. The compiler issues a deprecation warning for the original function name, and suggests the preferred name.
57
57
58
-
To fix this issue, we usually recommend you change your code to use the suggested function names instead. However, the updated names are Microsoft-specific. If you need to use the existing function names for portability reasons, you can turn off these warnings. The POSIX functions are still available in the library under their original names.
58
+
To fix this issue, we usually recommend you change your code to use the suggested function names instead. However, the updated names are Microsoft-specific. If you need to use the existing function names for portability reasons, you can turn off these warnings. The functions are still available in the library under their original names.
59
59
60
60
To turn off deprecation warnings for these functions, define the preprocessor macro **\_CRT\_NONSTDC\_NO\_WARNINGS**. You can define this macro at the command line by including the option `/D_CRT_NONSTDC_NO_WARNINGS`.
The functions return an absolute pathname that takes into account, as necessary, the current directory associated with its root name. \(For Posix, the functions return `absolute(pval)`.\)
482
+
The functions return an absolute pathname that takes into account, as necessary, the current directory associated with its root name. \(For POSIX, the functions return `absolute(pval)`.\)
Copy file name to clipboardExpand all lines: docs/standard-library/filesystem.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,19 +19,19 @@ using namespace std::experimental::filesystem::v1;
19
19
> [!IMPORTANT]
20
20
> As of the release of Visual Studio 2017, the \<filesystem> header was not yet a C++ standard. C++ in Visual Studio 2017 (MSVC v141) implements the final draft standard, found in [ISO/IEC JTC 1/SC 22/WG 21 N4100](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf).
21
21
22
-
This header supports filesystems for one of two broad classes of host operating systems: Microsoft Windows and Posix.
22
+
This header supports filesystems for one of two broad classes of host operating systems: Microsoft Windows and POSIX.
23
23
24
24
While most functionality is common to both operating systems, this document identifies where differences occur. For example:
25
25
26
26
- Windows supports multiple root names, such as c: or \\\network_name. A filesystem consists of a forest of trees, each with its own root directory, such as c:\ or \\\network_name\\, and each with its own current directory, for completing a relative pathname (one that is not an absolute pathname).
27
27
28
-
- Posix supports a single tree, with no root name, the single root directory /, and a single current directory.
28
+
- POSIX supports a single tree, with no root name, the single root directory /, and a single current directory.
29
29
30
30
Another significant difference is the native representation of pathnames:
31
31
32
32
- Windows uses a null-terminated sequence of wchar_t, encoded as UTF-16 (one or two elements for each character).
33
33
34
-
- Posix uses a null-terminated sequence of char, encoded as UTF-8 (one or more elements for each character).
34
+
- POSIX uses a null-terminated sequence of char, encoded as UTF-8 (one or more elements for each character).
35
35
36
36
- An object of class path stores the pathname in native form, but supports easy conversion between this stored form and several external forms:
37
37
@@ -51,7 +51,7 @@ Another difference is the detail with which each operating system lets you speci
51
51
52
52
1. Windows records whether a file is read only or writable, an attribute that has no meaning for directories.
53
53
54
-
1. Posix records whether a file can be read, written, or executed (scanned if a directory), by the owner, by the owner's group, or by everybody, plus a few other permissions.
54
+
1. POSIX records whether a file can be read, written, or executed (scanned if a directory), by the owner, by the owner's group, or by everybody, plus a few other permissions.
55
55
56
56
Common to both systems is the structure imposed on a pathname once you get past the root name. For the pathname c:/abc/xyz/def.ext:
|[is_absolute](#is_absolute)|For Windows, the function returns `has_root_name() && has_root_directory()`. For Posix, the function returns `has_root_directory()`.|
61
+
|[is_absolute](#is_absolute)|For Windows, the function returns `has_root_name() && has_root_directory()`. For POSIX, the function returns `has_root_directory()`.|
Copy file name to clipboardExpand all lines: docs/text/string-and-i-o-formatting-modern-cpp.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ Some advantages of `Boost.Format` are:
45
45
46
46
- Extensible: Works for any type that can be streamed.
47
47
48
-
- Convenient: Standard Posix and similar format strings.
48
+
- Convenient: Standard POSIX and similar format strings.
49
49
50
50
Although `Boost.Format` is built on C++ [\<iostream>](../standard-library/iostream-programming.md) facilities, which are safe and extensible, they aren't performance-optimized. When you require performance optimization, consider C [printf](../c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md) and [sprintf](../c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md), which are fast and easy to use. However, they aren't extensible or safe from vulnerabilities. (Safe versions exist, but they incur a slight performance penalty. For more information, see [printf_s, _printf_s_l, wprintf_s, _wprintf_s_l](../c-runtime-library/reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md) and [sprintf_s, _sprintf_s_l, swprintf_s, _swprintf_s_l](../c-runtime-library/reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md)).
0 commit comments