Skip to content

Commit d9bc7c1

Browse files
authored
Merge pull request #6101 from TylerMSFT/linkage-ai
add linkage info
2 parents 7ccf905 + d33d8b8 commit d9bc7c1

14 files changed

+101
-35
lines changed

docs/c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["_wctime64", "_ctime32", "_tctime", "_wctime", "_wctime32", "_tctime64", "_ctime64", "ctime"]
1010
helpviewer_keywords: ["tctime64 function", "_ctime32 function", "ctime32 function", "_wctime function", "wctime64 function", "_tctime64 function", "_tctime32 function", "_ctime64 function", "_wctime64 function", "ctime function", "wctime32 function", "ctime64 function", "_wctime32 function", "_tctime function", "tctime32 function", "tctime function", "wctime function", "time, converting"]
11-
ms.assetid: 2423de37-a35c-4f0a-a378-3116bc120a9d
1211
---
1312
# `ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`
1413

@@ -17,10 +16,10 @@ Convert a time value to a string and adjust for local time zone settings. More s
1716
## Syntax
1817

1918
```C
20-
char *ctime( const time_t *sourceTime );
19+
char *ctime( const time_t *sourceTime ); // See note in remarks section about linkage
2120
char *_ctime32( const __time32_t *sourceTime );
2221
char *_ctime64( const __time64_t *sourceTime );
23-
wchar_t *_wctime( const time_t *sourceTime );
22+
wchar_t *_wctime( const time_t *sourceTime ); // See note in remarks section about linkage
2423
wchar_t *_wctime32( const __time32_t *sourceTime );
2524
wchar_t *_wctime64( const __time64_t *sourceTime );
2625
```
@@ -62,9 +61,14 @@ These functions validate their parameters. If *`sourceTime`* is a null pointer,
6261

6362
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
6463

64+
> [!Note]
65+
> When you use Windows SDK version 10.0.26100.6901 and Visual Studio 2026 or later together, `ctime` and `_wctime` are no longer `static inline` (internal linkage). Instead, they're `inline` (external linkage).\
66+
> To return to the previous behavior, `#define _STATIC_INLINE_UCRT_FUNCTIONS=1` before including any CRT headers. By default, `_STATIC_INLINE_UCRT_FUNCTIONS` is set to 0.\
67+
> This change increases UCRT conformance with the C++ standard and improves compatibility with C++ modules.
68+
6569
### Generic-text routine mappings
6670

67-
| TCHAR.H routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
71+
| `TCHAR.H` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
6872
|---|---|---|---|
6973
| `_tctime` | **`ctime`** | **`ctime`** | **`_wctime`** |
7074
| `_tctime32` | **`_ctime32`** | **`_ctime32`** | **`_wctime32`** |
@@ -74,12 +78,12 @@ By default, this function's global state is scoped to the application. To change
7478

7579
| Routine | Required header |
7680
|---|---|
77-
| **`ctime`** | \<time.h> |
78-
| **`_ctime32`** | \<time.h> |
79-
| **`_ctime64`** | \<time.h> |
80-
| **`_wctime`** | \<time.h> or \<wchar.h> |
81-
| **`_wctime32`** | \<time.h> or \<wchar.h> |
82-
| **`_wctime64`** | \<time.h> or \<wchar.h> |
81+
| **`ctime`** | `<time.h>` |
82+
| **`_ctime32`** | `<time.h>` |
83+
| **`_ctime64`** | `<time.h>` |
84+
| **`_wctime`** | `<time.h>` or `<wchar.h>` |
85+
| **`_wctime32`** | `<time.h>` or `<wchar.h>` |
86+
| **`_wctime64`** | `<time.h>` or `<wchar.h>` |
8387

8488
For more compatibility information, see [Compatibility](../compatibility.md).
8589

docs/c-runtime-library/reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Convert a time value to a string and adjust for local time zone settings. These
1616
## Syntax
1717

