Re: Build fails on OS X 10.9
- From: Juan Rafael García Blanco <juanrgar gmail com>
- To: nemiver-list gnome org
- Subject: Re: Build fails on OS X 10.9
- Date: Mon, 6 Jan 2014 18:09:39 +0100
Hi again,
Here’s the big patch. This fixes compilation issues due to not-present tr1 headers, not-present pty.h, and
other small issues that annoy clang++ (clang-500.2.79). I hope you find it somehow useful; I’m looking
forward to receive any feedback from you.
Best regards,
Juan.
From 95a84eec96e5c08546e0221aceace31585e523b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20R=2E=20Garc=C3=ADa=20Blanco?= <juanrgar gmail com>
Date: Mon, 6 Jan 2014 17:40:00 +0100
Subject: [PATCH] Fix tr1 and pty.h compilation issues
* configure.ac: Check for tr1/unordered_map, tr1/memory
and tr1/tuple, and their boost::tr1 counterparts.
Check for pty.h, util.h and libutil.h.
* src/common/nmv-log-stream.cc: Replace checks on compiler
defined macros with checks for required headers; in this
case tr1/unordered_map and boost/tr1/unordered_map.hpp.
* src/dbgengine/nmv-dbg-common.h: Check whether tr1/memory
or boost/tr1/memory.hpp is available and use accordingly.
* src/dbgengine/nmv-var-list-walker.cc (SafePtrCmp::operator()):
Compare method const-correctness.
* src/dbgengine/nmv-var-walker.cc (SafePtrCmp::operator()):
Compare method const-correctness.
* src/langs/nmv-cpp-ast.h: Replace checks on compiler
defined macros with checks for required headers; in this
case tr1/memory and boost/tr1/memory.hpp.
Rearrange various class definitions to make the compiler
aware of the class hierarchy ahead of forward-declaring
shared_ptr typedefs.
* src/persp/dbgperspective/nmv-find-text-dialog.h: Use
SafePtr, ObjectRef and ObjectUnref from nemiver::common.
* src/uicommon/nmv-terminal.cc: Check whether tr1/tuple or
boost/tr1/tuple.hpp is available and use accordingly.
Replace checks on platform defined macros with checks for
required headers; in this case pty.h, util.h and libutil.h.
* src/common/nmv-proc-utils.cc: Replace checks on
platform defined macros with checks for required headers;
in this case pty.h, util.h and libutil.h.
---
configure.ac | 10 +
src/common/nmv-log-stream.cc | 6 +-
src/common/nmv-proc-utils.cc | 8 +-
src/dbgengine/nmv-dbg-common.h | 4 +
src/dbgengine/nmv-var-list-walker.cc | 2 +-
src/dbgengine/nmv-var-walker.cc | 2 +-
src/langs/nmv-cpp-ast.h | 401 ++++++++++++------------
src/persp/dbgperspective/nmv-find-text-dialog.h | 6 +-
src/uicommon/nmv-terminal.cc | 12 +-
9 files changed, 234 insertions(+), 217 deletions(-)
diff --git a/configure.ac b/configure.ac
index 04f5a26..3787159 100644
--- a/configure.ac
+++ b/configure.ac
@@ -270,6 +270,16 @@ if test x$GLIBMM_USES_DEPRECATED_GLIB_FUNCS = xyes; then
AC_MSG_NOTICE(glibmm uses deprecated glib functions!)
fi
+dnl Check for tr1 headers
+AC_CHECK_HEADERS([tr1/unordered_map boost/tr1/unordered_map.hpp])
+AC_CHECK_HEADERS([tr1/memory boost/tr1/memory.hpp])
+AC_CHECK_HEADERS([tr1/tuple boost/tr1/tuple.hpp])
+
+dnl Check for pty.h and its alternatives
+dnl https://www.gnu.org/software/gnulib/manual/html_node/pty_002eh.html
+AC_CHECK_HEADERS([pty.h util.h libutil.h])
+
+
#######################################################
#boost build system sucks no end.
#it is damn hard to detect the version of boost
diff --git a/src/common/nmv-log-stream.cc b/src/common/nmv-log-stream.cc
index 0914a46..6822de1 100644
--- a/src/common/nmv-log-stream.cc
+++ b/src/common/nmv-log-stream.cc
@@ -43,8 +43,10 @@
#include "nmv-date-utils.h"
#include "nmv-safe-ptr-utils.h"
-#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 2
+#if defined(HAVE_TR1_UNORDERED_MAP)
#include <tr1/unordered_map>
+#elif defined(HAVE_BOOST_TR1_UNORDERED_MAP_HPP)
+#include <boost/tr1/unordered_map.hpp>
#else
#include <ext/hash_map>
@@ -64,7 +66,7 @@ namespace common {
using namespace std;
-#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 2
+#if defined(HAVE_TR1_UNORDERED_MAP) || defined(HAVE_BOOST_TR1_UNORDERED_MAP_HPP)
typedef std::tr1::unordered_map<std::string, bool> DomainMap;
#else
typedef __gnu_cxx::hash_map<std::string, bool> DomainMap;
diff --git a/src/common/nmv-proc-utils.cc b/src/common/nmv-proc-utils.cc
index cfa8d2a..0d99a55 100644
--- a/src/common/nmv-proc-utils.cc
+++ b/src/common/nmv-proc-utils.cc
@@ -28,13 +28,13 @@
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
-#if defined(_GNU_SOURCE)
+#if defined(HAVE_PTY_H)
# include <pty.h>
-#elif defined(__FreeBSD__)
+#elif defined(HAVE_LIBUTIL_H)
# include <sys/types.h>
# include <sys/ioctl.h>
# include <libutil.h>
-#elif defined(__OpenBSD__)
+#elif defined(HAVE_UTIL_H)
#include <util.h>
#endif
#include <termios.h>
@@ -45,7 +45,7 @@
#include "nmv-exception.h"
#include "nmv-log-stream-utils.h"
-#if (defined(__FreeBSD__) || defined(__OpenBSD__)) && !defined(__MAX_BAUD)
+#if !defined(__MAX_BAUD)
#define __MAX_BAUD B38400
#endif
diff --git a/src/dbgengine/nmv-dbg-common.h b/src/dbgengine/nmv-dbg-common.h
index 2645e84..ad3cc00 100644
--- a/src/dbgengine/nmv-dbg-common.h
+++ b/src/dbgengine/nmv-dbg-common.h
@@ -27,7 +27,11 @@
#ifndef __NMV_DBG_COMMON_H_H__
#define __NMV_DBG_COMMON_H_H__
#include "nmv-i-debugger.h"
+#if defined(HAVE_TR1_MEMORY)
#include <tr1/memory>
+#elif defined(HAVE_BOOST_TR1_MEMORY_HPP)
+#include <boost/tr1/memory.hpp>
+#endif
NEMIVER_BEGIN_NAMESPACE (nemiver)
diff --git a/src/dbgengine/nmv-var-list-walker.cc b/src/dbgengine/nmv-var-list-walker.cc
index bd63559..ea53dc2 100644
--- a/src/dbgengine/nmv-var-list-walker.cc
+++ b/src/dbgengine/nmv-var-list-walker.cc
@@ -31,7 +31,7 @@ NEMIVER_BEGIN_NAMESPACE (nemiver)
struct SafePtrCmp {
bool operator() (const IVarWalkerSafePtr l,
- const IVarWalkerSafePtr r)
+ const IVarWalkerSafePtr r) const
{
return (l.get () < r.get ());
}
diff --git a/src/dbgengine/nmv-var-walker.cc b/src/dbgengine/nmv-var-walker.cc
index 2059b88..964b6ea 100644
--- a/src/dbgengine/nmv-var-walker.cc
+++ b/src/dbgengine/nmv-var-walker.cc
@@ -52,7 +52,7 @@ get_sequence ()
struct SafePtrCmp {
bool operator() (const IDebugger::VariableSafePtr l,
- const IDebugger::VariableSafePtr r)
+ const IDebugger::VariableSafePtr r) const
{
return (l.get () < r.get ());
}
diff --git a/src/langs/nmv-cpp-ast.h b/src/langs/nmv-cpp-ast.h
index 98314d3..321f735 100644
--- a/src/langs/nmv-cpp-ast.h
+++ b/src/langs/nmv-cpp-ast.h
@@ -25,11 +25,12 @@
#ifndef __NMV_CPP_AST_H__
#define __NMV_CPP_AST_H__
+#include "config.h"
#include <string>
#include <list>
-#if __GNUC__ >= 4
+#if defined(HAVE_TR1_MEMORY)
#include <tr1/memory>
-#else
+#elif defined(HAVE_BOOST_TR1_MEMORY_HPP)
#include <boost/tr1/memory.hpp>
#endif
#include "common/nmv-namespace.h"
@@ -174,6 +175,204 @@ bool to_string (const TypeIDPtr, string &);
bool to_string (const UnqualifiedIDExprPtr, string &);
UnqualifiedIDPtr create_unqualified_id (const string &);
+/// the base class of all expressions
+class NEMIVER_API ExprBase {
+ ExprBase (const ExprBase&);
+ ExprBase& operator= (const ExprBase&);
+ ExprBase ();
+
+public:
+ enum Kind {
+ UNDEFINED=0,
+ PRIMARY_EXPRESSION,
+ CONDITIONAL_EXPRESSION,
+ ASSIGNMENT_EXPRESION,
+ THROW_EXPRESSION,
+ UNARY_EXPRESSION,
+ CAST_EXPRESSION,
+ PM_EXPRESSION,
+ MULT_EXPR,
+ ADD_EXPR,
+ SHIFT_EXPR,
+ RELATIONAL_EXPR,
+ EQUALITY_EXPR,
+ AND_EXPR,
+ XOR_EXPR,
+ INCL_OR_EXPR,
+ LOGICAL_AND_EXPR,
+ LOGICAL_OR_EXPR,
+ COND_EXPR,
+ ASSIGNMENT_EXPR,
+ ASSIGNMENT_LIST
+ };
+
+ enum Operator {
+ OP_UNDEFINED,
+ MULT,
+ DIV,
+ MOD,
+ PLUS,
+ MINUS,
+ LT,
+ GT,
+ LT_OR_EQ,
+ GT_OR_EQ,
+ LEFT_SHIFT,
+ RIGHT_SHIFT,
+ ASSIGN,
+ MULT_EQ,
+ DIV_EQ,
+ MOD_EQ,
+ PLUS_EQ,
+ MINUS_EQ,
+ RIGHT_SHIFT_EQ,
+ LEFT_SHIFT_EQ,
+ AND_EQ,
+ XOR_EQ,
+ OR_EQ,
+ EQUALS,
+ NOT_EQUALS,
+ BIT_AND,
+ LOG_AND,
+ LOG_OR
+ };
+
+private:
+ Kind m_kind;
+
+public:
+ ExprBase (Kind a_kind) :
+ m_kind (a_kind)
+ {
+ }
+ virtual ~ExprBase () {}
+ Kind get_kind () {return m_kind;}
+ virtual bool to_string (string &) const=0;
+ static const string& operator_to_string (Operator);
+};//end class ExprBase
+typedef shared_ptr<ExprBase> ExprBasePtr;
+
+class NEMIVER_API PrimaryExpr : public ExprBase {
+ PrimaryExpr (const PrimaryExpr&);
+ PrimaryExpr& operator= (const PrimaryExpr&);
+
+public:
+ enum Kind {
+ UNDEFINED,
+ LITERAL,
+ THIS,
+ PARENTHESIZED,
+ ID_EXPR,
+ };
+
+private:
+ Kind m_kind;
+ Token m_token;
+ IDExprPtr m_id_expr;
+ ExprBasePtr m_parenthesized;
+
+public:
+ PrimaryExpr () :
+ ExprBase (PRIMARY_EXPRESSION), m_kind (UNDEFINED)
+ {}
+ PrimaryExpr (Kind k) :
+ ExprBase (PRIMARY_EXPRESSION),
+ m_kind (k)
+ {}
+ ~PrimaryExpr () {}
+ Kind get_kind () const {return m_kind;}
+ void set_kind (Kind kind) {m_kind=kind;}
+ void set_token (Kind kind, const Token &token) {m_kind=kind, m_token=token;}
+ const Token& get_token () const {return m_token;}
+ void set_id_expr (IDExprPtr id_expr) {m_kind=ID_EXPR, m_id_expr=id_expr;}
+ const IDExprPtr get_id_expr () const {return m_id_expr;}
+ void set_parenthesized (ExprBasePtr expr)
+ {
+ m_kind=PARENTHESIZED, m_parenthesized=expr;
+ }
+ const ExprBasePtr get_parenthesized () const {return m_parenthesized;}
+};//end class PrimaryExpr
+typedef shared_ptr<PrimaryExpr> PrimaryExprPtr;
+
+class NEMIVER_API IDExpr : public PrimaryExpr {
+ IDExpr (const IDExpr&);
+ IDExpr& operator= (const IDExpr&);
+ IDExpr ();
+
+public:
+ enum Kind {
+ UNDEFINED,
+ QUALIFIED,
+ UNQUALIFIED
+ };
+
+private:
+ Kind m_kind;
+
+public:
+ IDExpr (Kind kind) :
+ PrimaryExpr (ID_EXPR),
+ m_kind (kind)
+ {
+ }
+ ~IDExpr ();
+ Kind get_kind () const {return m_kind;}
+};//end class ExprBase
+
+class NEMIVER_API UnqualifiedIDExpr : public IDExpr {
+ UnqualifiedIDExpr (const UnqualifiedIDExpr&);
+ UnqualifiedIDExpr& operator= (const UnqualifiedIDExpr&);
+
+public:
+ enum Kind {
+ UNDEFINED,
+ IDENTIFIER,
+ OP_FUNC_ID,
+ CONV_FUNC_ID, //TODO:not supported yet
+ DESTRUCTOR_ID,
+ TEMPLATE_ID
+ };
+
+private:
+ Kind m_kind;
+
+public:
+ UnqualifiedIDExpr () :
+ IDExpr (UNQUALIFIED),
+ m_kind (UNDEFINED)
+ {
+ }
+
+ UnqualifiedIDExpr (Kind kind) :
+ IDExpr (UNQUALIFIED),
+ m_kind (kind)
+
+ {
+ }
+ Kind get_kind () const {return m_kind;}
+ void set_kind (Kind kind) {m_kind=kind;}
+ virtual ~UnqualifiedIDExpr () {}
+ virtual bool to_string (string &) const=0;
+};//end class UnqualifiedIDExpr
+
+class NEMIVER_API UnqualifiedID : public UnqualifiedIDExpr {
+ string m_name;
+
+public:
+ UnqualifiedID ():
+ UnqualifiedIDExpr (UnqualifiedIDExpr::IDENTIFIER)
+ {}
+ UnqualifiedID (const string &a_s):
+ UnqualifiedIDExpr (UnqualifiedIDExpr::IDENTIFIER),
+ m_name (a_s)
+ {}
+ ~UnqualifiedID ()
+ {}
+ const string& get_name () const {return m_name;}
+ void set_name (const string &a_n) {m_name=a_n;}
+ bool to_string (string &a_s) const;
+};
+
/// \brief Qualified Name.
///
/// can contain the result of the parsing of
@@ -432,128 +631,9 @@ public:
};//end SimpleDeclaration
typedef shared_ptr<SimpleDeclaration> SimpleDeclarationPtr;
-/// the base class of all expressions
-class NEMIVER_API ExprBase {
- ExprBase (const ExprBase&);
- ExprBase& operator= (const ExprBase&);
- ExprBase ();
-
-public:
- enum Kind {
- UNDEFINED=0,
- PRIMARY_EXPRESSION,
- CONDITIONAL_EXPRESSION,
- ASSIGNMENT_EXPRESION,
- THROW_EXPRESSION,
- UNARY_EXPRESSION,
- CAST_EXPRESSION,
- PM_EXPRESSION,
- MULT_EXPR,
- ADD_EXPR,
- SHIFT_EXPR,
- RELATIONAL_EXPR,
- EQUALITY_EXPR,
- AND_EXPR,
- XOR_EXPR,
- INCL_OR_EXPR,
- LOGICAL_AND_EXPR,
- LOGICAL_OR_EXPR,
- COND_EXPR,
- ASSIGNMENT_EXPR,
- ASSIGNMENT_LIST
- };
-
- enum Operator {
- OP_UNDEFINED,
- MULT,
- DIV,
- MOD,
- PLUS,
- MINUS,
- LT,
- GT,
- LT_OR_EQ,
- GT_OR_EQ,
- LEFT_SHIFT,
- RIGHT_SHIFT,
- ASSIGN,
- MULT_EQ,
- DIV_EQ,
- MOD_EQ,
- PLUS_EQ,
- MINUS_EQ,
- RIGHT_SHIFT_EQ,
- LEFT_SHIFT_EQ,
- AND_EQ,
- XOR_EQ,
- OR_EQ,
- EQUALS,
- NOT_EQUALS,
- BIT_AND,
- LOG_AND,
- LOG_OR
- };
-
-private:
- Kind m_kind;
-
-public:
- ExprBase (Kind a_kind) :
- m_kind (a_kind)
- {
- }
- virtual ~ExprBase () {}
- Kind get_kind () {return m_kind;}
- virtual bool to_string (string &) const=0;
- static const string& operator_to_string (Operator);
-};//end class ExprBase
-typedef shared_ptr<ExprBase> ExprBasePtr;
-
class Expr;
typedef shared_ptr<Expr> ExprPtr;
-class NEMIVER_API PrimaryExpr : public ExprBase {
- PrimaryExpr (const PrimaryExpr&);
- PrimaryExpr& operator= (const PrimaryExpr&);
-
-public:
- enum Kind {
- UNDEFINED,
- LITERAL,
- THIS,
- PARENTHESIZED,
- ID_EXPR,
- };
-
-private:
- Kind m_kind;
- Token m_token;
- IDExprPtr m_id_expr;
- ExprBasePtr m_parenthesized;
-
-public:
- PrimaryExpr () :
- ExprBase (PRIMARY_EXPRESSION), m_kind (UNDEFINED)
- {}
- PrimaryExpr (Kind k) :
- ExprBase (PRIMARY_EXPRESSION),
- m_kind (k)
- {}
- ~PrimaryExpr () {}
- Kind get_kind () const {return m_kind;}
- void set_kind (Kind kind) {m_kind=kind;}
- void set_token (Kind kind, const Token &token) {m_kind=kind, m_token=token;}
- const Token& get_token () const {return m_token;}
- void set_id_expr (IDExprPtr id_expr) {m_kind=ID_EXPR, m_id_expr=id_expr;}
- const IDExprPtr get_id_expr () const {return m_id_expr;}
- void set_parenthesized (ExprBasePtr expr)
- {
- m_kind=PARENTHESIZED, m_parenthesized=expr;
- }
- const ExprBasePtr get_parenthesized () const {return m_parenthesized;}
-};//end class PrimaryExpr
-typedef shared_ptr<PrimaryExpr> PrimaryExprPtr;
-
class NEMIVER_API LiteralPrimaryExpr : public PrimaryExpr {
LiteralPrimaryExpr (const LiteralPrimaryExpr&);
LiteralPrimaryExpr& operator= (const LiteralPrimaryExpr&);
@@ -687,85 +767,6 @@ public:
}
};//end class TemplateID
-class NEMIVER_API IDExpr : public PrimaryExpr {
- IDExpr (const IDExpr&);
- IDExpr& operator= (const IDExpr&);
- IDExpr ();
-
-public:
- enum Kind {
- UNDEFINED,
- QUALIFIED,
- UNQUALIFIED
- };
-
-private:
- Kind m_kind;
-
-public:
- IDExpr (Kind kind) :
- PrimaryExpr (ID_EXPR),
- m_kind (kind)
- {
- }
- ~IDExpr ();
- Kind get_kind () const {return m_kind;}
-};//end class ExprBase
-
-class NEMIVER_API UnqualifiedIDExpr : public IDExpr {
- UnqualifiedIDExpr (const UnqualifiedIDExpr&);
- UnqualifiedIDExpr& operator= (const UnqualifiedIDExpr&);
-
-public:
- enum Kind {
- UNDEFINED,
- IDENTIFIER,
- OP_FUNC_ID,
- CONV_FUNC_ID, //TODO:not supported yet
- DESTRUCTOR_ID,
- TEMPLATE_ID
- };
-
-private:
- Kind m_kind;
-
-public:
- UnqualifiedIDExpr () :
- IDExpr (UNQUALIFIED),
- m_kind (UNDEFINED)
- {
- }
-
- UnqualifiedIDExpr (Kind kind) :
- IDExpr (UNQUALIFIED),
- m_kind (kind)
-
- {
- }
- Kind get_kind () const {return m_kind;}
- void set_kind (Kind kind) {m_kind=kind;}
- virtual ~UnqualifiedIDExpr () {}
- virtual bool to_string (string &) const=0;
-};//end class UnqualifiedIDExpr
-
-class NEMIVER_API UnqualifiedID : public UnqualifiedIDExpr {
- string m_name;
-
-public:
- UnqualifiedID ():
- UnqualifiedIDExpr (UnqualifiedIDExpr::IDENTIFIER)
- {}
- UnqualifiedID (const string &a_s):
- UnqualifiedIDExpr (UnqualifiedIDExpr::IDENTIFIER),
- m_name (a_s)
- {}
- ~UnqualifiedID ()
- {}
- const string& get_name () const {return m_name;}
- void set_name (const string &a_n) {m_name=a_n;}
- bool to_string (string &a_s) const;
-};
-
class UnqualifiedOpFuncID : public UnqualifiedIDExpr {
UnqualifiedOpFuncID (const UnqualifiedOpFuncID&);
UnqualifiedOpFuncID& operator= (const UnqualifiedOpFuncID&);
diff --git a/src/persp/dbgperspective/nmv-find-text-dialog.h b/src/persp/dbgperspective/nmv-find-text-dialog.h
index a16c1c7..63fd1ea 100644
--- a/src/persp/dbgperspective/nmv-find-text-dialog.h
+++ b/src/persp/dbgperspective/nmv-find-text-dialog.h
@@ -31,11 +31,9 @@ NEMIVER_BEGIN_NAMESPACE (nemiver)
class SourceEditor;
class FindTextDialog;
-class ObjectRef;
-class ObjectUnref;
-template <class A, class B, class C> class SafePtr;
+using nemiver::common::SafePtr;
-typedef SafePtr<FindTextDialog, ObjectRef, ObjectUnref> FindTextDialogSafePtr;
+typedef SafePtr<FindTextDialog, common::ObjectRef, common::ObjectUnref> FindTextDialogSafePtr;
class FindTextDialog : public Dialog {
class Priv;
diff --git a/src/uicommon/nmv-terminal.cc b/src/uicommon/nmv-terminal.cc
index 717c094..1807a10 100644
--- a/src/uicommon/nmv-terminal.cc
+++ b/src/uicommon/nmv-terminal.cc
@@ -24,21 +24,23 @@
*/
#include "config.h"
#include "nmv-terminal.h"
-#if !(defined(__FreeBSD__) || defined(__OpenBSD__))
+#if defined(HAVE_PTY_H)
# include <pty.h>
-#else
+#elif defined (HAVE_LIBUTIL_H)
# include <sys/types.h>
# include <sys/ioctl.h>
# include <termios.h>
-#if defined(__FreeBSD__)
# include <libutil.h>
-#else
+#elif defined(HAVE_UTIL_H)
# include <util.h>
#endif
-#endif
#include <unistd.h>
#include <iostream>
+#if defined(HAVE_TR1_TUPLE)
#include <tr1/tuple>
+#elif defined(HAVE_BOOST_TR1_TUPLE_HPP)
+#include <boost/tr1/tuple.hpp>
+#endif
#include <gtkmm/bin.h>
#include <gtkmm/main.h>
#include <gtkmm/window.h>
--
1.8.3.4 (Apple Git-47)
On 03 Jan 2014, at 21:07, Juan Rafael García Blanco <juanrgar gmail com> wrote:
Hi,
I’ve managed to build nemiver on OS X 10.9. It works mostly fine; I’ve noticed that some non-essential
features do not work, but that could be due to Apple’s policy to debuggers other than the official one.
I’ve not worked on that yet.
Please find below a very simple patch to fix a compile error in tests/ folder. I’ve not generated patches
for the rest of the modifications as it takes me time because I find it hard to write substantial commit
messages. I hope you’ll hear from me soon. Of course, if I’ve done something wrong, please tell me and I’d
be more than happy to fix it. Thank you very much in advance.
Also, here’s the ticket at MacPorts https://trac.macports.org/ticket/41942
Best regards,
Juan.
From 465056ffd8fe247ddcc15cf3ad91fb12d773e0a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20R=2E=20Garc=C3=ADa=20Blanco?= <juanrgar gmail com>
Date: Mon, 30 Dec 2013 19:52:19 +0100
Subject: [PATCH] Fix compilation issue in tests/ due to wrong type
* tests/threads.cc (thread_func): Type of unused
variable tid changed from int to pthread_t.
---
tests/threads.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/threads.cc b/tests/threads.cc
index ed035eb..ec0ca20 100644
--- a/tests/threads.cc
+++ b/tests/threads.cc
@@ -28,7 +28,7 @@ thread_func (void *arg)
{
assert (arg != 0);
thread_info *ti = static_cast<thread_info*> (arg);
- __attribute__((unused)) int tid = ti->tid;
+ __attribute__((unused)) pthread_t tid = ti->tid;
return NULL;
}
--
1.8.3.4 (Apple Git-47)
On 14 Dec 2013, at 12:17, Juan Rafael García Blanco <juanrgar gmail com> wrote:
Hi,
I don’t know if this is the correct place to inform about this; maybe it’s better to file a bug report.
Sorry anyways. I was trying to get nemiver into macports and I discovered several points of failure. I’m
not sure if some of them can be easily fixed, i.e. some tweaks are not needed anymore even in recent linux
distros. Please find below the list of issues that I’ve discovered so far:
- Headers belonging to tr1 are used in various places. Their inclusion is guarded by ifdefs though. The
problem is clang++ seems to enter those sections and tries to include tr1/* headers. Starting with 10.9 OS
X uses by default libc++ instead of libstdc++ and this new library seems to not include tr1 headers.
- Inclusion of pty.h is not properly guarded. pty.h is not included in OS X, and util.h should be used
instead.
- ld option ‘--as-needed’ is not recognised. I couldn’t even find a description of this flag :) Is this
really needed?
I’m going to try to fix these as best as I can. This could be a public checklist and a remainder of the
work that needs to be done. I’ll much appreciate any comments on these; I mean, I’m assuming these issues
can all be fixed, I can be wrong though.
Thank you very much in advance.
Best regards,
Juan.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]