From: Marco van Wieringen Date: Sat, 2 Apr 2011 20:48:00 +0000 (+0200) Subject: For Solaris 9 and higher there is no need to call thr_setconcurrency anymore. X-Git-Tag: Release-7.0.0~966 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;ds=sidebyside;h=82742e68572f524385bd3b963d4715dddf79356f;hp=2c141deef33016fb873f2b822ec1850b227f42f9;p=bacula%2Fbacula For Solaris 9 and higher there is no need to call thr_setconcurrency anymore. See the manual page: These functions are obsolete and maintained for compatibility only. The thr_setconcurrency() function updates the desired concurrency level that libthread maintains for the calling process. This value does not affect the behavior of the calling process. --- diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index df417d386d..1a5e861e35 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -3172,9 +3172,17 @@ solaris) platforms/solaris/bacula-fd \ platforms/solaris/bacula-sd \ platforms/solaris/bacula-dir" - if test x$DISTVER = x5.6 ; then - AC_DEFINE(HAVE_OLD_SOCKOPT) - fi + case ${DISTVER} in + 5.5|5.6) + AC_DEFINE(HAVE_OLD_SOCKOPT) + AC_DEFINE(USE_THR_SETCONCURRENCY) + ;; + 5.7|5.8) + AC_DEFINE(USE_THR_SETCONCURRENCY) + ;; + *) + ;; + esac LIBS="$LIBS -lresolv -lrt" ;; suse) diff --git a/bacula/src/baconfig.h b/bacula/src/baconfig.h index f9f7807ec1..67be788d6a 100644 --- a/bacula/src/baconfig.h +++ b/bacula/src/baconfig.h @@ -507,35 +507,37 @@ int m_msg(const char *file, int line, POOLMEM *&pool_buf, const char *fmt, ...) * OS Dependent defines * ============================================================= */ - -#ifndef HAVE_FSEEKO -/* Bad news. This OS cannot handle 64 bit fseeks and ftells */ -#define fseeko fseek -#define ftello ftell -#endif - #if defined (__digital__) && defined (__unix__) /* Tru64 - it does have fseeko and ftello , but since ftell/fseek are also 64 bit */ /* take this 'shortcut' */ #define fseeko fseek #define ftello ftell +#else +#ifndef HAVE_FSEEKO +/* Bad news. This OS cannot handle 64 bit fseeks and ftells */ +#define fseeko fseek +#define ftello ftell +#endif #endif - #ifdef HAVE_SUN_OS - /** - * On Solaris 2.5, threads are not timesliced by default, so we need to - * explictly increase the conncurrency level. - */ +/* + * On Solaris 2.5/2.6/7 and 8, threads are not timesliced by default, + * so we need to explictly increase the conncurrency level. + */ +#ifdef USE_THR_SETCONCURRENCY #include #define set_thread_concurrency(x) thr_setconcurrency(x) extern int thr_setconcurrency(int); #define SunOS 1 - #else +#define set_thread_concurrency(x) +#endif - -/** Not needed on most systems */ +#else +/* + * Not needed on most systems + */ #define set_thread_concurrency(x) #endif @@ -551,8 +553,6 @@ int getdomainname(char *name, int len); #endif /* __cplusplus */ #endif /* HAVE_DARWIN_OS */ - - #if defined(HAVE_WIN32) /* * Windows