=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/lowparse.c,v retrieving revision 1.27 retrieving revision 1.28 diff -c -r1.27 -r1.28 *** src/usr.bin/make/lowparse.c 2012/03/22 13:50:30 1.27 --- src/usr.bin/make/lowparse.c 2012/08/25 08:12:56 1.28 *************** *** 1,4 **** ! /* $OpenBSD: lowparse.c,v 1.27 2012/03/22 13:50:30 espie Exp $ */ /* low-level parsing functions. */ --- 1,4 ---- ! /* $OpenBSD: lowparse.c,v 1.28 2012/08/25 08:12:56 espie Exp $ */ /* low-level parsing functions. */ *************** *** 73,78 **** --- 73,81 ---- static LIST input_stack; /* Stack of input_stream waiting to be parsed * (includes and loop reparses) */ + /* record gnode location for proper reporting at runtime */ + static Location *post_parse = NULL; + /* input_stream ctors. * * obj = new_input_file(filename, filehandle); *************** *** 433,442 **** } void Parse_FillLocation(Location *origin) { ! origin->lineno = Parse_Getlineno(); ! origin->fname = Parse_Getfilename(); } #ifdef CLEANUP --- 436,455 ---- } void + Parse_SetLocation(Location *origin) + { + post_parse = origin; + } + + void Parse_FillLocation(Location *origin) { ! if (post_parse) { ! *origin = *post_parse; ! } else { ! origin->lineno = Parse_Getlineno(); ! origin->fname = Parse_Getfilename(); ! } } #ifdef CLEANUP