Skip to content

Replace isdigit with OMR_ISDIGIT #21555

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Deigue
Copy link
Contributor

@Deigue Deigue commented Apr 2, 2025

In order to support removal of a2e header redefinitions for
isdigit() method, the usage of isdigit() are replaced with
OMR_ISDIGIT() to properly recognize ascii digit literals.
This is done by conditionally using __isdigit_a() on z/OS
platforms.

Main PR driving this change, that needs to be merged alongside: eclipse-omr/omr#7413

(project tag: Open XL z/OS compiler support)

@@ -698,14 +700,14 @@ parseROMQuery(J9Pool *allocator, const char *query)

if ('[' == *query) {
query++;
if (!isdigit(*query)) {
if (!__isdigit_a(*query)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a function on z/OS? The code is common to all platforms and needs to compile on all of them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should instead use OMR_ISDIGIT() once eclipse-omr/omr#7711 is merged.

@pshipton
Copy link
Member

pshipton commented Apr 2, 2025

@keithc-ca fyi

@keithc-ca
Copy link
Contributor

I proposed a way forward in eclipse-omr/omr#7711 (comment).

@Deigue Deigue changed the title Replace isdigit with __is_digit_a Replace isdigit with OMR_ISDIGIT Apr 14, 2025
@Deigue Deigue marked this pull request as draft April 14, 2025 18:02
@Deigue Deigue marked this pull request as ready for review April 14, 2025 19:24
@Deigue Deigue marked this pull request as draft April 14, 2025 19:25
In order to support removal of a2e header redefinitions for
isdigit() method, the usage of isdigit() are replaced with
OMR_ISDIGIT() to properly recognize ascii digit literals.
This is done by conditionally using __isdigit_a() on z/OS
platforms.

Signed-off-by: Gaurav Chaudhari <[email protected]>
Copy link
Contributor

@keithc-ca keithc-ca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are additional uses of isdigit() in these files:

  • runtime/compiler/il/J9DataTypes.cpp
  • runtime/redirector/redirector.c
  • runtime/util_core/j9argscan.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants