[Glibc-bsd-commits] r4100 - in trunk/freebsd-buildutils/debian: . local/include

Robert Millan rmh at alioth.debian.org
Wed Feb 15 21:57:07 UTC 2012


Author: rmh
Date: 2012-02-15 21:57:07 +0000 (Wed, 15 Feb 2012)
New Revision: 4100

Added:
   trunk/freebsd-buildutils/debian/local/include/paths.h
Modified:
   trunk/freebsd-buildutils/debian/changelog
   trunk/freebsd-buildutils/debian/local/include/unistd.h
Log:
Add execvP().

Modified: trunk/freebsd-buildutils/debian/changelog
===================================================================
--- trunk/freebsd-buildutils/debian/changelog	2012-02-15 21:30:20 UTC (rev 4099)
+++ trunk/freebsd-buildutils/debian/changelog	2012-02-15 21:57:07 UTC (rev 4100)
@@ -1,8 +1,9 @@
 freebsd-buildutils (9.0-7) UNRELEASED; urgency=low
 
   * sys/endian.h: Don't include_next <machine/endian.h>, just include.
+  * Add execvP().
 
- -- Robert Millan <rmh at debian.org>  Wed, 15 Feb 2012 22:30:08 +0100
+ -- Robert Millan <rmh at debian.org>  Wed, 15 Feb 2012 22:57:00 +0100
 
 freebsd-buildutils (9.0-6) unstable; urgency=low
 

Added: trunk/freebsd-buildutils/debian/local/include/paths.h
===================================================================
--- trunk/freebsd-buildutils/debian/local/include/paths.h	                        (rev 0)
+++ trunk/freebsd-buildutils/debian/local/include/paths.h	2012-02-15 21:57:07 UTC (rev 4100)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)paths.h	8.1 (Berkeley) 6/2/93
+ * $FreeBSD$
+ */
+
+#include_next <paths.h>
+
+#ifndef _FREEBSD_PATHS_H_
+#define	_FREEBSD_PATHS_H_
+
+#include <sys/cdefs.h>
+
+/* Locate system binaries. */
+#define	_PATH_SYSPATH	"/sbin:/usr/sbin"
+
+#endif

Modified: trunk/freebsd-buildutils/debian/local/include/unistd.h
===================================================================
--- trunk/freebsd-buildutils/debian/local/include/unistd.h	2012-02-15 21:30:20 UTC (rev 4099)
+++ trunk/freebsd-buildutils/debian/local/include/unistd.h	2012-02-15 21:57:07 UTC (rev 4100)
@@ -5,6 +5,7 @@
 
 #ifdef __FreeBSD_kernel__
 #include <sys/syscall.h>
+#include <stdlib.h>		/* setenv */
 #endif
 
 #define getopt(argc, argv, options) bsd_getopt(argc, argv, options)
@@ -94,6 +95,13 @@
 	return (i != 0);
 }
 
+static inline int
+execvP(const char *name, const char *path, char * const argv[])
+{
+	setenv ("PATH", path, 1);
+	return execvp(name, argv);
+}
+
 #endif /* __FreeBSD_kernel__ */
 
 __END_DECLS




More information about the Glibc-bsd-commits mailing list