mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8214976: Warn about uses of functions replaced for portability
Reviewed-by: dholmes, tschatzl, coleenp
This commit is contained in:
parent
024a240e1b
commit
04f02ac6b2
11 changed files with 153 additions and 27 deletions
|
@ -156,6 +156,19 @@ inline intptr_t p2i(const volatile void* p) {
|
|||
return (intptr_t) p;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Forbid the use of various C library functions.
|
||||
// Some of these have os:: replacements that should normally be used instead.
|
||||
// Others are considered security concerns, with preferred alternatives.
|
||||
|
||||
FORBID_C_FUNCTION(void exit(int), "use os::exit");
|
||||
FORBID_C_FUNCTION(void _exit(int), "use os::exit");
|
||||
FORBID_C_FUNCTION(char* strerror(int), "use os::strerror");
|
||||
FORBID_C_FUNCTION(char* strtok(char*, const char*), "use strtok_r");
|
||||
FORBID_C_FUNCTION(int vsprintf(char*, const char*, va_list), "use os::vsnprintf");
|
||||
FORBID_C_FUNCTION(int vsnprintf(char*, size_t, const char*, va_list), "use os::vsnprintf");
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Constants
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue