mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Try .exe path extensions
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13170 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ff4d7e7461
commit
ef20cde55c
2 changed files with 31 additions and 2 deletions
|
@ -12,6 +12,7 @@
|
||||||
getservbyname() doesn't.
|
getservbyname() doesn't.
|
||||||
* Source/UnixFileHandle.m: Fix to return gdomap port even if
|
* Source/UnixFileHandle.m: Fix to return gdomap port even if
|
||||||
getservbyname() doesn't.
|
getservbyname() doesn't.
|
||||||
|
* Source/NSTask.m: Try appending .exe extension to paths under windoze.
|
||||||
|
|
||||||
2002-03-19 Richard Frith-Macdonald <rfm@gnu.org>
|
2002-03-19 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
|
|
@ -737,13 +737,31 @@ pty_slave(const char* name)
|
||||||
full_path = [arch_path stringByAppendingPathComponent: libs];
|
full_path = [arch_path stringByAppendingPathComponent: libs];
|
||||||
|
|
||||||
lpath = [full_path stringByAppendingPathComponent: prog];
|
lpath = [full_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 = [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
|
||||||
|
@ -754,9 +772,19 @@ pty_slave(const char* name)
|
||||||
{
|
{
|
||||||
lpath = [NSBundle _absolutePathOfExecutable: prog];
|
lpath = [NSBundle _absolutePathOfExecutable: prog];
|
||||||
}
|
}
|
||||||
if (lpath != nil && [mgr isExecutableFileAtPath: lpath] == NO)
|
if (lpath != nil)
|
||||||
{
|
{
|
||||||
lpath = nil;
|
#ifdef __MINGW__
|
||||||
|
if ([mgr isExecutableFileAtPath: lpath] == NO
|
||||||
|
&& [mgr isExecutableFileAtPath:
|
||||||
|
(lpath = [lpath stringByAppendingPathExtension: @"exe"])]
|
||||||
|
== NO)
|
||||||
|
#else
|
||||||
|
if ([mgr isExecutableFileAtPath: lpath] == NO)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
lpath = nil;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue