fix: propagate M4 env variable to flex subprocess

From: "J(dot) Javier Maestro" <jjmaestro(at)ieee(dot)org>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: andres(at)anarazel(dot)de
Subject: fix: propagate M4 env variable to flex subprocess
Date: 2025-05-13 03:14:59
Message-ID: CABvji06GUpmrTqqiCr6_F9vRL2-JUSVAh8ChgWa6k47FUCvYmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

I was trying to build Postgres with Meson specifying the binaries of the
tools such as bison, flex and m4. I found that the m4 binary wasn't being
used by flex, and digging into this led me to the pgflex wrapper.

The pgflex wrapper runs flex with an explicit environment, so it doesn't
inherit environment variables from the parent process. However, flex can
use the M4 env variable and/or the PATH (via execvp) to find the m4 macro
processor.

Thus, since flex honors the M4 env variable, it should be propagated to the
subprocess environment if it's set in the parent environment. This patch
fixes it.

Let me know what you think!

Regards,

Javier

Attachment Content-Type Size
fix-propagate-M4-env-variable-to-flex-subprocess.patch application/octet-stream 1.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2025-05-13 03:26:32 make VALIDATE domain constraint lock on related relations as ShareUpdateExclusiveLock
Previous Message Alena Rybakina 2025-05-13 01:47:33 Re: Useless LEFT JOIN breaks MIN/MAX optimization