- include <windows.h> in bochs.h whenever WIN32 is defined. This is required

so that windows types can be used in fields, for example in cdrom.h:
    #ifdef WIN32
      HANDLE cdrom_interface::hFile;
    #endif
- since every file includes bochs.h, I removed includes of <windows.h>
  everywhere else
- modified: bochs.h cpu/extdb.cc gui/win32.cc gui/wx.cc iodev/cdrom.cc
  iodev/eth_win32.cc iodev/floppy.cc
This commit is contained in:
Bryce Denney 2002-10-03 21:07:04 +00:00
parent e44407be1d
commit f54551717e
7 changed files with 23 additions and 16 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: bochs.h,v 1.98 2002-10-03 05:28:56 bdenney Exp $
// $Id: bochs.h,v 1.99 2002-10-03 21:06:58 bdenney Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -37,6 +37,14 @@
#include "config.h" /* generated by configure script from config.h.in */
extern "C" {
#ifdef WIN32
// In a win32 compile (including cygwin), windows.h is required for several
// files in gui and iodev. It is important to include it here in a header
// file so that WIN32-specific data types can be used in fields of classes.
#include <windows.h>
#endif
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,6 +1,6 @@
#include "bochs.h"
#ifdef WIN32
# include <windows.h>
// windows.h included in bochs.h
#else
//# error "extdb.cc only supported in win32 environment"
#endif

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: win32.cc,v 1.42 2002-09-21 19:38:47 vruppert Exp $
// $Id: win32.cc,v 1.43 2002-10-03 21:06:59 bdenney Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -31,7 +31,7 @@
#include "bochs.h"
#include "icon_bochs.h"
#include "font/vga.bitmap.h"
#include <windows.h>
// windows.h is included by bochs.h
#include <commctrl.h>
#include <process.h>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////
// $Id: wx.cc,v 1.33 2002-10-03 13:12:20 vruppert Exp $
// $Id: wx.cc,v 1.34 2002-10-03 21:07:01 bdenney Exp $
/////////////////////////////////////////////////////////////////
//
// wxWindows VGA display for Bochs. wx.cc implements a custom
@ -376,7 +376,8 @@ wxAsciiKey[0x5f] = {
#if defined (wxHAS_RAW_KEY_CODES) && defined(__WXMSW__)
// get windows specific definitions. At present the only thing needed
// is the definition of HIWORD.
#include <windows.h>
// windows.h included by bochs.h, so nothing extra is required here.
#endif
// MS Windows specific key mapping, which uses wxKeyEvent::m_rawCode & 2.

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: cdrom.cc,v 1.45 2002-10-03 11:59:37 vruppert Exp $
// $Id: cdrom.cc,v 1.46 2002-10-03 21:07:02 bdenney Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -89,7 +89,7 @@ extern "C" {
#endif
#ifdef WIN32
#include <windows.h>
// windows.h included by bochs.h
#include <winioctl.h>
#include "aspi-win32.h"
#include "scsidefs.h"
@ -208,7 +208,7 @@ cdrom_interface::cdrom_interface(char *dev)
void
cdrom_interface::init(void) {
BX_DEBUG(("Init $Id: cdrom.cc,v 1.45 2002-10-03 11:59:37 vruppert Exp $"));
BX_DEBUG(("Init $Id: cdrom.cc,v 1.46 2002-10-03 21:07:02 bdenney Exp $"));
BX_INFO(("file = '%s'",path));
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: eth_win32.cc,v 1.13 2002-10-02 05:16:01 kevinlawton Exp $
// $Id: eth_win32.cc,v 1.14 2002-10-03 21:07:04 bdenney Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -36,8 +36,8 @@
// For ethernet support under win32 to work, you must install WinPCap.
// Download it from http://netgroup-serv.polito.it/winpcap
#include <windows.h>
#include "bochs.h"
// windows.h included by bochs.h
#define LOG_THIS bx_ne2k.
#define NDIS_PACKET_TYPE_PROMISCUOUS 0x0020

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: floppy.cc,v 1.50 2002-10-02 05:16:01 kevinlawton Exp $
// $Id: floppy.cc,v 1.51 2002-10-03 21:07:04 bdenney Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -40,9 +40,7 @@ extern "C" {
#include <errno.h>
}
#include "bochs.h"
#ifdef WIN32
#include <windows.h> // for wsprintf
#endif
// windows.h included by bochs.h
#define LOG_THIS bx_floppy.
@ -89,7 +87,7 @@ bx_floppy_ctrl_c::init(bx_devices_c *d, bx_cmos_c *cmos)
{
Bit8u i;
BX_DEBUG(("Init $Id: floppy.cc,v 1.50 2002-10-02 05:16:01 kevinlawton Exp $"));
BX_DEBUG(("Init $Id: floppy.cc,v 1.51 2002-10-03 21:07:04 bdenney Exp $"));
BX_FD_THIS devices = d;
BX_REGISTER_DMA8_CHANNEL(2, bx_floppy.dma_read, bx_floppy.dma_write, "Floppy Drive");