mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-24 03:37:16 +00:00
Remove __restrict keywords from array arguments to make GCC's -std=c99 work.
When GCC is invoked with -std=c99, the following errors are displayed when including <spawn.h>: /usr/include/spawn.h:69: error: static or type qualifiers in abstract declarator /usr/include/spawn.h:69: error: static or type qualifiers in abstract declarator /usr/include/spawn.h:72: error: static or type qualifiers in abstract declarator /usr/include/spawn.h:72: error: static or type qualifiers in abstract declarator We'd better remove the __restrict keywords here. The same is also done in <regex.h>. Submitted by: Andrzej Tobola <ato iem pw edu pl> Reviewed by: davidxu Approved by: philip (mentor, implicit)
This commit is contained in:
parent
7d28174b91
commit
6b0a300c02
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179873
|
@ -63,13 +63,16 @@ typedef struct __posix_spawn_file_actions *posix_spawn_file_actions_t;
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
/*
|
/*
|
||||||
* Spawn routines
|
* Spawn routines
|
||||||
|
*
|
||||||
|
* XXX both arrays should be __restrict, but this does not work when GCC
|
||||||
|
* is invoked with -std=c99.
|
||||||
*/
|
*/
|
||||||
int posix_spawn(pid_t * __restrict, const char * __restrict,
|
int posix_spawn(pid_t * __restrict, const char * __restrict,
|
||||||
const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict,
|
const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict,
|
||||||
char * const [__restrict], char * const [__restrict]);
|
char * const [], char * const []);
|
||||||
int posix_spawnp(pid_t * __restrict, const char * __restrict,
|
int posix_spawnp(pid_t * __restrict, const char * __restrict,
|
||||||
const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict,
|
const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict,
|
||||||
char * const [__restrict], char * const [__restrict]);
|
char * const [], char * const []);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* File descriptor actions
|
* File descriptor actions
|
||||||
|
|
Loading…
Reference in a new issue