Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor modules modifications #3373

Merged
merged 2 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions stl/inc/ctime
Original file line number Diff line number Diff line change
Expand Up @@ -30,46 +30,46 @@ _EXPORT_STD using _CSTD strftime;
_EXPORT_STD using _CSTD timespec;
#endif // _HAS_CXX17

#if _HAS_CXX23 && defined(_BUILD_STD_MODULE) // TRANSITION, DevCom-1126857
#if _HAS_CXX23 && defined(_BUILD_STD_MODULE) // TRANSITION, OS-33790456
_STL_DISABLE_DEPRECATED_WARNING

// These workaround functions intentionally aren't inline.
_EXPORT_STD
_Check_return_ _CRT_INSECURE_DEPRECATE(ctime_s)
char* __CRTDECL ctime(_In_ const time_t* const _Time) noexcept /* strengthened */ {
_Check_return_ _CRT_INSECURE_DEPRECATE(ctime_s) inline char* __CRTDECL ctime(_In_ const time_t* const _Time) noexcept
/* strengthened */ {
return _CSTD _ctime64(_Time);
}

_EXPORT_STD
_Check_return_ double __CRTDECL difftime(_In_ const time_t _Time1, _In_ const time_t _Time2) noexcept
_Check_return_ inline double __CRTDECL difftime(_In_ const time_t _Time1, _In_ const time_t _Time2) noexcept
/* strengthened */ {
return _CSTD _difftime64(_Time1, _Time2);
}

_EXPORT_STD
_Check_return_ _CRT_INSECURE_DEPRECATE(gmtime_s)
tm* __CRTDECL gmtime(_In_ const time_t* const _Time) noexcept /* strengthened */ {
_Check_return_ _CRT_INSECURE_DEPRECATE(gmtime_s) inline tm* __CRTDECL gmtime(_In_ const time_t* const _Time) noexcept
/* strengthened */ {
return _CSTD _gmtime64(_Time);
}

_EXPORT_STD
_CRT_INSECURE_DEPRECATE(localtime_s)
tm* __CRTDECL localtime(_In_ const time_t* const _Time) noexcept /* strengthened */ {
inline tm* __CRTDECL localtime(_In_ const time_t* const _Time) noexcept /* strengthened */ {
return _CSTD _localtime64(_Time);
}

_EXPORT_STD
_Check_return_opt_ time_t __CRTDECL mktime(_Inout_ tm* const _Tm) noexcept /* strengthened */ {
_Check_return_opt_ inline time_t __CRTDECL mktime(_Inout_ tm* const _Tm) noexcept /* strengthened */ {
return _CSTD _mktime64(_Tm);
}

_EXPORT_STD
time_t __CRTDECL time(_Out_opt_ time_t* const _Time) noexcept /* strengthened */ {
inline time_t __CRTDECL time(_Out_opt_ time_t* const _Time) noexcept /* strengthened */ {
return _CSTD _time64(_Time);
}

_EXPORT_STD
_Check_return_ int __CRTDECL timespec_get(_Out_ timespec* const _Ts, _In_ const int _Base) noexcept /* strengthened */ {
_Check_return_ inline int __CRTDECL timespec_get(_Out_ timespec* const _Ts, _In_ const int _Base) noexcept
/* strengthened */ {
return _CSTD _timespec64_get(reinterpret_cast<_timespec64*>(_Ts), _Base);
}

Expand Down
5 changes: 3 additions & 2 deletions stl/modules/std.ixx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

// In a module-file, the optional `module;` must appear first; see [cpp.pre].
module;

// This named module expects to be built with classic headers, not header units.
#define _BUILD_STD_MODULE

module;

// The subset of "C headers" [tab:c.headers] corresponding to
// the "C++ headers for C library facilities" [tab:headers.cpp.c]
#include <assert.h>
Expand Down