The full context for this is just too shonky so it’s omitted here. FAM is a file monitoring system from SGI that some Linux distros link their courier-imapd against (the SGI OSS pages for it needs some love, it’s seemingly abandoned). The ‘drop-in’ FAM replacement, gamin, doesn’t provide enough FAMness to fly:
Nov 7 14:03:45 localhost imapd: Failed to connect to socket /tmp/fam--
Nov 7 14:03:45 localhost imapd: Failed to create cache file: maildirwatch (lemon@example.com)
Nov 7 14:03:45 localhost imapd: Error: Input/output error
So we’re left with either rebuilding Courier to not link against it (this is a non-starter, no SRPMs available for this version and I can’t wholesale replace it owing to “control panel” sillyness), or installing FAM itself. For which there are no RPMs, and the source RPMs break owing to a g++ change that occurred ages ago.
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <x> header for the </x><x .h> header for C++ includes, or <iostream> instead of the deprecated header </iostream><iostream .h>. To disable this warning use -Wno-deprecated. ../include/BTree.h:240: error: expected constructor, destructor, or type conversion before 'BTree' ../include/BTree.h:352: error: expected constructor, destructor, or type conversion before 'BTree' ../include/BTree.h:408: error: expected constructor, destructor, or type conversion before 'BTree' ../include/BTree.h:503: error: expected constructor, destructor, or type conversion before 'BTree' ../include/BTree.h:561: error: expected constructor, destructor, or type conversion before 'BTree' ../include/BTree.h:591: error: expected constructor, destructor, or type conversion before 'BTree' make[2]: *** [Client.lo] Error 1 </iostream></x>
Struggling to remember C++ resulted in this patch:
--- fam-2.6.10.orig/fam/SmallTable.h 2003-04-15 05:21:43.000000000 +0100
+++ fam-2.6.10/fam/SmallTable.h 2007-11-07 13:50:14.000000000 +0000
@@ -98,7 +98,7 @@
}
template <class Tkey, class Tvalue>
-SmallTable<Tkey, Tvalue>::Closure
+typename SmallTable<Tkey, Tvalue>::Closure
SmallTable<Tkey, Tvalue>::position(const Tkey& key) const
{
unsigned l = 0, r = n;
Only in fam-2.6.10/: fam-2.6.10.tar.gz
diff -ur fam-2.6.10.orig/include/BTree.h fam-2.6.10/include/BTree.h
--- fam-2.6.10.orig/include/BTree.h 2003-04-15 05:21:19.000000000 +0100
+++ fam-2.6.10/include/BTree.h 2007-11-07 13:55:15.000000000 +0000
@@ -236,7 +236,7 @@
// to the right and returns them.
template <class Key, class Value>
-BTree<Key, Value>::Closure
+typename BTree<Key, Value>::Closure
BTree<Key, Value>::Node::remove(unsigned j)
{
Key k = key[j];
@@ -348,7 +348,7 @@
}
template <class Key, class Value>
-BTree<Key, Value>::Closure
+typename BTree<Key, Value>::Closure
BTree<Key, Value>::Node::next(const Key& pred) const
{
if (!this)
@@ -404,7 +404,7 @@
// nodes as necessary on the way back.
template <class Key, class Value>
-BTree<Key, Value>::Closure
+typename BTree<Key, Value>::Closure
BTree<Key, Value>::insert(Node *p, const Key& key, const Value& value)
{
if (!p) return Closure(key, value, NULL);
@@ -499,7 +499,7 @@
// Returns UNDER if node p is too small afterward, OK otherwise.
template <class Key, class Value>
-BTree<Key, Value>::Status
+typename BTree<Key, Value>::Status
BTree<Key, Value>::underflow(Node *p, unsigned i)
{
assert(p);
@@ -557,7 +557,7 @@
template <class Key, class Value>
-BTree<Key, Value>::Closure
+typename BTree<Key, Value>::Closure
BTree<Key, Value>::remove_rightmost(Node *p)
{
int i = p->n;
@@ -587,7 +587,7 @@
// back up.
template <class Key, class Value>
-BTree<Key, Value>::Status
+typename BTree<Key, Value>::Status
BTree<Key, Value>::remove(Node *p, const Key& key)
{
if (!p)
diff -ur fam-2.6.10.orig/libfam/Client.c++ fam-2.6.10/libfam/Client.c++
--- fam-2.6.10.orig/libfam/Client.c++ 2003-04-15 05:21:25.000000000 +0100
+++ fam-2.6.10/libfam/Client.c++ 2007-11-07 13:24:28.000000000 +0000
@@ -34,7 +34,7 @@
#include <syslog.h>
#include <errno.h>
-#include <iostream.h>
+#include <iostream>
#include "fam.h"
#include "Client.h"
Well, that was fun.
Leave a Reply
Recent articles
- Docker, SELinux, Consul, Registrator
(Wednesday, 04. 29. 2015 – No Comments) - ZFS performance on FreeBSD
(Tuesday, 09. 16. 2014 – No Comments) - Controlling Exim SMTP behaviour from Dovecot password data
(Wednesday, 09. 3. 2014 – No Comments) - Heartbleed OpenSSL vulnerability
(Tuesday, 04. 8. 2014 – No Comments)
Archives
- April 2015
- September 2014
- April 2014
- September 2013
- August 2013
- March 2013
- April 2012
- March 2012
- September 2011
- June 2011
- February 2011
- January 2011
- October 2010
- September 2010
- February 2010
- September 2009
- August 2009
- January 2009
- September 2008
- August 2008
- July 2008
- May 2008
- April 2008
- February 2008
- January 2008
- November 2007
- October 2007
- September 2007
- August 2007
- December 2006
- November 2006
- August 2006
- June 2006
- May 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005