mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-01 00:10:00 +01:00 
			
		
		
		
	* searching of exe in path also for OS/2
* fixed searching of exe in path.
This commit is contained in:
		
							parent
							
								
									17e5c889f3
								
							
						
					
					
						commit
						0c94c56136
					
				| @ -1077,10 +1077,18 @@ implementation | |||||||
|                                     Init |                                     Init | ||||||
| ****************************************************************************} | ****************************************************************************} | ||||||
| 
 | 
 | ||||||
|  | {$ifdef linux} | ||||||
|  |   {$define need_path_search} | ||||||
|  | {$endif linux} | ||||||
|  | {$ifdef os2} | ||||||
|  |   {$define need_path_search} | ||||||
|  | {$endif os2} | ||||||
|  | 
 | ||||||
|    procedure get_exepath; |    procedure get_exepath; | ||||||
|      var |      var | ||||||
|        hs1 : namestr; |        hs1 : namestr; | ||||||
|        hs2 : extstr; |        hs2 : extstr; | ||||||
|  |        b: boolean; | ||||||
|      begin |      begin | ||||||
| {$ifdef delphi} | {$ifdef delphi} | ||||||
|        exepath:=dmisc.getenv('PPC_EXEC_PATH'); |        exepath:=dmisc.getenv('PPC_EXEC_PATH'); | ||||||
| @ -1090,10 +1098,19 @@ implementation | |||||||
|        if exepath='' then |        if exepath='' then | ||||||
|         fsplit(FixFileName(paramstr(0)),exepath,hs1,hs2); |         fsplit(FixFileName(paramstr(0)),exepath,hs1,hs2); | ||||||
| {$ifndef VER0_99_15} | {$ifndef VER0_99_15} | ||||||
|      {$ifdef linux} |    {$ifdef need_path_search} | ||||||
|        if exepath='' then |        if exepath='' then | ||||||
|         fsearch(hs1,dos.getenv('PATH')); |         begin | ||||||
|      {$endif} |           if pos(source_os.exeext,hs1) <> | ||||||
|  |                (length(hs1) - length(source_os.exeext)+1) then | ||||||
|  |             hs1 := hs1 + source_os.exeext; | ||||||
|  |       {$ifdef delphi} | ||||||
|  |           exepath := findfile(hs1,dmisc.getenv('PATH'),b); | ||||||
|  |       {$else delphi} | ||||||
|  |           exepath := findfile(hs1,dos.getenv('PATH'),b); | ||||||
|  |       {$endif delphi} | ||||||
|  |         end; | ||||||
|  |    {$endif need_path_search} | ||||||
| {$endif} | {$endif} | ||||||
|        exepath:=FixPath(exepath,false); |        exepath:=FixPath(exepath,false); | ||||||
|      end; |      end; | ||||||
| @ -1198,7 +1215,11 @@ begin | |||||||
| end. | end. | ||||||
| { | { | ||||||
|   $Log$ |   $Log$ | ||||||
|   Revision 1.8  2000-09-11 17:00:22  florian |   Revision 1.9  2000-09-24 10:33:07  peter | ||||||
|  |     * searching of exe in path also for OS/2 | ||||||
|  |     * fixed searching of exe in path. | ||||||
|  | 
 | ||||||
|  |   Revision 1.8  2000/09/11 17:00:22  florian | ||||||
|     + first implementation of Netware Module support, thanks to |     + first implementation of Netware Module support, thanks to | ||||||
|       Armin Diehl (diehl@nordrhein.de) for providing the patches |       Armin Diehl (diehl@nordrhein.de) for providing the patches | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 peter
						peter