Browse Source

+ allow exports in win32 executables

pierre 26 years ago
parent
commit
6297537f4b
2 changed files with 15 additions and 6 deletions
  1. 6 3
      compiler/pdecl.pas
  2. 9 3
      compiler/pmodules.pas

+ 6 - 3
compiler/pdecl.pas

@@ -1160,12 +1160,12 @@ unit pdecl;
                    Not_supported_for_inline(token);
                    { here we should be at lexlevel 1, no ? PM }
                    if (lexlevel<>main_program_level) or
-                      (not islibrary and not DLLsource) then
+                      (current_module^.is_unit) then
                      begin
                         Message(parser_e_syntax_error);
                         consume_all_until(_SEMICOLON);
                      end
-                   else if islibrary then
+                   else if islibrary or (target_info.target=target_i386_WIN32) then
                      read_exports;
                 end
               else break;
@@ -1200,7 +1200,10 @@ unit pdecl;
 end.
 {
   $Log$
-  Revision 1.171  1999-11-09 23:43:08  pierre
+  Revision 1.172  1999-11-29 15:18:27  pierre
+   + allow exports in win32 executables
+
+  Revision 1.171  1999/11/09 23:43:08  pierre
    * better browser info
 
   Revision 1.170  1999/11/09 23:06:45  peter

+ 9 - 3
compiler/pmodules.pas

@@ -1362,6 +1362,7 @@ unit pmodules;
               consume(_PROGRAM);
               stringdispose(current_module^.modulename);
               current_module^.modulename:=stringdup(pattern);
+              exportlib^.preparelib(pattern);
               consume(_ID);
               if token=_LKLAMMER then
                 begin
@@ -1370,7 +1371,9 @@ unit pmodules;
                    consume(_RKLAMMER);
                 end;
               consume(_SEMICOLON);
-            end;
+            end
+         else
+           exportlib^.preparelib(current_module^.modulename^);
 
          { global switches are read, so further changes aren't allowed }
          current_module^.in_global:=false;
@@ -1496,7 +1499,7 @@ unit pmodules;
          if current_module^.uses_imports then
           importlib^.generatelib;
 
-         if islibrary then
+         if islibrary or (target_info.target=target_i386_WIN32) then
            exportlib^.generatelib;
 
 
@@ -1552,7 +1555,10 @@ unit pmodules;
 end.
 {
   $Log$
-  Revision 1.172  1999-11-24 11:41:05  pierre
+  Revision 1.173  1999-11-29 15:18:27  pierre
+   + allow exports in win32 executables
+
+  Revision 1.172  1999/11/24 11:41:05  pierre
    * defaultsymtablestack is now restored after parser.compile
 
   Revision 1.171  1999/11/22 22:21:46  pierre