[fawkes/f22] Revert errno changes - c++11 detection correction is all that was needed
rmattes
rmattes at fedoraproject.org
Wed Feb 18 04:57:17 UTC 2015
commit 0a0de701f0f25ed62ba09c871452541dd3a5e82c
Author: Rich Mattes <richmattes at gmail.com>
Date: Tue Feb 17 23:55:25 2015 -0500
Revert errno changes - c++11 detection correction is all that was needed
fawkes-0.5.0-cpp11.patch | 208 +---------------------------------------------
fawkes.spec | 4 +-
2 files changed, 2 insertions(+), 210 deletions(-)
---
diff --git a/fawkes-0.5.0-cpp11.patch b/fawkes-0.5.0-cpp11.patch
index 341582c..e1a38f8 100644
--- a/fawkes-0.5.0-cpp11.patch
+++ b/fawkes-0.5.0-cpp11.patch
@@ -7,7 +7,7 @@ diff -up ./etc/buildsys/gcc.mk.cpp11 ./etc/buildsys/gcc.mk
+ifeq ($(call gte,$(GCC_VERSION_MAJOR),5),$(true))
+ HAVE_CPP11=1
-+ CFLAGS_CPP11=-std=gnu++11
++ CFLAGS_CPP11=-std=c++11
+else
+
ifeq ($(call gte,$(GCC_VERSION_MAJOR),4),$(true))
@@ -21,209 +21,3 @@ diff -up ./etc/buildsys/gcc.mk.cpp11 ./etc/buildsys/gcc.mk
ifeq ($(USE_OPENMP),1)
CFLAGS_OPENMP = -fopenmp
-diff -up ./src/libs/blackboard/net/handler.cpp.cpp11 ./src/libs/blackboard/net/handler.cpp
---- ./src/libs/blackboard/net/handler.cpp.cpp11 2012-09-26 18:55:32.000000000 -0400
-+++ ./src/libs/blackboard/net/handler.cpp 2015-02-17 23:00:15.442545719 -0500
-@@ -357,10 +357,10 @@ BlackBoardNetworkHandler::send_opensucce
-
-
- void
--BlackBoardNetworkHandler::send_openfailure(unsigned int clid, unsigned int errno)
-+BlackBoardNetworkHandler::send_openfailure(unsigned int clid, unsigned int error_number)
- {
- bb_iopenfail_msg_t *ofm = (bb_iopenfail_msg_t *)malloc(sizeof(bb_iopenfail_msg_t));
-- ofm->errno = htonl(errno);
-+ ofm->error_number = htonl(error_number);
-
- FawkesNetworkMessage *omsg = new FawkesNetworkMessage(clid, FAWKES_CID_BLACKBOARD,
- MSG_BB_OPEN_FAILURE, ofm,
-diff -up ./src/libs/blackboard/net/handler.h.cpp11 ./src/libs/blackboard/net/handler.h
---- ./src/libs/blackboard/net/handler.h.cpp11 2012-09-26 18:55:32.000000000 -0400
-+++ ./src/libs/blackboard/net/handler.h 2015-02-17 23:00:15.442545719 -0500
-@@ -62,7 +62,7 @@ class BlackBoardNetworkHandler
-
- private:
- void send_opensuccess(unsigned int clid, Interface *interface);
-- void send_openfailure(unsigned int clid, unsigned int errno);
-+ void send_openfailure(unsigned int clid, unsigned int error_number);
-
-
- BlackBoard *__bb;
-diff -up ./src/libs/blackboard/net/messages.h.cpp11 ./src/libs/blackboard/net/messages.h
---- ./src/libs/blackboard/net/messages.h.cpp11 2012-09-26 18:55:32.000000000 -0400
-+++ ./src/libs/blackboard/net/messages.h 2015-02-17 23:00:15.442545719 -0500
-@@ -140,7 +140,7 @@ typedef struct {
-
- /** Message to send update data. */
- typedef struct {
-- uint32_t errno; /**< Error code. @see blackboard_neterror_t */
-+ uint32_t error_number; /**< Error code. @see blackboard_neterror_t */
- } bb_iopenfail_msg_t;
-
-
-diff -up ./src/libs/blackboard/remote.cpp.cpp11 ./src/libs/blackboard/remote.cpp
---- ./src/libs/blackboard/remote.cpp.cpp11 2012-09-26 18:55:32.000000000 -0400
-+++ ./src/libs/blackboard/remote.cpp 2015-02-17 23:00:15.443545757 -0500
-@@ -229,7 +229,7 @@ RemoteBlackBoard::open_interface(const c
- __proxies[proxy->serial()] = proxy;
- } else if ( __m->msgid() == MSG_BB_OPEN_FAILURE ) {
- bb_iopenfail_msg_t *fm = __m->msg<bb_iopenfail_msg_t>();
-- unsigned int error = ntohl(fm->errno);
-+ unsigned int error = ntohl(fm->error_number);
- __m->unref();
- __m = NULL;
- if ( error == BB_ERR_WRITER_EXISTS ) {
-diff -up ./src/libs/core/exception.cpp.cpp11 ./src/libs/core/exception.cpp
---- ./src/libs/core/exception.cpp.cpp11 2012-09-26 18:55:32.000000000 -0400
-+++ ./src/libs/core/exception.cpp 2015-02-17 23:00:15.443545757 -0500
-@@ -168,16 +168,16 @@ Exception::Exception(const char *format,
- * Constructs a new exception with the given message and errno value. This
- * is particularly handy when throwing the exception after a function failed
- * that returns an error code in errno.
-- * @param errno error number
-+ * @param error_number error number
- * @param format The format of the primary message. Supports the same
- * arguments as append(). The message is copied and not just referenced.
- * Thus the memory has to be freed if it is a dynamic string on the heap.
- */
--Exception::Exception(int errno, const char *format, ...) throw()
-+Exception::Exception(int error_number, const char *format, ...) throw()
- {
- messages_mutex = new Mutex();
-
-- _errno = errno;
-+ _errno = error_number;
- __type_id = "unknown";
-
- messages = NULL;
-@@ -188,7 +188,7 @@ Exception::Exception(int errno, const ch
- va_list arg;
- va_start(arg, format);
- char *ext_format;
-- if ( asprintf(&ext_format, "%s (errno: %i, %s)", format, errno, strerror(errno)) == -1 ) {
-+ if ( asprintf(&ext_format, "%s (errno: %i, %s)", format, error_number, strerror(error_number)) == -1 ) {
- append_nolock_va(format, arg);
- } else {
- append_nolock_va(ext_format, arg);
-@@ -196,7 +196,7 @@ Exception::Exception(int errno, const ch
- }
- va_end(arg);
- } else {
-- append_nolock("Exception with errno=%i (%s)", errno, strerror(errno));
-+ append_nolock("Exception with errno=%i (%s)", error_number, strerror(error_number));
- }
- }
-
-diff -up ./src/libs/core/exception.h.cpp11 ./src/libs/core/exception.h
---- ./src/libs/core/exception.h.cpp11 2012-09-26 18:55:32.000000000 -0400
-+++ ./src/libs/core/exception.h 2015-02-17 23:00:15.443545757 -0500
-@@ -37,7 +37,7 @@ class Exception : public std::exception
- public:
-
- Exception(const char *format, ...) throw();
-- Exception(int errno, const char *format, ...) throw();
-+ Exception(int error_number, const char *format, ...) throw();
- Exception(const Exception &exc) throw();
- virtual ~Exception() throw();
-
-diff -up ./src/libs/core/exceptions/system.cpp.cpp11 ./src/libs/core/exceptions/system.cpp
---- ./src/libs/core/exceptions/system.cpp.cpp11 2012-09-26 18:55:32.000000000 -0400
-+++ ./src/libs/core/exceptions/system.cpp 2015-02-17 23:00:15.444545796 -0500
-@@ -54,7 +54,7 @@ OutOfMemoryException::OutOfMemoryExcepti
- /** @class InterruptedException <core/exceptions/system.h>
- * The current system call has been interrupted (for instance by a signal).
- * Throw this exception if you use libc functions which return EINTR or store
-- * EINTR in errno.
-+ * EINTR in error_number.
- * @ingroup Exceptions
- */
- /** Constructor */
-@@ -112,12 +112,12 @@ TimeoutException::TimeoutException(const
-
- /** Constructor with error number.
- * @param filename name of file which could not be opened
-- * @param errno error number
-+ * @param error_code error number
- * @param additional_msg optional additional message
- */
--CouldNotOpenFileException::CouldNotOpenFileException(const char *filename, int errno,
-+CouldNotOpenFileException::CouldNotOpenFileException(const char *filename, int error_code,
- const char *additional_msg) throw()
-- : Exception(errno, "Could not open file '%s' %s%s%s", filename,
-+ : Exception(error_code, "Could not open file '%s' %s%s%s", filename,
- (additional_msg) ? "(" : "", (additional_msg) ? additional_msg : "",
- (additional_msg) ? ")" : "")
- {
-@@ -146,12 +146,12 @@ CouldNotOpenFileException::CouldNotOpenF
-
- /** Constructor with error number.
- * @param filename name of file which could not be read
-- * @param errno error number
-+ * @param error_number error number
- * @param additional_msg optional additional message
- */
--FileReadException::FileReadException(const char *filename, int errno,
-+FileReadException::FileReadException(const char *filename, int error_number,
- const char *additional_msg) throw()
-- : Exception(errno, "Could not read from file '%s' %s%s%s", filename,
-+ : Exception(error_number, "Could not read from file '%s' %s%s%s", filename,
- (additional_msg) ? "(" : "", (additional_msg) ? additional_msg : "",
- (additional_msg) ? ")" : "")
- {
-@@ -180,12 +180,12 @@ FileReadException::FileReadException(con
-
- /** Constructor with error number.
- * @param filename name of file which could not be written to
-- * @param errno error number
-+ * @param error_number error number
- * @param additional_msg optional additional message
- */
--FileWriteException::FileWriteException(const char *filename, int errno,
-+FileWriteException::FileWriteException(const char *filename, int error_number,
- const char *additional_msg) throw()
-- : Exception(errno, "Could not write to file '%s' %s%s%s", filename,
-+ : Exception(error_number, "Could not write to file '%s' %s%s%s", filename,
- (additional_msg) ? "(" : "", (additional_msg) ? additional_msg : "",
- (additional_msg) ? ")" : "")
- {
-diff -up ./src/libs/core/exceptions/system.h.cpp11 ./src/libs/core/exceptions/system.h
---- ./src/libs/core/exceptions/system.h.cpp11 2012-09-26 18:55:32.000000000 -0400
-+++ ./src/libs/core/exceptions/system.h 2015-02-17 23:00:15.444545796 -0500
-@@ -52,7 +52,7 @@ class TimeoutException : public Exceptio
-
- class CouldNotOpenFileException : public Exception {
- public:
-- CouldNotOpenFileException(const char *filename, int errno,
-+ CouldNotOpenFileException(const char *filename, int error_number,
- const char *additional_msg = 0) throw();
- CouldNotOpenFileException(const char *filename, const char *additional_msg = 0) throw();
- };
-@@ -60,14 +60,14 @@ class CouldNotOpenFileException : public
-
- class FileReadException : public Exception {
- public:
-- FileReadException(const char *filename, int errno,
-+ FileReadException(const char *filename, int error_number,
- const char *additional_msg = 0) throw();
- FileReadException(const char *filename, const char *additional_msg = 0) throw();
- };
-
- class FileWriteException : public Exception {
- public:
-- FileWriteException(const char *filename, int errno,
-+ FileWriteException(const char *filename, int error_number,
- const char *additional_msg = 0) throw();
- FileWriteException(const char *filename, const char *additional_msg = 0) throw();
- };
-diff -up ./src/plugins/worldmodel/fusers/objpos_majority.h.cpp11 ./src/plugins/worldmodel/fusers/objpos_majority.h
---- ./src/plugins/worldmodel/fusers/objpos_majority.h.cpp11 2012-09-26 18:55:32.000000000 -0400
-+++ ./src/plugins/worldmodel/fusers/objpos_majority.h 2015-02-17 23:00:15.444545796 -0500
-@@ -100,7 +100,7 @@ class WorldModelObjPosMajorityFuser
- typedef std::vector<Opi*> OpiBucket;
- typedef std::vector<OpiBucket> OpiBuckets;
-
-- const static float GROUP_RADIUS = 1.0f;
-+ constexpr static float GROUP_RADIUS = 1.0f;
-
- void check();
- void copy_own_if();
diff --git a/fawkes.spec b/fawkes.spec
index 6ee2885..6402259 100644
--- a/fawkes.spec
+++ b/fawkes.spec
@@ -478,7 +478,7 @@ functionality.
%endif
# No _smp_mflags; build is not parallel clean
make uncolored-switch-buildtype-sysinstall
-make uncolored-all uncolored-gui CFLAGS_EXT="%{optflags} -std=gnu++11" PREFIX=%{_prefix} \
+make uncolored-all uncolored-gui CFLAGS_EXT="%{optflags}" PREFIX=%{_prefix} \
%{feature_flags}
# Ignore documentation errors until fresh doxygen release hits build machines.
# Doxygen 1.7.1 is totally buggy and reports hundreds of false positives.
@@ -857,8 +857,6 @@ rm -rf %{buildroot}
%changelog
* Tue Feb 17 2015 Rich Mattes <richmattes at gmail.com> - 0.5.0-20
- Update lua 5.2 patch to detect correct version of lua
-- Replace variables and arguments named "errno" with "error_number"
-- Enable gnu++11 globally
- Fix gcc version based c++11 detection logic
* Thu Jan 29 2015 Petr Machata <pmachata at redhat.com> - 0.5.0-20
More information about the scm-commits
mailing list