1818
```C
19-
errno_t ctime_s(
19+
errno_t ctime_s( // See note in remarks section about linkage
2020
char* buffer,
2121
size_t numberOfElements,
2222
const time_t *sourceTime
@@ -31,7 +31,7 @@ errno_t _ctime64_s(
3131
size_t numberOfElements,
3232
const __time64_t *sourceTime
3333
);
34-
errno_t _wctime_s(
34+
errno_t _wctime_s( // See note in remarks section about linkage
3535
wchar_t* buffer,
3636
size_t numberOfElements,
3737
const time_t *sourceTime
@@ -124,6 +124,11 @@ The debug library versions of these functions first fill the buffer with 0xFE. T
124124

125125
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
126126

127+
> [!Note]
128+
> When you use Windows SDK version 10.0.26100.6901 and Visual Studio 2026 or later together, `ctime_s` and `_wctime_s` are no longer `static inline` (internal linkage). Instead, they're `inline` (external linkage).\
129+
> To return to the previous behavior, `#define _STATIC_INLINE_UCRT_FUNCTIONS=1` before including any CRT headers. By default, `_STATIC_INLINE_UCRT_FUNCTIONS` is set to 0.\
130+
> This change increases UCRT conformance with the C++ standard and improves compatibility with C++ modules.
131+
127132
### Generic-text routine mappings
128133

129134
| TCHAR.H routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |

docs/c-runtime-library/reference/difftime-difftime32-difftime64.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["_difftime64", "difftime", "difftime64", "_difftime32", "difftime32"]
1010
helpviewer_keywords: ["_difftime32 function", "difftime function", "time, finding the difference", "difftime64 function", "_difftime64 function", "difftime32 function"]
11-
ms.assetid: 4cc0ac2b-fc7b-42c0-8283-8c9d10c566d0
1211
---
1312
# `difftime`, `_difftime32`, `_difftime64`
1413

@@ -17,7 +16,7 @@ Finds the difference between two times.
1716
## Syntax
1817

1918
```C
20-
double difftime( time_t timeEnd, time_t timeStart );
19+
double difftime( time_t timeEnd, time_t timeStart ); // See note in remarks section about linkage
2120
double _difftime32( __time32_t timeEnd, __time32_t timeStart );
2221
double _difftime64( __time64_t timeEnd, __time64_t timeStart );
2322
```
@@ -46,13 +45,18 @@ These functions validate their parameters. If either of the parameters is zero o
4645
4746
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
4847
48+
> [!Note]
49+
> If you use Windows SDK version 10.0.26100.6901 and Visual Studio 2026 or later together, `difftime` is no longer `static inline` (internal linkage). Instead, it's `inline` (external linkage).\
50+
> To return to the previous behavior, `#define _STATIC_INLINE_UCRT_FUNCTIONS=1` before including any CRT headers. By default, `_STATIC_INLINE_UCRT_FUNCTIONS` is set to 0.\
51+
> This change increases UCRT conformance with the C++ standard and improves compatibility with C++ modules.
52+
4953
## Requirements
5054
5155
| Routine | Required header |
5256
|---|---|
53-
| **`difftime`** | \<time.h> |
54-
| **`_difftime32`** | \<time.h> |
55-
| **`_difftime64`** | \<time.h> |
57+
| **`difftime`** | `<time.h>` |
58+
| **`_difftime32`** | `<time.h>` |
59+
| **`_difftime64`** | `<time.h>` |
5660
5761
For more compatibility information, see [Compatibility](../compatibility.md).
5862

docs/c-runtime-library/reference/futime-futime32-futime64.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Sets the modification time on an open file.
1717
## Syntax
1818

1919
```C
20-
int _futime(
20+
int _futime( // See note in remarks section about linkage
2121
int fd,
2222
struct _utimbuf *filetime
2323
);
@@ -51,13 +51,18 @@ The **`_futime`** routine sets the modification date and the access time on the
5151

5252
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
5353

54+
> [!Note]
55+
> If you use Windows SDK version 10.0.26100.6901 and Visual Studio 2026 or later together, `_futime` is no longer `static inline` (internal linkage). Instead, it's `inline` (external linkage).\
56+
> To return to the previous behavior, `#define _STATIC_INLINE_UCRT_FUNCTIONS=1` before including any CRT headers. By default, `_STATIC_INLINE_UCRT_FUNCTIONS` is set to 0.\
57+
> This change increases UCRT conformance with the C++ standard and improves compatibility with C++ modules.
58+
5459
## Requirements
5560

