mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Cygwin-related changes.
- Disabled check for secure temporary directories under Cygwin - objc-load.m codepaths used for MinGW are now also used for Cygwin. Even in case of some functionality that should be standard under UNIX systems, it turns out that this functionality is, sadly, not present under Cygwin (e.g. dladdr()). git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36962 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
351c6d8b54
commit
d09edf1fff
3 changed files with 28 additions and 4 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
2013-08-10 Ivan Vucica <ivan@vucica.net>
|
||||
|
||||
* Source/NSPathUtilities.m:
|
||||
Disabled check for secure temporary directories under Cygwin. Refer
|
||||
to:
|
||||
http://stackoverflow.com/q/9561759/39974
|
||||
for a possible cause of problems.
|
||||
|
||||
* Source/objc-load.m:
|
||||
Codepaths used for MinGW are now also used for Cygwin. Even in
|
||||
case of some functionality that should be standard under UNIX systems,
|
||||
it turns out that this functionality is, sadly, not present under
|
||||
Cygwin (e.g. dladdr()).
|
||||
|
||||
2013-08-10 Lubos Dolezel <lubos@dolezel.info>
|
||||
|
||||
* Source/NSBundle.m: add NSBundle bundleURL, builtInPlugInsURL,
|
||||
|
|
|
@ -1942,6 +1942,7 @@ NSTemporaryDirectory(void)
|
|||
if (baseTempDirName == nil)
|
||||
{
|
||||
#if defined(__CYGWIN__)
|
||||
#warning Basing temporary directory in /cygdrive/c; any reason?
|
||||
baseTempDirName = @"/cygdrive/c/";
|
||||
#elif defined(__MINGW__)
|
||||
baseTempDirName = @"C:\\";
|
||||
|
@ -1982,7 +1983,9 @@ NSTemporaryDirectory(void)
|
|||
perm = perm & 0777;
|
||||
|
||||
// Mateu Batle: secure temporary directories don't work in MinGW
|
||||
#ifndef __MINGW__
|
||||
// Ivan Vucica: there are also problems with Cygwin
|
||||
// probable cause: http://stackoverflow.com/q/9561759/39974
|
||||
#if !defined(__MINGW__) && !defined(__CYGWIN__)
|
||||
|
||||
#if defined(__MINGW__)
|
||||
uid = owner;
|
||||
|
|
|
@ -35,6 +35,10 @@
|
|||
# include <objc/hooks.h>
|
||||
#endif
|
||||
|
||||
#if defined(__CYGWIN__)
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "objc-load.h"
|
||||
#import "Foundation/NSException.h"
|
||||
|
||||
|
@ -83,7 +87,7 @@ static int
|
|||
objc_initialize_loading(FILE *errorStream)
|
||||
{
|
||||
NSString *path;
|
||||
#ifdef __MINGW__
|
||||
#if defined(__MINGW__) || defined(__CYGWIN__)
|
||||
const unichar *fsPath;
|
||||
#else
|
||||
const char *fsPath;
|
||||
|
@ -126,7 +130,7 @@ objc_load_callback(Class class, struct objc_category * category)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__MINGW__)
|
||||
#if defined(__MINGW__) || defined(__CYGWIN__)
|
||||
#define FSCHAR unichar
|
||||
#else
|
||||
#define FSCHAR char
|
||||
|
@ -237,7 +241,7 @@ GSPrivateUnloadModule(FILE *errorStream,
|
|||
}
|
||||
|
||||
|
||||
#ifdef __MINGW__
|
||||
#if defined(__MINGW__) || defined(__CYGWIN__)
|
||||
// FIXME: We can probably get rid of this now - MinGW should include a working
|
||||
// dladdr() wrapping this function, so we no longer need a Windows-only code
|
||||
// path
|
||||
|
@ -252,6 +256,9 @@ GSPrivateSymbolPath(Class theClass, Category *theCategory)
|
|||
VirtualQueryEx(GetCurrentProcess(), theClass, &memInfo, sizeof(memInfo));
|
||||
if (GetModuleFileNameW(memInfo.AllocationBase, buf, sizeof(buf)))
|
||||
{
|
||||
#ifdef __CYGWIN__
|
||||
#warning Under Cygwin, we may want to use cygwin_conv_path() to get the unix path back?
|
||||
#endif
|
||||
s = [NSString stringWithCharacters: buf length: wcslen(buf)];
|
||||
}
|
||||
return s;
|
||||
|
|
Loading…
Reference in a new issue