Bug 301027 - Debian #670454 digikam: FTBFS on mips ("dng_flags.h error: #error Unable to figure out byte order.")
Summary: Debian #670454 digikam: FTBFS on mips ("dng_flags.h error: #error Unable to f...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Bqm-DngConverter (show other bugs)
Version: unspecified
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-02 04:52 UTC by Mark Purcell
Modified: 2016-07-15 12:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Purcell 2012-06-02 04:52:06 UTC
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670454


From: Modestas Vainius <modax@debian.org>
Subject: Improve big/little endian detection in dngconverter.
Origin: vendor

__BYTE_ORDER__ is a standard GNU C macro [1]. Neither of other checks passes on
s390 causing a FTBFS.

[1] http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html

--- a/extra/kipi-plugins/dngconverter/dngwriter/extra/dng_sdk/dng_flags.h
+++ b/extra/kipi-plugins/dngconverter/dngwriter/extra/dng_sdk/dng_flags.h
@@ -91,6 +91,14 @@
 #elif defined(__BIG_ENDIAN__)
 #define qDNGBigEndian 1
 
+#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && \
+    __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define qDNGBigEndian 1
+
+#elif defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
+    __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define qDNGBigEndian 0
+
 #else
 
 #ifndef qXCodeRez
Comment 1 Andrew Goodbody 2012-06-02 09:25:16 UTC
Git commit af67dd5c98d4d8357940a53114dd97201752f9f6 by Andrew Goodbody.
Committed on 02/06/2012 at 09:18.
Pushed by goodbody into branch 'master'.

Fix FTBFS on mips

Add ability to detect byte order from __BYTE_ORDER__ macro if defined,
fixes fail to build on MIPS.

M  +8    -0    dngconverter/dngwriter/extra/dng_sdk/dng_flags.h

http://commits.kde.org/kipi-plugins/af67dd5c98d4d8357940a53114dd97201752f9f6