utimens: cache whether utimensat syscall works
[pspp] / lib / spawni.c
index 0d0d418cb7f4b0529e95510abb5272bd7dcaea7d..af41682578cde7a989f86d52e0fe21532eea2ab4 100644 (file)
@@ -1,5 +1,5 @@
 /* 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 _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* 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
@@ -133,6 +149,10 @@ __spawni (pid_t *pid, const char *file,
   /* Do this once.  */
   short int flags = attrp == NULL ? 0 : attrp->_flags;
 
+  /* Avoid gcc warning
+       "variable 'flags' might be clobbered by 'longjmp' or 'vfork'"  */
+  (void) &flags;
+
   /* Generate the new process.  */
 #if HAVE_VFORK
   if ((flags & POSIX_SPAWN_USEVFORK) != 0
@@ -350,3 +370,5 @@ __spawni (pid_t *pid, const char *file,
   /* Return with an error.  */
   _exit (SPAWN_ERROR);
 }
+
+#endif