src/compiler/OPT.Mod: Fixed some typos ...

src/tools/make/configure.c: Fixed a typo. Reduced the value of 'MaxPathLen'
    for the generated 'Configuration.Mod' by one for consistency with
    'MaxFnLen' - meaning, the constant SYSTEM.MAXPATHLEN now doesn't count
    the terminating 0X. This is no problem, because corresponding array
    definitions may use the constant expression 'SYSTEM-MAXPATHLEN + 1'
    for achieving the same effect ...
This commit is contained in:
runkharr 2018-04-12 22:07:05 +02:00
parent 1d6e2ef187
commit 60df39cb6b
2 changed files with 5 additions and 5 deletions

View file

@ -1315,7 +1315,7 @@ END Import;
BEGIN BEGIN
Insert(name, obj); obj^.conval := NewConst(); Insert(name, obj); obj^.conval := NewConst();
obj^.mode := Con; obj^.typ := int32typ; obj^.conval^.intval := value; obj^.mode := Con; obj^.typ := int32typ; obj^.conval^.intval := value;
END EntarIntConst; END EnterIntConst;
PROCEDURE EnterTyp(name: OPS.Name; form: SHORTINT; size: INTEGER; VAR res: Struct); PROCEDURE EnterTyp(name: OPS.Name; form: SHORTINT; size: INTEGER; VAR res: Struct);
VAR obj: Object; typ: Struct; VAR obj: Object; typ: Struct;
@ -1375,8 +1375,8 @@ BEGIN topScope := NIL; OpenScope(0, NIL); OPM.errpos := 0;
EnterProc("MOVE", movefn); EnterProc("MOVE", movefn);
(* POSIX systems normally support PATH_MAX *) (* POSIX systems normally support PATH_MAX *)
EnterIntConst("MAXPATHLEN", Configuration.MaxPathLen); EnterIntConst("MAXPATHLEN", Configuration.MaxPathLen); (*PATH_MAX - 1*)
EnterIntConst("MAXFILENAMELENGTH", Configuration.MaxFnLen); EnterIntConst("MAXFILENAMELEN", Configuration.MaxFnLen); (*NAME_LEN*)
syslink := topScope^.right; syslink := topScope^.right;
universe := topScope; topScope^.right := NIL; universe := topScope; topScope^.right := NIL;

View file

@ -402,8 +402,8 @@ void writeConfigurationMod() {
fprintf(fd, " compile* = '%s';\n", cc); fprintf(fd, " compile* = '%s';\n", cc);
fprintf(fd, " installdir* = '%s';\n", installdir); fprintf(fd, " installdir* = '%s';\n", installdir);
fprintf(fd, " staticLink* = '%s';\n", staticlink); fprintf(fd, " staticLink* = '%s';\n", staticlink);
fprintf(fd, " MaxPathLen* = %d;\n", PATH_MAX); fprintf(fd, " MaxPathLen* = %d;\n", PATH_MAX-1); // -1 for more consistency
fprintf(fd " MaxFnLen* = %d;\n", NAME_MAX); fprintf(fd, " MaxFnLen* = %d;\n", NAME_MAX);
fprintf(fd, "VAR\n"); fprintf(fd, "VAR\n");
fprintf(fd, " versionLong-: ARRAY %d OF CHAR;\n", (int)strnlen(versionstring, 100)+1); fprintf(fd, " versionLong-: ARRAY %d OF CHAR;\n", (int)strnlen(versionstring, 100)+1);
fprintf(fd, "BEGIN\n"); fprintf(fd, "BEGIN\n");