Also update WorkingDir on line directives

This commit is contained in:
ceriel 1990-11-22 11:25:34 +00:00
parent b2bee3043a
commit 6545b68874
2 changed files with 6 additions and 2 deletions

View file

@ -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) {

View file

@ -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);
}