diff --git a/configure b/configure index 6997375a351..8d6d227b0e7 100755 --- a/configure +++ b/configure @@ -13066,7 +13066,6 @@ for ac_func in \ sigaltstack \ sigprocmask \ snprintf \ - spawnvp \ statfs \ statvfs \ strcasecmp \ diff --git a/configure.ac b/configure.ac index 080e961b4ae..084a2d6c1dd 100644 --- a/configure.ac +++ b/configure.ac @@ -2011,7 +2011,6 @@ AC_CHECK_FUNCS(\ sigaltstack \ sigprocmask \ snprintf \ - spawnvp \ statfs \ statvfs \ strcasecmp \ diff --git a/include/config.h.in b/include/config.h.in index 2f305493d19..0a1d78a581b 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -734,9 +734,6 @@ /* Define to 1 if you have the `socketpair' function. */ #undef HAVE_SOCKETPAIR -/* Define to 1 if you have the `spawnvp' function. */ -#undef HAVE_SPAWNVP - /* Define to 1 if the system has the type `ssize_t'. */ #undef HAVE_SSIZE_T diff --git a/include/wine/port.h b/include/wine/port.h index d6904c0f685..76a0b3e181e 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -353,8 +353,8 @@ extern int mkstemps(char *template, int suffix_len); # define _P_NOWAITO 3 # define _P_DETACH 4 #endif -#ifndef HAVE_SPAWNVP -extern int spawnvp(int mode, const char *cmdname, const char * const argv[]); +#ifndef HAVE__SPAWNVP +extern int _spawnvp(int mode, const char *cmdname, const char * const argv[]); #endif /* Interlocked functions */ diff --git a/libs/port/spawn.c b/libs/port/spawn.c index 0cdc08cd7b0..97364e73dcb 100644 --- a/libs/port/spawn.c +++ b/libs/port/spawn.c @@ -21,6 +21,8 @@ #include "config.h" #include "wine/port.h" +#ifndef HAVE__SPAWNVP + #include #include #include @@ -32,10 +34,8 @@ # include #endif -#ifndef HAVE_SPAWNVP -int spawnvp(int mode, const char *cmdname, const char *const argv[]) +int _spawnvp(int mode, const char *cmdname, const char *const argv[]) { -#ifndef HAVE__SPAWNVP int pid, status, wret; if (mode == _P_OVERLAY) @@ -93,8 +93,6 @@ int spawnvp(int mode, const char *cmdname, const char *const argv[]) } return pid; -#else /* HAVE__SPAWNVP */ - return _spawnvp(mode, cmdname, argv); -#endif /* HAVE__SPAWNVP */ } -#endif /* HAVE_SPAWNVP */ + +#endif /* HAVE__SPAWNVP */ diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 4c8e599bb26..7cfa0d1a0b5 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -45,7 +45,7 @@ static BOOL start_screensaver( void ) if (using_root) { const char *argv[3] = { "xdg-screensaver", "activate", NULL }; - int pid = spawnvp( _P_DETACH, argv[0], argv ); + int pid = _spawnvp( _P_DETACH, argv[0], argv ); if (pid > 0) { WINE_TRACE( "started process %d\n", pid ); diff --git a/programs/winebrowser/main.c b/programs/winebrowser/main.c index ad46b206e7d..22f3a93827f 100644 --- a/programs/winebrowser/main.c +++ b/programs/winebrowser/main.c @@ -90,7 +90,7 @@ static int launch_app( WCHAR *candidates, const WCHAR *argv1 ) argv_new[1] = cmdline; argv_new[2] = NULL; - spawnvp( _P_OVERLAY, app, argv_new ); /* only returns on error */ + _spawnvp( _P_OVERLAY, app, argv_new ); /* only returns on error */ app = strtok( NULL, "," ); /* grab the next app */ } WINE_ERR( "could not find a suitable app to run\n" ); diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index c931363eba5..9c81ab87ede 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -3371,11 +3371,11 @@ static void RefreshFileTypeAssociations(void) argv[0] = "update-mime-database"; argv[1] = mime_dir; argv[2] = NULL; - spawnvp( _P_DETACH, argv[0], argv ); + _spawnvp( _P_DETACH, argv[0], argv ); argv[0] = "update-desktop-database"; argv[1] = applications_dir; - spawnvp( _P_DETACH, argv[0], argv ); + _spawnvp( _P_DETACH, argv[0], argv ); } end: diff --git a/programs/winevdm/winevdm.c b/programs/winevdm/winevdm.c index d297551bea8..b818d76e799 100644 --- a/programs/winevdm/winevdm.c +++ b/programs/winevdm/winevdm.c @@ -198,7 +198,7 @@ static void start_dosbox( const char *appname, const char *args ) args[1] = "-conf"; args[2] = config_file; args[3] = NULL; - ret = spawnvp( _P_WAIT, args[0], args ); + ret = _spawnvp( _P_WAIT, args[0], args ); } CloseHandle( file ); DeleteFileW( config ); diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index 40a9afe9fef..1c77e4143dd 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -268,7 +268,7 @@ void spawn( struct strarray *args ) for (i = 0; args->str[i]; i++) fprintf( stderr, "%s%c", args->str[i], args->str[i+1] ? ' ' : '\n' ); - if ((status = spawnvp( _P_WAIT, args->str[0], args->str ))) + if ((status = _spawnvp( _P_WAIT, args->str[0], args->str ))) { if (status > 0) fatal_error( "%s failed with status %u\n", args->str[0], status ); else fatal_perror( "winebuild" ); diff --git a/tools/winegcc/utils.c b/tools/winegcc/utils.c index 05b9a651b9e..75fb20bc5ff 100644 --- a/tools/winegcc/utils.c +++ b/tools/winegcc/utils.c @@ -334,7 +334,7 @@ void spawn(const strarray* prefix, const strarray* args, int ignore_errors) printf("\n"); } - if ((status = spawnvp( _P_WAIT, argv[0], argv)) && !ignore_errors) + if ((status = _spawnvp( _P_WAIT, argv[0], argv)) && !ignore_errors) { if (status > 0) error("%s failed\n", argv[0]); else perror("winegcc");