summaryrefslogtreecommitdiff
path: root/recipes
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-09-19 16:40:40 -0700
committerKhem Raj <raj.khem@gmail.com>2010-09-19 16:40:40 -0700
commit3d7a67033464211cea02733c7808948fe71cd976 (patch)
tree4a97a1c2166263b1f57b3356391368b619a4a63c /recipes
parent0319f8878547c6e8a78373cfc86a85cea60450ae (diff)
fam_2.7.0.bb: Fix compilation with gcc4
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes')
-rw-r--r--recipes/fam/fam-2.7.0/gcc4-fixes.patch104
-rw-r--r--recipes/fam/fam_2.7.0.bb11
2 files changed, 108 insertions, 7 deletions
diff --git a/recipes/fam/fam-2.7.0/gcc4-fixes.patch b/recipes/fam/fam-2.7.0/gcc4-fixes.patch
new file mode 100644
index 0000000000..24b8fc17b6
--- /dev/null
+++ b/recipes/fam/fam-2.7.0/gcc4-fixes.patch
@@ -0,0 +1,104 @@
+Index: fam-2.7.0/lib/Client.c++
+===================================================================
+--- fam-2.7.0.orig/lib/Client.c++ 2010-09-19 15:38:46.498582001 -0700
++++ fam-2.7.0/lib/Client.c++ 2010-09-19 15:47:27.998582001 -0700
+@@ -29,12 +29,12 @@
+ #include <rpc/rpc.h>
+ #include <rpc/pmap_clnt.h>
+ #include <rpc/pmap_prot.h>
+-#include <string.h> // for memset
++#include <cstring> // for memset
+ #include <ctype.h>
+ #include <syslog.h>
+ #include <errno.h>
+
+-#include <iostream.h>
++#include <iostream>
+
+ #include "fam.h"
+ #include "Client.h"
+Index: fam-2.7.0/src/Interest.h
+===================================================================
+--- fam-2.7.0.orig/src/Interest.h 2010-09-19 15:40:40.708582002 -0700
++++ fam-2.7.0/src/Interest.h 2010-09-19 15:53:04.778582001 -0700
+@@ -27,6 +27,7 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <netinet/in.h> // for in_addr
++#include <cstdlib>
+
+ #include "Boolean.h"
+
+@@ -81,7 +82,7 @@ public:
+ protected:
+
+ bool do_stat();
+- virtual void post_event(const Event&, const char * = NULL) = 0;
++ virtual void post_event(const Event&, const char * = 0) = 0;
+ char& ci_bits() { return ci_char; }
+ char& dir_bits() { return dir_char; }
+ const char& ci_bits() const { return ci_char; }
+Index: fam-2.7.0/src/IMon.c++
+===================================================================
+--- fam-2.7.0.orig/src/IMon.c++ 2010-09-19 15:42:56.468582002 -0700
++++ fam-2.7.0/src/IMon.c++ 2010-09-19 15:48:29.028582002 -0700
+@@ -40,7 +40,7 @@
+ #include "Interest.h"
+ #include "Log.h"
+ #include "Scheduler.h"
+-#include "alloc.h"
++#include <memory>
+
+ int IMon::imonfd = -2;
+ IMon::EventHandler IMon::ehandler = NULL;
+Index: fam-2.7.0/include/BTree.h
+===================================================================
+--- fam-2.7.0.orig/include/BTree.h 2010-09-19 15:49:02.658582001 -0700
++++ fam-2.7.0/include/BTree.h 2010-09-19 15:49:59.288582001 -0700
+@@ -271,7 +271,7 @@ BTree<K, V>::Node::join(const Closure& i
+ n += that->n + 1;
+ link[n] = that->link[that->n];
+ that->n = 0;
+- that->link[0] = NULL;
++ that->link[0] = 0;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -280,7 +280,7 @@ BTree<K, V>::Node::join(const Closure& i
+
+ template <class K, class V>
+ BTree<K, V>::BTree()
+- : root(NULL), npairs(0)
++ : root(0), npairs(0)
+ {
+ assert(!(fanout % 2));
+ }
+@@ -407,7 +407,7 @@ template <class Key, class Value>
+ typename BTree<Key, Value>::Closure
+ BTree<Key, Value>::insert(Node *p, const Key& key, const Value& value)
+ {
+- if (!p) return Closure(key, value, NULL);
++ if (!p) return Closure(key, value, 0);
+ // If you're running Purify on a client linking with libfam, and it says
+ // that line is causing a 3-byte UMR for BTree<int, bool>::insert() in
+ // FAMNextEvent() ("Reading 8 bytes from 0x... on the stack (3 bytes at
+@@ -475,7 +475,7 @@ BTree<Key, Value>::remove(const Key& key
+ case UNDER:
+ if (root->n == 0)
+ { Node *nr = root->link[0];
+- root->link[0] = NULL; // don't delete subtree
++ root->link[0] = 0; // don't delete subtree
+ delete root;
+ root = nr;
+ }
+@@ -507,8 +507,8 @@ BTree<Key, Value>::underflow(Node *p, un
+ Node *cp = p->link[i];
+ assert(cp);
+
+- Node *rp = i < p->n ? p->link[i + 1] : NULL;
+- Node *lp = i > 0 ? p->link[i - 1] : NULL;
++ Node *rp = i < p->n ? p->link[i + 1] : 0;
++ Node *lp = i > 0 ? p->link[i - 1] : 0;
+ assert(!rp || rp->n >= fanout / 2);
+ assert(!lp || lp->n >= fanout / 2);
+
diff --git a/recipes/fam/fam_2.7.0.bb b/recipes/fam/fam_2.7.0.bb
index cca391593e..2c14581655 100644
--- a/recipes/fam/fam_2.7.0.bb
+++ b/recipes/fam/fam_2.7.0.bb
@@ -2,19 +2,16 @@ DESCRIPTION = "File Alteration Monitor"
SECTION = "libs"
PRIORITY = "optional"
LICENSE = "GPL LGPL"
+PR = "r1"
SRC_URI = "ftp://oss.sgi.com/projects/fam/download/stable/fam-${PV}.tar.gz \
- file://compile-fix.patch"
+ file://compile-fix.patch \
+ file://gcc4-fixes.patch \
+ "
inherit autotools
CPPFLAGS_append = " -DNDEBUG"
-do_stage() {
- oe_libinstall -so -a -C lib libfam ${STAGING_LIBDIR}/
- install -m 0644 ${S}/include/fam.h ${STAGING_INCDIR}/
-}
-
-
SRC_URI[md5sum] = "1bf3ae6c0c58d3201afc97c6a4834e39"
SRC_URI[sha256sum] = "1e0aa136693a3e9f4b43ebd71e7bd934cea31817a4a6cba2edc7aac353b8a93f"