-
Notifications
You must be signed in to change notification settings - Fork 397
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
Clean up c-style formatting #3599
Conversation
8ac4fcc
to
28c1d1a
Compare
@genie-omr build all |
@@ -21,6 +21,7 @@ | |||
|
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.
Copyright date needs to be updated.
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.
OK I might wait until CI passes, then push an amended commit that updates the copyrights, if that's OK?
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.
Sure, although the zos machines are down so it might be a while before that job passes.
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.
Fixed.
This PR adds a new header, omrformatconsts.h. This header provides platform-independent format specifiers for the following data types: - int8_t / uint8_t - int16_t / uint16_t - int32_t / uint32_t - int64 / uint64_t - size_t - intptr_t / uintptr_t - ptrdiff_t The following formats are provided in this PR: - x: unsigned hexadecimal format - u: unsigned decimal format - d: signed decimal format Normally, there are either special macros defined by the C library, or special format characters in the case of size_t / ptrdiff_t. Unfortunately, because of poor standards compliance across our compilers, these aren't universally available. This PR defines portable string constants that can be used to contruct correct format strings. The names of the constants follow the convention of those normally provided by stdint.h. Signed-off-by: Robert Young <rwy0717@gmail.com>
Signed-off-by: Robert Young <rwy0717@gmail.com>
Signed-off-by: Robert Young <rwy0717@gmail.com>
Signed-off-by: Robert Young <rwy0717@gmail.com>
The PID is, wierdly enough, a 32bit signed integer on most platforms. Extend the PID type to a signed long, just in case there's a platform that actually uses 64 bit pids. Signed-off-by: Robert Young <rwy0717@gmail.com>
Signed-off-by: Robert Young <rwy0717@gmail.com>
28c1d1a
to
f38f459
Compare
|
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.
LGTM 👍
@genie-omr build all |
@genie-omr build zos |
Alright, the zos build is failing because of infrastructural problems. These changes are not z specific and all the other builds (including zlinux) passed. Merging. |
Introduce a new header,
omrformatconsts.h
, which defines a set of portable constants for building format strings for special integral types. This header provides platform-independent format specifiers for the following data types:The following formats are provided in this PR:
(notably missing: i)
Normally, there are either special macros defined by the C library, or
special format characters in the case of size_t / ptrdiff_t.
Unfortunately, because of poor standards compliance across our
compilers, these aren't universally available.
The names of the constants follow the convention of those normally
provided by stdint.h.
As well, I've gone through and fixed a number of locations with format strings that generate errors.