Browse Source

* set moduleislib to true for libraries. Differences with islibrary:
a) is also set to true for packages (when packages will beimplemented)
b) exists for each package/library/application separately, instead of
being stored in the package containing the system unit (when packages
will be implemented)
(mantis #15701)

git-svn-id: trunk@14880 -

Jonas Maebe 15 years ago
parent
commit
1b58fcc877
3 changed files with 8 additions and 0 deletions
  1. 2 0
      rtl/inc/system.inc
  2. 2 0
      tests/test/tlibrary1.pp
  3. 4 0
      tests/test/tlibrary2.pp

+ 2 - 0
rtl/inc/system.inc

@@ -768,6 +768,8 @@ procedure internal_initializeunits; external name 'FPC_INITIALIZEUNITS';
 procedure fpc_LibInitializeUnits;[public,alias:'FPC_LIBINITIALIZEUNITS'];
 begin
   IsLibrary:=true;
+  { must also be set to true for packages when implemented }
+  ModuleIsLib:=true;
   internal_initializeunits;
 end;
 

+ 2 - 0
tests/test/tlibrary1.pp

@@ -38,6 +38,8 @@ procedure Test;export;
  begin
    if not islibrary then
      halt(1);
+   if not moduleislib then
+     halt(2);
    writeln('Hoi');
  end;
 

+ 4 - 0
tests/test/tlibrary2.pp

@@ -25,6 +25,10 @@ const
 procedure test;external libname name 'TestName';
 
 begin
+  if islibrary then
+    halt(3);
+  if moduleislib then
+    halt(4);
   test;
 end.
 {$else not supported}