Also update WorkingDir on line directives
This commit is contained in:
parent
b2bee3043a
commit
6545b68874
|
@ -30,7 +30,8 @@
|
|||
#include "const.h"
|
||||
#include "warning.h"
|
||||
|
||||
long str2long();
|
||||
extern long str2long();
|
||||
extern char *getwdir();
|
||||
|
||||
t_token dot,
|
||||
aside;
|
||||
|
@ -225,6 +226,7 @@ CheckForLineDirective()
|
|||
*/
|
||||
if (class(ch) == STNL && strcmp(FileName,buf)) {
|
||||
FileName = Salloc(buf,(unsigned) strlen(buf) + 1);
|
||||
WorkingDir = getwdir(FileName);
|
||||
}
|
||||
}
|
||||
if (class(ch) == STEOI) {
|
||||
|
|
|
@ -144,7 +144,9 @@ DefinitionModule
|
|||
MODULE IDENT { df = define(dot.TOK_IDF, GlobalScope, D_MODULE);
|
||||
df->df_flags |= D_BUSY | ForeignFlag;
|
||||
currscope->sc_definedby = df;
|
||||
if (DefId && df->df_idf != DefId) {
|
||||
if (DefId &&
|
||||
df->df_idf != DefId &&
|
||||
!is_anon_idf(df->df_idf)) {
|
||||
error("DEFINITION MODULE name is \"%s\", not \"%s\"",
|
||||
df->df_idf->id_text, DefId->id_text);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue