-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8313396: Portable implementation of FORBID_C_FUNCTION and ALLOW_C_FUNCTION #22890
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
Changes from 5 commits
993d465
e2a6324
46c098a
385c0b4
19d5162
08f2d34
77a8017
c478bda
b774f14
4dff1e4
000aca9
97a56ae
785b2cf
6f082c2
6d49abb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| /* | ||
| * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. | ||
| * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. | ||
| * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| * | ||
| * This code is free software; you can redistribute it and/or modify it | ||
|
|
@@ -31,7 +31,7 @@ | |
| // Provide wrappers for some functions otherwise forbidden from use in HotSpot. | ||
| // See forbiddenFunctions.hpp for details. | ||
|
|
||
| namespace permit_forbidden_functions { | ||
| namespace permit_forbidden_function { | ||
| BEGIN_ALLOW_FORBIDDEN_FUNCTIONS | ||
|
|
||
| // Used by the Windows implementation of os::realpath. | ||
|
|
@@ -40,6 +40,6 @@ inline char* _fullpath(char* absPath, const char* relPath, size_t maxLength) { | |
| } | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we forbid the non Standard _snprintf too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I'll add that. We should also technically be forbidding snprintf in favor of os::snprintf, but the difference |
||
| END_ALLOW_FORBIDDEN_FUNCTIONS | ||
| } // namespace permit_forbidden_functions | ||
| } // namespace permit_forbidden_function | ||
|
|
||
| #endif // OS_WINDOWS_PERMITFORBIDDENFUNCTIONS_WINDOWS_HPP | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that fclose was never forbidden, so the ALLOW_C_FUNCTION was not needed.