hrev46150 adds 4 changesets to branch 'master' old head: b617a7b410c05275effb95f4b2f5608359d9b7b9 new head: 5fd3766e032ca6b3a712dab6b3e3f9bf9700ad22 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=5fd3766+%5Eb617a7b ---------------------------------------------------------------------------- 57405de: Always use dlopen and dlsym to load libsolv Previous implementation used weak symbols on all platforms except Haiku. Mac OS X also does not support this use of weak symbols. In the discussion of #10028 it was decided that probably more platforms will have problems with this approach, so instead use the approach that always works. [ Niels Sascha Reedijk <niels.reedijk@xxxxxxxxx> ] a69102a: Add HOST_LIBSUPC++ to fix compilation on MacOS X [ Niels Sascha Reedijk <niels.reedijk@xxxxxxxxx> ] f04f704: Determine how to invoke sed with extended regexp This will require re-running configure [ Niels Sascha Reedijk <niels.reedijk@xxxxxxxxx> ] 5fd3766: libroot_build: fs_darwin: fdopendir(): close FD on success fdopendir() is supposed to consume the specified FD on success. [ Ingo Weinhold <ingo_weinhold@xxxxxx> ] ---------------------------------------------------------------------------- 6 files changed, 15 insertions(+), 34 deletions(-) build/jam/FileRules | 3 ++- configure | 7 +++++++ src/build/libroot/fs_darwin.cpp | 6 +++++- src/kits/package/solver/LibsolvSolver.cpp | 16 ---------------- src/kits/package/solver/Solver.cpp | 15 --------------- src/tools/create_repository_config/Jamfile | 2 +- ############################################################################ Commit: 57405de578b6ad646e55435b1b1d286cd5a5a6b3 URL: http://cgit.haiku-os.org/haiku/commit/?id=57405de Author: Niels Sascha Reedijk <niels.reedijk@xxxxxxxxx> Date: Sun Sep 29 15:35:14 2013 UTC Ticket: https://dev.haiku-os.org/ticket/10028 Always use dlopen and dlsym to load libsolv Previous implementation used weak symbols on all platforms except Haiku. Mac OS X also does not support this use of weak symbols. In the discussion of #10028 it was decided that probably more platforms will have problems with this approach, so instead use the approach that always works. ---------------------------------------------------------------------------- diff --git a/src/kits/package/solver/LibsolvSolver.cpp b/src/kits/package/solver/LibsolvSolver.cpp index a3ecbb7..12a4b6a 100644 --- a/src/kits/package/solver/LibsolvSolver.cpp +++ b/src/kits/package/solver/LibsolvSolver.cpp @@ -38,9 +38,6 @@ // abort()s. Obviously that isn't good behavior for a library. -#ifdef __HAIKU__ - - BSolver* BPackageKit::create_solver() { @@ -48,19 +45,6 @@ BPackageKit::create_solver() } -#else - - -extern "C" BSolver* -__create_libsolv_solver() -{ - return new(std::nothrow) LibsolvSolver; -} - - -#endif - - struct LibsolvSolver::SolvQueue : Queue { SolvQueue() { diff --git a/src/kits/package/solver/Solver.cpp b/src/kits/package/solver/Solver.cpp index e6984cd..7f5c630 100644 --- a/src/kits/package/solver/Solver.cpp +++ b/src/kits/package/solver/Solver.cpp @@ -13,9 +13,6 @@ typedef BPackageKit::BSolver* CreateSolverFunction(); -#ifdef __HAIKU__ - - #include <dlfcn.h> #include <pthread.h> @@ -41,16 +38,6 @@ load_libsolv_solver_add_on() dlclose(imageHandle); } -#else - - -static BPackageKit::BSolver* __create_libsolv_solver() - __attribute__((weakref("__create_libsolv_solver"))); -static CreateSolverFunction* sCreateSolver = &__create_libsolv_solver; - - -#endif - namespace BPackageKit { @@ -68,9 +55,7 @@ BSolver::~BSolver() /*static*/ status_t BSolver::Create(BSolver*& _solver) { -#ifdef __HAIKU__ pthread_once(&sLoadLibsolvSolverAddOnInitOnce, &load_libsolv_solver_add_on); -#endif if (sCreateSolver == NULL) return B_NOT_SUPPORTED; ############################################################################ Commit: a69102a1f3c39b5c6c9f4e83e2399a5d2ad015ad URL: http://cgit.haiku-os.org/haiku/commit/?id=a69102a Author: Niels Sascha Reedijk <niels.reedijk@xxxxxxxxx> Date: Sun Sep 29 15:38:37 2013 UTC Add HOST_LIBSUPC++ to fix compilation on MacOS X ---------------------------------------------------------------------------- diff --git a/src/tools/create_repository_config/Jamfile b/src/tools/create_repository_config/Jamfile index cfc462c..309189e 100644 --- a/src/tools/create_repository_config/Jamfile +++ b/src/tools/create_repository_config/Jamfile @@ -7,5 +7,5 @@ USES_BE_API on <build>create_repository_config = true ; BuildPlatformMain <build>create_repository_config : create_repository_config.cpp : - libpackage_build.so $(HOST_LIBBE) $(HOST_LIBSTDC++) + libpackage_build.so $(HOST_LIBBE) $(HOST_LIBSUPC++) $(HOST_LIBSTDC++) ; ############################################################################ Commit: f04f7042c5559ac05a6e2e3fe65020b30e7c4eb9 URL: http://cgit.haiku-os.org/haiku/commit/?id=f04f704 Author: Niels Sascha Reedijk <niels.reedijk@xxxxxxxxx> Date: Sun Sep 29 19:27:47 2013 UTC Determine how to invoke sed with extended regexp This will require re-running configure ---------------------------------------------------------------------------- diff --git a/build/jam/FileRules b/build/jam/FileRules index 6a4b02e..cdbb05e 100644 --- a/build/jam/FileRules +++ b/build/jam/FileRules @@ -454,7 +454,8 @@ rule DownloadFile file : url : source actions ChecksumFileSHA256 { - $(HOST_SHA256) $(2) | sed -r 's,([^[:space:]]*).*,\1,' > $(1) + $(HOST_SHA256) $(2) \ + | $(HOST_EXTENDED_REGEX_SED) 's,([^[:space:]]*).*,\1,' > $(1) # The sed part is only necessary for sha256sum, but it doesn't harm for # sha256 either. } diff --git a/configure b/configure index 9bcba39..4a86e07 100755 --- a/configure +++ b/configure @@ -465,6 +465,7 @@ HAIKU_HOST_USE_32BIT=0 HAIKU_HOST_USE_XATTR=0 HAIKU_HOST_USE_XATTR_REF=0 HAIKU_HOST_BUILD_ONLY=0 +HOST_EXTENDED_REGEX_SED="sed -r" HOST_GCC_LD=`gcc -print-prog-name=ld` HOST_GCC_OBJCOPY=`gcc -print-prog-name=objcopy` SFDISK_BINARY=sfdisk @@ -663,6 +664,11 @@ if [ $caseInsensitive != 0 ]; then exit 1 fi +# determine how to invoke sed with extended regexp support for non-GNU sed +if [ $HOST_PLATFORM = "darwin" ]; then + HOST_EXTENDED_REGEX_SED="sed -E" +fi + # create output directory mkdir -p "$buildOutputDir" || exit 1 @@ -858,6 +864,7 @@ HAIKU_BUILD_ATTRIBUTES_DIR ?= ${HAIKU_BUILD_ATTRIBUTES_DIR} ; HAIKU_YASM ?= ${HAIKU_YASM} ; +HOST_EXTENDED_REGEX_SED ?= ${HOST_EXTENDED_REGEX_SED} ; HOST_GCC_RAW_VERSION ?= ${HOST_GCC_RAW_VERSION} ; HOST_GCC_MACHINE ?= ${HOST_GCC_MACHINE} ; HOST_LD ?= ${HOST_GCC_LD} ; ############################################################################ Revision: hrev46150 Commit: 5fd3766e032ca6b3a712dab6b3e3f9bf9700ad22 URL: http://cgit.haiku-os.org/haiku/commit/?id=5fd3766 Author: Ingo Weinhold <ingo_weinhold@xxxxxx> Date: Sun Sep 29 20:37:07 2013 UTC Committer: Niels Sascha Reedijk <niels.reedijk@xxxxxxxxx> Commit-Date: Mon Sep 30 19:41:56 2013 UTC libroot_build: fs_darwin: fdopendir(): close FD on success fdopendir() is supposed to consume the specified FD on success. ---------------------------------------------------------------------------- diff --git a/src/build/libroot/fs_darwin.cpp b/src/build/libroot/fs_darwin.cpp index f381bd0..f4d11b6 100644 --- a/src/build/libroot/fs_darwin.cpp +++ b/src/build/libroot/fs_darwin.cpp @@ -230,7 +230,11 @@ fdopendir(int fd) return NULL; } - return opendir(path); + DIR* dir = opendir(path); + if (dir != NULL) + close(fd); + + return dir; }