Use C++ compatible declaration for posix_spawn (instead of the C99 specific

posix one).
This commit is contained in:
martin 2012-02-22 17:51:01 +00:00
parent f50962bc3d
commit 136a5cd515
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: spawn.h,v 1.3 2012/02/21 10:54:07 martin Exp $ */
/* $NetBSD: spawn.h,v 1.4 2012/02/22 17:51:01 martin Exp $ */
/*-
* Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org>
@ -40,10 +40,10 @@ __BEGIN_DECLS
*/
int posix_spawn(pid_t * __restrict, const char * __restrict,
const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict,
char * const [__conly_restrict], char * const [__conly_restrict]);
char * const *__restrict, char * const *__restrict);
int posix_spawnp(pid_t * __restrict, const char * __restrict,
const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict,
char * const [__conly_restrict], char * const [__conly_restrict]);
char * const *__restrict, char * const *__restrict);
/*
* File descriptor actions

View File

@ -1,4 +1,4 @@
/* $NetBSD: posix_spawnp.c,v 1.1 2012/02/11 23:31:24 martin Exp $ */
/* $NetBSD: posix_spawnp.c,v 1.2 2012/02/22 17:51:01 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: posix_spawnp.c,v 1.1 2012/02/11 23:31:24 martin Exp $");
__RCSID("$NetBSD: posix_spawnp.c,v 1.2 2012/02/22 17:51:01 martin Exp $");
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
@ -45,7 +45,7 @@ __RCSID("$NetBSD: posix_spawnp.c,v 1.1 2012/02/11 23:31:24 martin Exp $");
int posix_spawnp(pid_t * __restrict pid, const char * __restrict file,
const posix_spawn_file_actions_t *fa,
const posix_spawnattr_t * __restrict sa,
char * const cav[__restrict], char * const env[__restrict])
char * const *__restrict cav, char * const *__restrict env)
{
char fpath[FILENAME_MAX], *last, *p;
char *path;