[haiku-commits] haiku: hrev51672 - headers/private/graphics/common src/add-ons/media/plugins/ffmpeg src/add-ons/kernel/file_systems/btrfs src/add-ons/kernel/file_systems/userlandfs/kernel_add_on

  • From: waddlesplash@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 13 Dec 2017 02:35:57 +0100 (CET)

hrev51672 adds 4 changesets to branch 'master'
old head: 0d020b8298e74a466fda84048297a89b82987728
new head: cef24e1a439c5dbf02e06f730e97be356aa99be9
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=cef24e1a439c+%5E0d020b8298e7

----------------------------------------------------------------------------

36f28382dba6: configure: Properly test for set crossToolsPrefix and targetArchs.
  
  Now you can specify a --build-cross-tools and then override just
  GCC from it with a following --use-clang in the same configure
  invocation.

361f980f9dae: More "missing space after macro; invalid in C++11" error fixes.

b06b5456a511: btrfs: [] on the end of a struct field is a variable length array.
  
  This throws an error in Clang, so just declare these as pointers.

cef24e1a439c: userlandfs: Pre-define and use the right KMessage.
  
  Otherwise, later on when we include the real one Clang errors about
  there being two conflicting KMessages declared in separate contexts.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

5 files changed, 26 insertions(+), 21 deletions(-)
configure                                        |  8 +++++--
headers/private/graphics/common/debug_ext.h      | 22 ++++++++++----------
src/add-ons/kernel/file_systems/btrfs/btrfs.h    |  4 ++--
.../userlandfs/kernel_add_on/FileSystem.h        |  3 ++-
src/add-ons/media/plugins/ffmpeg/gfx_util.cpp    | 10 ++++-----

############################################################################

Commit:      36f28382dba6030f2b16a790be85dbfbeff8790f
URL:         http://cgit.haiku-os.org/haiku/commit/?id=36f28382dba6
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Wed Dec 13 01:07:38 2017 UTC

configure: Properly test for set crossToolsPrefix and targetArchs.

Now you can specify a --build-cross-tools and then override just
GCC from it with a following --use-clang in the same configure
invocation.

----------------------------------------------------------------------------

