Skip to content

Conversation

khwilliamson
Copy link
Contributor

  • This set of changes does not require a perldelta entry.

@bulk88
Copy link
Contributor

bulk88 commented Aug 25, 2025

&& ! defined(__MVS__) is this the official name of Z/OS platform inside the C preprocessor?

And is it the 1 and only way to detect the Z/OS platform?

Does IBM offer any software alternatives to MVS OS >= year 2010 that customers can request/install/run?

My very tiny concern is would there be "multiple toolchains" for MVS OS or Z/OS HW? or multiple competing "POSIX subsystem" products for Z/OS HW, or multiple competing "POSIX subsystem" for 1 MVS OS release?

If __MVS__ is universal and forever then this PR looks good.

If Perl on Z/OS has multiple "POSIX emulation layers" to target, or IBM or IBM's SAS/VAR contractor greenfield rewrites their POSIX emulation layer every 6-9 years out of boredom, or financial reasons, a #define MVS_PERL should be invented vs editing all the __MVS__ tokens in core and on CPAN 6-10 years from now, when IBM forklift replaces its POSIX VAR contractor, or releases a POSIX emulation layer 2.0 new + improved + not compatible with your legacy code product.

@tonycoz
Copy link
Contributor

tonycoz commented Aug 27, 2025

Shmat_t is defined by config.h based on the shmattype configuration variable, which Configure probes for.

What values is Configure finding for the shmat keys (linux values here):

$ grep shmat config.sh
d_shmat='define'
d_shmatprototype='define'
shmattype='void *'

I suspect we need to either improve the d_shmatprototype probe or set it to define in the hints file, but the change given here seems like the wrong approach.

@khwilliamson
Copy link
Contributor Author

This patch was written by IBM; I was doing them a favor by making a p.r. out of it.

That fact indicates

  1. __MVS__ is very likely to be the way to go if that approach were to be taken
  2. They would likely be unfamiliar with Configure and its options. I didn't know myself there was a probe for it.

I agree the Configure/hints is a better approach. I'll ask what the problem is. There is also an issue with Socket passing Configure but not our tests that I had started looking into.

@Leont
Copy link
Contributor

Leont commented Aug 27, 2025

Yeah I'd trust IBM to write a patch that works for their OS, but I agree with Tony that a hints patch is a better approach.

@khwilliamson
Copy link
Contributor Author

I have investigated this further, and yes this is the wrong approach. It turns out that Configure runs cpp on sys/shm.h, and that is generating garbage output. Configure then greps for the prototype and doesn't find it. There are other places in Configure that also run cpp. My guess is that this is an issue in those places too.

@khwilliamson
Copy link
Contributor Author

Configure is broken, and fixing it is the proper approach. #23682 is what will fix this

@khwilliamson khwilliamson deleted the Shmat_t branch September 4, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants