mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Minor win32 fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8468 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
545718f0a4
commit
5c8b61a934
3 changed files with 25 additions and 16 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-01-03 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSBundle.m: fix for checking windows executable file
|
||||
extensions - reported by michael.scheibler@onevision.de
|
||||
|
||||
2001-01-03 Mirko Viviani <mirko.viviani@rccr.cremona.it>
|
||||
|
||||
* Source/NSObjCRuntime.m (GSInstanceVariableInfo): fixes.
|
||||
|
|
|
@ -59,13 +59,13 @@ GS_EXPORT void NSLogv (NSString* format, va_list args);
|
|||
|
||||
#ifndef YES
|
||||
#define YES 1
|
||||
#endif YES
|
||||
#endif
|
||||
#ifndef NO
|
||||
#define NO 0
|
||||
#endif NO
|
||||
#endif
|
||||
#ifndef nil
|
||||
#define nil 0
|
||||
#endif nil
|
||||
#endif
|
||||
|
||||
#define FOUNDATION_EXPORT
|
||||
#define FOUNDATION_STATIC_INLINE static inline
|
||||
|
|
|
@ -1331,19 +1331,23 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
|||
if ([mgr isExecutableFileAtPath: prefix])
|
||||
return [prefix stringByStandardizingPath];
|
||||
#if defined(__WIN32__)
|
||||
/* Also add common executable extensions on windows */
|
||||
if ([path pathExtension] == nil)
|
||||
{
|
||||
NSString *wpath;
|
||||
wpath = [prefix stringByAppendingPathExtension: @"exe"];
|
||||
if ([mgr isExecutableFileAtPath: wpath])
|
||||
return [wpath stringByStandardizingPath];
|
||||
wpath = [prefix stringByAppendingPathExtension: @"com"];
|
||||
if ([mgr isExecutableFileAtPath: wpath])
|
||||
return [wpath stringByStandardizingPath];
|
||||
wpath = [prefix stringByAppendingPathExtension: @"cmd"];
|
||||
if ([mgr isExecutableFileAtPath: wpath])
|
||||
return [wpath stringByStandardizingPath];
|
||||
{
|
||||
NSString *ext = [path pathExtension];
|
||||
|
||||
/* Also add common executable extensions on windows */
|
||||
if (ext == nil || [ext length] == 0)
|
||||
{
|
||||
NSString *wpath;
|
||||
wpath = [prefix stringByAppendingPathExtension: @"exe"];
|
||||
if ([mgr isExecutableFileAtPath: wpath])
|
||||
return [wpath stringByStandardizingPath];
|
||||
wpath = [prefix stringByAppendingPathExtension: @"com"];
|
||||
if ([mgr isExecutableFileAtPath: wpath])
|
||||
return [wpath stringByStandardizingPath];
|
||||
wpath = [prefix stringByAppendingPathExtension: @"cmd"];
|
||||
if ([mgr isExecutableFileAtPath: wpath])
|
||||
return [wpath stringByStandardizingPath];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue