packages: rsyslog5/rsyslog5.spec, rsyslog5/rsyslog5-atomic64.patch (NEW) - ...

baggins baggins at pld-linux.org
Wed Dec 9 15:43:46 CET 2009


Author: baggins                      Date: Wed Dec  9 14:43:45 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 5
- fix problems with 64bit atomic ops on some 32bit platforms

---- Files affected:
packages/rsyslog5:
   rsyslog5.spec (1.18 -> 1.19) , rsyslog5-atomic64.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/rsyslog5/rsyslog5.spec
diff -u packages/rsyslog5/rsyslog5.spec:1.18 packages/rsyslog5/rsyslog5.spec:1.19
--- packages/rsyslog5/rsyslog5.spec:1.18	Wed Dec  9 14:33:30 2009
+++ packages/rsyslog5/rsyslog5.spec	Wed Dec  9 15:43:39 2009
@@ -15,7 +15,7 @@
 Summary(tr.UTF-8):	Linux sistem ve çekirdek kayıt süreci
 Name:		rsyslog5
 Version:	5.5.1
-Release:	4
+Release:	5
 License:	GPL v3
 Group:		Daemons
 Source0:	http://download.rsyslog.com/rsyslog/%{_nm}-%{version}.tar.gz
@@ -24,6 +24,7 @@
 Source2:	%{_nm}.conf
 Source3:	%{_nm}.sysconfig
 Source4:	%{_nm}.logrotate
+Patch0:		%{name}-atomic64.patch
 URL:		http://www.rsyslog.com/
 %{?with_gssapi:BuildRequires:	heimdal-devel}
 %{?with_mysql:BuildRequires:	mysql-devel}
@@ -149,6 +150,7 @@
 
 %prep
 %setup -q -n %{_nm}-%{version}
+%patch0 -p1
 
 %build
 %configure \
@@ -315,6 +317,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.19  2009/12/09 14:43:39  baggins
+- rel 5
+- fix problems with 64bit atomic ops on some 32bit platforms
+
 Revision 1.18  2009/12/09 13:33:30  baggins
 - rel 4
 

================================================================
Index: packages/rsyslog5/rsyslog5-atomic64.patch
diff -u /dev/null packages/rsyslog5/rsyslog5-atomic64.patch:1.1
--- /dev/null	Wed Dec  9 15:43:46 2009
+++ packages/rsyslog5/rsyslog5-atomic64.patch	Wed Dec  9 15:43:39 2009
@@ -0,0 +1,111 @@
+From: Rainer Gerhards <rgerhards at adiscon.com>
+Date: Wed, 2 Dec 2009 16:04:04 +0000 (+0100)
+Subject: worked around an issue where omfile failed to compile on32 bit platforms
+X-Git-Url: http://git.adiscon.com/?p=rsyslog.git;a=commitdiff_plain;h=113915eb9dfddf5a04f8116b01b71e591e75f193
+
+worked around an issue where omfile failed to compile on32 bit platforms
+
+under some circumstances (this smells like a gcc problem, but a simple
+solution was available). Thanks to Kenneth Marshall for some advice.
+---
+
+diff --git a/ChangeLog b/ChangeLog
+index 085d462..0695317 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,5 +1,8 @@
+ ---------------------------------------------------------------------------
+ Version 5.5.2  [DEVEL] (rgerhards), 2009-11-??
++- worked around an issue where omfile failed to compile on32 bit platforms
++  under some circumstances (this smells like a gcc problem, but a simple
++  solution was available). Thanks to Kenneth Marshall for some advice.
+ - extended testbench
+ - bugfix: hostname accidently set to IP address for some message sources,
+   for example imudp. Thanks to Anton for reporting this bug. [imported v4]
+diff --git a/configure.ac b/configure.ac
+index 08eb24f..ea3fb1c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -128,6 +128,7 @@ AC_TRY_COMPILE([
+ 
+ # check for availability of atomic operations
+ RS_ATOMIC_OPERATIONS
++RS_ATOMIC_OPERATIONS_64BIT
+ 
+ 
+ # Additional module directories
+diff --git a/m4/atomic_operations_64bit.m4 b/m4/atomic_operations_64bit.m4
+new file mode 100644
+index 0000000..3121cf1
+--- /dev/null
++++ b/m4/atomic_operations_64bit.m4
+@@ -0,0 +1,53 @@
++# rsyslog
++#
++# atomic_operations.m4 - autoconf macro to check if compiler supports atomic
++# operations
++#
++# rgerhards, 2008-09-18, added based on
++# http://svn.apache.org/repos/asf/apr/apr/trunk/configure.in
++#
++#
++AC_DEFUN([RS_ATOMIC_OPERATIONS_64BIT],
++[AC_CACHE_CHECK([whether the compiler provides atomic builtins for 64 bit data types], [ap_cv_atomic_builtins_64],
++[AC_TRY_RUN([
++int main()
++{
++    unsigned long long val = 1010, tmp, *mem = &val;
++
++    if (__sync_fetch_and_add(&val, 1010) != 1010 || val != 2020)
++        return 1;
++
++    tmp = val;
++
++    if (__sync_fetch_and_sub(mem, 1010) != tmp || val != 1010)
++        return 1;
++
++    if (__sync_sub_and_fetch(&val, 1010) != 0 || val != 0)
++        return 1;
++
++    tmp = 3030;
++
++    if (__sync_val_compare_and_swap(mem, 0, tmp) != 0 || val != tmp)
++        return 1;
++
++    if (__sync_lock_test_and_set(&val, 4040) != 3030)
++        return 1;
++
++    mem = &tmp;
++
++    if (__sync_val_compare_and_swap(&mem, &tmp, &val) != &tmp)
++        return 1;
++
++    __sync_synchronize();
++
++    if (mem != &val)
++        return 1;
++
++    return 0;
++}], [ap_cv_atomic_builtins_64=yes], [ap_cv_atomic_builtins_64=no], [ap_cv_atomic_builtins_64=no])])
++
++if test "$ap_cv_atomic_builtins_64" = "yes"; then
++    AC_DEFINE(HAVE_ATOMIC_BUILTINS_64BIT, 1, [Define if compiler provides 64 bit atomic builtins])
++fi
++
++])
+diff --git a/tools/omfile.c b/tools/omfile.c
+index 13bb74a..3a206eb 100644
+--- a/tools/omfile.c
++++ b/tools/omfile.c
+@@ -83,7 +83,11 @@ DEFobjCurrIf(strm)
+  * That should be sufficient (and even than, there would no really bad effect ;)).
+  * The variable below is the global counter/clock.
+  */
++#if HAVE_ATOMIC_BUILTINS_64BIT
+ static uint64 clockFileAccess = 0;
++#else
++static unsigned clockFileAccess = 0;
++#endif
+ /* and the "tick" function */
+ static inline uint64
+ getClockFileAccess(void)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/rsyslog5/rsyslog5.spec?r1=1.18&r2=1.19&f=u



More information about the pld-cvs-commit mailing list