Index: /vendor/glibc/2.3.2/misc/error.c
===================================================================
--- /vendor/glibc/2.3.2/misc/error.c	(revision 2381)
+++ /vendor/glibc/2.3.2/misc/error.c	(revision 2381)
@@ -0,0 +1,384 @@
+/* Error handler for noninteractive utilities
+   Copyright (C) 1990-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.  Its master source is NOT part of
+   the C library, however.  The master source lives in /gd/gnu/lib.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* Written by David MacKenzie <djm@gnu.ai.mit.edu>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <libintl.h>
+#ifdef _LIBC
+# include <wchar.h>
+# define mbsrtowcs __mbsrtowcs
+#endif
+
+#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
+# if __STDC__
+#  include <stdarg.h>
+#  define VA_START(args, lastarg) va_start(args, lastarg)
+# else
+#  include <varargs.h>
+#  define VA_START(args, lastarg) va_start(args)
+# endif
+#else
+# define va_alist a1, a2, a3, a4, a5, a6, a7, a8
+# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8;
+#endif
+
+#if STDC_HEADERS || _LIBC
+# include <stdlib.h>
+# include <string.h>
+#else
+void exit ();
+#endif
+
+#include "error.h"
+
+#ifndef _
+# define _(String) String
+#endif
+
+/* If NULL, error will flush stdout, then print on stderr the program
+   name, a colon and a space.  Otherwise, error will call this
+   function without parameters instead.  */
+void (*error_print_progname) (
+#if __STDC__ - 0
+			      void
+#endif
+			      );
+
+/* This variable is incremented each time `error' is called.  */
+unsigned int error_message_count;
+
+#ifdef _LIBC
+/* In the GNU C library, there is a predefined variable for this.  */
+
+# define program_name program_invocation_name
+# include <errno.h>
+# include <libio/libioP.h>
+
+/* In GNU libc we want do not want to use the common name `error' directly.
+   Instead make it a weak alias.  */
+extern void __error (int status, int errnum, const char *message, ...)
+     __attribute__ ((__format__ (__printf__, 3, 4)));
+extern void __error_at_line (int status, int errnum, const char *file_name,
+			     unsigned int line_number, const char *message,
+			     ...)
+     __attribute__ ((__format__ (__printf__, 5, 6)));;
+# define error __error
+# define error_at_line __error_at_line
+
+# include <libio/iolibio.h>
+# define fflush(s) INTUSE(_IO_fflush) (s)
+# undef putc
+# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
+
+#else /* not _LIBC */
+
+# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
+#  ifndef HAVE_DECL_STRERROR_R
+"this configure-time declaration test was not run"
+#  endif
+char *strerror_r ();
+# endif
+
+/* The calling program should define program_name and set it to the
+   name of the executing program.  */
+extern char *program_name;
+
+# if HAVE_STRERROR_R || defined strerror_r
+#  define __strerror_r strerror_r
+# else
+#  if HAVE_STRERROR
+#   ifndef HAVE_DECL_STRERROR
+"this configure-time declaration test was not run"
+#   endif
+#   if !HAVE_DECL_STRERROR
+char *strerror ();
+#   endif
+#  else
+static char *
+private_strerror (int errnum)
+{
+  extern char *sys_errlist[];
+  extern int sys_nerr;
+
+  if (errnum > 0 && errnum <= sys_nerr)
+    return _(sys_errlist[errnum]);
+  return _("Unknown system error");
+}
+#   define strerror private_strerror
+#  endif /* HAVE_STRERROR */
+# endif	/* HAVE_STRERROR_R || defined strerror_r */
+#endif	/* not _LIBC */
+
+static void
+print_errno_message (int errnum)
+{
+  char const *s;
+
+#if defined HAVE_STRERROR_R || _LIBC
+  char errbuf[1024];
+# if STRERROR_R_CHAR_P || _LIBC
+  s = __strerror_r (errnum, errbuf, sizeof errbuf);
+# else
+  if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
+    s = errbuf;
+  else
+    s = 0;
+# endif
+#else
+  s = strerror (errnum);
+#endif
+
+#if !_LIBC
+  if (! s)
+    s = _("Unknown system error");
+#endif
+
+#if _LIBC
+  if (_IO_fwide (stderr, 0) > 0)
+    {
+      __fwprintf (stderr, L": %s", s);
+      return;
+    }
+#endif
+
+  fprintf (stderr, ": %s", s);
+}
+
+#ifdef VA_START
+static void
+error_tail (int status, int errnum, const char *message, va_list args)
+{
+# if HAVE_VPRINTF || _LIBC
+#  if _LIBC
+  if (_IO_fwide (stderr, 0) > 0)
+    {
+#   define ALLOCA_LIMIT	2000
+      size_t len = strlen (message) + 1;
+      wchar_t *wmessage = NULL;
+      mbstate_t st;
+      size_t res;
+      const char *tmp;
+
+      do
+	{
+	  if (len < ALLOCA_LIMIT)
+	    wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
+	  else
+	    {
+	      if (wmessage != NULL && len / 2 < ALLOCA_LIMIT)
+		wmessage = NULL;
+
+	      wmessage = (wchar_t *) realloc (wmessage,
+					      len * sizeof (wchar_t));
+
+	      if (wmessage == NULL)
+		{
+		  fputws_unlocked (L"out of memory\n", stderr);
+		  return;
+		}
+	    }
+
+	  memset (&st, '\0', sizeof (st));
+	  tmp =message;
+	}
+      while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len);
+
+      if (res == (size_t) -1)
+	/* The string cannot be converted.  */
+	wmessage = (wchar_t *) L"???";
+
+      __vfwprintf (stderr, wmessage, args);
+    }
+  else
+#  endif
+    vfprintf (stderr, message, args);
+# else
+  _doprnt (message, args, stderr);
+# endif
+  va_end (args);
+
+  ++error_message_count;
+  if (errnum)
+    print_errno_message (errnum);
+# if _LIBC
+  if (_IO_fwide (stderr, 0) > 0)
+    putwc (L'\n', stderr);
+  else
+# endif
+    putc ('\n', stderr);
+  fflush (stderr);
+  if (status)
+    exit (status);
+}
+#endif
+
+
+/* Print the program name and error message MESSAGE, which is a printf-style
+   format string with optional args.
+   If ERRNUM is nonzero, print its corresponding system error message.
+   Exit with status STATUS if it is nonzero.  */
+/* VARARGS */
+void
+#if defined VA_START && __STDC__
+error (int status, int errnum, const char *message, ...)
+#else
+error (status, errnum, message, va_alist)
+     int status;
+     int errnum;
+     char *message;
+     va_dcl
+#endif
+{
+#ifdef VA_START
+  va_list args;
+#endif
+
+  fflush (stdout);
+#ifdef _LIBC
+  _IO_flockfile (stderr);
+#endif
+  if (error_print_progname)
+    (*error_print_progname) ();
+  else
+    {
+#if _LIBC
+      if (_IO_fwide (stderr, 0) > 0)
+	__fwprintf (stderr, L"%s: ", program_name);
+      else
+#endif
+	fprintf (stderr, "%s: ", program_name);
+    }
+
+#ifdef VA_START
+  VA_START (args, message);
+  error_tail (status, errnum, message, args);
+#else
+  fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
+
+  ++error_message_count;
+  if (errnum)
+    print_errno_message (errnum);
+  putc ('\n', stderr);
+  fflush (stderr);
+  if (status)
+    exit (status);
+#endif
+
+#ifdef _LIBC
+  _IO_funlockfile (stderr);
+#endif
+}
+
+
+/* Sometimes we want to have at most one error per line.  This
+   variable controls whether this mode is selected or not.  */
+int error_one_per_line;
+
+void
+#if defined VA_START && __STDC__
+error_at_line (int status, int errnum, const char *file_name,
+	       unsigned int line_number, const char *message, ...)
+#else
+error_at_line (status, errnum, file_name, line_number, message, va_alist)
+     int status;
+     int errnum;
+     const char *file_name;
+     unsigned int line_number;
+     char *message;
+     va_dcl
+#endif
+{
+#ifdef VA_START
+  va_list args;
+#endif
+
+  if (error_one_per_line)
+    {
+      static const char *old_file_name;
+      static unsigned int old_line_number;
+
+      if (old_line_number == line_number
+	  && (file_name == old_file_name
+	      || strcmp (old_file_name, file_name) == 0))
+	/* Simply return and print nothing.  */
+	return;
+
+      old_file_name = file_name;
+      old_line_number = line_number;
+    }
+
+  fflush (stdout);
+#ifdef _LIBC
+  _IO_flockfile (stderr);
+#endif
+  if (error_print_progname)
+    (*error_print_progname) ();
+  else
+    {
+#if _LIBC
+      if (_IO_fwide (stderr, 0) > 0)
+	__fwprintf (stderr, L"%s: ", program_name);
+      else
+#endif
+	fprintf (stderr, "%s:", program_name);
+    }
+
+  if (file_name != NULL)
+    {
+#if _LIBC
+      if (_IO_fwide (stderr, 0) > 0)
+	__fwprintf (stderr, L"%s:%d: ", file_name, line_number);
+      else
+#endif
+	fprintf (stderr, "%s:%d: ", file_name, line_number);
+    }
+
+#ifdef VA_START
+  VA_START (args, message);
+  error_tail (status, errnum, message, args);
+#else
+  fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
+
+  ++error_message_count;
+  if (errnum)
+    print_errno_message (errnum);
+  putc ('\n', stderr);
+  fflush (stderr);
+  if (status)
+    exit (status);
+#endif
+
+#ifdef _LIBC
+  _IO_funlockfile (stderr);
+#endif
+}
+
+#ifdef _LIBC
+/* Make the weak alias.  */
+# undef error
+# undef error_at_line
+weak_alias (__error, error)
+weak_alias (__error_at_line, error_at_line)
+#endif
Index: /vendor/glibc/2.3.2/misc/error.h
===================================================================
--- /vendor/glibc/2.3.2/misc/error.h	(revision 2381)
+++ /vendor/glibc/2.3.2/misc/error.h	(revision 2381)
@@ -0,0 +1,76 @@
+/* Declaration for error-reporting function
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.  Its master source is NOT part of
+   the C library, however.  The master source lives in /gd/gnu/lib.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _ERROR_H
+#define _ERROR_H 1
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later.  */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+#  define __attribute__(Spec) /* empty */
+# endif
+/* The __-protected variants of `format' and `printf' attributes
+   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+#  define __format__ format
+#  define __printf__ printf
+# endif
+#endif
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+#if defined (__STDC__) && __STDC__
+
+/* Print a message with `fprintf (stderr, FORMAT, ...)';
+   if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
+   If STATUS is nonzero, terminate the program with `exit (STATUS)'.  */
+
+extern void error (int status, int errnum, const char *format, ...)
+     __attribute__ ((__format__ (__printf__, 3, 4)));
+
+extern void error_at_line (int status, int errnum, const char *fname,
+			   unsigned int lineno, const char *format, ...)
+     __attribute__ ((__format__ (__printf__, 5, 6)));
+
+/* If NULL, error will flush stdout, then print on stderr the program
+   name, a colon and a space.  Otherwise, error will call this
+   function without parameters instead.  */
+extern void (*error_print_progname) (void);
+
+#else
+void error ();
+void error_at_line ();
+extern void (*error_print_progname) ();
+#endif
+
+/* This variable is incremented each time `error' is called.  */
+extern unsigned int error_message_count;
+
+/* Sometimes we want to have at most one error per line.  This
+   variable controls whether this mode is selected or not.  */
+extern int error_one_per_line;
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif /* error.h */
Index: /vendor/glibc/2.3.2/posix/spawn.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawn.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawn.c	(revision 2381)
@@ -0,0 +1,31 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include "spawn_int.h"
+
+/* Spawn a new process executing PATH with the attributes describes in *ATTRP.
+   Before running the process perform the actions described in FILE-ACTIONS. */
+int
+posix_spawn (pid_t *pid, const char *path,
+	     const posix_spawn_file_actions_t *file_actions,
+	     const posix_spawnattr_t *attrp, char *const argv[],
+	     char *const envp[])
+{
+  return __spawni (pid, path, file_actions, attrp, argv, envp, 0);
+}
Index: /vendor/glibc/2.3.2/posix/spawn_faction_addclose.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawn_faction_addclose.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawn_faction_addclose.c	(revision 2381)
@@ -0,0 +1,53 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <errno.h>
+#include <spawn.h>
+#include <unistd.h>
+
+#include "spawn_int.h"
+
+/* Add an action to FILE-ACTIONS which tells the implementation to call
+   `close' for the given file descriptor during the `spawn' call.  */
+int
+posix_spawn_file_actions_addclose (posix_spawn_file_actions_t *file_actions,
+				   int fd)
+{
+  int maxfd = __sysconf (_SC_OPEN_MAX);
+  struct __spawn_action *rec;
+
+  /* Test for the validity of the file descriptor.  */
+  if (fd < 0 || fd >= maxfd)
+    return EBADF;
+
+  /* Allocate more memory if needed.  */
+  if (file_actions->__used == file_actions->__allocated
+      && __posix_spawn_file_actions_realloc (file_actions) != 0)
+    /* This can only mean we ran out of memory.  */
+    return ENOMEM;
+
+  /* Add the new value.  */
+  rec = &file_actions->__actions[file_actions->__used];
+  rec->tag = spawn_do_close;
+  rec->action.open_action.fd = fd;
+
+  /* Account for the new entry.  */
+  ++file_actions->__used;
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawn_faction_adddup2.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawn_faction_adddup2.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawn_faction_adddup2.c	(revision 2381)
@@ -0,0 +1,54 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <errno.h>
+#include <spawn.h>
+#include <unistd.h>
+
+#include "spawn_int.h"
+
+/* Add an action to FILE-ACTIONS which tells the implementation to call
+   `dup2' for the given file descriptors during the `spawn' call.  */
+int
+posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *file_actions,
+				  int fd, int newfd)
+{
+  int maxfd = __sysconf (_SC_OPEN_MAX);
+  struct __spawn_action *rec;
+
+  /* Test for the validity of the file descriptor.  */
+  if (fd < 0 || newfd < 0 || fd >= maxfd || newfd >= maxfd)
+    return EBADF;
+
+  /* Allocate more memory if needed.  */
+  if (file_actions->__used == file_actions->__allocated
+      && __posix_spawn_file_actions_realloc (file_actions) != 0)
+    /* This can only mean we ran out of memory.  */
+    return ENOMEM;
+
+  /* Add the new value.  */
+  rec = &file_actions->__actions[file_actions->__used];
+  rec->tag = spawn_do_dup2;
+  rec->action.dup2_action.fd = fd;
+  rec->action.dup2_action.newfd = newfd;
+
+  /* Account for the new entry.  */
+  ++file_actions->__used;
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawn_faction_addopen.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawn_faction_addopen.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawn_faction_addopen.c	(revision 2381)
@@ -0,0 +1,57 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <errno.h>
+#include <spawn.h>
+#include <unistd.h>
+
+#include "spawn_int.h"
+
+/* Add an action to FILE-ACTIONS which tells the implementation to call
+   `open' for the given file during the `spawn' call.  */
+int
+posix_spawn_file_actions_addopen (posix_spawn_file_actions_t *file_actions,
+				  int fd, const char *path, int oflag,
+				  mode_t mode)
+{
+  int maxfd = __sysconf (_SC_OPEN_MAX);
+  struct __spawn_action *rec;
+
+  /* Test for the validity of the file descriptor.  */
+  if (fd < 0 || fd >= maxfd)
+    return EBADF;
+
+  /* Allocate more memory if needed.  */
+  if (file_actions->__used == file_actions->__allocated
+      && __posix_spawn_file_actions_realloc (file_actions) != 0)
+    /* This can only mean we ran out of memory.  */
+    return ENOMEM;
+
+  /* Add the new value.  */
+  rec = &file_actions->__actions[file_actions->__used];
+  rec->tag = spawn_do_open;
+  rec->action.open_action.fd = fd;
+  rec->action.open_action.path = path;
+  rec->action.open_action.oflag = oflag;
+  rec->action.open_action.mode = mode;
+
+  /* Account for the new entry.  */
+  ++file_actions->__used;
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawn_faction_destroy.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawn_faction_destroy.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawn_faction_destroy.c	(revision 2381)
@@ -0,0 +1,29 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include <stdlib.h>
+
+/* Initialize data structure for file attribute for `spawn' call.  */
+int
+posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *file_actions)
+{
+  /* Free the memory allocated.  */
+  free (file_actions->__actions);
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawn_faction_init.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawn_faction_init.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawn_faction_init.c	(revision 2381)
@@ -0,0 +1,54 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <errno.h>
+#include <spawn.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "spawn_int.h"
+
+
+/* Function used to increase the size of the allocated array.  This
+   function is called from the `add'-functions.  */
+int
+__posix_spawn_file_actions_realloc (posix_spawn_file_actions_t *file_actions)
+{
+  int newalloc = file_actions->__allocated + 8;
+  void *newmem = realloc (file_actions->__actions,
+			  newalloc * sizeof (struct __spawn_action));
+
+  if (newmem == NULL)
+    /* Not enough memory.  */
+    return ENOMEM;
+
+  file_actions->__actions = (struct __spawn_action *) newmem;
+  file_actions->__allocated = newalloc;
+
+  return 0;
+}
+
+
+/* Initialize data structure for file attribute for `spawn' call.  */
+int
+posix_spawn_file_actions_init (posix_spawn_file_actions_t *file_actions)
+{
+  /* Simply clear all the elements.  */
+  memset (file_actions, '\0', sizeof (*file_actions));
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawn_int.h
===================================================================
--- /vendor/glibc/2.3.2/posix/spawn_int.h	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawn_int.h	(revision 2381)
@@ -0,0 +1,38 @@
+/* Data structure to contain the action information.  */
+struct __spawn_action
+{
+  enum
+  {
+    spawn_do_close,
+    spawn_do_dup2,
+    spawn_do_open
+  } tag;
+
+  union
+  {
+    struct
+    {
+      int fd;
+    } close_action;
+    struct
+    {
+      int fd;
+      int newfd;
+    } dup2_action;
+    struct
+    {
+      int fd;
+      const char *path;
+      int oflag;
+      mode_t mode;
+    } open_action;
+  } action;
+};
+
+extern int __posix_spawn_file_actions_realloc (posix_spawn_file_actions_t *
+					       file_actions);
+
+extern int __spawni (pid_t *pid, const char *path,
+		     const posix_spawn_file_actions_t *file_actions,
+		     const posix_spawnattr_t *attrp, char *const argv[],
+		     char *const envp[], int use_path);
Index: /vendor/glibc/2.3.2/posix/spawnattr_destroy.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnattr_destroy.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnattr_destroy.c	(revision 2381)
@@ -0,0 +1,27 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+
+/* Initialize data structure for file attribute for `spawn' call.  */
+int
+posix_spawnattr_destroy (posix_spawnattr_t *attr)
+{
+  /* Nothing to do in the moment.  */
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawnattr_getdefault.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnattr_getdefault.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnattr_getdefault.c	(revision 2381)
@@ -0,0 +1,32 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include <string.h>
+
+/* Store signal mask for signals with default handling from ATTR in
+   SIGDEFAULT.  */
+int
+posix_spawnattr_getsigdefault (const posix_spawnattr_t *attr,
+			       sigset_t *sigdefault)
+{
+  /* Copy the sigset_t data to the user buffer.  */
+  memcpy (sigdefault, &attr->__sd, sizeof (sigset_t));
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawnattr_getflags.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnattr_getflags.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnattr_getflags.c	(revision 2381)
@@ -0,0 +1,30 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include <string.h>
+
+/* Get flag word from the attribute structure.  */
+int
+posix_spawnattr_getflags (const posix_spawnattr_t *attr, short int *flags)
+{
+  /* Copy the flag word.  */
+  *flags = attr->__flags;
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawnattr_getpgroup.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnattr_getpgroup.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnattr_getpgroup.c	(revision 2381)
@@ -0,0 +1,30 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include <string.h>
+
+/* Get process group ID from the attribute structure.  */
+int
+posix_spawnattr_getpgroup (const posix_spawnattr_t *attr, pid_t *pgroup)
+{
+  /* Copy the process group ID.  */
+  *pgroup = attr->__pgrp;
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawnattr_getschedparam.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnattr_getschedparam.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnattr_getschedparam.c	(revision 2381)
@@ -0,0 +1,31 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include <string.h>
+
+/* Get scheduling parameters from the attribute structure.  */
+int
+posix_spawnattr_getschedparam (const posix_spawnattr_t *attr,
+			       struct sched_param *schedparam)
+{
+  /* Copy the scheduling parameters.  */
+  memcpy (schedparam, &attr->__sp, sizeof (*attr));
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawnattr_getschedpolicy.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnattr_getschedpolicy.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnattr_getschedpolicy.c	(revision 2381)
@@ -0,0 +1,31 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include <string.h>
+
+/* Get scheduling policy from the attribute structure.  */
+int
+posix_spawnattr_getschedpolicy (const posix_spawnattr_t *attr,
+				int *schedpolicy)
+{
+  /* Copy the scheduling policy.  */
+  *schedpolicy = attr->__policy;
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawnattr_getsigmask.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnattr_getsigmask.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnattr_getsigmask.c	(revision 2381)
@@ -0,0 +1,31 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include <string.h>
+
+/* Store signal mask for the new process from ATTR in SIGMASK.  */
+int
+posix_spawnattr_getsigmask (const posix_spawnattr_t *attr,
+			    sigset_t *sigmask)
+{
+  /* Copy the sigset_t data to the user buffer.  */
+  memcpy (sigmask, &attr->__ss, sizeof (sigset_t));
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawnattr_init.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnattr_init.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnattr_init.c	(revision 2381)
@@ -0,0 +1,31 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include <string.h>
+
+/* Initialize data structure for file attribute for `spawn' call.  */
+int
+posix_spawnattr_init (posix_spawnattr_t *attr)
+{
+  /* All elements have to be initialized to the default values which
+     is generally zero.  */
+  memset (attr, '\0', sizeof (*attr));
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawnattr_setdefault.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnattr_setdefault.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnattr_setdefault.c	(revision 2381)
@@ -0,0 +1,31 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include <string.h>
+
+/* Set signal mask for signals with default handling in ATTR to SIGDEFAULT.  */
+int
+posix_spawnattr_setsigdefault (posix_spawnattr_t *attr,
+			       const sigset_t *sigdefault)
+{
+  /* Copy the sigset_t data to the user buffer.  */
+  memcpy (&attr->__sd, sigdefault, sizeof (sigset_t));
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawnattr_setflags.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnattr_setflags.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnattr_setflags.c	(revision 2381)
@@ -0,0 +1,30 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include <string.h>
+
+/* Store flags in the attribute structure.  */
+int
+posix_spawnattr_setflags (posix_spawnattr_t *attr, short int flags)
+{
+  /* Store the flag word.  */
+  attr->__flags = flags;
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawnattr_setpgroup.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnattr_setpgroup.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnattr_setpgroup.c	(revision 2381)
@@ -0,0 +1,30 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include <string.h>
+
+/* Store process group ID in the attribute structure.  */
+int
+posix_spawnattr_setpgroup (posix_spawnattr_t *attr, pid_t pgroup)
+{
+  /* Store the process group ID.  */
+  attr->__pgrp = pgroup;
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawnattr_setschedparam.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnattr_setschedparam.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnattr_setschedparam.c	(revision 2381)
@@ -0,0 +1,31 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include <string.h>
+
+/* Store scheduling parameters in the attribute structure.  */
+int
+posix_spawnattr_setschedparam (posix_spawnattr_t *attr,
+			       const struct sched_param *schedparam)
+{
+  /* Store the scheduling parameters.  */
+  attr->__sp = *schedparam;
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawnattr_setschedpolicy.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnattr_setschedpolicy.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnattr_setschedpolicy.c	(revision 2381)
@@ -0,0 +1,34 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <errno.h>
+#include <spawn.h>
+
+/* Store scheduling policy in the attribute structure.  */
+int
+posix_spawnattr_setschedpolicy (posix_spawnattr_t *attr, int schedpolicy)
+{
+  if (schedpolicy != SCHED_OTHER && schedpolicy != SCHED_FIFO
+      && schedpolicy != SCHED_RR)
+    return EINVAL;
+
+  /* Store the policy.  */
+  attr->__policy = schedpolicy;
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawnattr_setsigmask.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnattr_setsigmask.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnattr_setsigmask.c	(revision 2381)
@@ -0,0 +1,31 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include <string.h>
+
+/* Set signal mask for the new process in ATTR to SIGMASK.  */
+int
+posix_spawnattr_setsigmask (posix_spawnattr_t *attr,
+			    const sigset_t *sigmask)
+{
+  /* Copy the sigset_t data to the user buffer.  */
+  memcpy (&attr->__ss, sigmask, sizeof (sigset_t));
+
+  return 0;
+}
Index: /vendor/glibc/2.3.2/posix/spawnp.c
===================================================================
--- /vendor/glibc/2.3.2/posix/spawnp.c	(revision 2381)
+++ /vendor/glibc/2.3.2/posix/spawnp.c	(revision 2381)
@@ -0,0 +1,31 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <spawn.h>
+#include "spawn_int.h"
+
+/* Spawn a new process executing FILE with the attributes describes in *ATTRP.
+   Before running the process perform the actions described in FILE-ACTIONS. */
+int
+posix_spawnp (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[])
+{
+  return __spawni (pid, file, file_actions, attrp, argv, envp, 1);
+}
Index: /vendor/glibc/2.3.2/string/argz-addsep.c
===================================================================
--- /vendor/glibc/2.3.2/string/argz-addsep.c	(revision 2381)
+++ /vendor/glibc/2.3.2/string/argz-addsep.c	(revision 2381)
@@ -0,0 +1,59 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <argz.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+error_t
+__argz_add_sep (char **argz, size_t *argz_len, const char *string, int delim)
+{
+  size_t nlen = strlen (string) + 1;
+
+  if (nlen > 1)
+    {
+      const char *rp;
+      char *wp;
+
+      *argz = (char *) realloc (*argz, *argz_len + nlen);
+      if (*argz == NULL)
+	return ENOMEM;
+
+      wp = *argz + *argz_len;
+      rp = string;
+      do
+	if (*rp == delim)
+	  {
+	    if (wp > *argz && wp[-1] != '\0')
+	      *wp++ = '\0';
+	    else
+	      --nlen;
+	  }
+	else
+	  *wp++ = *rp;
+      while (*rp++ != '\0');
+
+      *argz_len += nlen;
+    }
+
+  return 0;
+}
+weak_alias (__argz_add_sep, argz_add_sep)
Index: /vendor/glibc/2.3.2/string/argz-append.c
===================================================================
--- /vendor/glibc/2.3.2/string/argz-append.c	(revision 2381)
+++ /vendor/glibc/2.3.2/string/argz-append.c	(revision 2381)
@@ -0,0 +1,50 @@
+/* Routines for dealing with '\0' separated arg vectors.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@gnu.ai.mit.edu>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <argz.h>
+#include <string.h>
+#include <stdlib.h>
+
+/* Add BUF, of length BUF_LEN to the argz vector in ARGZ & ARGZ_LEN.  */
+error_t
+__argz_append (char **argz, size_t *argz_len, const char *buf, size_t buf_len)
+{
+  size_t new_argz_len = *argz_len + buf_len;
+  char *new_argz = realloc (*argz, new_argz_len);
+  if (new_argz)
+    {
+      memcpy (new_argz + *argz_len, buf, buf_len);
+      *argz = new_argz;
+      *argz_len = new_argz_len;
+      return 0;
+    }
+  else
+    return ENOMEM;
+}
+weak_alias (__argz_append, argz_append)
+
+/* Add STR to the argz vector in ARGZ & ARGZ_LEN.  This should be moved into
+   argz.c in libshouldbelibc.  */
+error_t
+__argz_add (char **argz, size_t *argz_len, const char *str)
+{
+  return __argz_append (argz, argz_len, str, strlen (str) + 1);
+}
+weak_alias (__argz_add, argz_add)
Index: /vendor/glibc/2.3.2/string/argz-count.c
===================================================================
--- /vendor/glibc/2.3.2/string/argz-count.c	(revision 2381)
+++ /vendor/glibc/2.3.2/string/argz-count.c	(revision 2381)
@@ -0,0 +1,39 @@
+/* Routines for dealing with '\0' separated arg vectors.
+   Copyright (C) 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@gnu.ai.mit.edu>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <argz.h>
+#include <string.h>
+
+/* Returns the number of strings in ARGZ.  */
+size_t
+__argz_count (const char *argz, size_t len)
+{
+  size_t count = 0;
+  while (len > 0)
+    {
+      size_t part_len = strlen(argz);
+      argz += part_len + 1;
+      len -= part_len + 1;
+      count++;
+    }
+  return count;
+}
+INTDEF(__argz_count)
+weak_alias (__argz_count, argz_count)
Index: /vendor/glibc/2.3.2/string/argz-create.c
===================================================================
--- /vendor/glibc/2.3.2/string/argz-create.c	(revision 2381)
+++ /vendor/glibc/2.3.2/string/argz-create.c	(revision 2381)
@@ -0,0 +1,54 @@
+/* Routines for dealing with '\0' separated arg vectors.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@gnu.ai.mit.edu>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <argz.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Make a '\0' separated arg vector from a unix argv vector, returning it in
+   ARGZ, and the total length in LEN.  If a memory allocation error occurs,
+   ENOMEM is returned, otherwise 0.  */
+error_t
+__argz_create (char *const argv[], char **argz, size_t *len)
+{
+  int argc;
+  size_t tlen = 0;
+  char *const *ap;
+  char *p;
+
+  for (argc = 0; argv[argc] != NULL; ++argc)
+    tlen += strlen (argv[argc]) + 1;
+
+  if (tlen == 0)
+    *argz = NULL;
+  else
+    {
+      *argz = malloc (tlen);
+      if (*argz == NULL)
+	return ENOMEM;
+
+      for (p = *argz, ap = argv; *ap; ++ap, ++p)
+	p = __stpcpy (p, *ap);
+    }
+  *len = tlen;
+
+  return 0;
+}
+weak_alias (__argz_create, argz_create)
Index: /vendor/glibc/2.3.2/string/argz-ctsep.c
===================================================================
--- /vendor/glibc/2.3.2/string/argz-ctsep.c	(revision 2381)
+++ /vendor/glibc/2.3.2/string/argz-ctsep.c	(revision 2381)
@@ -0,0 +1,71 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <argz.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+error_t
+__argz_create_sep (const char *string, int delim, char **argz, size_t *len)
+{
+  size_t nlen = strlen (string) + 1;
+
+  if (nlen > 1)
+    {
+      const char *rp;
+      char *wp;
+
+      *argz = (char *) malloc (nlen);
+      if (*argz == NULL)
+	return ENOMEM;
+
+      rp = string;
+      wp = *argz;
+      do
+	if (*rp == delim)
+	  {
+	    if (wp > *argz && wp[-1] != '\0')
+	      *wp++ = '\0';
+	    else
+	      --nlen;
+	  }
+	else
+	  *wp++ = *rp;
+      while (*rp++ != '\0');
+
+      if (nlen == 0)
+	{
+	  free (*argz);
+	  *argz = NULL;
+	  *len = 0;
+	}
+
+      *len = nlen;
+    }
+  else
+    {
+      *argz = NULL;
+      *len = 0;
+    }
+
+  return 0;
+}
+weak_alias (__argz_create_sep, argz_create_sep)
Index: /vendor/glibc/2.3.2/string/argz-delete.c
===================================================================
--- /vendor/glibc/2.3.2/string/argz-delete.c	(revision 2381)
+++ /vendor/glibc/2.3.2/string/argz-delete.c	(revision 2381)
@@ -0,0 +1,42 @@
+/* Routines for dealing with '\0' separated arg vectors.
+   Copyright (C) 1995,96,97,2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@gnu.org>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <argz.h>
+#include <string.h>
+#include <stdlib.h>
+
+/* Delete ENTRY from ARGZ & ARGZ_LEN, if any.  */
+void
+argz_delete (char **argz, size_t *argz_len, char *entry)
+{
+  if (entry)
+    /* Get rid of the old value for NAME.  */
+    {
+      size_t entry_len = strlen (entry) + 1;
+      *argz_len -= entry_len;
+      memmove (entry, entry + entry_len, *argz_len - (entry - *argz));
+      if (*argz_len == 0)
+	{
+	  free (*argz);
+	  *argz = 0;
+	}
+    }
+}
+libc_hidden_def (argz_delete)
Index: /vendor/glibc/2.3.2/string/argz-extract.c
===================================================================
--- /vendor/glibc/2.3.2/string/argz-extract.c	(revision 2381)
+++ /vendor/glibc/2.3.2/string/argz-extract.c	(revision 2381)
@@ -0,0 +1,37 @@
+/* Routines for dealing with '\0' separated arg vectors.
+   Copyright (C) 1995, 96, 97, 98 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@gnu.org>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <argz.h>
+
+/* Puts pointers to each string in ARGZ, plus a terminating 0 element, into
+   ARGV, which must be large enough to hold them all.  */
+void
+__argz_extract (const char *argz, size_t len, char **argv)
+{
+  while (len > 0)
+    {
+      size_t part_len = strlen (argz);
+      *argv++ = (char *) argz;
+      argz += part_len + 1;
+      len -= part_len + 1;
+    }
+  *argv = 0;
+}
+weak_alias (__argz_extract, argz_extract)
Index: /vendor/glibc/2.3.2/string/argz-insert.c
===================================================================
--- /vendor/glibc/2.3.2/string/argz-insert.c	(revision 2381)
+++ /vendor/glibc/2.3.2/string/argz-insert.c	(revision 2381)
@@ -0,0 +1,64 @@
+/* Routines for dealing with '\0' separated arg vectors.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@gnu.ai.mit.edu>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <argz.h>
+#include <string.h>
+#include <stdlib.h>
+
+/* Insert ENTRY into ARGZ & ARGZ_LEN before BEFORE, which should be an
+   existing entry in ARGZ; if BEFORE is NULL, ENTRY is appended to the end.
+   Since ARGZ's first entry is the same as ARGZ, argz_insert (ARGZ, ARGZ_LEN,
+   ARGZ, ENTRY) will insert ENTRY at the beginning of ARGZ.  If BEFORE is not
+   in ARGZ, EINVAL is returned, else if memory can't be allocated for the new
+   ARGZ, ENOMEM is returned, else 0.  */
+error_t
+__argz_insert (char **argz, size_t *argz_len, char *before, const char *entry)
+{
+  if (! before)
+    return __argz_add (argz, argz_len, entry);
+
+  if (before < *argz || before >= *argz + *argz_len)
+    return EINVAL;
+
+  if (before > *argz)
+    /* Make sure before is actually the beginning of an entry.  */
+    while (before[-1])
+      before--;
+
+  {
+    size_t after_before = *argz_len - (before - *argz);
+    size_t entry_len = strlen  (entry) + 1;
+    size_t new_argz_len = *argz_len + entry_len;
+    char *new_argz = realloc (*argz, new_argz_len);
+
+    if (new_argz)
+      {
+	before = new_argz + (before - *argz);
+	memmove (before + entry_len, before, after_before);
+	memmove (before, entry, entry_len);
+	*argz = new_argz;
+	*argz_len = new_argz_len;
+	return 0;
+      }
+    else
+      return ENOMEM;
+  }
+}
+weak_alias (__argz_insert, argz_insert)
Index: /vendor/glibc/2.3.2/string/argz-next.c
===================================================================
--- /vendor/glibc/2.3.2/string/argz-next.c	(revision 2381)
+++ /vendor/glibc/2.3.2/string/argz-next.c	(revision 2381)
@@ -0,0 +1,40 @@
+/* Iterate through the elements of an argz block.
+   Copyright (C) 1995, 96, 97, 98 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@gnu.org>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <argz.h>
+#include <string.h>
+
+char *
+__argz_next (const char *argz, size_t argz_len, const char *entry)
+{
+  if (entry)
+    {
+      if (entry < argz + argz_len)
+	entry = strchr (entry, '\0') + 1;
+
+      return entry >= argz + argz_len ? NULL : (char *) entry;
+    }
+  else
+    if (argz_len > 0)
+      return (char *) argz;
+    else
+      return NULL;
+}
+weak_alias (__argz_next, argz_next)
Index: /vendor/glibc/2.3.2/string/argz-replace.c
===================================================================
--- /vendor/glibc/2.3.2/string/argz-replace.c	(revision 2381)
+++ /vendor/glibc/2.3.2/string/argz-replace.c	(revision 2381)
@@ -0,0 +1,136 @@
+/* String replacement in an argz vector
+   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@gnu.ai.mit.edu>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <stdlib.h>
+#include <string.h>
+#include <argz.h>
+
+/* Append BUF, of length BUF_LEN to *TO, of length *TO_LEN, reallocating and
+   updating *TO & *TO_LEN appropriately.  If an allocation error occurs,
+   *TO's old value is freed, and *TO is set to 0.  */
+static void
+str_append (char **to, size_t *to_len, const char *buf, const size_t buf_len)
+{
+  size_t new_len = *to_len + buf_len;
+  char *new_to = realloc (*to, new_len + 1);
+
+  if (new_to)
+    {
+      *((char *) __mempcpy (new_to + *to_len, buf, buf_len)) = '\0';
+      *to = new_to;
+      *to_len = new_len;
+    }
+  else
+    {
+      free (*to);
+      *to = 0;
+    }
+}
+
+/* Replace any occurrences of the string STR in ARGZ with WITH, reallocating
+   ARGZ as necessary.  If REPLACE_COUNT is non-zero, *REPLACE_COUNT will be
+   incremented by number of replacements performed.  */
+error_t
+__argz_replace (char **argz, size_t *argz_len, const char *str, const char *with,
+		unsigned *replace_count)
+{
+  error_t err = 0;
+
+  if (str && *str)
+    {
+      char *arg = 0;
+      char *src = *argz;
+      size_t src_len = *argz_len;
+      char *dst = 0;
+      size_t dst_len = 0;
+      int delayed_copy = 1;	/* True while we've avoided copying anything.  */
+      size_t str_len = strlen (str), with_len = strlen (with);
+
+      while (!err && (arg = argz_next (src, src_len, arg)))
+	{
+	  char *match = strstr (arg, str);
+	  if (match)
+	    {
+	      char *from = match + str_len;
+	      size_t to_len = match - arg;
+	      char *to = __strndup (arg, to_len);
+
+	      while (to && from)
+		{
+		  str_append (&to, &to_len, with, with_len);
+		  if (to)
+		    {
+		      match = strstr (from, str);
+		      if (match)
+			{
+			  str_append (&to, &to_len, from, match - from);
+			  from = match + str_len;
+			}
+		      else
+			{
+			  str_append (&to, &to_len, from, strlen (from));
+			  from = 0;
+			}
+		    }
+		}
+
+	      if (to)
+		{
+		  if (delayed_copy)
+		    /* We avoided copying SRC to DST until we found a match;
+                       now that we've done so, copy everything from the start
+                       of SRC.  */
+		    {
+		      if (arg > src)
+			err = __argz_append (&dst, &dst_len, src, (arg - src));
+		      delayed_copy = 0;
+		    }
+		  if (! err)
+		    err = __argz_add (&dst, &dst_len, to);
+		  free (to);
+		}
+	      else
+		err = ENOMEM;
+
+	      if (replace_count)
+		(*replace_count)++;
+	    }
+	  else if (! delayed_copy)
+	    err = __argz_add (&dst, &dst_len, arg);
+	}
+
+      if (! err)
+	{
+	  if (! delayed_copy)
+	    /* We never found any instances of str.  */
+	    {
+	      if (src)
+		free (src);
+	      *argz = dst;
+	      *argz_len = dst_len;
+	    }
+	}
+      else if (dst_len > 0)
+	free (dst);
+    }
+
+  return err;
+}
+weak_alias (__argz_replace, argz_replace)
Index: /vendor/glibc/2.3.2/string/argz-stringify.c
===================================================================
--- /vendor/glibc/2.3.2/string/argz-stringify.c	(revision 2381)
+++ /vendor/glibc/2.3.2/string/argz-stringify.c	(revision 2381)
@@ -0,0 +1,41 @@
+/* Routines for dealing with '\0' separated arg vectors.
+   Copyright (C) 1995,96,97,2000,2001, 2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@gnu.org>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <argz.h>
+#include <string.h>
+
+/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
+   except the last into the character SEP.  */
+void
+__argz_stringify (char *argz, size_t len, int sep)
+{
+  if (len > 0)
+    while (1)
+      {
+	size_t part_len = __strnlen (argz, len);
+	argz += part_len;
+	len -= part_len;
+	if (len-- <= 1)		/* includes final '\0' we want to stop at */
+	  break;
+	*argz++ = sep;
+      }
+}
+INTDEF(__argz_stringify)
+weak_alias (__argz_stringify, argz_stringify)
Index: /vendor/glibc/2.3.2/string/strndup.c
===================================================================
--- /vendor/glibc/2.3.2/string/strndup.c	(revision 2381)
+++ /vendor/glibc/2.3.2/string/strndup.c	(revision 2381)
@@ -0,0 +1,59 @@
+/* Copyright (C) 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+
+#if defined _LIBC || defined STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#else
+char *malloc ();
+#endif
+
+#undef __strndup
+#undef strndup
+
+#ifndef weak_alias
+# define __strndup strndup
+#endif
+
+char *
+__strndup (s, n)
+     const char *s;
+     size_t n;
+{
+  size_t len = __strnlen (s, n);
+  char *new = (char *) malloc (len + 1);
+
+  if (new == NULL)
+    return NULL;
+
+  new[len] = '\0';
+  return (char *) memcpy (new, s, len);
+}
+#ifdef libc_hidden_def
+libc_hidden_def (__strndup)
+#endif
+#ifdef weak_alias
+weak_alias (__strndup, strndup)
+#endif