5661
| Function | Required header | Optional header |
5762
|---|---|---|
58-
| **`_futime`** | \<sys/utime.h> | \<errno.h> |
59-
| **`_futime32`** | \<sys/utime.h> | \<errno.h> |
60-
| **`_futime64`** | \<sys/utime.h> | \<errno.h> |
63+
| **`_futime`** | `<sys/utime.h>` | `<errno.h>` |
64+
| **`_futime32`** | `<sys/utime.h>` | `<errno.h>` |
65+
| **`_futime64`** | `<sys/utime.h>` | `<errno.h>` |
6166

6267
For more compatibility information, see [Compatibility](../compatibility.md).
6368

docs/c-runtime-library/reference/gmtime-gmtime32-gmtime64.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Converts a `time_t` time value to a `tm` structure. More secure versions of thes
1616
## Syntax
1717

1818
```C
19-
struct tm *gmtime( const time_t *sourceTime );
19+
struct tm *gmtime( const time_t *sourceTime ); // See note in remarks section about linkage
2020
struct tm *_gmtime32( const __time32_t *sourceTime );
2121
struct tm *_gmtime64( const __time64_t *sourceTime );
2222
```
@@ -56,6 +56,11 @@ The **`_gmtime32`** function breaks down the *`sourceTime`* value and stores it
5656
5757
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
5858
59+
> [!Note]
60+
> When you use Windows SDK version 10.0.26100.6901 and Visual Studio 2026 or later together, `gmtime` is no longer `static inline` (internal linkage). Instead, it's `inline` (external linkage).\
61+
> To return to the previous behavior, `#define _STATIC_INLINE_UCRT_FUNCTIONS=1` before including any CRT headers. By default, `_STATIC_INLINE_UCRT_FUNCTIONS` is set to 0.\
62+
> This change increases UCRT conformance with the C++ standard and improves compatibility with C++ modules.
63+
5964
## Requirements
6065
6166
| Routine | Required C header | Required C++ header |

