Browse Source

+ Warn for Debian mouse bug on Debian systems.

git-svn-id: trunk@7694 -
daniel 18 years ago
parent
commit
0ad710dc44
1 changed files with 24 additions and 0 deletions
  1. 24 0
      ide/fp.pas

+ 24 - 0
ide/fp.pas

@@ -237,6 +237,25 @@ begin
   end;
   end;
 end;
 end;
 
 
+{$ifdef linux}
+procedure detect_debian;
+
+var attr:word;
+    f:text;
+
+begin
+  assign(f,'/etc/debian_version');
+  getfattr(f,attr);
+  if doserror=0 then
+    errorbox('Debian system detected!'#13#13+
+             'Debian systems use an incompatible gpm'#13+
+             'library, therefore your system might'#13+
+             'suffer from Debian bug 412927. Please'#13+
+             'see http://bugs.debian.org/cgi-bin/'#13+
+             'bugreport.cgi?bug=412927 for details.',nil);
+end;
+{$endif}
+
 procedure DelTempFiles;
 procedure DelTempFiles;
 begin
 begin
   DeleteFile(FPOutFileName);
   DeleteFile(FPOutFileName);
@@ -403,6 +422,10 @@ BEGIN
 
 
   if ShowReadme then
   if ShowReadme then
   begin
   begin
+  {$ifdef linux}
+    {Regrettably we do not have a proper solution.}
+    detect_debian;
+  {$endif}
     PutCommand(Application,evCommand,cmShowReadme,nil);
     PutCommand(Application,evCommand,cmShowReadme,nil);
     ShowReadme:=false; { do not show next time }
     ShowReadme:=false; { do not show next time }
   end;
   end;
@@ -410,6 +433,7 @@ BEGIN
   StoreExitProc:=ExitProc;
   StoreExitProc:=ExitProc;
   ExitProc:=@InterceptExit;
   ExitProc:=@InterceptExit;
 
 
+
   repeat
   repeat
 {$IFDEF HasSignal}
 {$IFDEF HasSignal}
      SetJmpRes:=setjmp(StopJmp);
      SetJmpRes:=setjmp(StopJmp);