-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ntoskrnl7/features/use_ms_ucrt
Features/use windows kit ucrt
- Loading branch information
Showing
91 changed files
with
2,469 additions
and
2,395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,27 +108,27 @@ crtsys가 장점은 아래와 같습니다. | |
- [Initialization](https://en.cppreference.com/w/cpp/language/initialization) | ||
- [x] [Non-local variables](https://en.cppreference.com/w/cpp/language/initialization#Non-local_variables) | ||
- [x] [Static initialization](https://en.cppreference.com/w/cpp/language/initialization#Static_initialization) | ||
- [x] [Constant initialization](https://en.cppreference.com/w/cpp/language/constant_initialization) [(tested)](./test/src/cpp/lang/initialization.cpp#L15) | ||
- [x] [Zero initialization](https://en.cppreference.com/w/cpp/language/zero_initialization) [(tested)](./test/src/cpp/lang/initialization.cpp#L44) | ||
- [x] [Dynamic initialization](https://en.cppreference.com/w/cpp/language/initialization#Dynamic_initialization) [(tested)](./test/src/cpp/lang/initialization.cpp#L71) | ||
- [x] [Constant initialization](https://en.cppreference.com/w/cpp/language/constant_initialization) [(tested)](./test/src/cpp/lang/initialization.cpp#L13) | ||
- [x] [Zero initialization](https://en.cppreference.com/w/cpp/language/zero_initialization) [(tested)](./test/src/cpp/lang/initialization.cpp#L41) | ||
- [x] [Dynamic initialization](https://en.cppreference.com/w/cpp/language/initialization#Dynamic_initialization) [(tested)](./test/src/cpp/lang/initialization.cpp#L65) | ||
- [ ] [Static local variables](https://en.cppreference.com/w/cpp/language/storage_duration#Static_local_variables) | ||
- [ ] thread_local | ||
- [ ] static | ||
- [Exceptions](https://en.cppreference.com/w/cpp/language/exceptions) | ||
- [x] [throw](https://en.cppreference.com/w/cpp/language/throw) [(tested)](./test/src/cpp/lang/exceptions.cpp#L58) | ||
- [x] [try-block](https://en.cppreference.com/w/cpp/language/try_catch) [(tested)](./test/src/cpp/lang/exceptions.cpp#L77) | ||
- [x] [Function-try-block](https://en.cppreference.com/w/cpp/language/function-try-block) [(tested)](./test/src/cpp/lang/exceptions.cpp#L125) | ||
- [x] [throw](https://en.cppreference.com/w/cpp/language/throw) [(tested)](./test/src/cpp/lang/exceptions.cpp#L42) | ||
- [x] [try-block](https://en.cppreference.com/w/cpp/language/try_catch) [(tested)](./test/src/cpp/lang/exceptions.cpp#L60) | ||
- [x] [Function-try-block](https://en.cppreference.com/w/cpp/language/function-try-block) [(tested)](./test/src/cpp/lang/exceptions.cpp#L98) | ||
|
||
#### STL | ||
|
||
- [x] [std::chrono](https://en.cppreference.com/w/cpp/chrono) [(tested)](./test/src/cpp/stl/chrono.cpp#L15) | ||
- [x] [std::thread](https://en.cppreference.com/w/cpp/thread) [(tested)](./test/src/cpp/stl/thread.cpp#L39) | ||
- [x] [std::condition_variable](https://en.cppreference.com/w/cpp/thread/condition_variable) [(tested)](./test/src/cpp/stl/thread.cpp#L39) | ||
- [x] [std::mutex](https://en.cppreference.com/w/cpp/thread/mutex) [(tested)](./test/src/cpp/stl/thread.cpp#L86) | ||
- [x] [std::shared_mutex](https://en.cppreference.com/w/cpp/thread/shared_mutex) [(tested)](./test/src/cpp/stl/thread.cpp#L135) | ||
- [x] [std::future](https://en.cppreference.com/w/cpp/thread/future) [(tested)](./test/src/cpp/stl/thread.cpp#L164) | ||
- [x] [std::promise](https://en.cppreference.com/w/cpp/thread/promise) [(tested)](./test/src/cpp/stl/thread.cpp#L212) | ||
- [x] [std::packaged_task](https://en.cppreference.com/w/cpp/thread/packaged_task) [(tested)](./test/src/cpp/stl/thread.cpp#L280) | ||
- [x] [std::thread](https://en.cppreference.com/w/cpp/thread) [(tested)](./test/src/cpp/stl/thread.cpp#L35) | ||
- [x] [std::condition_variable](https://en.cppreference.com/w/cpp/thread/condition_variable) [(tested)](./test/src/cpp/stl/thread.cpp#L35) | ||
- [x] [std::mutex](https://en.cppreference.com/w/cpp/thread/mutex) [(tested)](./test/src/cpp/stl/thread.cpp#L81) | ||
- [x] [std::shared_mutex](https://en.cppreference.com/w/cpp/thread/shared_mutex) [(tested)](./test/src/cpp/stl/thread.cpp#L129) | ||
- [x] [std::future](https://en.cppreference.com/w/cpp/thread/future) [(tested)](./test/src/cpp/stl/thread.cpp#L157) | ||
- [x] [std::promise](https://en.cppreference.com/w/cpp/thread/promise) [(tested)](./test/src/cpp/stl/thread.cpp#L203) | ||
- [x] [std::packaged_task](https://en.cppreference.com/w/cpp/thread/packaged_task) [(tested)](./test/src/cpp/stl/thread.cpp#L267) | ||
- [x] [std::cin](https://en.cppreference.com/w/cpp/io/cin) | ||
- [x] [std::clog](https://en.cppreference.com/w/cpp/io/clog) | ||
- [x] [std::cerr](https://en.cppreference.com/w/cpp/io/cerr) | ||
|
@@ -241,7 +241,7 @@ project(crtsys_test LANGUAGES C) | |
include(cmake/CPM.cmake) | ||
set(CRTSYS_NTL_MAIN ON) # use ntl::main | ||
CPMAddPackage("gh:ntoskrnl7/[email protected].0") | ||
CPMAddPackage("gh:ntoskrnl7/[email protected].2") | ||
include(${crtsys_SOURCE_DIR}/cmake/CrtSys.cmake) | ||
# add driver | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/*++ | ||
|
||
Copyright (c) CrtSys Authors. All rights reserved. | ||
|
||
Module Name: | ||
|
||
version.h | ||
|
||
Abstract: | ||
|
||
This module defines the version preprocessor. | ||
|
||
Author: | ||
|
||
Jung Kwang Lee ([email protected]) | ||
|
||
Environment: | ||
|
||
Kernel mode | ||
|
||
--*/ | ||
#pragma once | ||
|
||
#ifndef _CRTSYS_VERSION_H_ | ||
#define _CRTSYS_VERSION_H_ | ||
|
||
#define CRTSYS_VERSION_MAJOR 0 | ||
#define CRTSYS_VERSION_MINOR 1 | ||
#define CRTSYS_VERSION_PATCH 2 | ||
|
||
#endif // _CRTSYS_VERSION_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,127 @@ | ||
// clang-format off | ||
|
||
#pragma once | ||
|
||
#undef _CTYPE_DISABLE_MACROS | ||
#include <ctype.h> | ||
|
||
#include <windows.h> | ||
|
||
#pragma warning(disable : 4201) | ||
#include <WinUser.h> | ||
|
||
EXTERN_C _ACRTIMP const unsigned short *__cdecl __pctype_func(void); | ||
EXTERN_C _ACRTIMP const wctype_t *__cdecl __pwctype_func(void); | ||
|
||
#define WINBASEAPI | ||
EXTERN_C | ||
|
||
EXTERN_C_START | ||
|
||
|
||
|
||
// crt/src/stl/xdateord.cpp | ||
WINBASEAPI | ||
int WINAPI GetLocaleInfoEx(_In_opt_ LPCWSTR lpLocaleName, _In_ LCTYPE LCType, | ||
_Out_writes_to_opt_(cchData, return ) | ||
LPWSTR lpLCData, | ||
_In_ int cchData); | ||
|
||
EXTERN_C | ||
|
||
|
||
// crt\src\stl\xgetwctype.cpp | ||
WINBASEAPI | ||
BOOL WINAPI GetStringTypeW(_In_ DWORD dwInfoType, | ||
_In_NLS_string_(cchSrc) LPCWCH lpSrcStr, | ||
_In_ int cchSrc, _Out_ LPWORD lpCharType); | ||
_In_ int cchSrc, _Out_ LPWORD lpCharType); | ||
|
||
|
||
|
||
// ucrt/internal/winapi_thunks.cpp | ||
WINBASEAPI | ||
int | ||
WINAPI | ||
GetLocaleInfoW( | ||
_In_ LCID Locale, | ||
_In_ LCTYPE LCType, | ||
_Out_writes_opt_(cchData) LPWSTR lpLCData, | ||
_In_ int cchData); | ||
|
||
|
||
|
||
// ucrt/internal/winapi_thunks.cpp | ||
WINBASEAPI | ||
int | ||
WINAPI | ||
GetDateFormatW( | ||
_In_ LCID Locale, | ||
_In_ DWORD dwFlags, | ||
_In_opt_ CONST SYSTEMTIME* lpDate, | ||
_In_opt_ LPCWSTR lpFormat, | ||
_Out_writes_opt_(cchDate) LPWSTR lpDateStr, | ||
_In_ int cchDate | ||
); | ||
|
||
|
||
|
||
// ucrt/internal/winapi_thunks.cpp | ||
WINBASEAPI | ||
int | ||
WINAPI | ||
GetTimeFormatW( | ||
_In_ LCID Locale, | ||
_In_ DWORD dwFlags, | ||
_In_opt_ CONST SYSTEMTIME* lpTime, | ||
_In_opt_ LPCWSTR lpFormat, | ||
_Out_writes_opt_(cchTime) LPWSTR lpTimeStr, | ||
_In_ int cchTime | ||
); | ||
|
||
|
||
|
||
// ucrt\locale\getqloc_downlevel.cpp | ||
typedef BOOL (CALLBACK* LOCALE_ENUMPROCW)(LPWSTR); // DEPRECATED: please use LOCALE_ENUMPROCEX | ||
|
||
WINBASEAPI | ||
BOOL | ||
WINAPI | ||
EnumSystemLocalesW( | ||
_In_ LOCALE_ENUMPROCW lpLocaleEnumProc, | ||
_In_ DWORD dwFlags); | ||
|
||
|
||
|
||
// ucrt/inc/corecrt_internal.h | ||
typedef BOOL (CALLBACK* LOCALE_ENUMPROCEX)(LPWSTR, DWORD, LPARAM); | ||
|
||
// ucrt/internal/winapi_thunks.cpp | ||
WINBASEAPI | ||
BOOL | ||
WINAPI | ||
EnumSystemLocalesEx( | ||
_In_ LOCALE_ENUMPROCEX lpLocaleEnumProcEx, | ||
_In_ DWORD dwFlags, | ||
_In_ LPARAM lParam, | ||
_In_opt_ LPVOID lpReserved | ||
); | ||
|
||
|
||
|
||
// ucrt/inc/corecrt_internal.h | ||
WINBASEAPI | ||
BOOL | ||
WINAPI | ||
FindClose( | ||
_Inout_ HANDLE hFindFile | ||
); | ||
|
||
// ucrt\inc\corecrt_internal_lowio.h | ||
typedef struct INPUT_RECORD *PINPUT_RECORD; | ||
|
||
|
||
|
||
// ucrt\startup\thread.cpp | ||
WINBASEAPI | ||
DWORD | ||
WINAPI | ||
ResumeThread( | ||
_In_ HANDLE hThread | ||
); | ||
|
||
EXTERN_C_END |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.