diff --git a/src/devices/cdrom/cdrom.c b/src/devices/cdrom/cdrom.c index 20b11c9..b4ff947 100644 --- a/src/devices/cdrom/cdrom.c +++ b/src/devices/cdrom/cdrom.c @@ -8,7 +8,7 @@ * * Generic interface for CD-ROM/DVD/BD implementations. * - * Version: @(#)cdrom.c 1.0.23 2018/10/19 + * Version: @(#)cdrom.c 1.0.24 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -63,10 +63,11 @@ int cdrom_do_log = ENABLE_CDROM_LOG; cdrom_t cdrom[CDROM_NUM]; -#if defined(_LOGGING) && defined(ENABLE_CDROM_LOG) +#ifdef _LOGGING void cdrom_log(int level, const char *fmt, ...) { +# ifdef ENABLE_CDROM_LOG va_list ap; if (cdrom_do_log >= level) { @@ -74,6 +75,7 @@ cdrom_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/cdrom/cdrom_image.cpp b/src/devices/cdrom/cdrom_image.cpp index a64cdcb..520e2ea 100644 --- a/src/devices/cdrom/cdrom_image.cpp +++ b/src/devices/cdrom/cdrom_image.cpp @@ -8,7 +8,7 @@ * * CD-ROM image support. * - * Version: @(#)cdrom_image.cpp 1.0.16 2018/10/19 + * Version: @(#)cdrom_image.cpp 1.0.17 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -58,10 +58,11 @@ int cdrom_image_do_log = ENABLE_CDROM_IMAGE_LOG; #endif -#if defined(_LOGGING) && defined(ENABLE_CDROM_IMAGE_LOG) +#ifdef _LOGGING void -cdrom_image_log(int level, const char *fmt, ...) +cdrom_image_log(UNUSED(int level), UNUSED(const char *fmt), ...) { +# ifdef ENABLE_CDROM_IMAGE_LOG va_list ap; if (cdrom_image_do_log >= level) { @@ -69,6 +70,7 @@ cdrom_image_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/disk/hdc.c b/src/devices/disk/hdc.c index 3dc6df2..732396c 100644 --- a/src/devices/disk/hdc.c +++ b/src/devices/disk/hdc.c @@ -8,7 +8,7 @@ * * Common code to handle all sorts of disk controllers. * - * Version: @(#)hdc.c 1.0.15 2018/10/19 + * Version: @(#)hdc.c 1.0.16 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -90,10 +90,11 @@ static const struct { }; -#if defined(_LOGGING) && defined(ENABLE_HDC_LOG) +#ifdef _LOGGING void hdc_log(int level, const char *fmt, ...) { +# ifdef ENABLE_HDC_LOG va_list ap; if (hdc_do_log >= level) { @@ -101,6 +102,7 @@ hdc_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/disk/hdd.c b/src/devices/disk/hdd.c index 2720f78..5ce0806 100644 --- a/src/devices/disk/hdd.c +++ b/src/devices/disk/hdd.c @@ -8,7 +8,7 @@ * * Common code to handle all sorts of hard disk images. * - * Version: @(#)hdd.c 1.0.10 2018/10/19 + * Version: @(#)hdd.c 1.0.11 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -53,10 +53,11 @@ int hdd_do_log = ENABLE_HDD_LOG; #endif -#if defined(_LOGGING) && defined(ENABLE_HDD_LOG) +#ifdef _LOGGING void hdd_log(int level, const char *fmt, ...) { +# ifdef ENABLE_HDD_LOG va_list ap; if (hdd_do_log >= level) { @@ -64,6 +65,7 @@ hdd_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/disk/zip.c b/src/devices/disk/zip.c index 2eff44f..3af09bb 100644 --- a/src/devices/disk/zip.c +++ b/src/devices/disk/zip.c @@ -9,7 +9,7 @@ * Implementation of the Iomega ZIP drive with SCSI(-like) * commands, for both ATAPI and SCSI usage. * - * Version: @(#)zip.c 1.0.19 2018/10/19 + * Version: @(#)zip.c 1.0.20 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -479,10 +479,11 @@ static void zip_init(zip_t *dev); static void zip_callback(void *p); -#if defined(_LOGGING) && defined(ENABLE_ZIP_LOG) +#ifdef _LOGGING static void zip_log(int level, const char *fmt, ...) { +# ifdef ENABLE_ZIP_LOG va_list ap; if (zip_do_log >= level) { @@ -490,6 +491,7 @@ zip_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/floppy/fdc.c b/src/devices/floppy/fdc.c index 6428dab..b633b2b 100644 --- a/src/devices/floppy/fdc.c +++ b/src/devices/floppy/fdc.c @@ -9,7 +9,7 @@ * Implementation of the NEC uPD-765 and compatible floppy disk * controller. * - * Version: @(#)fdc.c 1.0.16 2018/10/19 + * Version: @(#)fdc.c 1.0.17 2018/10/20 * * Authors: Miran Grca, * Sarah Walker, @@ -114,10 +114,11 @@ int floppyrate[FDD_NUM]; static void fdc_callback(void *priv); -#if defined(_LOGGING) && defined(ENABLE_FDC_LOG) +#ifdef _LOGGING static void fdc_log(int level, const char *fmt, ...) { +# ifdef ENABLE_FDC_LOG va_list ap; if (fdc_do_log >= level) { @@ -125,6 +126,7 @@ fdc_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/floppy/fdd.c b/src/devices/floppy/fdd.c index 14be872..39a9c7c 100644 --- a/src/devices/floppy/fdd.c +++ b/src/devices/floppy/fdd.c @@ -8,7 +8,7 @@ * * Implementation of the floppy drive emulation. * - * Version: @(#)fdd.c 1.0.16 2018/10/19 + * Version: @(#)fdd.c 1.0.17 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -219,10 +219,11 @@ static const struct }; -#if defined(_LOGGING) && defined(ENABLE_FDD_LOG) +#ifdef _LOGGING void fdd_log(int level, const char *fmt, ...) { +# ifdef ENABLE_FDD_LOG va_list ap; if (fdd_do_log >= level) { @@ -230,6 +231,7 @@ fdd_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/floppy/fdd_86f.c b/src/devices/floppy/fdd_86f.c index dafed66..c1b9798 100644 --- a/src/devices/floppy/fdd_86f.c +++ b/src/devices/floppy/fdd_86f.c @@ -10,7 +10,7 @@ * data in the form of FM/MFM-encoded transitions) which also * forms the core of the emulator's floppy disk emulation. * - * Version: @(#)fdd_86f.c 1.0.14 2018/10/19 + * Version: @(#)fdd_86f.c 1.0.15 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -280,10 +280,11 @@ void d86f_poll_write_data(int drive, int side, uint16_t pos, uint8_t data); int d86f_format_conditions(int drive); -#if defined(_LOGGING) && defined(ENABLE_D86F_LOG) +#ifdef _LOGGING static void d86f_log(int level, const char *fmt, ...) { +# ifdef ENABLE_D86F_LOG va_list ap; if (d86f_do_log >= level) { @@ -291,6 +292,7 @@ d86f_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/input/keyboard.c b/src/devices/input/keyboard.c index 520768e..ae3e79e 100644 --- a/src/devices/input/keyboard.c +++ b/src/devices/input/keyboard.c @@ -8,7 +8,7 @@ * * General keyboard driver interface. * - * Version: @(#)keyboard.c 1.0.10 2018/10/19 + * Version: @(#)keyboard.c 1.0.11 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -68,10 +68,11 @@ static uint8_t scroll_lock = 0; static uint8_t shift = 0; -#if defined(_LOGGING) && defined(ENABLE_KEYBOARD_LOG) +#ifdef _LOGGING void kbd_log(int level, const char *fmt, ...) { +# ifdef ENABLE_KEYBOARD_LOG va_list ap; if (keyboard_do_log >= level) { @@ -79,6 +80,7 @@ kbd_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/input/mouse.c b/src/devices/input/mouse.c index d0397a4..f121cf4 100644 --- a/src/devices/input/mouse.c +++ b/src/devices/input/mouse.c @@ -10,7 +10,7 @@ * * TODO: Add the Genius bus- and serial mouse. * - * Version: @(#)mouse.c 1.0.13 2018/10/19 + * Version: @(#)mouse.c 1.0.14 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -113,10 +113,11 @@ static int mouse_nbut; static device_t mouse_dev; -#if defined(_LOGGING) && defined(ENABLE_MOUSE_LOG) +#ifdef _LOGGING void mouse_log(int level, const char *fmt, ...) { +# ifdef ENABLE_MOUSE_LOG va_list ap; if (mouse_do_log >= level) { @@ -124,6 +125,7 @@ mouse_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/network/network.c b/src/devices/network/network.c index 3485f6e..16736cf 100644 --- a/src/devices/network/network.c +++ b/src/devices/network/network.c @@ -12,7 +12,7 @@ * it should be malloc'ed and then linked to the NETCARD def. * Will be done later. * - * Version: @(#)network.c 1.0.14 2018/10/19 + * Version: @(#)network.c 1.0.15 2018/10/20 * * Author: Fred N. van Kempen, * @@ -156,10 +156,11 @@ hexdump_p(char *ptr, uint8_t *bufp, int len) #endif -#if defined(_LOGGING) && defined(ENABLE_NETWORK_LOG) +#ifdef _LOGGING void network_log(int level, const char *fmt, ...) { +# ifdef ENABLE_NETWORK_LOG va_list ap; if (network_do_log >= level) { @@ -167,14 +168,16 @@ network_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif -#if defined(_LOGGING) && defined(ENABLE_NETWORK_DEV_LOG) +#ifdef _LOGGING void network_card_log(int level, const char *fmt, ...) { +# ifdef ENABLE_NETWORK_DEV_LOG va_list ap; if (network_card_do_log >= level) { @@ -182,6 +185,7 @@ network_card_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/network/slirp/slirp.h b/src/devices/network/slirp/slirp.h index ad2678a..bdee4d2 100644 --- a/src/devices/network/slirp/slirp.h +++ b/src/devices/network/slirp/slirp.h @@ -374,13 +374,13 @@ int inet_aton _P((const char *cp, struct in_addr *ia)); #include "debug.h" -#if defined __GNUC__ +#if defined(__GNUC__) #define PACKED__ __attribute__ ((packed)) -#elif defined __sgi +#elif defined(__sgi) #define PRAGMA_PACK_SUPPORTED 1 #define PACK_END 0 #define PACKED__ -#elif _MSC_VER +#elif defined(_MSC_VER) #define PACKED__ #else #error "Packed attribute or pragma shall be supported" diff --git a/src/devices/ports/game.c b/src/devices/ports/game.c index b8bd726..a29137d 100644 --- a/src/devices/ports/game.c +++ b/src/devices/ports/game.c @@ -8,7 +8,7 @@ * * Implementation of a generic Game Port. * - * Version: @(#)game.c 1.0.17 2018/10/19 + * Version: @(#)game.c 1.0.18 2018/10/20 * * Authors: Fred N. van Kempen, * Sarah Walker, @@ -76,10 +76,11 @@ int game_do_log = ENABLE_GAME_LOG; #endif -#if defined(_LOGGING) && defined(ENABLE_GAME_LOG) +#ifdef _LOGGING void game_log(int level, const char *fmt, ...) { +# ifdef ENABLE_GAME_LOG va_list ap; if (game_do_log >= level) { @@ -87,6 +88,7 @@ game_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/ports/parallel.c b/src/devices/ports/parallel.c index 4d12aec..65340c1 100644 --- a/src/devices/ports/parallel.c +++ b/src/devices/ports/parallel.c @@ -8,7 +8,7 @@ * * Implementation of the "LPT" style parallel ports. * - * Version: @(#)parallel.c 1.0.12 2018/10/19 + * Version: @(#)parallel.c 1.0.13 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -77,10 +77,11 @@ static const uint16_t addr_list[] = { /* valid port addresses */ static parallel_t ports[PARALLEL_MAX]; /* the ports */ -#if defined(_LOGGING) && defined(ENABLE_PARALLEL_LOG) +#ifdef _LOGGING void parallel_log(int level, const char *fmt, ...) { +# ifdef ENABLE_PARALLEL_LOG va_list ap; if (parallel_do_log >= level) { @@ -88,6 +89,7 @@ parallel_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/ports/serial.c b/src/devices/ports/serial.c index e27fc87..11104f0 100644 --- a/src/devices/ports/serial.c +++ b/src/devices/ports/serial.c @@ -8,7 +8,7 @@ * * Implementation of 8250-style serial port. * - * Version: @(#)serial.c 1.0.9 2018/10/19 + * Version: @(#)serial.c 1.0.10 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -78,10 +78,11 @@ static const struct { static SERIAL ports[SERIAL_MAX]; /* the ports */ -#if defined(_LOGGING) && defined(ENABLE_SERIAL_LOG) +#ifdef _LOGGING void serial_log(int level, const char *fmt, ...) { +# ifdef ENABLE_SERIAL_LOG va_list ap; if (serial_do_log >= level) { @@ -89,6 +90,7 @@ serial_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/scsi/scsi.c b/src/devices/scsi/scsi.c index f4bfdcd..67a4401 100644 --- a/src/devices/scsi/scsi.c +++ b/src/devices/scsi/scsi.c @@ -8,7 +8,7 @@ * * Handling of the SCSI controllers. * - * Version: @(#)scsi.c 1.0.14 2018/10/19 + * Version: @(#)scsi.c 1.0.15 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -147,10 +147,11 @@ scsi_card_has_config(int card) } -#if defined(_LOGGING) && defined(ENABLE_SCSI_DEV_LOG) +#ifdef _LOGGING void scsi_card_log(int level, const char *fmt, ...) { +# ifdef ENABLE_SCSI_DEV_LOG va_list ap; if (scsi_card_do_log >= level) { @@ -158,6 +159,7 @@ scsi_card_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/scsi/scsi_cdrom.c b/src/devices/scsi/scsi_cdrom.c index 85c5031..05e5a6c 100644 --- a/src/devices/scsi/scsi_cdrom.c +++ b/src/devices/scsi/scsi_cdrom.c @@ -8,7 +8,7 @@ * * Emulation of SCSI (and ATAPI) CD-ROM drives. * - * Version: @(#)scsi_cdrom.c 1.0.5 2018/10/19 + * Version: @(#)scsi_cdrom.c 1.0.6 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -350,10 +350,11 @@ static void mode_sense_load(scsi_cdrom_t *dev); static void scsi_cdrom_callback(void *p); -#if defined(_LOGGING) && defined(ENABLE_SCSI_CDROM_LOG) +#ifdef _LOGGING static void scsi_cdrom_log(int level, const char *fmt, ...) { +# ifdef ENABLE_SCSI_CDROM_LOG va_list ap; if (scsi_cdrom_do_log >= level) { @@ -361,6 +362,7 @@ scsi_cdrom_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/scsi/scsi_device.c b/src/devices/scsi/scsi_device.c index b3df727..46cd42e 100644 --- a/src/devices/scsi/scsi_device.c +++ b/src/devices/scsi/scsi_device.c @@ -8,7 +8,7 @@ * * The generic SCSI device command handler. * - * Version: @(#)scsi_device.c 1.0.12 2018/10/19 + * Version: @(#)scsi_device.c 1.0.13 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -208,10 +208,11 @@ scsi_device_get_buf_len(scsi_device_t *dev) } -#if defined(_LOGGING) && defined(ENABLE_SCSI_LOG) +#ifdef _LOGGING void scsi_log(int level, const char *fmt, ...) { +# ifdef ENABLE_SCSI_LOG va_list ap; if (scsi_do_log >= level) { @@ -219,5 +220,6 @@ scsi_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/scsi/scsi_disk.c b/src/devices/scsi/scsi_disk.c index 6ca4d1a..148c97a 100644 --- a/src/devices/scsi/scsi_disk.c +++ b/src/devices/scsi/scsi_disk.c @@ -8,7 +8,7 @@ * * Emulation of SCSI fixed disks. * - * Version: @(#)scsi_disk.c 1.0.17 2018/10/19 + * Version: @(#)scsi_disk.c 1.0.18 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -171,10 +171,11 @@ int scsi_disk_do_log = ENABLE_SCSI_DISK_LOG; #endif -#if defined(_LOGGING) && defined(ENABLE_SCSI_DISK_LOG) +#ifdef _LOGGING static void scsi_disk_log(int level, const char *fmt, ...) { +# ifdef ENABLE_SCSI_DISK_LOG va_list ap; if (scsi_disk_do_log >= level) { @@ -182,6 +183,7 @@ scsi_disk_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/sound/midi.c b/src/devices/sound/midi.c index d3692b1..cf48c53 100644 --- a/src/devices/sound/midi.c +++ b/src/devices/sound/midi.c @@ -8,7 +8,7 @@ * * MIDI support module, main file. * - * Version: @(#)midi.c 1.0.9 2018/10/19 + * Version: @(#)midi.c 1.0.10 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -184,10 +184,11 @@ midi_device_get_from_internal_name(const char *s) } -#if defined(_LOGGING) && defined(ENABLE_SOUND_MIDI_LOG) +#ifdef _LOGGING void sound_midi_log(int level, const char *fmt, ...) { +# ifdef ENABLE_SOUND_MIDI_LOG va_list ap; if (sound_midi_do_log >= level) { @@ -195,6 +196,7 @@ sound_midi_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/sound/sound.c b/src/devices/sound/sound.c index 52a2061..3b6c04e 100644 --- a/src/devices/sound/sound.c +++ b/src/devices/sound/sound.c @@ -8,7 +8,7 @@ * * Sound emulation core. * - * Version: @(#)sound.c 1.0.14 2018/10/19 + * Version: @(#)sound.c 1.0.15 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -299,10 +299,11 @@ sound_poll(void *priv) } -#if defined(_LOGGING) && defined(ENABLE_SOUND_LOG) +#ifdef _LOGGING void sound_log(int level, const char *fmt, ...) { +#ifdef ENABLE_SOUND_LOG va_list ap; if (sound_do_log >= level) { @@ -310,6 +311,7 @@ sound_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/sound/sound_dev.c b/src/devices/sound/sound_dev.c index 3279e57..f26a3d9 100644 --- a/src/devices/sound/sound_dev.c +++ b/src/devices/sound/sound_dev.c @@ -8,7 +8,7 @@ * * Sound devices support module. * - * Version: @(#)sound_dev.c 1.0.9 2018/10/19 + * Version: @(#)sound_dev.c 1.0.10 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -115,10 +115,11 @@ static const struct { }; -#if defined(_LOGGING) && defined(ENABLE_SOUND_DEV_LOG) +#ifdef _LOGGING void sound_card_log(int level, const char *fmt, ...) { +# ifdef ENABLE_SOUND_DEV_LOG va_list ap; if (sound_card_do_log >= level) { @@ -126,6 +127,7 @@ sound_card_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/system/pci.c b/src/devices/system/pci.c index abba2a6..5aae6bb 100644 --- a/src/devices/system/pci.c +++ b/src/devices/system/pci.c @@ -8,7 +8,7 @@ * * Implement the PCI bus. * - * Version: @(#)pci.c 1.0.8 2018/10/19 + * Version: @(#)pci.c 1.0.9 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -93,10 +93,11 @@ static int pci_index, static int trc_reg = 0; -#if defined(_LOGGING) && defined(ENABLE_BUS_LOG) +#ifdef _LOGGING static void pcilog(int level, const char *fmt, ...) { +# ifdef ENABLE_BUS_LOG va_list ap; if (pci_do_log >= level) { @@ -104,6 +105,7 @@ pcilog(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/video/video.c b/src/devices/video/video.c index 28985a4..ac697d4 100644 --- a/src/devices/video/video.c +++ b/src/devices/video/video.c @@ -40,7 +40,7 @@ * W = 3 bus clocks * L = 4 bus clocks * - * Version: @(#)video.c 1.0.19 2018/10/19 + * Version: @(#)video.c 1.0.20 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -645,10 +645,11 @@ create_bitmap(int x, int y) } -#if defined(_LOGGING) && defined(ENABLE_VIDEO_LOG) +#ifdef _LOGGING void video_log(int level, const char *fmt, ...) { +# ifdef ENABLE_VIDEO_LOG va_list ap; if (video_do_log >= level) { @@ -656,6 +657,7 @@ video_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/devices/video/video_dev.c b/src/devices/video/video_dev.c index 2bf3ac1..b55ce92 100644 --- a/src/devices/video/video_dev.c +++ b/src/devices/video/video_dev.c @@ -12,7 +12,7 @@ * "extern" reference to its device into the video.h file, * and add an entry for it into the table here. * - * Version: @(#)video_dev.c 1.0.24 2018/10/19 + * Version: @(#)video_dev.c 1.0.25 2018/10/20 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -160,10 +160,11 @@ static const struct { }; -#if defined(_LOGGING) && defined(ENABLE_VIDEO_DEV_LOG) +#ifdef _LOGGING void video_card_log(int level, const char *fmt, ...) { +# ifdef ENABLE_VIDEO_DEV_LOG va_list ap; if (video_card_do_log >= level) { @@ -171,6 +172,7 @@ video_card_log(int level, const char *fmt, ...) pclog_ex(fmt, ap); va_end(ap); } +# endif } #endif diff --git a/src/win/mingw/include/bittypes.h b/src/win/mingw/include/bittypes.h index 558a0b5..277d0f5 100644 --- a/src/win/mingw/include/bittypes.h +++ b/src/win/mingw/include/bittypes.h @@ -66,6 +66,10 @@ typedef signed char int16_t; #ifndef HAVE_U_INT32_T +#ifndef SIZEOF_LONG +# define SIZEOF_LONG 0 +#endif + #if SIZEOF_INT == 4 typedef unsigned int u_int32_t; typedef signed int int32_t;