mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-28 11:10:51 +00:00
mingw fixup by Riccardo
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37568 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bc6da4ddc2
commit
08ecbf5d0c
2 changed files with 13 additions and 25 deletions
|
@ -3,6 +3,8 @@
|
||||||
* Source/NSFileManager.m:
|
* Source/NSFileManager.m:
|
||||||
On mingw a file is executable if its extension is in the list
|
On mingw a file is executable if its extension is in the list
|
||||||
provided by the PATHEXT environment variable.
|
provided by the PATHEXT environment variable.
|
||||||
|
* Source/NSTask.m:
|
||||||
|
Simplification/clarification suggested by Riccardo
|
||||||
|
|
||||||
2014-01-08 Quentin Mathe <quentin.mathe@gmail.com>
|
2014-01-08 Quentin Mathe <quentin.mathe@gmail.com>
|
||||||
|
|
||||||
|
|
|
@ -771,32 +771,25 @@ pty_slave(const char* name)
|
||||||
arch_path = [arch_path stringByAppendingPathComponent: os];
|
arch_path = [arch_path stringByAppendingPathComponent: os];
|
||||||
full_path = [arch_path stringByAppendingPathComponent: libs];
|
full_path = [arch_path stringByAppendingPathComponent: libs];
|
||||||
|
|
||||||
lpath = [full_path stringByAppendingPathComponent: prog];
|
|
||||||
#ifdef __MINGW__
|
#ifdef __MINGW__
|
||||||
if ([mgr isExecutableFileAtPath: lpath] == NO
|
/* As a convenience on windows, if the program was supplied without
|
||||||
&& [mgr isExecutableFileAtPath:
|
* an extension (which means it can't be executable) try using the
|
||||||
(lpath = [lpath stringByAppendingPathExtension: @"exe"])] == NO)
|
* most common extension.
|
||||||
#else
|
*/
|
||||||
if ([mgr isExecutableFileAtPath: lpath] == NO)
|
if ([[prog pathExtension] length] == 0)
|
||||||
|
{
|
||||||
|
prog = [prog stringByAppendingPathExtension: @"exe"];
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
lpath = [full_path stringByAppendingPathComponent: prog];
|
||||||
|
if ([mgr isExecutableFileAtPath: lpath] == NO)
|
||||||
{
|
{
|
||||||
lpath = [arch_path stringByAppendingPathComponent: prog];
|
lpath = [arch_path stringByAppendingPathComponent: prog];
|
||||||
#ifdef __MINGW__
|
|
||||||
if ([mgr isExecutableFileAtPath: lpath] == NO
|
|
||||||
&& [mgr isExecutableFileAtPath:
|
|
||||||
(lpath = [lpath stringByAppendingPathExtension: @"exe"])] == NO)
|
|
||||||
#else
|
|
||||||
if ([mgr isExecutableFileAtPath: lpath] == NO)
|
if ([mgr isExecutableFileAtPath: lpath] == NO)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
lpath = [base_path stringByAppendingPathComponent: prog];
|
lpath = [base_path stringByAppendingPathComponent: prog];
|
||||||
#ifdef __MINGW__
|
|
||||||
if ([mgr isExecutableFileAtPath: lpath] == NO
|
|
||||||
&& [mgr isExecutableFileAtPath:
|
|
||||||
(lpath = [lpath stringByAppendingPathExtension: @"exe"])] == NO)
|
|
||||||
#else
|
|
||||||
if ([mgr isExecutableFileAtPath: lpath] == NO)
|
if ([mgr isExecutableFileAtPath: lpath] == NO)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Last resort - if the launch path was simply a program name
|
* Last resort - if the launch path was simply a program name
|
||||||
|
@ -809,14 +802,7 @@ pty_slave(const char* name)
|
||||||
}
|
}
|
||||||
if (lpath != nil)
|
if (lpath != nil)
|
||||||
{
|
{
|
||||||
#ifdef __MINGW__
|
|
||||||
if ([mgr isExecutableFileAtPath: lpath] == NO
|
|
||||||
&& [mgr isExecutableFileAtPath:
|
|
||||||
(lpath = [lpath stringByAppendingPathExtension: @"exe"])]
|
|
||||||
== NO)
|
|
||||||
#else
|
|
||||||
if ([mgr isExecutableFileAtPath: lpath] == NO)
|
if ([mgr isExecutableFileAtPath: lpath] == NO)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
lpath = nil;
|
lpath = nil;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue