On 2025-08-05 11:18, David Boyce wrote: > My man page says: > > VERSIONS > The execvpe() function first appeared in glibc 2.11. > ... > The execvpe() function is a GNU extension.
Curiously ... In a fresh clone of the GNU Make git repo, searching only the materials that are in git (nothing generated), all the calls to execvpe are wrapped by #if MK_OS_ZOS that OP is trying to build for! There is a comment which gives a reason why execvpe cannot be used. If the environment argument contains a PATH, excevpe will not use that PATH for the searching; it will use whatever PATH is in its own environment. It seems to be used anyway on ZOS as part of some workaround. $ git grep -B 3 -A 3 execvpe src/job.c-# elif MK_OS_ZOS src/job.c- /* In z/OS we can't set environ in ASCII mode. */ src/job.c- environ = envp; src/job.c: execvpe(argv[0], argv, envp); src/job.c- src/job.c-# else src/job.c- src/job.c: /* Run the program. Don't use execvpe() as we want the search for argv[0] src/job.c: to use the new PATH, but execvpe() searches before resetting PATH. */ src/job.c- environ = envp; src/job.c- execvp (argv[0], argv); src/job.c- -- src/job.c- break; src/job.c-# elif MK_OS_ZOS src/job.c- /* In z/OS we can't set environ in ASCII mode. */ src/job.c: execvpe(shell, new_argv, envp); src/job.c-# else src/job.c- execvp (shell, new_argv); src/job.c-# endif