<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 6/10/25 10:15, Sachin T via
      Gnupg-devel wrote:</div>
    <blockquote type="cite"
cite="mid:CO1PR15MB50039E7CDDACD38D73A12DAF976AA@CO1PR15MB5003.namprd15.prod.outlook.com">
      <div class="WordSection1">
        <p class="MsoNormal"><o:p></o:p></p>
        <p class="MsoNormal"><o:p>[...]</o:p></p>
        <blockquote>3. On z/OS, environ is defined as a macro in
          <stdlib.h>, so it is temporarily redefined around the
          header inclusion to avoid conflicts.<br>
        </blockquote>
        [...]<br>
        <br>
        diff --git a/src/spawn-posix.c b/src/spawn-posix.c<o:p></o:p><br>
        index ac19761..2666862 100644<br>
        --- a/src/spawn-posix.c<br>
        +++ b/src/spawn-posix.c<br>
        @@ -27,8 +27,17 @@
        <p class="MsoNormal">#error This code is only used on POSIX<o:p></o:p><br>
          #endif<o:p></o:p><o:p><br>
          </o:p><br>
          +#if defined(__MVS__)<o:p></o:p><br>
          +#define environ environ_replace<o:p></o:p><br>
          +#endif<o:p></o:p><br>
          +<o:p></o:p><br>
          #include <stdio.h><o:p></o:p><br>
          #include <stdlib.h><o:p></o:p><br>
          +<o:p></o:p><br>
          +#if defined(__MVS__)<o:p></o:p><br>
          +#undef environ<o:p></o:p><br>
          +#endif<o:p></o:p><br>
          +<o:p></o:p><br>
          #include <stdint.h><o:p></o:p><br>
          #include <string.h><o:p></o:p><br>
          #include <errno.h><o:p></o:p></p>
      </div>
    </blockquote>
    <p>What exactly is this dance supposed to do?  The C preprocessor
      has no equivalent to M4's pushdef()/popdef().</p>
    <p>If environ is supposed to be a symbol, then there is no reason to
      define it before including stdlib.h and undefining it to get rid
      of the macro.  If the file does not use environ, then why care? 
      If environ's macro definition is actually important on z/OS, then
      this dance likely causes breakage.</p>
    <p>What is this trying to accomplish?</p>
    <p><br>
    </p>
    <p>-- Jacob<br>
    </p>
  </body>
</html>