[PATCH] libgfortran: Don't quote ENV_PPID and ENV_BASE in caf/shmem/shared_memory.c

John David Anglin <[email protected]> Fri, 12 Jun 2026 14:41:37 -0400
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <[email protected]>
Tested on hppa64-hp-hpux11.11.

Okay?

Dave
---

libgfortran: Don't quote ENV_PPID and ENV_BASE in caf/shmem/shared_memory.c

ENV_PPID and ENV_BASE are declared previously as strings and they
don't need to be quoted.

2026-06-12  John David Anglin  <[email protected]>

libgfortran/ChangeLog:

	* caf/shmem/shared_memory.c (shared_memory_set_env): Don't
	quote ENV_PPID.
	(shared_memory_init) Don't quote ENV_BASE.

diff --git a/libgfortran/caf/shmem/shared_memory.c b/libgfortran/caf/shmem/shared_memory.c
index a42b0963697..6cf0c80eeb6 100644
--- a/libgfortran/caf/shmem/shared_memory.c
+++ b/libgfortran/caf/shmem/shared_memory.c
@@ -75,7 +75,7 @@ shared_memory_set_env (pid_t pid)
   int res;
 
   /* HP-UX / Legacy Fallback using putenv */
-  res = snprintf (buffer, 28, "%s=%d", "ENV_PPID", (int)pid);
+  res = snprintf (buffer, 28, "%s=%d", ENV_PPID, (int)pid);
   if (res != -1)
     putenv (buffer);
 #endif
@@ -257,7 +268,7 @@ shared_memory_init (shared_memory_act *mem, size_t size)
       int res;
 
       /* HP-UX / Legacy Fallback using putenv */
-      res = snprintf (buffer, 28, "%s=%p", "ENV_BASE", mem->glbl.base);
+      res = snprintf (buffer, 28, "%s=%p", ENV_BASE, mem->glbl.base);
       if (res != -1)
 	putenv (buffer);
 #endif
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEnRzl+6e9+DTrEhyEXb/Nrl8ZTfEFAmosUtgACgkQXb/Nrl8Z
TfHxmQ/+MSECMNgTEF2LkKN87F2WqxpqjqaOZVwGmhdd1kqJ6/ad43OxUjx+tYj+
2On3EeIAfi1D3Yg08LVerjKbiZtCoVMMMdXcaZ48uTJqOQsRpvNENuUisz8WULmW
XLg0f+1o3OsNo0sXGCSxzMsKxyk0EawrI8SUFPNP8/F8DJAyoMnIWCoTuu2FXN9q
RenRnn7Wy7K8HKp9KUNfh+Mwbap3D1mwIhWabCeceulqXjjwZ0EikMNaTMtCPMw8
sRMOqbw20CNVUc+2j40wP17E79ahQ3/S1W3iravwlTy7uIzlLuT2w38C2gUcTwhn
AU/UJpB6tYbrVpjwrDKsg/dyeEd3tUFlLPT+bi4BU2e32zgrJSP7z3oQa1WPbuTT
kIO+6bwOY5BgfV9Cw2jmjYxFhD37sVWM4Jb1mms3FZjRQ5vD1xhP9wgPEhw9/ZF5
xDbd5tsHP1XFoxujE4wreQ/YaCLMPmzuh0jh48gunF3kVYITmBE6Jr1/KARBmrjE
GZNwqQGwIZzaPRdIS7oGCWNhqKyJvVIaxlsOJUJhKSi3AulUrC01MeKVEisdIVvp
dmCR80ac31KIekHNbI+fWwQn4bv+PCsk5U9Mrb4qYYKtd/UW/NNtxKC09u/T/bkI
yH94lf8WDsWsqW3pg8IELwuuDjyWfIkoa7hvzObXYZ06QIa3xtA=
=uQgp
-----END PGP SIGNATURE-----