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

Remove printf implementation #81243

Merged
merged 6 commits into from
Jan 28, 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
1 change: 0 additions & 1 deletion src/coreclr/dlls/mscordac/mscordac_unixexports.src
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ nativeStringResourceTable_mscorrc
#PAL_Random
#PAL_malloc
#PAL_realloc
#PAL_printf
#PAL_qsort
#PAL_fprintf
#PAL__wcstoui64
Expand Down
5 changes: 3 additions & 2 deletions src/coreclr/inc/stresslog.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,9 @@ class StressLog {
Volatile<ThreadStressLog*> logs; // the list of logs for every thread.
uint64_t tickFrequency; // number of ticks per second
uint64_t startTimeStamp; // start time from when tick counter started
uint64_t threadsWithNoLog; // threads that didn't get a log
uint64_t reserved[15]; // for future expansion
uint32_t threadsWithNoLog; // threads that didn't get a log
uint32_t reserved1;
uint64_t reserved2[15]; // for future expansion
ModuleDesc modules[MAX_MODULES]; // descriptor of the modules images
uint8_t moduleImage[64*1024*1024];// copy of the module images described by modules field
};
Expand Down
12 changes: 5 additions & 7 deletions src/coreclr/pal/inc/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -3921,8 +3921,6 @@ PAL_GetCurrentThreadAffinitySet(SIZE_T size, UINT_PTR* data);
defines */
#ifndef PAL_STDCPP_COMPAT
#define exit PAL_exit
#define printf PAL_printf
#define vprintf PAL_vprintf
#define wcstod PAL_wcstod
#define wcstoul PAL_wcstoul
#define wcscat PAL_wcscat
Expand Down Expand Up @@ -3993,6 +3991,10 @@ PAL_GetCurrentThreadAffinitySet(SIZE_T size, UINT_PTR* data);
#define _mm_setcsr PAL__mm_setcsr
#endif // HOST_AMD64

// Forward declare functions that are in header files we can't include yet
int printf(const char *, ...);
int vprintf(const char *, va_list);

#endif // !PAL_STDCPP_COMPAT

#ifndef _CONST_RETURN
Expand Down Expand Up @@ -4069,14 +4071,13 @@ PALIMPORT int remove(const char*);
PALIMPORT DLLEXPORT errno_t __cdecl memcpy_s(void *, size_t, const void *, size_t) THROW_DECL;
PALIMPORT errno_t __cdecl memmove_s(void *, size_t, const void *, size_t);
PALIMPORT DLLEXPORT int __cdecl _stricmp(const char *, const char *);
PALIMPORT DLLEXPORT int __cdecl vsprintf_s(char *, size_t, const char *, va_list);
PALIMPORT char * __cdecl _gcvt_s(char *, int, double, int);
PALIMPORT int __cdecl __iscsym(int);
PALIMPORT DLLEXPORT int __cdecl _wcsicmp(const WCHAR *, const WCHAR*);
PALIMPORT int __cdecl _wcsnicmp(const WCHAR *, const WCHAR *, size_t);
PALIMPORT int __cdecl _vsnprintf(char *, size_t, const char *, va_list);
PALIMPORT DLLEXPORT int __cdecl _vsnprintf_s(char *, size_t, size_t, const char *, va_list);
PALIMPORT DLLEXPORT int __cdecl _snprintf_s(char *, size_t, size_t, const char *, ...);
PALIMPORT DLLEXPORT int __cdecl vsprintf_s(char *, size_t, const char *, va_list);
PALIMPORT DLLEXPORT int __cdecl sprintf_s(char *, size_t, const char *, ... );
PALIMPORT DLLEXPORT int __cdecl sscanf_s(const char *, const char *, ...);
PALIMPORT DLLEXPORT errno_t __cdecl _itow_s(int, WCHAR *, size_t, int);
Expand Down Expand Up @@ -4342,9 +4343,6 @@ PALIMPORT PAL_FILE * __cdecl _wfopen(const WCHAR *, const WCHAR *);
PALIMPORT int __cdecl rand(void);
PALIMPORT void __cdecl srand(unsigned int);

PALIMPORT DLLEXPORT int __cdecl printf(const char *, ...);
PALIMPORT int __cdecl vprintf(const char *, va_list);

#ifdef _MSC_VER
#define PAL_get_caller _MSC_VER
#else
Expand Down
5 changes: 0 additions & 5 deletions src/coreclr/pal/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ set(SOURCES
cruntime/malloc.cpp
cruntime/math.cpp
cruntime/misc.cpp
cruntime/printf.cpp
cruntime/printfcpp.cpp
cruntime/silent_printf.cpp
cruntime/string.cpp
cruntime/stringtls.cpp
cruntime/thread.cpp
Expand Down Expand Up @@ -179,10 +177,7 @@ set(SOURCES
safecrt/memmove_s.cpp
safecrt/mbusafecrt.cpp
safecrt/safecrt_input_s.cpp
safecrt/safecrt_output_l.cpp
safecrt/safecrt_output_s.cpp
safecrt/safecrt_winput_s.cpp
safecrt/safecrt_woutput_s.cpp
safecrt/splitpath_s.cpp
safecrt/sprintf_s.cpp
safecrt/sscanf_s.cpp
Expand Down
249 changes: 0 additions & 249 deletions src/coreclr/pal/src/cruntime/printf.cpp

This file was deleted.

Loading