Commit 43ac582d authored by Alexandre Julliard's avatar Alexandre Julliard

libport: Rename spawnvp to _spawnvp to avoid the deprecated name.

parent c8ada1fc
......@@ -13066,7 +13066,6 @@ for ac_func in \
sigaltstack \
sigprocmask \
snprintf \
spawnvp \
statfs \
statvfs \
strcasecmp \
......
......@@ -2011,7 +2011,6 @@ AC_CHECK_FUNCS(\
sigaltstack \
sigprocmask \
snprintf \
spawnvp \
statfs \
statvfs \
strcasecmp \
......
......@@ -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
......
......@@ -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 */
......
......@@ -21,6 +21,8 @@
#include "config.h"
#include "wine/port.h"
#ifndef HAVE__SPAWNVP
#include <errno.h>
#include <signal.h>
#include <stdlib.h>
......@@ -32,10 +34,8 @@
# include <unistd.h>
#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 */
......@@ -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 );
......
......@@ -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" );
......
......@@ -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:
......
......@@ -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 );
......
......@@ -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" );
......
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment