Using native spawnvp if possible
Pavel Roskin
proski at gnu.org
Tue Sep 23 17:59:30 CDT 2003
Hello!
I'm writing a script to compile some parts of Wine (including wrc) under
mingw. There is a little problem - mingw (as included with current
Cygwin) defines function spawnvp() differently:
_CRTIMP int __cdecl spawnvp (int, const char*, const char* const*);
Wine defines it as
extern int spawnvp(int mode, const char *cmdname, char *const argv[]);
Search for "spawnvp" on Google shows that we cannot just fix Wine's
definition to match mingw. QNX Neutrino used the same prototype as Wine:
http://www.qnx.com/developer/docs/qnx_6.1_docs/neutrino/lib_ref/s/spawnvp.html
I think the best approach would be to use spawnvp() as is it it's already
present in the C library. Following patch has been successfully tested on
Red Hat 9 and Cygwin+mingw.
ChangeLog:
include/wine/port.h, libs/port/spawn.c:
Don't redefine spawnvp() if it's present in the C library.
configure.ac:
Test for spawnvp().
Make sure to rerun autoconf and autoheader after applying the patch.
--
Regards,
Pavel Roskin
More information about the wine-patches
mailing list