mirror of
https://github.com/mirror/make.git
synced 2025-01-21 09:41:03 +08:00
Allow compiling with an ISO C 1989/1990 compiler.
* posixos.c (jobserver_post_child): Use C89 for loop syntax. * remake.c (update_goal_chain): Ditto. * variable.c (parse_variable_definition): Ditto.
This commit is contained in:
parent
4c9e10fd94
commit
45200a42d3
23
posixos.c
23
posixos.c
@ -193,16 +193,19 @@ jobserver_post_child (int recursive)
|
|||||||
{
|
{
|
||||||
#if defined(F_GETFD) && defined(F_SETFD)
|
#if defined(F_GETFD) && defined(F_SETFD)
|
||||||
if (!recursive && job_fds[0] >= 0)
|
if (!recursive && job_fds[0] >= 0)
|
||||||
for (int i = 0; i < 2; ++i)
|
{
|
||||||
{
|
unsigned int i;
|
||||||
int flags;
|
for (i = 0; i < 2; ++i)
|
||||||
EINTRLOOP (flags, fcntl (job_fds[i], F_GETFD));
|
{
|
||||||
if (flags >= 0)
|
int flags;
|
||||||
{
|
EINTRLOOP (flags, fcntl (job_fds[i], F_GETFD));
|
||||||
int r;
|
if (flags >= 0)
|
||||||
EINTRLOOP (r, fcntl (job_fds[i], F_SETFD, flags & ~FD_CLOEXEC));
|
{
|
||||||
}
|
int r;
|
||||||
}
|
EINTRLOOP (r, fcntl (job_fds[i], F_SETFD, flags & ~FD_CLOEXEC));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
remake.c
4
remake.c
@ -271,10 +271,12 @@ update_goal_chain (struct goaldep *goaldeps)
|
|||||||
void
|
void
|
||||||
show_goal_error ()
|
show_goal_error ()
|
||||||
{
|
{
|
||||||
|
struct goaldep *goal;
|
||||||
|
|
||||||
if ((goal_dep->flags & (RM_INCLUDED|RM_DONTCARE)) != RM_INCLUDED)
|
if ((goal_dep->flags & (RM_INCLUDED|RM_DONTCARE)) != RM_INCLUDED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (struct goaldep *goal = goal_list; goal; goal = goal->next)
|
for (goal = goal_list; goal; goal = goal->next)
|
||||||
if (goal_dep->file == goal->file)
|
if (goal_dep->file == goal->file)
|
||||||
{
|
{
|
||||||
if (goal->error)
|
if (goal->error)
|
||||||
|
@ -1449,6 +1449,7 @@ parse_variable_definition (const char *p, struct variable *var)
|
|||||||
/* This begins a variable expansion reference. Make sure we don't
|
/* This begins a variable expansion reference. Make sure we don't
|
||||||
treat chars inside the reference as assignment tokens. */
|
treat chars inside the reference as assignment tokens. */
|
||||||
char closeparen;
|
char closeparen;
|
||||||
|
unsigned int count;
|
||||||
|
|
||||||
c = *p++;
|
c = *p++;
|
||||||
if (c == '(')
|
if (c == '(')
|
||||||
@ -1463,7 +1464,7 @@ parse_variable_definition (const char *p, struct variable *var)
|
|||||||
|
|
||||||
/* P now points past the opening paren or brace.
|
/* P now points past the opening paren or brace.
|
||||||
Count parens or braces until it is matched. */
|
Count parens or braces until it is matched. */
|
||||||
for (unsigned int count = 1; *p != '\0'; ++p)
|
for (count = 1; *p != '\0'; ++p)
|
||||||
{
|
{
|
||||||
if (*p == closeparen && --count == 0)
|
if (*p == closeparen && --count == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user