diff --git a/.mulle/share/env/environment-plugin.sh b/.mulle/share/env/environment-plugin.sh index e35d3a2..33b0fbb 100644 --- a/.mulle/share/env/environment-plugin.sh +++ b/.mulle/share/env/environment-plugin.sh @@ -22,6 +22,6 @@ export MULLE_SOURCETREE_SYMLINK='YES' # # # -export MULLE_SDE_INSTALLED_VERSION="3.2.0" +export MULLE_SDE_INSTALLED_VERSION="3.2.2" diff --git a/.mulle/share/env/version b/.mulle/share/env/version index 03f488b..c7cb131 100644 --- a/.mulle/share/env/version +++ b/.mulle/share/env/version @@ -1 +1 @@ -5.3.0 +5.3.1 diff --git a/.mulle/share/sde/version/mulle-sde/cmake b/.mulle/share/sde/version/mulle-sde/cmake index 697f087..48f7a71 100644 --- a/.mulle/share/sde/version/mulle-sde/cmake +++ b/.mulle/share/sde/version/mulle-sde/cmake @@ -1 +1 @@ -0.28.0 +0.28.1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c0eda1..8175882 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required( VERSION 3.15) -project( MulleObjCOSFoundation VERSION 0.23.0 LANGUAGES C) +project( MulleObjCOSFoundation VERSION 0.24.0 LANGUAGES C) # we don't produce any Loader, the subprojects do that diff --git a/README.md b/README.md index e898622..e824e5f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ It builds differently on each platform. | Release Version | Release Notes |-------------------------------------------------------|-------------- -| ![Mulle kybernetiK tag](https://img.shields.io/github/tag/MulleFoundation/MulleObjCOSFoundation.svg?branch=release) [![Build Status](https://github.com/MulleFoundation/MulleObjCOSFoundation/workflows/CI/badge.svg?branch=release)](//github.com/MulleFoundation/MulleObjCOSFoundation/actions) | [RELEASENOTES](RELEASENOTES.md) | +| ![Mulle kybernetiK tag](https://img.shields.io/github/tag/MulleFoundation/MulleObjCOSFoundation.svg) [![Build Status](https://github.com/MulleFoundation/MulleObjCOSFoundation/workflows/CI/badge.svg)](//github.com/MulleFoundation/MulleObjCOSFoundation/actions) | [RELEASENOTES](RELEASENOTES.md) | ## API @@ -56,8 +56,6 @@ mulle-sde add github:MulleFoundation/MulleObjCOSFoundation ## Install -### Install with mulle-sde - Use [mulle-sde](//github.com/mulle-sde) to build and install MulleObjCOSFoundation: ``` sh @@ -65,7 +63,7 @@ mulle-sde install --prefix /usr/local \ https://github.com/MulleFoundation/MulleObjCOSFoundation/archive/latest.tar.gz ``` -### Manual Installation +### Legacy Installation Download the latest [tar](https://github.com/MulleFoundation/MulleObjCOSFoundation/archive/refs/tags/latest.tar.gz) or [zip](https://github.com/MulleFoundation/MulleObjCOSFoundation/archive/refs/tags/latest.zip) archive and unpack it. diff --git a/RELEASENOTES.md b/RELEASENOTES.md index bca5a42..4aaf49d 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,3 +1,8 @@ +## 0.24.0 + +* made NSFileHandle threadsafe, which needed -closeFile to explicitly call -finalize now + + ## 0.23.0 feat: enhance thread safety and system integration diff --git a/cmake/share/InstallRpath.cmake b/cmake/share/InstallRpath.cmake index dbdae7f..8e03fcb 100644 --- a/cmake/share/InstallRpath.cmake +++ b/cmake/share/InstallRpath.cmake @@ -27,10 +27,15 @@ if( MULLE_NO_CMAKE_INSTALL_RPATH) set( CMAKE_SKIP_BUILD_RPATH ON) else() if( APPLE) - set( CMAKE_INSTALL_RPATH - "@loader_path/../lib/" - "@loader_path/../Frameworks/" - ) + if( CMAKE_VERSION VERSION_GREATER_EQUAL 3.20) + # Modern CMake handles lib path automatically + set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks/") + else() + set(CMAKE_INSTALL_RPATH + "@loader_path/../lib/" + "@loader_path/../Frameworks/" + ) + endif() else() set( CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") endif() diff --git a/src/BSD/.mulle/share/env/environment-plugin.sh b/src/BSD/.mulle/share/env/environment-plugin.sh index e35d3a2..33b0fbb 100644 --- a/src/BSD/.mulle/share/env/environment-plugin.sh +++ b/src/BSD/.mulle/share/env/environment-plugin.sh @@ -22,6 +22,6 @@ export MULLE_SOURCETREE_SYMLINK='YES' # # # -export MULLE_SDE_INSTALLED_VERSION="3.2.0" +export MULLE_SDE_INSTALLED_VERSION="3.2.2" diff --git a/src/BSD/.mulle/share/env/version b/src/BSD/.mulle/share/env/version index 03f488b..c7cb131 100644 --- a/src/BSD/.mulle/share/env/version +++ b/src/BSD/.mulle/share/env/version @@ -1 +1 @@ -5.3.0 +5.3.1 diff --git a/src/BSD/.mulle/share/sde/version/mulle-sde/cmake b/src/BSD/.mulle/share/sde/version/mulle-sde/cmake index 697f087..48f7a71 100644 --- a/src/BSD/.mulle/share/sde/version/mulle-sde/cmake +++ b/src/BSD/.mulle/share/sde/version/mulle-sde/cmake @@ -1 +1 @@ -0.28.0 +0.28.1 diff --git a/src/BSD/cmake/share/InstallRpath.cmake b/src/BSD/cmake/share/InstallRpath.cmake index dbdae7f..8e03fcb 100644 --- a/src/BSD/cmake/share/InstallRpath.cmake +++ b/src/BSD/cmake/share/InstallRpath.cmake @@ -27,10 +27,15 @@ if( MULLE_NO_CMAKE_INSTALL_RPATH) set( CMAKE_SKIP_BUILD_RPATH ON) else() if( APPLE) - set( CMAKE_INSTALL_RPATH - "@loader_path/../lib/" - "@loader_path/../Frameworks/" - ) + if( CMAKE_VERSION VERSION_GREATER_EQUAL 3.20) + # Modern CMake handles lib path automatically + set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks/") + else() + set(CMAKE_INSTALL_RPATH + "@loader_path/../lib/" + "@loader_path/../Frameworks/" + ) + endif() else() set( CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") endif() diff --git a/src/Darwin/.mulle/share/env/environment-plugin.sh b/src/Darwin/.mulle/share/env/environment-plugin.sh index e35d3a2..33b0fbb 100644 --- a/src/Darwin/.mulle/share/env/environment-plugin.sh +++ b/src/Darwin/.mulle/share/env/environment-plugin.sh @@ -22,6 +22,6 @@ export MULLE_SOURCETREE_SYMLINK='YES' # # # -export MULLE_SDE_INSTALLED_VERSION="3.2.0" +export MULLE_SDE_INSTALLED_VERSION="3.2.2" diff --git a/src/Darwin/.mulle/share/env/version b/src/Darwin/.mulle/share/env/version index 03f488b..c7cb131 100644 --- a/src/Darwin/.mulle/share/env/version +++ b/src/Darwin/.mulle/share/env/version @@ -1 +1 @@ -5.3.0 +5.3.1 diff --git a/src/Darwin/.mulle/share/sde/version/mulle-sde/cmake b/src/Darwin/.mulle/share/sde/version/mulle-sde/cmake index 697f087..48f7a71 100644 --- a/src/Darwin/.mulle/share/sde/version/mulle-sde/cmake +++ b/src/Darwin/.mulle/share/sde/version/mulle-sde/cmake @@ -1 +1 @@ -0.28.0 +0.28.1 diff --git a/src/Darwin/cmake/share/InstallRpath.cmake b/src/Darwin/cmake/share/InstallRpath.cmake index dbdae7f..8e03fcb 100644 --- a/src/Darwin/cmake/share/InstallRpath.cmake +++ b/src/Darwin/cmake/share/InstallRpath.cmake @@ -27,10 +27,15 @@ if( MULLE_NO_CMAKE_INSTALL_RPATH) set( CMAKE_SKIP_BUILD_RPATH ON) else() if( APPLE) - set( CMAKE_INSTALL_RPATH - "@loader_path/../lib/" - "@loader_path/../Frameworks/" - ) + if( CMAKE_VERSION VERSION_GREATER_EQUAL 3.20) + # Modern CMake handles lib path automatically + set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks/") + else() + set(CMAKE_INSTALL_RPATH + "@loader_path/../lib/" + "@loader_path/../Frameworks/" + ) + endif() else() set( CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") endif() diff --git a/src/FreeBSD/.mulle/share/env/environment-plugin.sh b/src/FreeBSD/.mulle/share/env/environment-plugin.sh index e35d3a2..33b0fbb 100644 --- a/src/FreeBSD/.mulle/share/env/environment-plugin.sh +++ b/src/FreeBSD/.mulle/share/env/environment-plugin.sh @@ -22,6 +22,6 @@ export MULLE_SOURCETREE_SYMLINK='YES' # # # -export MULLE_SDE_INSTALLED_VERSION="3.2.0" +export MULLE_SDE_INSTALLED_VERSION="3.2.2" diff --git a/src/FreeBSD/.mulle/share/env/version b/src/FreeBSD/.mulle/share/env/version index 03f488b..c7cb131 100644 --- a/src/FreeBSD/.mulle/share/env/version +++ b/src/FreeBSD/.mulle/share/env/version @@ -1 +1 @@ -5.3.0 +5.3.1 diff --git a/src/FreeBSD/.mulle/share/sde/version/mulle-sde/cmake b/src/FreeBSD/.mulle/share/sde/version/mulle-sde/cmake index 697f087..48f7a71 100644 --- a/src/FreeBSD/.mulle/share/sde/version/mulle-sde/cmake +++ b/src/FreeBSD/.mulle/share/sde/version/mulle-sde/cmake @@ -1 +1 @@ -0.28.0 +0.28.1 diff --git a/src/FreeBSD/cmake/share/InstallRpath.cmake b/src/FreeBSD/cmake/share/InstallRpath.cmake index dbdae7f..8e03fcb 100644 --- a/src/FreeBSD/cmake/share/InstallRpath.cmake +++ b/src/FreeBSD/cmake/share/InstallRpath.cmake @@ -27,10 +27,15 @@ if( MULLE_NO_CMAKE_INSTALL_RPATH) set( CMAKE_SKIP_BUILD_RPATH ON) else() if( APPLE) - set( CMAKE_INSTALL_RPATH - "@loader_path/../lib/" - "@loader_path/../Frameworks/" - ) + if( CMAKE_VERSION VERSION_GREATER_EQUAL 3.20) + # Modern CMake handles lib path automatically + set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks/") + else() + set(CMAKE_INSTALL_RPATH + "@loader_path/../lib/" + "@loader_path/../Frameworks/" + ) + endif() else() set( CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") endif() diff --git a/src/Linux/.mulle/share/env/environment-plugin.sh b/src/Linux/.mulle/share/env/environment-plugin.sh index e35d3a2..33b0fbb 100644 --- a/src/Linux/.mulle/share/env/environment-plugin.sh +++ b/src/Linux/.mulle/share/env/environment-plugin.sh @@ -22,6 +22,6 @@ export MULLE_SOURCETREE_SYMLINK='YES' # # # -export MULLE_SDE_INSTALLED_VERSION="3.2.0" +export MULLE_SDE_INSTALLED_VERSION="3.2.2" diff --git a/src/Linux/.mulle/share/env/version b/src/Linux/.mulle/share/env/version index 03f488b..c7cb131 100644 --- a/src/Linux/.mulle/share/env/version +++ b/src/Linux/.mulle/share/env/version @@ -1 +1 @@ -5.3.0 +5.3.1 diff --git a/src/Linux/.mulle/share/sde/version/mulle-sde/cmake b/src/Linux/.mulle/share/sde/version/mulle-sde/cmake index 697f087..48f7a71 100644 --- a/src/Linux/.mulle/share/sde/version/mulle-sde/cmake +++ b/src/Linux/.mulle/share/sde/version/mulle-sde/cmake @@ -1 +1 @@ -0.28.0 +0.28.1 diff --git a/src/Linux/cmake/share/InstallRpath.cmake b/src/Linux/cmake/share/InstallRpath.cmake index dbdae7f..8e03fcb 100644 --- a/src/Linux/cmake/share/InstallRpath.cmake +++ b/src/Linux/cmake/share/InstallRpath.cmake @@ -27,10 +27,15 @@ if( MULLE_NO_CMAKE_INSTALL_RPATH) set( CMAKE_SKIP_BUILD_RPATH ON) else() if( APPLE) - set( CMAKE_INSTALL_RPATH - "@loader_path/../lib/" - "@loader_path/../Frameworks/" - ) + if( CMAKE_VERSION VERSION_GREATER_EQUAL 3.20) + # Modern CMake handles lib path automatically + set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks/") + else() + set(CMAKE_INSTALL_RPATH + "@loader_path/../lib/" + "@loader_path/../Frameworks/" + ) + endif() else() set( CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") endif() diff --git a/src/MulleObjCOSFoundation.h b/src/MulleObjCOSFoundation.h index 8a104c5..228b9b0 100644 --- a/src/MulleObjCOSFoundation.h +++ b/src/MulleObjCOSFoundation.h @@ -5,7 +5,7 @@ // Created by Nat! on 05.04.16. // Copyright © 2016 Mulle kybernetiK. All rights reserved. // -#define MULLE_OBJC_OS_FOUNDATION_VERSION ((0UL << 20) | (23 << 8) | 0) +#define MULLE_OBJC_OS_FOUNDATION_VERSION ((0UL << 20) | (24 << 8) | 0) #import "import.h" diff --git a/src/OSBase/.mulle/share/env/environment-plugin.sh b/src/OSBase/.mulle/share/env/environment-plugin.sh index e35d3a2..33b0fbb 100644 --- a/src/OSBase/.mulle/share/env/environment-plugin.sh +++ b/src/OSBase/.mulle/share/env/environment-plugin.sh @@ -22,6 +22,6 @@ export MULLE_SOURCETREE_SYMLINK='YES' # # # -export MULLE_SDE_INSTALLED_VERSION="3.2.0" +export MULLE_SDE_INSTALLED_VERSION="3.2.2" diff --git a/src/OSBase/.mulle/share/env/version b/src/OSBase/.mulle/share/env/version index 03f488b..c7cb131 100644 --- a/src/OSBase/.mulle/share/env/version +++ b/src/OSBase/.mulle/share/env/version @@ -1 +1 @@ -5.3.0 +5.3.1 diff --git a/src/OSBase/.mulle/share/sde/version/mulle-sde/cmake b/src/OSBase/.mulle/share/sde/version/mulle-sde/cmake index 697f087..48f7a71 100644 --- a/src/OSBase/.mulle/share/sde/version/mulle-sde/cmake +++ b/src/OSBase/.mulle/share/sde/version/mulle-sde/cmake @@ -1 +1 @@ -0.28.0 +0.28.1 diff --git a/src/OSBase/NSFileHandle.h b/src/OSBase/NSFileHandle.h index 454b041..d2f453b 100644 --- a/src/OSBase/NSFileHandle.h +++ b/src/OSBase/NSFileHandle.h @@ -20,25 +20,27 @@ MULLE_OBJC_OSBASE_FOUNDATION_GLOBAL NSString *NSFileHandleOperationException; +enum NSFileHandleStateBit +{ + NSFileHandleStateEOF = 1, + NSFileHandleStatePipe = 2, + NSFileHandleStateAgain = 4 +}; + // // This class contains the abstract code for a NSFileHandle // it could be made thread safe with little effort, but a filehandle object // should only be accessed by a single thread anyway (the underlying file // descriptor (like 1 for stdout) is a different thing) // -@interface NSFileHandle : NSObject +@interface NSFileHandle : NSObject { - void *_fd; - int (*_closer)( void *); // TODO: use mulle_buffer_stdio_functions ?? - int _mode; - struct - { - unsigned int eof : 1; - unsigned int pipe : 1; - unsigned int again : 1; - } _state; + void *_fd; + int (*_closer)( void *); // TODO: use mulle_buffer_stdio_functions ?? + int _mode; + int _closerRval; + NSUIntegerAtomic _state; } - + (instancetype) fileHandleForReadingAtPath:(NSString *) path; + (instancetype) fileHandleForWritingAtPath:(NSString *) path; + (instancetype) fileHandleForUpdatingAtPath:(NSString *) path; @@ -65,11 +67,16 @@ NSString *NSFileHandleOperationException; - (int) _fileDescriptorForReading; - (int) _fileDescriptorForWriting; + +// does -finalize +- (void) closeFile; + // mulle addition, if len == -1, it will strlen bytes!! - (void) mulleWriteBytes:(void *) bytes length:(NSUInteger) len; -- (void) closeFile; +- (void) mulleAddToStateBits:(NSUInteger) bits; +- (NSUInteger) mulleGetStateBits; @end diff --git a/src/OSBase/NSFileHandle.m b/src/OSBase/NSFileHandle.m index 7b3ac8d..ea4af52 100644 --- a/src/OSBase/NSFileHandle.m +++ b/src/OSBase/NSFileHandle.m @@ -95,6 +95,7 @@ static id NSInitFileHandle( NSFileHandle *self, void *fd) return( self); } + - (instancetype) initWithFileDescriptor:(int) fd { return( NSInitFileHandle( self, (void *) (intptr_t) fd)); @@ -128,9 +129,20 @@ + (instancetype) fileHandleWithNullDevice } +/// +// we basically use -finalize as a thread sync mechanism here, as only +// one thread can be executing close +// - (void) finalize { - [self closeFile]; + if( _closer) + { + _closerRval = (*_closer)( _fd); + if( _closerRval == 0) + _closer = 0; + // else, raise or what ? + } + [super finalize]; } @@ -140,15 +152,7 @@ - (void) finalize - (void) closeFile { - int rval; - - if( ! _closer) - return; - - rval = (*_closer)( _fd); - if( rval == 0) - _closer = 0; - // raise or what ? + [self mullePerformFinalize]; } @@ -188,7 +192,7 @@ - (int) _fileDescriptorForWriting char *buf; char *start; - if( ! length || self->_state.eof) + if( ! length || (NSUIntegerAtomicGet( &self->_state) & NSFileHandleStateEOF)) return( nil); data = [NSMutableData dataWithLength:length]; @@ -271,7 +275,7 @@ - (void) mulleWriteBytes:(void *) bytes { written = [self _writeBytes:buf length:len]; - if( ! written && _state.eof) + if( ! written && (NSUIntegerAtomicGet( &self->_state) & NSFileHandleStateEOF)) break; len -= written; @@ -309,5 +313,20 @@ - (void) truncateFileAtOffset:(unsigned long long) offset mode:_MulleObjCSeekCur]; // TODO: check! } + +- (void) mulleAddToStateBits:(NSUInteger) bits +{ + NSUIntegerAtomicMaskedOr( &self->_state, ~0L, bits); +} + + +- (NSUInteger) mulleGetStateBits +{ + NSUInteger state; + + state = NSUIntegerAtomicGet( &self->_state); + return( state); +} + @end diff --git a/src/OSBase/NSRunLoop.m b/src/OSBase/NSRunLoop.m index 85d2b29..a385203 100644 --- a/src/OSBase/NSRunLoop.m +++ b/src/OSBase/NSRunLoop.m @@ -650,6 +650,12 @@ + (void) willFinalize { NSRunLoop *runLoop; + // + // if thread is already finalized, don't create another runloop + // + if( thread && _mulle_objc_object_is_finalized( thread)) + return( nil); + runLoop = [thread mulleRunLoop]; if( ! runLoop && ! Self._isFinalizing) { diff --git a/src/OSBase/cmake/share/InstallRpath.cmake b/src/OSBase/cmake/share/InstallRpath.cmake index dbdae7f..8e03fcb 100644 --- a/src/OSBase/cmake/share/InstallRpath.cmake +++ b/src/OSBase/cmake/share/InstallRpath.cmake @@ -27,10 +27,15 @@ if( MULLE_NO_CMAKE_INSTALL_RPATH) set( CMAKE_SKIP_BUILD_RPATH ON) else() if( APPLE) - set( CMAKE_INSTALL_RPATH - "@loader_path/../lib/" - "@loader_path/../Frameworks/" - ) + if( CMAKE_VERSION VERSION_GREATER_EQUAL 3.20) + # Modern CMake handles lib path automatically + set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks/") + else() + set(CMAKE_INSTALL_RPATH + "@loader_path/../lib/" + "@loader_path/../Frameworks/" + ) + endif() else() set( CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") endif() diff --git a/src/Posix/.mulle/share/env/environment-plugin.sh b/src/Posix/.mulle/share/env/environment-plugin.sh index e35d3a2..33b0fbb 100644 --- a/src/Posix/.mulle/share/env/environment-plugin.sh +++ b/src/Posix/.mulle/share/env/environment-plugin.sh @@ -22,6 +22,6 @@ export MULLE_SOURCETREE_SYMLINK='YES' # # # -export MULLE_SDE_INSTALLED_VERSION="3.2.0" +export MULLE_SDE_INSTALLED_VERSION="3.2.2" diff --git a/src/Posix/.mulle/share/env/version b/src/Posix/.mulle/share/env/version index 03f488b..c7cb131 100644 --- a/src/Posix/.mulle/share/env/version +++ b/src/Posix/.mulle/share/env/version @@ -1 +1 @@ -5.3.0 +5.3.1 diff --git a/src/Posix/.mulle/share/sde/version/mulle-sde/cmake b/src/Posix/.mulle/share/sde/version/mulle-sde/cmake index 697f087..48f7a71 100644 --- a/src/Posix/.mulle/share/sde/version/mulle-sde/cmake +++ b/src/Posix/.mulle/share/sde/version/mulle-sde/cmake @@ -1 +1 @@ -0.28.0 +0.28.1 diff --git a/src/Posix/NSFileHandle+Posix.m b/src/Posix/NSFileHandle+Posix.m index 23dee43..b07f2a6 100644 --- a/src/Posix/NSFileHandle+Posix.m +++ b/src/Posix/NSFileHandle+Posix.m @@ -123,20 +123,24 @@ - (ssize_t) _readBytes:(void *) buf if( errno == EPIPE) { - _state.eof = 1; - _state.pipe = 1; + NSUIntegerAtomicOr( &self->_state, NSFileHandleStateEOF|NSFileHandleStatePipe); return( 0); } if( errno == EAGAIN) { - _state.again = 1; + NSUIntegerAtomicOr( &self->_state, NSFileHandleStateAgain); return( 0); } MulleObjCThrowErrnoException( @"read"); } - _state.eof = len && ! result; + + // _state.eof = len && ! result; + NSUIntegerAtomicMaskedOr( &self->_state, + ~NSFileHandleStateEOF, + (len && ! result) ? NSFileHandleStateEOF : 0); + return( result); } @@ -163,21 +167,22 @@ - (size_t) _writeBytes:(void *) buf if( errno == EPIPE) { - _state.eof = 1; - _state.pipe = 1; + NSUIntegerAtomicOr( &self->_state, NSFileHandleStateEOF|NSFileHandleStatePipe); return( 0); } if( errno == EAGAIN) { - _state.again = 1; + NSUIntegerAtomicOr( &self->_state, NSFileHandleStateAgain); return( 0); } MulleObjCThrowErrnoException( @"write"); } - _state.eof = len && ! result; + NSUIntegerAtomicMaskedOr( &self->_state, + ~NSFileHandleStateEOF, + (len && ! result) ? NSFileHandleStateEOF : 0); return( (size_t) result); } @@ -209,8 +214,7 @@ - (unsigned long long) _seek:(unsigned long long) offset { if( errno == EPIPE) { - _state.eof = 1; - _state.pipe = 1; + NSUIntegerAtomicOr( &self->_state, NSFileHandleStateEOF|NSFileHandleStatePipe); return( 0); } diff --git a/src/Posix/cmake/share/InstallRpath.cmake b/src/Posix/cmake/share/InstallRpath.cmake index dbdae7f..8e03fcb 100644 --- a/src/Posix/cmake/share/InstallRpath.cmake +++ b/src/Posix/cmake/share/InstallRpath.cmake @@ -27,10 +27,15 @@ if( MULLE_NO_CMAKE_INSTALL_RPATH) set( CMAKE_SKIP_BUILD_RPATH ON) else() if( APPLE) - set( CMAKE_INSTALL_RPATH - "@loader_path/../lib/" - "@loader_path/../Frameworks/" - ) + if( CMAKE_VERSION VERSION_GREATER_EQUAL 3.20) + # Modern CMake handles lib path automatically + set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks/") + else() + set(CMAKE_INSTALL_RPATH + "@loader_path/../lib/" + "@loader_path/../Frameworks/" + ) + endif() else() set( CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") endif() diff --git a/src/Windows/.mulle/share/env/environment-plugin.sh b/src/Windows/.mulle/share/env/environment-plugin.sh index e35d3a2..33b0fbb 100644 --- a/src/Windows/.mulle/share/env/environment-plugin.sh +++ b/src/Windows/.mulle/share/env/environment-plugin.sh @@ -22,6 +22,6 @@ export MULLE_SOURCETREE_SYMLINK='YES' # # # -export MULLE_SDE_INSTALLED_VERSION="3.2.0" +export MULLE_SDE_INSTALLED_VERSION="3.2.2" diff --git a/src/Windows/.mulle/share/env/version b/src/Windows/.mulle/share/env/version index 03f488b..c7cb131 100644 --- a/src/Windows/.mulle/share/env/version +++ b/src/Windows/.mulle/share/env/version @@ -1 +1 @@ -5.3.0 +5.3.1 diff --git a/src/Windows/.mulle/share/sde/version/mulle-sde/cmake b/src/Windows/.mulle/share/sde/version/mulle-sde/cmake index 697f087..48f7a71 100644 --- a/src/Windows/.mulle/share/sde/version/mulle-sde/cmake +++ b/src/Windows/.mulle/share/sde/version/mulle-sde/cmake @@ -1 +1 @@ -0.28.0 +0.28.1 diff --git a/src/Windows/cmake/share/InstallRpath.cmake b/src/Windows/cmake/share/InstallRpath.cmake index dbdae7f..8e03fcb 100644 --- a/src/Windows/cmake/share/InstallRpath.cmake +++ b/src/Windows/cmake/share/InstallRpath.cmake @@ -27,10 +27,15 @@ if( MULLE_NO_CMAKE_INSTALL_RPATH) set( CMAKE_SKIP_BUILD_RPATH ON) else() if( APPLE) - set( CMAKE_INSTALL_RPATH - "@loader_path/../lib/" - "@loader_path/../Frameworks/" - ) + if( CMAKE_VERSION VERSION_GREATER_EQUAL 3.20) + # Modern CMake handles lib path automatically + set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks/") + else() + set(CMAKE_INSTALL_RPATH + "@loader_path/../lib/" + "@loader_path/../Frameworks/" + ) + endif() else() set( CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") endif() diff --git a/test/.mulle/share/env/environment-plugin.sh b/test/.mulle/share/env/environment-plugin.sh index e35d3a2..33b0fbb 100644 --- a/test/.mulle/share/env/environment-plugin.sh +++ b/test/.mulle/share/env/environment-plugin.sh @@ -22,6 +22,6 @@ export MULLE_SOURCETREE_SYMLINK='YES' # # # -export MULLE_SDE_INSTALLED_VERSION="3.2.0" +export MULLE_SDE_INSTALLED_VERSION="3.2.2" diff --git a/test/.mulle/share/env/version b/test/.mulle/share/env/version index 03f488b..c7cb131 100644 --- a/test/.mulle/share/env/version +++ b/test/.mulle/share/env/version @@ -1 +1 @@ -5.3.0 +5.3.1 diff --git a/test/.mulle/share/sde/version/mulle-sde/base-test-runtime b/test/.mulle/share/sde/version/mulle-sde/base-test-runtime index 19b860c..a4c853e 100644 --- a/test/.mulle/share/sde/version/mulle-sde/base-test-runtime +++ b/test/.mulle/share/sde/version/mulle-sde/base-test-runtime @@ -1 +1 @@ -6.4.0 +6.4.2 diff --git a/test/.mulle/share/sde/version/mulle-sde/c-test-runtime b/test/.mulle/share/sde/version/mulle-sde/c-test-runtime index 19b860c..a4c853e 100644 --- a/test/.mulle/share/sde/version/mulle-sde/c-test-runtime +++ b/test/.mulle/share/sde/version/mulle-sde/c-test-runtime @@ -1 +1 @@ -6.4.0 +6.4.2 diff --git a/test/.mulle/share/sde/version/mulle-sde/objc-test b/test/.mulle/share/sde/version/mulle-sde/objc-test index 19b860c..a4c853e 100644 --- a/test/.mulle/share/sde/version/mulle-sde/objc-test +++ b/test/.mulle/share/sde/version/mulle-sde/objc-test @@ -1 +1 @@ -6.4.0 +6.4.2 diff --git a/test/.mulle/share/sde/version/mulle-sde/objc-test-runtime b/test/.mulle/share/sde/version/mulle-sde/objc-test-runtime index 19b860c..a4c853e 100644 --- a/test/.mulle/share/sde/version/mulle-sde/objc-test-runtime +++ b/test/.mulle/share/sde/version/mulle-sde/objc-test-runtime @@ -1 +1 @@ -6.4.0 +6.4.2