mirror of
https://github.com/mirror/make.git
synced 2025-01-31 06:40:49 +08:00
* configure.ac: [SV 63070] Clean up the test program for posix_spawn.
This commit is contained in:
parent
8f49029561
commit
aa99e810a9
16
configure.ac
16
configure.ac
@ -369,20 +369,16 @@ AS_IF([test "$make_cv_posix_spawn" = yes],
|
|||||||
[make_cv_synchronous_posix_spawn],
|
[make_cv_synchronous_posix_spawn],
|
||||||
[make_cv_synchronous_posix_spawn=no
|
[make_cv_synchronous_posix_spawn=no
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
#include <errno.h>
|
||||||
#include <spawn.h>
|
#include <spawn.h>
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
int main () {
|
||||||
int main() {
|
char path[[]] = "./xxx-non-existent";
|
||||||
char* path = strdup("./non-existent");
|
char *argv[[]] = {path, 0};
|
||||||
char *argv[[2]];
|
return posix_spawn (0, path, 0, 0, argv, environ) == ENOENT ? 0 : 1;
|
||||||
argv[[0]] = path;
|
|
||||||
argv[[1]] = 0;
|
|
||||||
return posix_spawn(0, path, 0, 0, argv, environ);
|
|
||||||
}]])],
|
}]])],
|
||||||
[make_cv_synchronous_posix_spawn=no],
|
|
||||||
[make_cv_synchronous_posix_spawn=yes],
|
[make_cv_synchronous_posix_spawn=yes],
|
||||||
|
[make_cv_synchronous_posix_spawn=no],
|
||||||
[make_cv_synchronous_posix_spawn="no (cross-compiling)"])]))
|
[make_cv_synchronous_posix_spawn="no (cross-compiling)"])]))
|
||||||
|
|
||||||
AS_CASE([/$user_posix_spawn/$make_cv_posix_spawn/$make_cv_synchronous_posix_spawn/],
|
AS_CASE([/$user_posix_spawn/$make_cv_posix_spawn/$make_cv_synchronous_posix_spawn/],
|
||||||
|
Loading…
Reference in New Issue
Block a user