libport: Rename spawnvp to _spawnvp to avoid the deprecated name.
This commit is contained in:
parent
c8ada1fc06
commit
43ac582d7d
|
@ -13066,7 +13066,6 @@ for ac_func in \
|
||||||
sigaltstack \
|
sigaltstack \
|
||||||
sigprocmask \
|
sigprocmask \
|
||||||
snprintf \
|
snprintf \
|
||||||
spawnvp \
|
|
||||||
statfs \
|
statfs \
|
||||||
statvfs \
|
statvfs \
|
||||||
strcasecmp \
|
strcasecmp \
|
||||||
|
|
|
@ -2011,7 +2011,6 @@ AC_CHECK_FUNCS(\
|
||||||
sigaltstack \
|
sigaltstack \
|
||||||
sigprocmask \
|
sigprocmask \
|
||||||
snprintf \
|
snprintf \
|
||||||
spawnvp \
|
|
||||||
statfs \
|
statfs \
|
||||||
statvfs \
|
statvfs \
|
||||||
strcasecmp \
|
strcasecmp \
|
||||||
|
|
|
@ -734,9 +734,6 @@
|
||||||
/* Define to 1 if you have the `socketpair' function. */
|
/* Define to 1 if you have the `socketpair' function. */
|
||||||
#undef HAVE_SOCKETPAIR
|
#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'. */
|
/* Define to 1 if the system has the type `ssize_t'. */
|
||||||
#undef HAVE_SSIZE_T
|
#undef HAVE_SSIZE_T
|
||||||
|
|
||||||
|
|
|
@ -353,8 +353,8 @@ extern int mkstemps(char *template, int suffix_len);
|
||||||
# define _P_NOWAITO 3
|
# define _P_NOWAITO 3
|
||||||
# define _P_DETACH 4
|
# define _P_DETACH 4
|
||||||
#endif
|
#endif
|
||||||
#ifndef HAVE_SPAWNVP
|
#ifndef HAVE__SPAWNVP
|
||||||
extern int spawnvp(int mode, const char *cmdname, const char * const argv[]);
|
extern int _spawnvp(int mode, const char *cmdname, const char * const argv[]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Interlocked functions */
|
/* Interlocked functions */
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "wine/port.h"
|
#include "wine/port.h"
|
||||||
|
|
||||||
|
#ifndef HAVE__SPAWNVP
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -32,10 +34,8 @@
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#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;
|
int pid, status, wret;
|
||||||
|
|
||||||
if (mode == _P_OVERLAY)
|
if (mode == _P_OVERLAY)
|
||||||
|
@ -93,8 +93,6 @@ int spawnvp(int mode, const char *cmdname, const char *const argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
return pid;
|
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)
|
if (using_root)
|
||||||
{
|
{
|
||||||
const char *argv[3] = { "xdg-screensaver", "activate", NULL };
|
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)
|
if (pid > 0)
|
||||||
{
|
{
|
||||||
WINE_TRACE( "started process %d\n", pid );
|
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[1] = cmdline;
|
||||||
argv_new[2] = NULL;
|
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 */
|
app = strtok( NULL, "," ); /* grab the next app */
|
||||||
}
|
}
|
||||||
WINE_ERR( "could not find a suitable app to run\n" );
|
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[0] = "update-mime-database";
|
||||||
argv[1] = mime_dir;
|
argv[1] = mime_dir;
|
||||||
argv[2] = NULL;
|
argv[2] = NULL;
|
||||||
spawnvp( _P_DETACH, argv[0], argv );
|
_spawnvp( _P_DETACH, argv[0], argv );
|
||||||
|
|
||||||
argv[0] = "update-desktop-database";
|
argv[0] = "update-desktop-database";
|
||||||
argv[1] = applications_dir;
|
argv[1] = applications_dir;
|
||||||
spawnvp( _P_DETACH, argv[0], argv );
|
_spawnvp( _P_DETACH, argv[0], argv );
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
|
@ -198,7 +198,7 @@ static void start_dosbox( const char *appname, const char *args )
|
||||||
args[1] = "-conf";
|
args[1] = "-conf";
|
||||||
args[2] = config_file;
|
args[2] = config_file;
|
||||||
args[3] = NULL;
|
args[3] = NULL;
|
||||||
ret = spawnvp( _P_WAIT, args[0], args );
|
ret = _spawnvp( _P_WAIT, args[0], args );
|
||||||
}
|
}
|
||||||
CloseHandle( file );
|
CloseHandle( file );
|
||||||
DeleteFileW( config );
|
DeleteFileW( config );
|
||||||
|
|
|
@ -268,7 +268,7 @@ void spawn( struct strarray *args )
|
||||||
for (i = 0; args->str[i]; i++)
|
for (i = 0; args->str[i]; i++)
|
||||||
fprintf( stderr, "%s%c", args->str[i], args->str[i+1] ? ' ' : '\n' );
|
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 );
|
if (status > 0) fatal_error( "%s failed with status %u\n", args->str[0], status );
|
||||||
else fatal_perror( "winebuild" );
|
else fatal_perror( "winebuild" );
|
||||||
|
|
|
@ -334,7 +334,7 @@ void spawn(const strarray* prefix, const strarray* args, int ignore_errors)
|
||||||
printf("\n");
|
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]);
|
if (status > 0) error("%s failed\n", argv[0]);
|
||||||
else perror("winegcc");
|
else perror("winegcc");
|
||||||
|
|
Loading…
Reference in New Issue