diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2026-01-15 22:52:32 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2026-01-15 22:52:32 +0900 |
| commit | 99e229125ee233bce9b3a1424b1f828350e1ef33 (patch) | |
| tree | f687f23a0a0ec4b975409eda4556d8420f5c56ef | |
| parent | 04c8d737804890585589b6f5a528c68b31762999 (diff) | |
| download | kvirc-drop/old-thread-support.tar.gz kvirc-drop/old-thread-support.zip | |
Remove code related to obsoleted thread librariesdrop/old-thread-support
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
| -rw-r--r-- | INSTALL | 24 | ||||
| -rw-r--r-- | admin/acinclude.m4.in | 103 | ||||
| -rw-r--r-- | config.h.in | 10 | ||||
| -rw-r--r-- | src/kvilib/config/kvi_wincfg.h | 6 | ||||
| -rw-r--r-- | src/kvilib/system/kvi_thread.h | 35 |
5 files changed, 28 insertions, 150 deletions
@@ -165,18 +165,6 @@ General notes for the installation of the 3.4.0 release of KVIrc If you don't have it (the configure script will tell you) you can download it from your favorite GNU mirror. - On Solaris you can use the native libthread.so library instead - but you will have to pass the specific option to configure (see below). - FreeBSD has a native implementation of pthreads in libc_r and - the gcc compiler has a special -pthread flag to link to it. - If you're on FreeBSD, use the --with-freebsd-pthread configure - option and make sure that you don't have other pthread wrappers - installed (that might collide with the native header files). - - The configure script will also fail if the library is - hidden somewhere on your system (eg. not in /lib , /usr/lib or - /usr/local/lib): you should probably move it. - - You need the dynamic linker interface library libdl.so. @@ -478,18 +466,6 @@ General notes for the installation of the 3.4.0 release of KVIrc It also eats some executable size. So this option allows to disable the pseudo-transparency. - --with-solaris-lthread - If you're on Solaris and don't have the pthread library (A wrapper - I guess) you might try this option: it attempts to use the native - Solaris threading support. - - --with-freebsd-pthread - If you're on FreeBSD, you NEED this option. This enables the usage - of the native FreeBSD pthread implementation found in libc_r. - This requires you to use the native gcc compiler: it has a special - -pthread flag that enables the linkage to libc_r instead - of plain libc. - --with-libresolv Link to libresolv. I guess that this is required for Solaris diff --git a/admin/acinclude.m4.in b/admin/acinclude.m4.in index 7ebc1eb..3c91617 100644 --- a/admin/acinclude.m4.in +++ b/admin/acinclude.m4.in @@ -1181,84 +1181,37 @@ dnl ############################################################################ AC_DEFUN([AC_SS_CHECK_THREAD_STUFF], [ - SS_THREAD_LIBLINK="" + SS_THREAD_LIBLINK="-lpthread" - AC_MSG_CHECKING([if you want to use the solaris lthread]) + AC_MSG_CHECKING([if your pthread implementation works]) SS_DO_IT="false" - AC_ARG_WITH(solaris-lthread, [ --with-solaris-lthread Use the Solaris native libthread],SS_DO_IT="true") - if test "$SS_DO_IT" = "true"; then - AC_MSG_RESULT(yes) - SS_THREAD_LIBLINK="-lthread" - AC_DEFINE([COMPILE_THREADS_USE_SOLARIS_LIBTHREAD], 1, [define if you want to use the solaris libthread]) - else - AC_MSG_RESULT(no) - - AC_MSG_CHECKING([if you want to use freebsd native pthread support]) - SS_DO_IT="false" - - AC_ARG_WITH(freebsd-pthread, [ --with-freebsd-pthread Use the FreeBSD native libc_r for threading],SS_DO_IT="true") - if test "$SS_DO_IT" = "true"; then - AC_MSG_RESULT(yes) - SS_THREAD_LIBLINK="-pthread" - AC_DEFINE([COMPILE_THREADS_USE_POSIX], 1, [define if you want to use the pthreads library]) - else - AC_MSG_RESULT(no..using lpthread) - SS_THREAD_LIBLINK="-lpthread" - AC_DEFINE([COMPILE_THREADS_USE_POSIX], 1, [define if you want to use the pthreads library]) - fi - - AC_MSG_CHECKING([if your pthread implementation works]) - SS_DO_IT="false" - AC_ARG_WITH(no-pthread-check, [ --with-no-pthread-check Do not check if pthreads stuff compiles],SS_DO_IT="true") - - if test "$SS_DO_IT" = "true"; then - AC_MSG_RESULT(yes, trusting you) - else - SS_SAVE_LIBS="$LIBS" - LIBS="$SS_THREAD_LIBLINK" - AC_TRY_LINK([ - #include <pthread.h> - ],[ - pthread_mutex_lock(0); - ], - eval "SS_PTHREAD_OK=yes" - , - eval "SS_PTHREAD_OK=no" - ) - LIBS="$SS_SAVE_LIBS" + SS_SAVE_LIBS="$LIBS" + LIBS="$SS_THREAD_LIBLINK" + AC_TRY_LINK([ + #include <pthread.h> + ],[ + pthread_mutex_lock(0); + ], + eval "SS_PTHREAD_OK=yes" + , + eval "SS_PTHREAD_OK=no" + ) + LIBS="$SS_SAVE_LIBS" - if test "$SS_PTHREAD_OK" = "yes"; then - AC_MSG_RESULT(yes, it seems to) - else - AC_MSG_RESULT(["FAILED"]) - AC_SS_SET_REDINK - if test "$SS_THREAD_LIBLINK" = "-pthread"; then - echo "################################################################################" - echo "### CONFIGURE ERROR:" - echo "### Failed to compile the pthread test program." - echo "### You have specified to use the native FreeBSD libc_r for threading" - echo "### but it looks that this does not work." - echo "### Make sure that you have libc_r floating around your system" - echo "### and that the -pthread special gcc flag works." - echo "### (You need to use the native FreeBSD gcc compiler for this to work)" - echo "################################################################################" - else - echo "################################################################################" - echo "### CONFIGURE ERROR:" - echo "### Failed to compile the pthread test program." - echo "### It looks that you either don't have libpthread installed or" - echo "### it is not reachable by the linker." - echo "### Make sure that libpthread is in /lib or /usr/lib." - echo "### If you're on solaris you might try the --with-solaris-lthread" - echo "### configure option. If you're on FreeBSD you should use" - echo "### --with-freebsd-pthread." - echo "### Good luck :)" - echo "################################################################################" - fi - AC_SS_SET_NORMALINK - AC_MSG_ERROR(["This was fatal...aborting"]) - fi - fi + if test "$SS_PTHREAD_OK" = "yes"; then + AC_MSG_RESULT(yes, it seems to) + else + AC_MSG_RESULT(["FAILED"]) + AC_SS_SET_REDINK + echo "################################################################################" + echo "### CONFIGURE ERROR:" + echo "### Failed to compile the pthread test program." + echo "### It looks that you either don't have libpthread installed or" + echo "### it is not reachable by the linker." + echo "### Make sure that libpthread is in /lib or /usr/lib." + echo "################################################################################" + AC_SS_SET_NORMALINK + AC_MSG_ERROR(["This was fatal...aborting"]) fi ]) diff --git a/config.h.in b/config.h.in index 47fc9ac..6cdab96 100644 --- a/config.h.in +++ b/config.h.in @@ -73,12 +73,6 @@ /* define if you have openssl and want the ssl support in kvirc */ #undef COMPILE_SSL_SUPPORT -/* define if you want to use the pthreads library */ -#undef COMPILE_THREADS_USE_POSIX - -/* define if you want to use the solaris libthread */ -#undef COMPILE_THREADS_USE_SOLARIS_LIBTHREAD - /* define if your compiler supports gotos do dynamic labels */ #undef COMPILE_USE_DYNAMIC_LABELS @@ -229,10 +223,6 @@ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE diff --git a/src/kvilib/config/kvi_wincfg.h b/src/kvilib/config/kvi_wincfg.h index c10ad5b..56fa5fa 100644 --- a/src/kvilib/config/kvi_wincfg.h +++ b/src/kvilib/config/kvi_wincfg.h @@ -74,12 +74,6 @@ /* define if you want zlib support */ #define COMPILE_ZLIB_SUPPORT 1 -/* define if you want to use the pthreads library */ -/* #undef COMPILE_THREADS_USE_POSIX */ - -/* define if you want to use the solaris libthread */ -/* #undef COMPILE_THREADS_USE_SOLARIS_LIBTHREAD */ - #define COMPILE_PSEUDO_TRANSPARENCY /* define if you have the SIOCGIFADDR ioctl and the related headers */ diff --git a/src/kvilib/system/kvi_thread.h b/src/kvilib/system/kvi_thread.h index 75bc077..37eb3c0 100644 --- a/src/kvilib/system/kvi_thread.h +++ b/src/kvilib/system/kvi_thread.h @@ -72,7 +72,6 @@ #define kvi_threadExit() ExitThread(0) #else - #ifdef COMPILE_THREADS_USE_POSIX // Glibc pthread implementation #include <pthread.h> @@ -109,40 +108,6 @@ // We don't care about exit codes at all #define kvi_threadExit() pthread_exit(0) - #else - #ifdef COMPILE_THREADS_USE_SOLARIS_LIBTHREAD - // Native solaris implementation - #include <thread.h> - #include <synch.h> - #include <errno.h> - - // Mutex stuff - #define kvi_mutex_t mutex_t - #define kvi_threadMutexInit(_pMutex_t) mutex_init(_pMutex_t,0,0) - #define kvi_threadMutexLock(_pMutex_t) mutex_lock(_pMutex_t) - #define kvi_threadMutexUnlock(_pMutex_t) mutex_unlock(_pMutex_t) - #define kvi_threadMutexDestroy(_pMutex_t) mutex_destroy(_pMutex_t) - inline bool kvi_threadMutexTryLock(kvi_mutex_t *_pMutex_t) - { - return (mutex_trylock(_pMutex_t) != EBUSY); - }; - // Actually unused - // #define kvi_threadMutexTryLock(_pMutex_t) mutex_trylock(_pMutex_t) - - // Thread stuff - #define kvi_thread_t thread_t - - inline bool kvi_threadCreate(kvi_thread_t *t,void * (*start_routine)(void *),void *arg) - { - return (thr_create(0,0,start_routine,arg,THR_DETACHED,t) == 0); - } - - // We don't care about exit codes at all - #define kvi_threadExit() thr_exit(0) - #else -// FIXME: #warning "Missing a decent thread implementation: we're going to fail , sorry!" - #endif - #endif #endif class KVILIB_API KviMutex : public KviHeapObject |
