Improve m4 compatibility with GNU m4 extension ** (exponent)

Submitted by:	Marc Espie (espie@OpenBSD.org)
Approved by:	des@ (mentor)
This commit is contained in:
Baptiste Daroussin 2012-04-15 13:25:51 +00:00
parent bf9abaa954
commit fb3f3d7caf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=234310
3 changed files with 7 additions and 3 deletions

View File

@ -269,10 +269,11 @@ expand_builtin(const char *argv[], int argc, int td)
case INCLTYPE:
if (argc > 2)
if (!doincl(argv[2])) {
if (mimic_gnu)
if (mimic_gnu) {
warn("%s at line %lu: include(%s)",
CURRENT_NAME, CURRENT_LINE, argv[2]);
else
exit_code = 1;
} else
err(1, "%s at line %lu: include(%s)",
CURRENT_NAME, CURRENT_LINE, argv[2]);
}

View File

@ -87,6 +87,7 @@ extern ndptr macro_getbuiltin(const char *);
/* main.c */
extern void outputstr(const char *);
extern void do_emit_synchline(void);
extern int exit_code;
#define emit_synchline() do { if (synch_lines) do_emit_synchline(); } while(0)
/* misc.c */

View File

@ -164,6 +164,8 @@ static void enlarge_stack(void);
int main(int, char *[]);
int exit_code = 0;
int
main(int argc, char *argv[])
{
@ -282,7 +284,7 @@ main(int argc, char *argv[])
(void) fclose(outfile[0]);
}
return 0;
return exit_code;
}
/*