docs/c-runtime-library/reference/gmtime-s-gmtime32-s-gmtime64-s.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Converts a time value to a `tm` structure. These functions are versions of [`_gm
1616
## Syntax
1717

1818
```C
19-
errno_t gmtime_s(
19+
errno_t gmtime_s( // See note in remarks section about linkage
2020
struct tm* tmDest,
2121
const __time_t* sourceTime
2222
);
@@ -76,6 +76,11 @@ Each of the structure fields is of type **`int`**, as shown in the following tab
7676

7777
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
7878

79+
> [!Note]
80+
> When you use Windows SDK version 10.0.26100.6901 and Visual Studio 2026 or later together, `gmtime_s` is no longer `static inline` (internal linkage). Instead, it's `inline` (external linkage).\
81+
> To return to the previous behavior, `#define _STATIC_INLINE_UCRT_FUNCTIONS=1` before including any CRT headers. By default, `_STATIC_INLINE_UCRT_FUNCTIONS` is set to 0.\
82+
> This change increases UCRT conformance with the C++ standard and improves compatibility with C++ modules.
83+
7984
## Requirements
8085

8186
| Routine | Required C header | Required C++ header |

docs/c-runtime-library/reference/localtime-localtime32-localtime64.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Converts a time value and corrects for the local time zone. More secure versions
1717
## Syntax
1818

1919
```C
20-
struct tm *localtime( const time_t *sourceTime );
20+
struct tm *localtime( const time_t *sourceTime ); // See note in remarks section about linkage
2121
struct tm *_localtime32( const __time32_t *sourceTime );
2222
struct tm *_localtime64( const __time64_t *sourceTime );
2323
```
@@ -72,6 +72,11 @@ These functions validate their parameters. If *`sourceTime`* is a null pointer,
7272
7373
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
7474
75+
> [!Note]
76+
> When you use Windows SDK version 10.0.26100.6901 and Visual Studio 2026 or later together, `localtime` is no longer `static inline` (internal linkage). Instead, it's `inline` (external linkage).\
77+
> To return to the previous behavior, `#define _STATIC_INLINE_UCRT_FUNCTIONS=1` before including any CRT headers. By default, `_STATIC_INLINE_UCRT_FUNCTIONS` is set to 0.\
78+
> This change increases UCRT conformance with the C++ standard and improves compatibility with C++ modules.
79+
7580
## Requirements
7681
7782
| Routine | Required C header | Required C++ header |

docs/c-runtime-library/reference/localtime-s-localtime32-s-localtime64-s.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Converts a **`time_t`** time value to a **`tm`** structure, and corrects for the
1717
## Syntax
1818

1919
```C
20-
errno_t localtime_s(
20+
errno_t localtime_s( // See note in remarks section about linkage
2121
struct tm* const tmDest,
2222
time_t const* const sourceTime
2323
);
@@ -84,6 +84,11 @@ If the **`TZ`** environment variable is set, the C run-time library assumes rule
8484

8585
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
8686

87+
> [!Note]
88+
> When you use Windows SDK version 10.0.26100.6901 and Visual Studio 2026 or later together, `localtime_s` is no longer `static inline` (internal linkage). Instead, it's `inline` (external linkage).\
89+
> To return to the previous behavior, `#define _STATIC_INLINE_UCRT_FUNCTIONS=1` before including any CRT headers. By default, `_STATIC_INLINE_UCRT_FUNCTIONS` is set to 0.\
90+
> This change increases UCRT conformance with the C++ standard and improves compatibility with C++ modules.
91+
8792
## Requirements
8893

8994
| Routine | Required C header | Required C++ header |

docs/c-runtime-library/reference/mkgmtime-mkgmtime32-mkgmtime64.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Converts a UTC time represented by a **`struct tm`** to a UTC time represented b
1616
## Syntax
1717

1818
```C
19-
time_t _mkgmtime(
19+
time_t _mkgmtime( // See note in remarks section about linkage
2020
struct tm* timeptr
2121
);
2222
__time32_t _mkgmtime32(
@@ -48,6 +48,11 @@ The range of the **`_mkgmtime32`** function is from midnight, January 1, 1970, U
4848

4949
Both **`gmtime`** and **`localtime`** use a common static buffer for the conversion. If you supply this buffer to **`_mkgmtime`**, the previous contents are destroyed.
5050

51+
> [!Note]
52+
> When you use Windows SDK version 10.0.26100.6901 and Visual Studio 2026 or later together, `_mkgmtime` is no longer `static inline` (internal linkage). Instead, it's `inline` (external linkage).\
53+
> To return to the previous behavior, `#define _STATIC_INLINE_UCRT_FUNCTIONS=1` before including any CRT headers. By default, `_STATIC_INLINE_UCRT_FUNCTIONS` is set to 0.\
54+
> This change increases UCRT conformance with the C++ standard and improves compatibility with C++ modules.
55+
5156
## Examples
5257

5358
```C

docs/c-runtime-library/reference/mktime-mktime32-mktime64.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Convert the local time to a calendar value.
1616
## Syntax
1717

1818
```C
19-
time_t mktime(
19+
time_t mktime( // See note in remarks section about linkage
2020
struct tm *timeptr
2121
);
2222
__time32_t _mktime32(
@@ -62,6 +62,11 @@ These functions validate their parameter. If *`timeptr`* is a null pointer, the
6262

6363
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
6464

65+
> [!Note]
66+
> When you use Windows SDK version 10.0.26100.6901 and Visual Studio 2026 or later together, `mktime` is no longer `static inline` (internal linkage). Instead, it's `inline` (external linkage).\
67+
> To return to the previous behavior, `#define _STATIC_INLINE_UCRT_FUNCTIONS=1` before including any CRT headers. By default, `_STATIC_INLINE_UCRT_FUNCTIONS` is set to 0.\
68+
> This change increases UCRT conformance with the C++ standard and improves compatibility with C++ modules.
69+
6570
## Requirements
6671

6772
| Routine | Required header |

0 commit comments

Comments
 (0)