devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Errapart <andrei-VvktuG2w+SIZux3j3Bed6fC9HSW9iNxf@public.gmane.org>
To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 2/4] Microsoft Visual C patches
Date: Wed, 18 Jun 2014 20:02:28 +0300	[thread overview]
Message-ID: <53A1C624.60608@errapartengineering.com> (raw)
In-Reply-To: <20140616104628.GB29264-1s0os16eZneny3qCrzbmXA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: dtc-header.patch --]
[-- Type: text/plain, Size: 1002 bytes --]

commit 8216d97ee62aadac330c9ff85f3775fcd3c760d3
Author: Andrei Errapart <andrei-VvktuG2w+SIZux3j3Bed6fC9HSW9iNxf@public.gmane.org>
Date:   Wed Jun 18 18:07:04 2014 +0200

    Work around MSVC limitations:
    1) No variadic macros in the form "args..."; this is a GCC extension.
    2) No empty struct initializers. In any case, there is very little to win: { } vs. { 0 }.
    Signed-off-by: Andrei Errapart <andrei-VvktuG2w+SIZux3j3Bed6fC9HSW9iNxf@public.gmane.org>

diff --git a/dtc.h b/dtc.h
index 20de073..56212c8 100644
--- a/dtc.h
+++ b/dtc.h
@@ -38,9 +38,9 @@
 #include "util.h"
 
 #ifdef DEBUG
-#define debug(fmt,args...)	printf(fmt, ##args)
+#define debug(...)	printf(__VA_ARGS__)
 #else
-#define debug(fmt,args...)
+#define debug(...)
 #endif
 
 
@@ -88,7 +88,7 @@ struct data {
 };
 
 
-#define empty_data ((struct data){ /* all .members = 0 or NULL */ })
+#define empty_data ((struct data){ 0 /* all .members = 0 or NULL */ })
 
 #define for_each_marker(m) \
 	for (; (m); (m) = (m)->next)

  parent reply	other threads:[~2014-06-18 17:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-15 15:46 [PATCH] Microsoft Visual C patches Andrei Errapart
     [not found] ` <539DBFC8.4050204-VvktuG2w+SIZux3j3Bed6fC9HSW9iNxf@public.gmane.org>
2014-06-16 10:46   ` David Gibson
     [not found]     ` <20140616104628.GB29264-1s0os16eZneny3qCrzbmXA@public.gmane.org>
2014-06-17 17:18       ` Matthew Gerlach
2014-06-18 17:01       ` [PATCH 1/4] " Andrei Errapart
     [not found]         ` <53A1C5FC.9040105-VvktuG2w+SIZux3j3Bed6fC9HSW9iNxf@public.gmane.org>
2014-06-19 11:14           ` David Gibson
     [not found]             ` <20140619111459.GM29264-1s0os16eZneny3qCrzbmXA@public.gmane.org>
2014-06-19 14:17               ` Andrei Errapart
     [not found]                 ` <53A2F104.90701-VvktuG2w+SIZux3j3Bed6fC9HSW9iNxf@public.gmane.org>
2014-06-19 15:06                   ` Andrei Errapart
2014-06-20 12:55                   ` David Gibson
     [not found]                     ` <20140620125528.GB16801-1s0os16eZneny3qCrzbmXA@public.gmane.org>
2014-06-20 13:32                       ` Simon Glass
2014-06-18 17:02       ` Andrei Errapart [this message]
2014-06-18 17:03       ` [PATCH 3/4] " Andrei Errapart
2014-06-18 17:04       ` [PATCH 4/4] " Andrei Errapart
2014-06-18 17:27       ` [PATCH] " Andrei Errapart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A1C624.60608@errapartengineering.com \
    --to=andrei-vvktug2w+sizux3j3bed6fc9hsw9inxf@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).