diff --git a/configure b/configure
index 5368bf9..922665c 100755
--- a/configure
+++ b/configure
@@ -699,10 +699,14 @@ while [ $# -gt 0 ] ; do
                                        ;;
                        esac
                        get_build_tool_path clang clang
-                       if [ -n "crossToolsPrefix_$targetArch" ]; then
+                       if [ -z `get_variable "crossToolsPrefix_$targetArch"` ] 
\
+                                       && [ -z `get_variable 
buildCrossToolsMachine_$targetArch` ]; then
                                set_variable crossToolsPrefix_$targetArch llvm-
                        fi
-                       targetArchs="$targetArchs $targetArch"
+                       if ! test "${targetArchs#*$targetArch}" != 
"$targetArchs"; then
+                               # we have not already added this arch to 
targetArchs, so add it now
+                               targetArchs="$targetArchs $targetArch"
+                       fi
                        HAIKU_PACKAGING_ARCHS=
                        shift 2
                        ;;

############################################################################

Commit:      361f980f9dae7ee67259c22d09495dfc8ed3b574
URL:         http://cgit.haiku-os.org/haiku/commit/?id=361f980f9dae
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Wed Dec 13 01:08:26 2017 UTC

More "missing space after macro; invalid in C++11" error fixes.

----------------------------------------------------------------------------

diff --git a/headers/private/graphics/common/debug_ext.h 
b/headers/private/graphics/common/debug_ext.h
index c15ce31..9ac65ab 100644
--- a/headers/private/graphics/common/debug_ext.h
+++ b/headers/private/graphics/common/debug_ext.h
@@ -3,7 +3,7 @@
 
 
        Part of Radeon driver
-               
+
        Extended debugging functions
 */
 
@@ -18,7 +18,7 @@
 //  info: tells things that are important but not an error
 //  error: used if something has gone wrong
 //
-// common usage is 
+// common usage is
 //  SHOW_{FLOW,INFO,ERROR}( seriousness, format string, parameters... );
 //  SHOW_{FLOW,INFO,ERROR}0( seriousness, string );
 //
@@ -29,7 +29,7 @@
 // to specify the module that created the message you have
 // to define a string called
 //  DEBUG_MSG_PREFIX
-// you dynamically speficify the maximum seriousness level by defining 
+// you dynamically speficify the maximum seriousness level by defining
 // the following variables/macros
 //  debug_level_flow
 //  debug_level_info
@@ -40,7 +40,7 @@
 //  DEBUG_MAX_LEVEL_INFO
 //  DEBUG_MAX_LEVEL_ERRROR
 //
-// you _can_ ask to delay execution after each printed message 
+// you _can_ ask to delay execution after each printed message
 // by defining the duration (in ms) via
 //  DEBUG_WAIT_ON_MSG (for flow and info)
 //  DEBUG_WAIT_ON_ERROR (for error)
@@ -48,7 +48,7 @@
 #ifdef DEBUG_WAIT_ON_MSG
 #define DEBUG_WAIT snooze( DEBUG_WAIT_ON_MSG );
 #else
-#define DEBUG_WAIT 
+#define DEBUG_WAIT
 #endif
 
 #ifdef DEBUG_WAIT_ON_ERROR
@@ -77,32 +77,32 @@
 
 #define SHOW_FLOW(seriousness, format, param...) \
        do { if( seriousness <= debug_level_flow && seriousness <= 
DEBUG_MAX_LEVEL_FLOW ) { \
-               dprintf( "%s%s: "format"\n", FUNC_NAME, param ); DEBUG_WAIT \
+               dprintf( "%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
        }} while( 0 )
 
 #define SHOW_FLOW0(seriousness, format) \
        do { if( seriousness <= debug_level_flow && seriousness <= 
DEBUG_MAX_LEVEL_FLOW ) { \
-               dprintf( "%s%s: "format"\n", FUNC_NAME); DEBUG_WAIT \
+               dprintf( "%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
        }} while( 0 )
 
 #define SHOW_INFO(seriousness, format, param...) \
        do { if( seriousness <= debug_level_info && seriousness <= 
DEBUG_MAX_LEVEL_INFO ) { \
-               dprintf( "%s%s: "format"\n", FUNC_NAME, param ); DEBUG_WAIT \
+               dprintf( "%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
        }} while( 0 )
 
 #define SHOW_INFO0(seriousness, format) \
        do { if( seriousness <= debug_level_info && seriousness <= 
DEBUG_MAX_LEVEL_INFO ) { \
-               dprintf( "%s%s: "format"\n", FUNC_NAME); DEBUG_WAIT \
+               dprintf( "%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
        }} while( 0 )
 
 #define SHOW_ERROR(seriousness, format, param...) \
        do { if( seriousness <= debug_level_error && seriousness <= 
DEBUG_MAX_LEVEL_ERROR ) { \
-               dprintf( "%s%s: "format"\n", FUNC_NAME, param ); 
DEBUG_WAIT_ERROR \
+               dprintf( "%s%s: " format "\n", FUNC_NAME, param ); 
DEBUG_WAIT_ERROR \
        }} while( 0 )
 
 #define SHOW_ERROR0(seriousness, format) \
        do { if( seriousness <= debug_level_error && seriousness <= 
DEBUG_MAX_LEVEL_ERROR ) { \
-               dprintf( "%s%s: "format"\n", FUNC_NAME); DEBUG_WAIT_ERROR \
+               dprintf( "%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT_ERROR \
        }} while( 0 )
 
 #endif
diff --git a/src/add-ons/media/plugins/ffmpeg/gfx_util.cpp 
b/src/add-ons/media/plugins/ffmpeg/gfx_util.cpp
index bb83dc8..f20c61c 100644
--- a/src/add-ons/media/plugins/ffmpeg/gfx_util.cpp
+++ b/src/add-ons/media/plugins/ffmpeg/gfx_util.cpp
@@ -23,7 +23,7 @@ extern "C" {
 #endif
 
 #if LIBAVCODEC_VERSION_INT < ((54 << 16) | (50 << 8))
-#define AVPixelFormat PixelFormat 
+#define AVPixelFormat PixelFormat
 #define AV_PIX_FMT_NONE PIX_FMT_NONE
 #define AV_PIX_FMT_YUV410P PIX_FMT_YUV410P
 #define AV_PIX_FMT_YUV411P PIX_FMT_YUV411P
@@ -291,8 +291,8 @@ colorspace_to_pixfmt(color_space format)
 void
 dump_ffframe_audio(AVFrame* frame, const char* name)
 {
-       printf(BEGIN_TAG"AVFrame(%s) [ pkt_dts:%-10lld #samples:%-5d %s"
-               " ]\n"END_TAG,
+       printf(BEGIN_TAG "AVFrame(%s) [ pkt_dts:%-10lld #samples:%-5d %s"
+               " ]\n" END_TAG,
                name,
                frame->pkt_dts,
                frame->nb_samples,
@@ -305,8 +305,8 @@ dump_ffframe_video(AVFrame* frame, const char* name)
 {
        const char* picttypes[] = {"no pict type", "intra", "predicted",
                "bidir pre", "s(gmc)-vop"};
-       printf(BEGIN_TAG"AVFrame(%s) [ pkt_dts:%-10lld cnum:%-5d dnum:%-5d %s%s"
-               " ]\n"END_TAG,
+       printf(BEGIN_TAG "AVFrame(%s) [ pkt_dts:%-10lld cnum:%-5d dnum:%-5d 
%s%s"
+               " ]\n" END_TAG,
                name,
                frame->pkt_dts,
                frame->coded_picture_number,

############################################################################

Commit:      b06b5456a511d66af5aa2db7873dd8eb9b90527c
URL:         http://cgit.haiku-os.org/haiku/commit/?id=b06b5456a511
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Wed Dec 13 01:09:41 2017 UTC

btrfs: [] on the end of a struct field is a variable length array.

This throws an error in Clang, so just declare these as pointers.

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/file_systems/btrfs/btrfs.h 
b/src/add-ons/kernel/file_systems/btrfs/btrfs.h
index 57058f5..3d0e7bf 100644
--- a/src/add-ons/kernel/file_systems/btrfs/btrfs.h
+++ b/src/add-ons/kernel/file_systems/btrfs/btrfs.h
@@ -356,8 +356,8 @@ struct btrfs_dir_entry {
        uint16  data_length;
        uint16  name_length;
        uint8   type;
-       uint8   name[];
-       uint8   data[];         // attribute data
+       uint8*  name;
+       uint8*  data;           // attribute data
        uint16 DataLength() const { return 
B_LENDIAN_TO_HOST_INT16(data_length); }
        uint16 NameLength() const { return 
B_LENDIAN_TO_HOST_INT16(name_length); }
        ino_t InodeID() const { return location.ObjectID(); }

############################################################################

Revision:    hrev51672
Commit:      cef24e1a439c5dbf02e06f730e97be356aa99be9
URL:         http://cgit.haiku-os.org/haiku/commit/?id=cef24e1a439c
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Wed Dec 13 01:10:42 2017 UTC

userlandfs: Pre-define and use the right KMessage.

Otherwise, later on when we include the real one Clang errors about
there being two conflicting KMessages declared in separate contexts.

----------------------------------------------------------------------------

diff --git 
a/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/FileSystem.h 
b/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/FileSystem.h
index 256d6a4..988f14a 100644
--- a/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/FileSystem.h
+++ b/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/FileSystem.h
@@ -22,7 +22,8 @@
 
 
 struct IOCtlInfo;
-class KMessage;
+namespace BPrivate { class KMessage; }
+using BPrivate::KMessage;
 class Settings;
 class Volume;
 


Other related posts: