summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-10-16 10:13:46 +0300
committerTor Lillqvist <tml@collabora.com>2014-10-16 11:22:12 +0300
commitb02e958fa0bf7d062a5b8aff03d22325e3068feb (patch)
treee76ec94b574b2f371cbcfe88611dda27d8c80467 /sal
parentf9aa686432c0ba62c6f440302d5a35856496a786 (diff)
MAC_OS_X_VERSION_MAX_ALLOWED is always >= 1080 now
Change-Id: Ieae67cbf917cdf4bca2b0d6c1697eddc6137dbe2
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/memory.c11
-rw-r--r--sal/osl/unx/system.c51
2 files changed, 0 insertions, 62 deletions
diff --git a/sal/osl/unx/memory.c b/sal/osl/unx/memory.c
index f31c28c88291..e9fb9a885533 100644
--- a/sal/osl/unx/memory.c
+++ b/sal/osl/unx/memory.c
@@ -24,13 +24,6 @@ void* osl_aligned_alloc( sal_Size align, sal_Size size )
{
#if defined __ANDROID__
return memalign(align, size);
-#elif defined MAC_OS_X_VERSION_MAX_ALLOWED && MAC_OS_X_VERSION_MAX_ALLOWED < 1060
- void* ptr = malloc(size + (align - 1) + sizeof(void*));
- if (!ptr) return NULL;
- char* aptr = ((char*)ptr) + sizeof(void*);
- aptr += (align - ((size_t)aptr & (align - 1))) & (align - 1);
- ((void**)aptr)[-1] = ptr;
- return aptr;
#else
void* ptr;
int err = posix_memalign(&ptr, align, size);
@@ -41,11 +34,7 @@ void* osl_aligned_alloc( sal_Size align, sal_Size size )
void osl_aligned_free( void* p )
{
-#if defined MAC_OS_X_VERSION_MAX_ALLOWED && MAC_OS_X_VERSION_MAX_ALLOWED < 1060
- free(((void**)p)[-1]);
-#else
free(p);
-#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/unx/system.c b/sal/osl/unx/system.c
index a234fce2a13a..cb5734dc9d44 100644
--- a/sal/osl/unx/system.c
+++ b/sal/osl/unx/system.c
@@ -157,17 +157,10 @@ int macxp_resolveAlias(char *path, int buflen)
(void) buflen;
return 0;
#else
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
- FSRef aFSRef;
- OSStatus nErr;
- Boolean bFolder;
- Boolean bAliased;
-#else
CFStringRef cfpath;
CFURLRef cfurl;
CFErrorRef cferror;
CFDataRef cfbookmark;
-#endif
char *unprocessedPath = path;
@@ -181,49 +174,6 @@ int macxp_resolveAlias(char *path, int buflen)
if ( unprocessedPath )
*unprocessedPath = '\0';
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
- nErr = noErr;
- bFolder = FALSE;
- bAliased = FALSE;
-
- if ( FSPathMakeRef( (const UInt8 *)path, &aFSRef, 0 ) == noErr )
- {
- nErr = FSResolveAliasFileWithMountFlags( &aFSRef, TRUE, &bFolder, &bAliased, kResolveAliasFileNoUI );
- if ( nErr == nsvErr )
- {
- errno = ENOENT;
- nRet = -1;
- }
- else if ( nErr == noErr && bAliased )
- {
- char tmpPath[ PATH_MAX ];
- if ( FSRefMakePath( &aFSRef, (UInt8 *)tmpPath, PATH_MAX ) == noErr )
- {
- int nLen = strlen( tmpPath ) + ( unprocessedPath ? strlen( unprocessedPath + 1 ) + 1 : 0 );
- if ( nLen < buflen && nLen < PATH_MAX )
- {
- if ( unprocessedPath )
- {
- int nTmpPathLen = strlen( tmpPath );
- strcat( tmpPath, "/" );
- strcat( tmpPath, unprocessedPath + 1 );
- strcpy( path, tmpPath);
- unprocessedPath = path + nTmpPathLen;
- }
- else if ( !unprocessedPath )
- {
- strcpy( path, tmpPath);
- }
- }
- else
- {
- errno = ENAMETOOLONG;
- nRet = -1;
- }
- }
- }
- }
-#else
cfpath = CFStringCreateWithCString( NULL, path, kCFStringEncodingUTF8 );
cfurl = CFURLCreateWithFileSystemPath( NULL, cfpath, kCFURLPOSIXPathStyle, false );
CFRelease( cfpath );
@@ -283,7 +233,6 @@ int macxp_resolveAlias(char *path, int buflen)
}
}
}
-#endif
if ( unprocessedPath )
*unprocessedPath++ = '/';