+2009-03-06 Eric Blake <ebb9@byu.net>
+ Bruno Haible <bruno@clisp.org>
+
+ * lib/spawni.c (__spawni) [WIN32_NATIVE]: Define as a stub.
+ * modules/posix_spawn-tests (configure.ac): Define POSIX_SPAWN_PORTED
+ condition.
+ (Makefile.am): Do nothing if POSIX_SPAWN_PORTED is false.
+ * modules/posix_spawnp-tests (configure.ac): Define POSIX_SPAWN_PORTED
+ condition.
+ (Makefile.am): Do nothing if POSIX_SPAWN_PORTED is false.
+
2009-03-06 Eric Blake <ebb9@byu.net>
* lib/execute.c (execute) [WIN32_NATIVE]: Cast arguments of spawnvpe,
/* Guts of POSIX spawn interface. Generic POSIX.1 version.
- Copyright (C) 2000-2005, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
#define SPAWN_ERROR 127
+#if defined _MSC_VER || defined __MINGW32__
+
+/* Native Woe32 API. */
+int
+__spawni (pid_t *pid, const char *file,
+ const posix_spawn_file_actions_t *file_actions,
+ const posix_spawnattr_t *attrp, char *const argv[],
+ char *const envp[], int use_path)
+{
+ /* Not yet implemented. */
+ return ENOSYS;
+}
+
+#else
+
+
/* The file is accessible but it is not an executable file. Invoke
the shell to interpret it as a script. */
static void
/* Return with an error. */
_exit (SPAWN_ERROR);
}
+
+#endif
sys_wait
configure.ac:
+AC_EGREP_CPP([notposix], [[
+#if defined _MSC_VER || defined __MINGW32__
+ notposix
+#endif
+ ]],
+ [posix_spawn_ported=no],
+ [posix_spawn_ported=yes])
+AM_CONDITIONAL([POSIX_SPAWN_PORTED], [test $posix_spawn_ported = yes])
Makefile.am:
+if POSIX_SPAWN_PORTED
TESTS += test-posix_spawn3
check_PROGRAMS += test-posix_spawn3
+endif
sys_wait
configure.ac:
+AC_EGREP_CPP([notposix], [[
+#if defined _MSC_VER || defined __MINGW32__
+ notposix
+#endif
+ ]],
+ [posix_spawn_ported=no],
+ [posix_spawn_ported=yes])
+AM_CONDITIONAL([POSIX_SPAWN_PORTED], [test $posix_spawn_ported = yes])
Makefile.am:
+if POSIX_SPAWN_PORTED
TESTS += test-posix_spawn1 test-posix_spawn2
check_PROGRAMS += test-posix_spawn1 test-posix_spawn2
cp $(srcdir)/test-posix_spawn2.in.sh $@-t
mv $@-t $@
MOSTLYCLEANFILES += test-posix_spawn2.sh test-posix_spawn2.sh-t
+endif