Преглед на файлове

* threading switch, defines the symbol FPC_THREADING

peter преди 23 години
родител
ревизия
fb12ccee3b
променени са 2 файла, в които са добавени 29 реда и са изтрити 11 реда
  1. 8 5
      compiler/globtype.pas
  2. 21 6
      compiler/scandir.pas

+ 8 - 5
compiler/globtype.pas

@@ -53,7 +53,7 @@ interface
          cs_support_c_operators,cs_static_keyword,
          { generation }
          cs_profile,cs_debuginfo,cs_browser,cs_local_browser,cs_compilesystem,
-         cs_lineinfo,
+         cs_lineinfo,cs_threading,
          { linking }
          cs_create_smart,cs_create_dynamic,cs_create_pic
        );
@@ -143,7 +143,7 @@ interface
          pocall_system         { system call }
        );
        tproccalloptions = set of tproccalloption;
-       
+
 
      const
        proccalloptionStr : array[tproccalloption] of string[14]=('',
@@ -167,8 +167,8 @@ interface
 
        tnormalset = set of byte; { 256 elements set }
        pnormalset = ^tnormalset;
-       
-       
+
+
 
        pboolean   = ^boolean;
        pdouble    = ^double;
@@ -211,7 +211,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.32  2002-10-05 12:43:24  carl
+  Revision 1.33  2002-10-14 19:43:41  peter
+    * threading switch, defines the symbol FPC_THREADING
+
+  Revision 1.32  2002/10/05 12:43:24  carl
     * fixes for Delphi 6 compilation
      (warning : Some features do not work under Delphi)
 

+ 21 - 6
compiler/scandir.pas

@@ -705,6 +705,21 @@ implementation
         do_message(scan_f_user_defined);
       end;
 
+    procedure dir_threading;
+      var
+        mac : tmacro;
+      begin
+        do_moduleswitch(cs_threading);
+        { defined/undefine FPC_THREADING }
+        mac:=tmacro(current_scanner.macros.search('FPC_THREADING'));
+        if not assigned(mac) then
+         begin
+           mac:=tmacro.create('FPC_THREADING');
+           current_scanner.macros.insert(mac);
+         end;
+        mac.defined:=(cs_threading in aktmoduleswitches);
+      end;
+
     procedure dir_typedaddress;
       begin
         do_delphiswitch('T');
@@ -880,6 +895,7 @@ implementation
         AddDirective('DESCRIPTION',{$ifdef FPCPROCVAR}@{$endif}dir_description);
         AddDirective('ERROR',{$ifdef FPCPROCVAR}@{$endif}dir_error);
         AddDirective('EXTENDEDSYNTAX',{$ifdef FPCPROCVAR}@{$endif}dir_extendedsyntax);
+        AddDirective('EXTERNALSYM',{$ifdef FPCPROCVAR}@{$endif}dir_externalsym);
         AddDirective('FATAL',{$ifdef FPCPROCVAR}@{$endif}dir_fatal);
         AddDirective('GOTO',{$ifdef FPCPROCVAR}@{$endif}dir_goto);
         AddDirective('HINT',{$ifdef FPCPROCVAR}@{$endif}dir_hint);
@@ -919,17 +935,13 @@ implementation
         AddDirective('RANGECHECKS',{$ifdef FPCPROCVAR}@{$endif}dir_rangechecks);
         AddDirective('REFERENCEINFO',{$ifdef FPCPROCVAR}@{$endif}dir_referenceinfo);
         AddDirective('SATURATION',{$ifdef FPCPROCVAR}@{$endif}dir_saturation);
-        {ad 18.05.2001: Screen and Threadname for Netware}
         AddDirective('SCREENNAME',{$ifdef FPCPROCVAR}@{$endif}dir_screenname);
-        AddDirective('EXTERNALSYM',{$ifdef FPCPROCVAR}@{$endif}dir_externalsym);
-
         AddDirective('SMARTLINK',{$ifdef FPCPROCVAR}@{$endif}dir_smartlink);
         AddDirective('STACKFRAMES',{$ifdef FPCPROCVAR}@{$endif}dir_stackframes);
         AddDirective('STATIC',{$ifdef FPCPROCVAR}@{$endif}dir_static);
         AddDirective('STOP',{$ifdef FPCPROCVAR}@{$endif}dir_stop);
-        {ad 18.05.2001: Screen and Threadname for Netware}
+        AddDirective('THREADING',{$ifdef FPCPROCVAR}@{$endif}dir_threading);
         AddDirective('THREADNAME',{$ifdef FPCPROCVAR}@{$endif}dir_threadname);
-
         AddDirective('TYPEDADDRESS',{$ifdef FPCPROCVAR}@{$endif}dir_typedaddress);
         AddDirective('TYPEINFO',{$ifdef FPCPROCVAR}@{$endif}dir_typeinfo);
         AddDirective('UNITPATH',{$ifdef FPCPROCVAR}@{$endif}dir_unitpath);
@@ -948,7 +960,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.19  2002-08-13 18:01:52  carl
+  Revision 1.20  2002-10-14 19:43:41  peter
+    * threading switch, defines the symbol FPC_THREADING
+
+  Revision 1.19  2002/08/13 18:01:52  carl
     * rename swatoperands to swapoperands
     + m68k first compilable version (still needs a lot of testing):
         assembler generator, system information , inline