Replace gcc variadic macro extension with C99 version
PATCH 1/1 Replace gcc variadic macro extension with C99 version
--- block-raw-posix.c | 6 +++--- darwin-user/main.c | 12 ++++++------ darwin-user/syscall.c | 18 +++++++++--------- hw/adb.c | 6 +++--- hw/apb_pci.c | 6 +++--- hw/arm_gic.c | 6 +++--- hw/cs4231.c | 6 +++--- hw/cuda.c | 6 +++--- hw/dp8393x.c | 10 +++++----- hw/eccmemctl.c | 6 +++--- hw/eepro100.c | 4 ++-- hw/eeprom93xx.c | 4 ++-- hw/escc.c | 18 +++++++++--------- hw/esp.c | 10 +++++----- hw/fdc.c | 10 +++++----- hw/fw_cfg.c | 6 +++--- hw/g364fb.c | 10 +++++----- hw/grackle_pci.c | 6 +++--- hw/heathrow_pic.c | 6 +++--- hw/iommu.c | 6 +++--- hw/lsi53c895a.c | 14 +++++++------- hw/m48t59.c | 4 ++-- hw/mac_dbdma.c | 6 +++--- hw/mac_nvram.c | 6 +++--- hw/mcf_fec.c | 6 +++--- hw/openpic.c | 4 ++-- hw/parallel.c | 4 ++-- hw/pci_host.h | 6 +++--- hw/pflash_cfi01.c | 10 +++++----- hw/pflash_cfi02.c | 6 +++--- hw/pl022.c | 14 +++++++------- hw/pl031.c | 6 +++--- hw/pl061.c | 14 +++++++------- hw/pl181.c | 6 +++--- hw/ppc4xx_pci.c | 2 +- hw/ppc_newworld.c | 6 +++--- hw/ppc_prep.c | 10 +++++----- hw/ppce500_pci.c | 4 ++-- hw/rc4030.c | 10 +++++----- hw/sbi.c | 6 +++--- hw/scsi-disk.c | 10 +++++----- hw/scsi-generic.c | 10 +++++----- hw/sd.c | 6 +++--- hw/sh_intc.h | 2 +- hw/slavio_intctl.c | 6 +++--- hw/slavio_misc.c | 6 +++--- hw/slavio_timer.c | 6 +++--- hw/sm501.c | 4 ++-- hw/smbus.c | 14 +++++++------- hw/sparc32_dma.c | 6 +++--- hw/ssd0303.c | 14 +++++++------- hw/ssd0323.c | 14 +++++++------- hw/ssi-sd.c | 14 +++++++------- hw/stellaris_enet.c | 14 +++++++------- hw/sun4c_intctl.c | 6 +++--- hw/sun4m.c | 6 +++--- hw/sun4u.c | 6 +++--- hw/unin_pci.c | 6 +++--- hw/usb-msd.c | 6 +++--- hw/usb-serial.c | 6 +++--- linux-user/main.c | 12 ++++++------ linux-user/syscall.c | 10 +++++----- slirp/bootp.c | 6 +++--- target-i386/ops_sse.h | 4 ++-- target-i386/translate.c | 4 ++-- target-mips/translate.c | 6 +++--- target-sparc/op_helper.c | 16 ++++++++-------- tests/linux-test.c | 2 +- 68 files changed, 264 insertions(+), 264 deletions(-)
block-raw-posix.c +3 -3
@@ -73,10 +73,10 @@//#define DEBUG_BLOCK #if defined(DEBUG_BLOCK ) -#define DEBUG_BLOCK_PRINT(formatCstr, args...) do { if (qemu_log_enabled()) \ - { qemu_log(formatCstr, ##args); qemu_log_flush(); } } while (0) +#define DEBUG_BLOCK_PRINT (formatCstr, ...) do { if (qemu_log_enabled()) \ + { qemu_log(formatCstr, ## __VA_ARGS__); qemu_log_flush(); } } while (0)#else -#define DEBUG_BLOCK_PRINT(formatCstr, args...) +#define DEBUG_BLOCK_PRINT (formatCstr, ...)#endif /* OS X does not have O_DSYNC */
darwin-user/main.c +0 -0
@@ -158,12 +158,12 @@ int ppc_dcr_write (ppc_dcr_t *dcr_env, int dcrn,
target_ulong val)
return -1;
}
-#define EXCP_DUMP(env, fmt, args...) \
-do { \
- fprintf(stderr, fmt , ##args); \
- cpu_dump_state(env, stderr, fprintf, 0); \
- qemu_log(fmt, ##args); \
- log_cpu_state(env, 0);
\
+#define EXCP_DUMP(env, fmt, ...) \
+do { \
+ fprintf(stderr, fmt , ## __VA_ARGS__); \
+ cpu_dump_state(env, stderr, fprintf, 0); \
+ qemu_log(fmt, ## __VA_ARGS__); \
+ log_cpu_state(env, 0); \} while (0)
void cpu_loop(CPUPPCState *env)
darwin-user/syscall.c +1 -2
@@ -627,7 +627,7 @@ static inline void byteswap_winsize(struct winsize *w)tswap16s (&w->ws_ypixel); } -#define STRUCT(name, list...) STRUCT_ ## name, +#define STRUCT (name, ...) STRUCT_ ## name,#define STRUCT_SPECIAL (name) STRUCT_ ## name,enum {#include "ioctls_types.h"
@@ -635,7 +635,7 @@ enum {#undef STRUCT#undef STRUCT_SPECIAL -#define STRUCT(name, list...) const argtype struct_ ## name ## _def[]
= { list, TYPE_NULL };
+#define STRUCT(name, ...) const argtype struct_ ## name ## _def[] = {
__VA_ARGS__, TYPE_NULL };
#define STRUCT_SPECIAL(name)
#include "ioctls_types.h"
#undef STRUCT
@@ -656,8 +656,8 @@ typedef struct IOCTLEntry {
#define MAX_STRUCT_SIZE 4096
static IOCTLEntry ioctl_entries[] = {
-#define IOCTL(cmd, access, types...) \
- { cmd, cmd, #cmd, access, { types } },
+#define IOCTL(cmd, access, ...) \
+ { cmd, cmd, #cmd, access, { __VA_ARGS__ } },
#include "ioctls.h"
{ 0, 0, }, };
@@ -898,10 +898,10 @@ typedef long (*syscall_function_t)(void *cpu_env, int num);
#define WRAPPER_CALL_DIRECT_6(function, _arg1, _arg2, _arg3, _arg4,_arg5, _arg6) long __qemu_##function(void *cpu_env) { int i = 0; typeof(_arg1) arg1 = _arg1; typeof(_arg2) arg2 = _arg2; typeof(_arg3) arg3 = _arg3; typeof(_arg4) arg4 = _arg4; typeof(_arg5) arg5 = _arg5; typeof(_arg6) arg6 = _arg6; return (long)function(arg1, arg2, arg3, arg4, arg5, arg6); }
#define WRAPPER_CALL_DIRECT_7(function, _arg1, _arg2, _arg3, _arg4,_arg5, _arg6, _arg7) long __qemu_##function(void *cpu_env) { int i =
0; typeof(_arg1) arg1 = _arg1; typeof(_arg2) arg2 = _arg2;typeof(_arg3) arg3 = _arg3; typeof(_arg4) arg4 = _arg4; typeof(_arg5) arg5 = _arg5; typeof(_arg6) arg6 = _arg6; typeof(_arg7) arg7 = _arg7; return (long)function(arg1, arg2, arg3, arg4, arg5, arg6, arg7); }
#define WRAPPER_CALL_DIRECT_8(function, _arg1, _arg2, _arg3, _arg4,_arg5, _arg6, _arg7, _arg8) long __qemu_##function(void *cpu_env) {
int i = 0; typeof(_arg1) arg1 = _arg1; typeof(_arg2) arg2 = _arg2;typeof(_arg3) arg3 = _arg3; typeof(_arg4) arg4 = _arg4; typeof(_arg5) arg5 = _arg5; typeof(_arg6) arg6 = _arg6; typeof(_arg7) arg7 = _arg7; typeof(_arg8) arg8 = _arg8; return (long)function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); }
-#define WRAPPER_CALL_DIRECT(function, nargs, args...) WRAPPER_CALL_DIRECT_##nargs(function, args)
-#define WRAPPER_CALL_NOERRNO(function, nargs, args...) WRAPPER_CALL_DIRECT(function, nargs, args)
-#define WRAPPER_CALL_INDIRECT(function, nargs, args...) -#define ENTRY(name, number, function, nargs, call_type, args...) WRAPPER_##call_type(function, nargs, args)
+#define WRAPPER_CALL_DIRECT(function, nargs, ...) WRAPPER_CALL_DIRECT_##nargs(function, __VA_ARGS__) +#define WRAPPER_CALL_NOERRNO(function, nargs, ...) WRAPPER_CALL_DIRECT(function, nargs, __VA_ARGS__)
+#define WRAPPER_CALL_INDIRECT(function, nargs, ...) +#define ENTRY(name, number, function, nargs, call_type, ...) WRAPPER_##call_type(function, nargs, __VA_ARGS__)
#include "syscalls.h"
@@ -926,7 +926,7 @@ typedef long (*syscall_function_t)(void *cpu_env, int num);
#define ENTRY_CALL_DIRECT(name, number, function, nargs, call_type)_ENTRY(name, number, __qemu_##function, nargs, call_type)
#define ENTRY_CALL_NOERRNO(name, number, function, nargs, call_type)ENTRY_CALL_DIRECT(name, number, function, nargs, call_type)
#define ENTRY_CALL_INDIRECT(name, number, function, nargs, call_type)_ENTRY(name, number, function, nargs, call_type)
-#define ENTRY(name, number, function, nargs, call_type, args...) ENTRY_##call_type(name, number, function, nargs, call_type) +#define ENTRY(name, number, function, nargs, call_type, ...) ENTRY_##call_type(name, number, function, nargs, call_type)
#define CALL_DIRECT 1
#define CALL_INDIRECT 2
hw/adb.c +3 -3
@@ -29,10 +29,10 @@//#define DEBUG_ADB #ifdef DEBUG_ADB -#define ADB_DPRINTF(fmt, args...) \ -do { printf("ADB: " fmt , ##args); } while (0) +#define ADB_DPRINTF (fmt, ...) \ +do { printf("ADB: " fmt , ## __VA_ARGS__); } while (0)#else -#define ADB_DPRINTF(fmt, args...) +#define ADB_DPRINTF (fmt, ...)#endif /* ADB commands */
hw/apb_pci.c +3 -3
@@ -33,10 +33,10 @@//#define DEBUG_APB #ifdef DEBUG_APB -#define APB_DPRINTF(fmt, args...) \ -do { printf("APB: " fmt , ##args); } while (0) +#define APB_DPRINTF (fmt, ...) \ +do { printf("APB: " fmt , ## __VA_ARGS__); } while (0)#else -#define APB_DPRINTF(fmt, args...) +#define APB_DPRINTF (fmt, ...)#endif typedef target_phys_addr_t pci_addr_t ;
hw/arm_gic.c +3 -3
@@ -14,10 +14,10 @@//#define DEBUG_GIC #ifdef DEBUG_GIC -#define DPRINTF(fmt, args...) \ -do { printf("arm_gic: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ +do { printf("arm_gic: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) do {} while(0) +#define DPRINTF (fmt, ...) do {} while(0)#endif #ifdef NVIC
hw/cs4231.c +3 -3
@@ -46,10 +46,10 @@ typedef struct CSState {#define CS_CDC_VER 0x8a#ifdef DEBUG_CS -#define DPRINTF(fmt, args...) \ - do { printf("CS: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ + do { printf("CS: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) +#define DPRINTF (fmt, ...)#endif static void cs_reset (void *opaque)
hw/cuda.c +3 -3
@@ -36,10 +36,10 @@//#define DEBUG_CUDA_PACKET #ifdef DEBUG_CUDA -#define CUDA_DPRINTF(fmt, args...) \ -do { printf("CUDA: " fmt , ##args); } while (0) +#define CUDA_DPRINTF (fmt, ...) \ + do { printf("CUDA: " fmt , ## __VA_ARGS__); } while (0)#else -#define CUDA_DPRINTF(fmt, args...) +#define CUDA_DPRINTF (fmt, ...)#endif /* Bits in B data register: all active low */
hw/dp8393x.c +5 -5
@@ -34,8 +34,8 @@#endif #ifdef DEBUG_SONIC -#define DPRINTF(fmt, args...) \ -do { printf("sonic: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ +do { printf("sonic: " fmt , ## __VA_ARGS__); } while (0)static const char * reg_names[] = {"CR" ,"DCR" ,"RCR" ,"TCR" ,"IMR" ,"ISR" ,"UTDA" ,"CTDA" , "TPS", "TFC", "TSA0", "TSA1", "TFS", "URDA", "CRDA", "CRBA0",
@@ -46,11 +46,11 @@ static const char* reg_names[] = {"0x30" ,"0x31" ,"0x32" ,"0x33" ,"0x34" ,"0x35" ,"0x36" ,"0x37" , "0x38", "0x39", "0x3a", "0x3b", "0x3c", "0x3d", "0x3e", "DCR2" };#else -#define DPRINTF(fmt, args...) do {} while (0) +#define DPRINTF (fmt, ...) do {} while (0)#endif -#define SONIC_ERROR(fmt, args...) \ -do { printf("sonic ERROR: %s: " fmt, __func__ , ##args); } while (0) +#define SONIC_ERROR (fmt, ...) \ +do { printf("sonic ERROR: %s: " fmt, __func__ , ## __VA_ARGS__); } while (0)#define SONIC_CR 0x00#define SONIC_DCR 0x01
hw/eccmemctl.c +3 -3
@@ -28,10 +28,10 @@//#define DEBUG_ECC #ifdef DEBUG_ECC -#define DPRINTF(fmt, args...) \ - do { printf("ECC: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ + do { printf("ECC: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) +#define DPRINTF (fmt, ...)#endif /* There are 3 versions of this chip used in SMP sun4m systems:
hw/eepro100.c +0 -1
@@ -60,9 +60,9 @@//~ #define DEBUG_EEPRO100 #ifdef DEBUG_EEPRO100 -#define logout(fmt, args...) fprintf(stderr, "EE100\t%-24s" fmt,
__func__, ##args)
+#define logout(fmt, ...) fprintf(stderr, "EE100\t%-24s" fmt, __func__, ## __VA_ARGS__)
#else
-#define logout(fmt, args...) ((void)0)
+#define logout(fmt, ...) ((void)0)
#endif
/* Set flags to 0 to disable debug output. */
hw/eeprom93xx.c +0 -1
@@ -44,9 +44,9 @@//~ #define DEBUG_EEPROM #ifdef DEBUG_EEPROM -#define logout(fmt, args...) fprintf(stderr, "EEPROM\t%-24s" fmt,
__func__, ##args)
+#define logout(fmt, ...) fprintf(stderr, "EEPROM\t%-24s" fmt, __func__, ## __VA_ARGS__)
#else
-#define logout(fmt, args...) ((void)0)
+#define logout(fmt, ...) ((void)0)
#endif
#define EEPROM_INSTANCE 0
hw/escc.c +9 -9
@@ -62,22 +62,22 @@*/ #ifdef DEBUG_SERIAL -#define SER_DPRINTF(fmt, args...) \ -do { printf("SER: " fmt , ##args); } while (0) +#define SER_DPRINTF (fmt, ...) \ + do { printf("SER: " fmt , ## __VA_ARGS__); } while (0)#else -#define SER_DPRINTF(fmt, args...) +#define SER_DPRINTF (fmt, ...)#endif #ifdef DEBUG_KBD -#define KBD_DPRINTF(fmt, args...) \ -do { printf("KBD: " fmt , ##args); } while (0) +#define KBD_DPRINTF (fmt, ...) \ + do { printf("KBD: " fmt , ## __VA_ARGS__); } while (0)#else -#define KBD_DPRINTF(fmt, args...) +#define KBD_DPRINTF (fmt, ...)#endif #ifdef DEBUG_MOUSE -#define MS_DPRINTF(fmt, args...) \ -do { printf("MSC: " fmt , ##args); } while (0) +#define MS_DPRINTF (fmt, ...) \ + do { printf("MSC: " fmt , ## __VA_ARGS__); } while (0)#else -#define MS_DPRINTF(fmt, args...) +#define MS_DPRINTF (fmt, ...)#endif typedef enum {
hw/esp.c +5 -5
@@ -38,14 +38,14 @@*/ #ifdef DEBUG_ESP -#define DPRINTF(fmt, args...) \ -do { printf("ESP: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ + do { printf("ESP: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) do {} while (0) +#define DPRINTF (fmt, ...) do {} while (0)#endif -#define ESP_ERROR(fmt, args...) \ -do { printf("ESP ERROR: %s: " fmt, __func__ , ##args); } while (0) +#define ESP_ERROR (fmt, ...) \ + do { printf("ESP ERROR: %s: " fmt, __func__ , ## __VA_ARGS__); } while (0)#define ESP_REGS 16#define TI_BUFSZ 16
hw/fdc.c +5 -5
@@ -37,14 +37,14 @@//#define DEBUG_FLOPPY #ifdef DEBUG_FLOPPY -#define FLOPPY_DPRINTF(fmt, args...) \ -do { printf("FLOPPY: " fmt , ##args); } while (0) +#define FLOPPY_DPRINTF (fmt, ...) \ + do { printf("FLOPPY: " fmt , ## __VA_ARGS__); } while (0)#else -#define FLOPPY_DPRINTF(fmt, args...) +#define FLOPPY_DPRINTF (fmt, ...)#endif -#define FLOPPY_ERROR(fmt, args...) \ -do { printf("FLOPPY ERROR: %s: " fmt, __func__ , ##args); } while (0) +#define FLOPPY_ERROR (fmt, ...) \ + do { printf("FLOPPY ERROR: %s: " fmt, __func__ , ## __VA_ARGS__);
} while (0)
/********************************************************/
/* Floppy drive emulation */
hw/fw_cfg.c +3 -3
@@ -30,10 +30,10 @@//#define DEBUG_FW_CFG #ifdef DEBUG_FW_CFG -#define FW_CFG_DPRINTF(fmt, args...) \ - do { printf("FW_CFG: " fmt , ##args); } while (0) +#define FW_CFG_DPRINTF (fmt, ...) \ + do { printf("FW_CFG: " fmt , ## __VA_ARGS__); } while (0)#else -#define FW_CFG_DPRINTF(fmt, args...) +#define FW_CFG_DPRINTF (fmt, ...)#endif #define FW_CFG_SIZE 2
hw/g364fb.c +5 -5
@@ -26,13 +26,13 @@//#define DEBUG_G364 #ifdef DEBUG_G364 -#define DPRINTF(fmt, args...) \ -do { printf("g364: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ +do { printf("g364: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) do {} while (0) +#define DPRINTF (fmt, ...) do {} while (0)#endif -#define BADF(fmt, args...) \ -do { fprintf(stderr, "g364 ERROR: " fmt , ##args);} while (0) +#define BADF (fmt, ...) \ +do { fprintf(stderr, "g364 ERROR: " fmt , ## __VA_ARGS__);} while (0) typedef struct G364State { /* hardware */
hw/grackle_pci.c +3 -3
@@ -31,10 +31,10 @@//#define DEBUG_GRACKLE #ifdef DEBUG_GRACKLE -#define GRACKLE_DPRINTF(fmt, args...) \ -do { printf("GRACKLE: " fmt , ##args); } while (0) +#define GRACKLE_DPRINTF (fmt, ...) \ + do { printf("GRACKLE: " fmt , ## __VA_ARGS__); } while (0)#else -#define GRACKLE_DPRINTF(fmt, args...) +#define GRACKLE_DPRINTF (fmt, ...)#endif typedef target_phys_addr_t pci_addr_t ;
hw/heathrow_pic.c +3 -3
@@ -29,10 +29,10 @@//#define DEBUG_PIC #ifdef DEBUG_PIC -#define PIC_DPRINTF(fmt, args...) \ -do { printf("PIC: " fmt , ##args); } while (0) +#define PIC_DPRINTF (fmt, ...) \ + do { printf("PIC: " fmt , ## __VA_ARGS__); } while (0)#else -#define PIC_DPRINTF(fmt, args...) +#define PIC_DPRINTF (fmt, ...)#endif typedef struct HeathrowPIC {
hw/iommu.c +3 -3
@@ -28,10 +28,10 @@//#define DEBUG_IOMMU #ifdef DEBUG_IOMMU -#define DPRINTF(fmt, args...) \ -do { printf("IOMMU: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ + do { printf("IOMMU: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) +#define DPRINTF (fmt, ...)#endif #define IOMMU_NREGS (4*4096/4)
hw/lsi53c895a.c +4 -4
@@ -19,14 +19,14 @@//#define DEBUG_LSI_REG #ifdef DEBUG_LSI -#define DPRINTF(fmt, args...) \ -do { printf("lsi_scsi: " fmt , ##args); } while (0) -#define BADF(fmt, args...) \ -do { fprintf(stderr, "lsi_scsi: error: " fmt , ##args); exit(1);} while (0) +#define DPRINTF (fmt, ...) \ +do { printf("lsi_scsi: " fmt , ## __VA_ARGS__); } while (0) +#define BADF (fmt, ...) \ +do { fprintf(stderr, "lsi_scsi: error: " fmt , ## __VA_ARGS__);
exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "lsi_scsi: error: " fmt , ##args);} while (0) +#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "lsi_scsi: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
#define LSI_SCNTL0_TRG 0x01
hw/m48t59.c +2 -2
@@ -30,9 +30,9 @@//#define DEBUG_NVRAM #if defined(DEBUG_NVRAM ) -#define NVRAM_PRINTF(fmt, args...) do { printf(fmt , ##args); } while (0) +#define NVRAM_PRINTF (fmt, ...) do { printf(fmt , ## __VA_ARGS__); } while (0)#else -#define NVRAM_PRINTF(fmt, args...) do { } while (0) +#define NVRAM_PRINTF (fmt, ...) do { } while (0)#endif /*
hw/mac_dbdma.c +3 -3
@@ -44,10 +44,10 @@//#define DEBUG_DBDMA #ifdef DEBUG_DBDMA -#define DBDMA_DPRINTF(fmt, args...) \ -do { printf("DBDMA: " fmt , ##args); } while (0) +#define DBDMA_DPRINTF (fmt, ...) \ + do { printf("DBDMA: " fmt , ## __VA_ARGS__); } while (0)#else -#define DBDMA_DPRINTF(fmt, args...) +#define DBDMA_DPRINTF (fmt, ...)#endif /*
hw/mac_nvram.c +3 -3
@@ -31,10 +31,10 @@//#define DEBUG_NVR #ifdef DEBUG_NVR -#define NVR_DPRINTF(fmt, args...) \ -do { printf("NVR: " fmt , ##args); } while (0) +#define NVR_DPRINTF (fmt, ...) \ + do { printf("NVR: " fmt , ## __VA_ARGS__); } while (0)#else -#define NVR_DPRINTF(fmt, args...) +#define NVR_DPRINTF (fmt, ...)#endif struct MacIONVRAMState {
hw/mcf_fec.c +3 -3
@@ -14,10 +14,10 @@//#define DEBUG_FEC 1 #ifdef DEBUG_FEC -#define DPRINTF(fmt, args...) \ -do { printf("mcf_fec: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ +do { printf("mcf_fec: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) do {} while(0) +#define DPRINTF (fmt, ...) do {} while(0)#endif #define FEC_MAX_FRAME_SIZE 2032
hw/openpic.c +2 -2
@@ -40,9 +40,9 @@//#define DEBUG_OPENPIC #ifdef DEBUG_OPENPIC -#define DPRINTF(fmt, args...) do { printf(fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) do { printf(fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) do { } while (0) +#define DPRINTF (fmt, ...) do { } while (0)#endif #define USE_MPCxxx/* Intel model is broken, for now */
hw/parallel.c +2 -2
@@ -30,9 +30,9 @@//#define DEBUG_PARALLEL #ifdef DEBUG_PARALLEL -#define pdebug(fmt, arg...) printf("pp: " fmt, ##arg) +#define pdebug (fmt, ...) printf("pp: " fmt, ## __VA_ARGS__)#else -#define pdebug(fmt, arg...) ((void)0) +#define pdebug (fmt, ...) ((void)0)#endif #define PARA_REG_DATA 0
hw/pci_host.h +3 -3
@@ -29,10 +29,10 @@//#define DEBUG_PCI #ifdef DEBUG_PCI -#define PCI_DPRINTF(fmt, args...) \ -do { printf("pci_host_data: " fmt , ##args); } while (0) +#define PCI_DPRINTF (fmt, ...) \ +do { printf("pci_host_data: " fmt , ## __VA_ARGS__); } while (0)#else -#define PCI_DPRINTF(fmt, args...) +#define PCI_DPRINTF (fmt, ...)#endif typedef struct {
hw/pflash_cfi01.c +5 -5
@@ -42,20 +42,20 @@#include "block.h" #include "qemu-timer.h" -#define PFLASH_BUG(fmt, args...) \ +#define PFLASH_BUG (fmt, ...) \ do { \ - printf("PFLASH: Possible BUG - " fmt, ##args); \ + printf("PFLASH: Possible BUG - " fmt, ## __VA_ARGS__); \ exit(1); \ } while(0)/* #define PFLASH_DEBUG */ #ifdef PFLASH_DEBUG -#define DPRINTF(fmt, args...) \ +#define DPRINTF (fmt, ...) \ do { \ - printf("PFLASH: " fmt , ##args); \ + printf("PFLASH: " fmt , ## __VA_ARGS__); \ } while (0)#else -#define DPRINTF(fmt, args...) do { } while (0) +#define DPRINTF (fmt, ...) do { } while (0)#endif struct pflash_t {
hw/pflash_cfi02.c +3 -3
@@ -43,12 +43,12 @@//#define PFLASH_DEBUG #ifdef PFLASH_DEBUG -#define DPRINTF(fmt, args...) \ +#define DPRINTF (fmt, ...) \ do { \ - printf("PFLASH: " fmt , ##args); \ + printf("PFLASH: " fmt , ## __VA_ARGS__); \ } while (0)#else -#define DPRINTF(fmt, args...) do { } while (0) +#define DPRINTF (fmt, ...) do { } while (0)#endif struct pflash_t {
hw/pl022.c +4 -4
@@ -13,14 +13,14 @@//#define DEBUG_PL022 1 #ifdef DEBUG_PL022 -#define DPRINTF(fmt, args...) \ -do { printf("pl022: " fmt , ##args); } while (0) -#define BADF(fmt, args...) \ -do { fprintf(stderr, "pl022: error: " fmt , ##args); exit(1);} while (0) +#define DPRINTF (fmt, ...) \ +do { printf("pl022: " fmt , ## __VA_ARGS__); } while (0) +#define BADF (fmt, ...) \ +do { fprintf(stderr, "pl022: error: " fmt , ## __VA_ARGS__);
exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "pl022: error: " fmt , ##args);} while (0) +#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "pl022: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
#define PL022_CR1_LBM 0x01
hw/pl031.c +3 -3
@@ -16,10 +16,10 @@//#define DEBUG_PL031 #ifdef DEBUG_PL031 -#define DPRINTF(fmt, args...) \ -do { printf("pl031: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ +do { printf("pl031: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) do {} while(0) +#define DPRINTF (fmt, ...) do {} while(0)#endif #define RTC_DR 0x00/* Data read register */
hw/pl061.c +4 -4
@@ -14,14 +14,14 @@//#define DEBUG_PL061 1 #ifdef DEBUG_PL061 -#define DPRINTF(fmt, args...) \ -do { printf("pl061: " fmt , ##args); } while (0) -#define BADF(fmt, args...) \ -do { fprintf(stderr, "pl061: error: " fmt , ##args); exit(1);} while (0) +#define DPRINTF (fmt, ...) \ +do { printf("pl061: " fmt , ## __VA_ARGS__); } while (0) +#define BADF (fmt, ...) \ +do { fprintf(stderr, "pl061: error: " fmt , ## __VA_ARGS__);
exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "pl061: error: " fmt , ##args);} while (0) +#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "pl061: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
static const uint8_t pl061_id[12] =
hw/pl181.c +3 -3
@@ -14,10 +14,10 @@//#define DEBUG_PL181 1 #ifdef DEBUG_PL181 -#define DPRINTF(fmt, args...) \ -do { printf("pl181: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ +do { printf("pl181: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) do {} while(0) +#define DPRINTF (fmt, ...) do {} while(0)#endif #define PL181_FIFO_LEN 16
hw/ppc4xx_pci.c +1 -1
@@ -33,7 +33,7 @@ typedef target_phys_addr_t pci_addr_t;#ifdef DEBUG #define DPRINTF (fmt, ...) do { printf(fmt, ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) +#define DPRINTF (fmt, ...)#endif /* DEBUG */ struct PCIMasterMap {
hw/ppc_newworld.c +3 -3
@@ -44,10 +44,10 @@//#define DEBUG_UNIN #ifdef DEBUG_UNIN -#define UNIN_DPRINTF(fmt, args...) \ -do { printf("UNIN: " fmt , ##args); } while (0) +#define UNIN_DPRINTF (fmt, ...) \ + do { printf("UNIN: " fmt , ## __VA_ARGS__); } while (0)#else -#define UNIN_DPRINTF(fmt, args...) +#define UNIN_DPRINTF (fmt, ...)#endif /* UniN device */
hw/ppc_prep.c +3 -4
@@ -50,18 +50,18 @@#endif #if defined (HARD_DEBUG_PPC_IO ) -#define PPC_IO_DPRINTF(fmt, args...) \ +#define PPC_IO_DPRINTF (fmt, ...) \ do { \ if (qemu_loglevel_mask(CPU_LOG_IOPORT)) { \ - qemu_log("%s: " fmt, __func__ , ##args); \ + qemu_log("%s: " fmt, __func__ , ## __VA_ARGS__); \ } else { \ - printf("%s : " fmt, __func__ , ##args); \ + printf("%s : " fmt, __func__ , ## __VA_ARGS__); \ } \ } while (0)#elif defined (DEBUG_PPC_IO ) -#define PPC_IO_DPRINTF(fmt, args...) qemu_log_mask(CPU_LOG_IOPORT, ##
__VA_ARGS__)
+#define PPC_IO_DPRINTF(fmt, ...) qemu_log_mask(CPU_LOG_IOPORT, ## __VA_ARGS__)
#else
-#define PPC_IO_DPRINTF(fmt, args...) do { } while (0)
+#define PPC_IO_DPRINTF(fmt, ...) do { } while (0)
#endif
/* Constants for devices init */
hw/ppce500_pci.c +2 -2
@@ -24,9 +24,9 @@ typedef target_phys_addr_t pci_addr_t;#include "qemu-log.h" #ifdef DEBUG_PCI -#define pci_debug(fmt, arg...) fprintf(stderr, fmt, ##arg) +#define pci_debug (fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)#else -#define pci_debug(fmt, arg...) +#define pci_debug (fmt, ...)#endif #define PCIE500_CFGADDR 0x0
hw/rc4030.c +5 -5
@@ -33,16 +33,16 @@//#define DEBUG_RC4030_DMA #ifdef DEBUG_RC4030 -#define DPRINTF(fmt, args...) \ -do { printf("rc4030: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ +do { printf("rc4030: " fmt , ## __VA_ARGS__); } while (0)static const char * irq_names[] = {"parallel" ,"floppy" ,"sound" ,"video" ,"network" ,"scsi" ,"keyboard" ,"mouse" ,"serial0" ,"serial1" };#else -#define DPRINTF(fmt, args...) +#define DPRINTF (fmt, ...)#endif -#define RC4030_ERROR(fmt, args...) \ -do { fprintf(stderr, "rc4030 ERROR: %s: " fmt, __func__ , ##args); } while (0) +#define RC4030_ERROR (fmt, ...) \ +do { fprintf(stderr, "rc4030 ERROR: %s: " fmt, __func__ , ##
__VA_ARGS__); } while (0)
/********************************************************/
/* rc4030 emulation */
hw/sbi.c +3 -3
@@ -28,10 +28,10 @@//#define DEBUG_IRQ #ifdef DEBUG_IRQ -#define DPRINTF(fmt, args...) \ -do { printf("IRQ: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ + do { printf("IRQ: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) +#define DPRINTF (fmt, ...)#endif #define MAX_CPUS 16
hw/scsi-disk.c +5 -5
@@ -18,14 +18,14 @@//#define DEBUG_SCSI #ifdef DEBUG_SCSI -#define DPRINTF(fmt, args...) \ -do { printf("scsi-disk: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ +do { printf("scsi-disk: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) do {} while(0) +#define DPRINTF (fmt, ...) do {} while(0)#endif -#define BADF(fmt, args...) \ -do { fprintf(stderr, "scsi-disk: " fmt , ##args); } while (0) +#define BADF (fmt, ...) \ +do { fprintf(stderr, "scsi-disk: " fmt , ## __VA_ARGS__); } while (0)#include "qemu-common.h" #include "block.h"
hw/scsi-generic.c +0 -0
@@ -28,14 +28,14 @@ SCSIDevice *scsi_generic_init(BlockDriverState
*bdrv, int tcq,
//#define DEBUG_SCSI
#ifdef DEBUG_SCSI
-#define DPRINTF(fmt, args...) \
-do { printf("scsi-generic: " fmt , ##args); } while (0) +#define DPRINTF(fmt, ...) \
+do { printf("scsi-generic: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
+#define DPRINTF(fmt, ...) do {} while(0)
#endif
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "scsi-generic: " fmt , ##args); } while (0) +#define BADF(fmt, ...) \
+do { fprintf(stderr, "scsi-generic: " fmt , ## __VA_ARGS__); } while (0)
#include <stdio.h>
#include <sys/types.h>
hw/sd.c +3 -3
@@ -36,10 +36,10 @@//#define DEBUG_SD 1 #ifdef DEBUG_SD -#define DPRINTF(fmt, args...) \ -do { fprintf(stderr, "SD: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ +do { fprintf(stderr, "SD: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) do {} while(0) +#define DPRINTF (fmt, ...) do {} while(0)#endif typedef enum {
hw/sh_intc.h +1 -1
@@ -18,7 +18,7 @@ struct intc_group {intc_enum enum_ids[32 ]; }; -#define INTC_GROUP(enum_id, ids...) { enum_id, { ids } } +#define INTC_GROUP (enum_id, ...) { enum_id, { __VA_ARGS__ } }struct intc_mask_reg {unsigned long set_reg, clr_reg, reg_width;
hw/slavio_intctl.c +3 -3
@@ -29,10 +29,10 @@//#define DEBUG_IRQ #ifdef DEBUG_IRQ -#define DPRINTF(fmt, args...) \ -do { printf("IRQ: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ + do { printf("IRQ: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) +#define DPRINTF (fmt, ...)#endif /*
hw/slavio_misc.c +3 -3
@@ -37,10 +37,10 @@*/ #ifdef DEBUG_MISC -#define MISC_DPRINTF(fmt, args...) \ -do { printf("MISC: " fmt , ##args); } while (0) +#define MISC_DPRINTF (fmt, ...) \ + do { printf("MISC: " fmt , ## __VA_ARGS__); } while (0)#else -#define MISC_DPRINTF(fmt, args...) +#define MISC_DPRINTF (fmt, ...)#endif typedef struct MiscState {
hw/slavio_timer.c +3 -3
@@ -28,10 +28,10 @@//#define DEBUG_TIMER #ifdef DEBUG_TIMER -#define DPRINTF(fmt, args...) \ -do { printf("TIMER: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ + do { printf("TIMER: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) do {} while (0) +#define DPRINTF (fmt, ...) do {} while (0)#endif /*
hw/sm501.c +2 -2
@@ -47,9 +47,9 @@//#define DEBUG_BITBLT #ifdef DEBUG_SM501 -#define SM501_DPRINTF(fmt...) printf(fmt) +#define SM501_DPRINTF (fmt, ...) printf(fmt, ## __VA_ARGS__)#else -#define SM501_DPRINTF(fmt...) do {} while(0) +#define SM501_DPRINTF (fmt, ...) do {} while(0)#endif
hw/smbus.c +2 -4
@@ -16,14 +16,14 @@//#define DEBUG_SMBUS 1 #ifdef DEBUG_SMBUS -#define DPRINTF(fmt, args...) \ -do { printf("smbus(%02x): " fmt , dev->i2c.address, ##args); } while (0) -#define BADF(fmt, args...) \ -do { fprintf(stderr, "smbus: error: " fmt , ##args); exit(1);} while (0) +#define DPRINTF (fmt, ...) \ +do { printf("smbus(%02x): " fmt , dev->i2c.address, ## __VA_ARGS__);
} while (0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "smbus: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "smbus: error: " fmt , ##args);} while (0) +#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "smbus: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
enum {
hw/sparc32_dma.c +3 -3
@@ -37,10 +37,10 @@*/ #ifdef DEBUG_DMA -#define DPRINTF(fmt, args...) \ -do { printf("DMA: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ + do { printf("DMA: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) +#define DPRINTF (fmt, ...)#endif #define DMA_REGS 4
hw/ssd0303.c +4 -4
@@ -17,14 +17,14 @@//#define DEBUG_SSD0303 1 #ifdef DEBUG_SSD0303 -#define DPRINTF(fmt, args...) \ -do { printf("ssd0303: " fmt , ##args); } while (0) -#define BADF(fmt, args...) \ -do { fprintf(stderr, "ssd0303: error: " fmt , ##args); exit(1);} while (0) +#define DPRINTF (fmt, ...) \ +do { printf("ssd0303: " fmt , ## __VA_ARGS__); } while (0) +#define BADF (fmt, ...) \ +do { fprintf(stderr, "ssd0303: error: " fmt , ## __VA_ARGS__);
exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "ssd0303: error: " fmt , ##args);} while (0) +#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "ssd0303: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
/* Scaling factor for pixels. */
hw/ssd0323.c +4 -4
@@ -17,14 +17,14 @@//#define DEBUG_SSD0323 1 #ifdef DEBUG_SSD0323 -#define DPRINTF(fmt, args...) \ -do { printf("ssd0323: " fmt , ##args); } while (0) -#define BADF(fmt, args...) \ -do { fprintf(stderr, "ssd0323: error: " fmt , ##args); exit(1);} while (0) +#define DPRINTF (fmt, ...) \ +do { printf("ssd0323: " fmt , ## __VA_ARGS__); } while (0) +#define BADF (fmt, ...) \ +do { fprintf(stderr, "ssd0323: error: " fmt , ## __VA_ARGS__);
exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "ssd0323: error: " fmt , ##args);} while (0) +#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "ssd0323: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
/* Scaling factor for pixels. */
hw/ssi-sd.c +4 -4
@@ -13,14 +13,14 @@//#define DEBUG_SSI_SD 1 #ifdef DEBUG_SSI_SD -#define DPRINTF(fmt, args...) \ -do { printf("ssi_sd: " fmt , ##args); } while (0) -#define BADF(fmt, args...) \ -do { fprintf(stderr, "ssi_sd: error: " fmt , ##args); exit(1);} while (0) +#define DPRINTF (fmt, ...) \ +do { printf("ssi_sd: " fmt , ## __VA_ARGS__); } while (0) +#define BADF (fmt, ...) \ +do { fprintf(stderr, "ssi_sd: error: " fmt , ## __VA_ARGS__);
exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "ssi_sd: error: " fmt , ##args);} while (0) +#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "ssi_sd: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
typedef enum {
hw/stellaris_enet.c +0 -4
@@ -14,14 +14,14 @@//#define DEBUG_STELLARIS_ENET 1 #ifdef DEBUG_STELLARIS_ENET -#define DPRINTF(fmt, args...) \ -do { printf("stellaris_enet: " fmt , ##args); } while (0) -#define BADF(fmt, args...) \ -do { fprintf(stderr, "stellaris_enet: error: " fmt , ##args);
exit(1);} while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("stellaris_enet: " fmt , ## __VA_ARGS__); } while (0) +#define BADF(fmt, ...) \
+do { fprintf(stderr, "stellaris_enet: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "stellaris_enet: error: " fmt , ##args);} while (0) +#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "stellaris_enet: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
#define SE_INT_RX 0x01
hw/sun4c_intctl.c +3 -3
@@ -28,10 +28,10 @@//#define DEBUG_IRQ #ifdef DEBUG_IRQ -#define DPRINTF(fmt, args...) \ -do { printf("IRQ: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ + do { printf("IRQ: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) +#define DPRINTF (fmt, ...)#endif /*
hw/sun4m.c +3 -3
@@ -68,10 +68,10 @@*/ #ifdef DEBUG_IRQ -#define DPRINTF(fmt, args...) \ - do { printf("CPUIRQ: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ + do { printf("CPUIRQ: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) +#define DPRINTF (fmt, ...)#endif #define KERNEL_LOAD_ADDR 0x00004000
hw/sun4u.c +3 -3
@@ -36,10 +36,10 @@//#define DEBUG_IRQ #ifdef DEBUG_IRQ -#define DPRINTF(fmt, args...) \ - do { printf("CPUIRQ: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ + do { printf("CPUIRQ: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) +#define DPRINTF (fmt, ...)#endif #define KERNEL_LOAD_ADDR 0x00404000
hw/unin_pci.c +3 -3
@@ -29,10 +29,10 @@//#define DEBUG_UNIN #ifdef DEBUG_UNIN -#define UNIN_DPRINTF(fmt, args...) \ -do { printf("UNIN: " fmt , ##args); } while (0) +#define UNIN_DPRINTF (fmt, ...) \ + do { printf("UNIN: " fmt , ## __VA_ARGS__); } while (0)#else -#define UNIN_DPRINTF(fmt, args...) +#define UNIN_DPRINTF (fmt, ...)#endif typedef target_phys_addr_t pci_addr_t ;
hw/usb-msd.c +3 -3
@@ -16,10 +16,10 @@//#define DEBUG_MSD #ifdef DEBUG_MSD -#define DPRINTF(fmt, args...) \ -do { printf("usb-msd: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ +do { printf("usb-msd: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) do {} while(0) +#define DPRINTF (fmt, ...) do {} while(0)#endif /* USB requests. */
hw/usb-serial.c +3 -3
@@ -15,10 +15,10 @@//#define DEBUG_Serial #ifdef DEBUG_Serial -#define DPRINTF(fmt, args...) \ -do { printf("usb-serial: " fmt , ##args); } while (0) +#define DPRINTF (fmt, ...) \ +do { printf("usb-serial: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF(fmt, args...) do {} while(0) +#define DPRINTF (fmt, ...) do {} while(0)#endif #define RECV_BUF 384
linux-user/main.c +0 -0
@@ -1080,12 +1080,12 @@ int ppc_dcr_write (ppc_dcr_t *dcr_env, int
dcrn, target_ulong val)
return -1;
}
-#define EXCP_DUMP(env, fmt, args...) \
-do { \
- fprintf(stderr, fmt , ##args); \
- cpu_dump_state(env, stderr, fprintf, 0); \
- qemu_log(fmt, ##args); \
- log_cpu_state(env, 0);
\
+#define EXCP_DUMP(env, fmt, ...) \
+do { \
+ fprintf(stderr, fmt , ## __VA_ARGS__); \
+ cpu_dump_state(env, stderr, fprintf, 0); \
+ qemu_log(fmt, ## __VA_ARGS__); \
+ log_cpu_state(env, 0); \} while (0)
void cpu_loop(CPUPPCState *env)
linux-user/syscall.c +1 -2
@@ -2563,7 +2563,7 @@ static abi_long do_ipc(unsigned int call, int first,/* kernel structure types definitions */ #define IFNAMSIZ 16 -#define STRUCT(name, list...) STRUCT_ ## name, +#define STRUCT (name, ...) STRUCT_ ## name,#define STRUCT_SPECIAL (name) STRUCT_ ## name,enum {#include "syscall_types.h"
@@ -2571,7 +2571,7 @@ enum {#undef STRUCT#undef STRUCT_SPECIAL -#define STRUCT(name, list...) static const argtype struct_ ## name ##
_def[] = { list, TYPE_NULL };
+#define STRUCT(name, ...) static const argtype struct_ ## name ## _def[] = { __VA_ARGS__, TYPE_NULL };
#define STRUCT_SPECIAL(name)
#include "syscall_types.h"
#undef STRUCT
@@ -2592,8 +2592,8 @@ typedef struct IOCTLEntry {
#define MAX_STRUCT_SIZE 4096
static IOCTLEntry ioctl_entries[] = {
-#define IOCTL(cmd, access, types...) \
- { TARGET_ ## cmd, cmd, #cmd, access, { types } },
+#define IOCTL(cmd, access, ...) \
+ { TARGET_ ## cmd, cmd, #cmd, access, { __VA_ARGS__ } },
#include "ioctls.h"
{ 0, 0, },
};
@@ -3497,7 +3497,7 @@ void syscall_init(void)
int size;
int i;-#define STRUCT(name, list...) thunk_register_struct(STRUCT_ ## name, #name, struct_ ## name ## _def);
+#define STRUCT(name, ...) thunk_register_struct(STRUCT_ ## name, #name, struct_ ## name ## _def);
#define STRUCT_SPECIAL(name) thunk_register_struct_direct(STRUCT_ ##
name, #name, &struct_ ## name ## _def);
#include "syscall_types.h"
#undef STRUCT
slirp/bootp.c +2 -2
@@ -43,10 +43,10 @@ const char *bootp_filename;static const uint8_t rfc1533_cookie[] = {RFC1533_COOKIE };#ifdef DEBUG -#define dprintf(fmt, args...) \ -if (slirp_debug & DBG_CALL) { fprintf(dfd, fmt, ## args); fflush(dfd); } +#define dprintf (fmt, ...) \ +if (slirp_debug & DBG_CALL) { fprintf(dfd, fmt, ## __VA_ARGS__);
fflush(dfd); }
#else
-#define dprintf(fmt, args...)
+#define dprintf(fmt, ...)
#endif
static BOOTPClient *get_new_addr(struct in_addr *paddr)
target-i386/ops_sse.h +2 -2
@@ -20,7 +20,7 @@*/ #if SHIFT ==0 #define Reg MMXReg -#define XMM_ONLY(x...) +#define XMM_ONLY (...)#define B (n) MMX_B(n)#define W (n) MMX_W(n)#define L (n) MMX_L(n)
@@ -28,7 +28,7 @@#define SUFFIX _mmx#else #define Reg XMMReg -#define XMM_ONLY(x...) x +#define XMM_ONLY (...) __VA_ARGS__#define B (n) XMM_B(n)#define W (n) XMM_W(n)#define L (n) XMM_L(n)
target-i386/translate.c +2 -2
@@ -42,7 +42,7 @@#ifdef TARGET_X86_64 #define X86_64_ONLY (x) x -#define X86_64_DEF(x...) x +#define X86_64_DEF (...) __VA_ARGS__#define CODE64 (s) ((s)->code64)#define REX_X (s) ((s)->rex_x)#define REX_B (s) ((s)->rex_b)
@@ -52,7 +52,7 @@#endif #else #define X86_64_ONLY (x) NULL -#define X86_64_DEF(x...) +#define X86_64_DEF (...)#define CODE64 (s) 0#define REX_X (s) 0#define REX_B (s) 0
target-mips/translate.c +3 -3
@@ -501,13 +501,13 @@ static const char *fregnames[] = "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", };#ifdef MIPS_DEBUG_DISAS -#define MIPS_DEBUG(fmt, args...) \ +#define MIPS_DEBUG (fmt, ...) \ qemu_log_mask(CPU_LOG_TB_IN_ASM, \ TARGET_FMT_lx ": %08x " fmt "\n", \ - ctx->pc, ctx->opcode , ##args) + ctx->pc, ctx->opcode , ## __VA_ARGS__)#define LOG_DISAS (...) qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__)#else -#define MIPS_DEBUG(fmt, args...) do { } while(0) +#define MIPS_DEBUG (fmt, ...) do { } while(0)#define LOG_DISAS (...) do { } while (0)#endif
target-sparc/op_helper.c +8 -8
@@ -13,22 +13,22 @@//#define DEBUG_PCALL #ifdef DEBUG_MMU -#define DPRINTF_MMU(fmt, args...) \ -do { printf("MMU: " fmt , ##args); } while (0) +#define DPRINTF_MMU (fmt, ...) \ + do { printf("MMU: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF_MMU(fmt, args...) do {} while (0) +#define DPRINTF_MMU (fmt, ...) do {} while (0)#endif #ifdef DEBUG_MXCC -#define DPRINTF_MXCC(fmt, args...) \ -do { printf("MXCC: " fmt , ##args); } while (0) +#define DPRINTF_MXCC (fmt, ...) \ + do { printf("MXCC: " fmt , ## __VA_ARGS__); } while (0)#else -#define DPRINTF_MXCC(fmt, args...) do {} while (0) +#define DPRINTF_MXCC (fmt, ...) do {} while (0)#endif #ifdef DEBUG_ASI -#define DPRINTF_ASI(fmt, args...) \ -do { printf("ASI: " fmt , ##args); } while (0) +#define DPRINTF_ASI (fmt, ...) \ + do { printf("ASI: " fmt , ## __VA_ARGS__); } while (0)#endif #ifdef TARGET_SPARC64
tests/linux-test.c +1 -1
@@ -65,7 +65,7 @@ int __chk_error(const char *filename, int line, int ret)return ret; } -#define error(fmt, args...) error1(__FILE__, __LINE__, fmt, ##args) +#define error (fmt, ...) error1(__FILE__, __LINE__, fmt, ## __VA_ARGS__)#define chk_error (ret) __chk_error(__FILE__, __LINE__, (ret))
Signature · 1 line
1.6.2.4