[Pkg-owncloud-commits] [owncloud-client] 138/164: Fix the build with GCC 4.7

Sandro Knauß hefee-guest at moszumanska.debian.org
Sun Mar 22 11:57:05 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 0f84510e6f022a54ccce2bae023c0698af453627
Author: Jocelyn Turcotte <jturcotte at woboq.com>
Date:   Thu Mar 12 12:56:43 2015 +0100

    Fix the build with GCC 4.7
    
    Disable bitfields completely in SyncFileItem with that compiler.
---
 src/libsync/syncfileitem.h | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/src/libsync/syncfileitem.h b/src/libsync/syncfileitem.h
index 99e3354..dc2bf4a 100644
--- a/src/libsync/syncfileitem.h
+++ b/src/libsync/syncfileitem.h
@@ -21,6 +21,13 @@
 
 #include <csync.h>
 
+#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG) && (__GNUC__ * 100 + __GNUC_MINOR__ < 408)
+ // openSuse 12.3 didn't like enum bitfields.
+ #define BITFIELD(size)
+#else
+ #define BITFIELD(size) :size
+#endif
+
 namespace OCC {
 
 class SyncFileItem {
@@ -114,19 +121,19 @@ public:
     // Variables usefull for everybody
     QString _file;
     QString _renameTarget;
-    Type _type:3;
-    Direction _direction:2;
-    bool _isDirectory:1;
+    Type _type BITFIELD(3);
+    Direction _direction BITFIELD(2);
+    bool _isDirectory BITFIELD(1);
 
     /// Whether there's an entry in the blacklist table.
     /// Note: that entry may have retries left, so this can be true
     /// without the status being FileIgnored.
-    bool                 _hasBlacklistEntry:1;
+    bool                 _hasBlacklistEntry BITFIELD(1);
 
     // Variables usefull to report to the user
-    Status               _status:4;
-    bool                 _isRestoration:1; // The original operation was forbidden, and this is a restoration
-    bool                 _should_update_etag:1;
+    Status               _status BITFIELD(4);
+    bool                 _isRestoration BITFIELD(1); // The original operation was forbidden, and this is a restoration
+    bool                 _should_update_etag BITFIELD(1);
     quint16              _httpErrorCode;
     QString              _errorString; // Contains a string only in case of error
     QByteArray           _responseTimeStamp;
@@ -155,8 +162,8 @@ public:
         time_t      _other_modtime;
         QByteArray  _other_etag;
         QByteArray  _other_fileId;
-        enum csync_instructions_e _instruction:16;
-        enum csync_instructions_e _other_instruction:16;
+        enum csync_instructions_e _instruction BITFIELD(16);
+        enum csync_instructions_e _other_instruction BITFIELD(16);
     } log;
 };
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list