Fixed a few #ifdefs.

This commit is contained in:
Brian Joseph Czapiga 1999-02-14 13:35:52 +00:00 committed by Alexandre Julliard
parent 1da6dbab67
commit 5ef8b175c0
3 changed files with 43 additions and 38 deletions

View File

@ -19,7 +19,7 @@
* write (rwflag == 0)
************************************************************/
#if defined(linux) || defined(__FreeBSD__)
#if defined(linux) || defined(__FreeBSD__) || defined(__OpenBSD__)
BOOL32 DEBUG_checkmap_bad( const char *addr, size_t size, int rwflag)
{
FILE *fp;

View File

@ -36,7 +36,7 @@ extern LPMIDIINCAPS16 midiInDevices [MAX_MIDIINDRV];
#ifdef HAVE_OSS
int unixToWindowsDeviceType(int type)
{
#ifndef __NetBSD__
#if !defined(__NetBSD__) && !defined(__OpenBSD__)
/* MOD_MIDIPORT output port
* MOD_SYNTH generic internal synth
* MOD_SQSYNTH square wave internal synth
@ -70,7 +70,7 @@ int unixToWindowsDeviceType(int type)
*/
BOOL32 MULTIMEDIA_MidiInit(void)
{
#if defined(HAVE_OSS) && !defined(__NetBSD__)
#if defined(HAVE_OSS) && !defined(__NetBSD__) && !defined(__OpenBSD__)
int i, status, numsynthdevs = 255, nummididevs = 255;
struct synth_info sinfo;
struct midi_info minfo;

View File

@ -20,6 +20,9 @@
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#if defined(__FreeBSD__) || defined(__OpenBSD__)
#include <sys/errno.h>
#endif
#include <sys/ioctl.h>
#include "wine/winuser16.h"
#include "ldt.h"
@ -657,41 +660,6 @@ static DWORD midStop(WORD wDevID)
#endif /* HAVE_OSS */
}
/**************************************************************************
* midMessage [sample driver]
*/
DWORD WINAPI midMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2)
{
TRACE(midi, "(%04X, %04X, %08lX, %08lX, %08lX);\n",
wDevID, wMsg, dwUser, dwParam1, dwParam2);
switch (wMsg) {
case MIDM_OPEN:
return midOpen(wDevID,(LPMIDIOPENDESC)dwParam1, dwParam2);
case MIDM_CLOSE:
return midClose(wDevID);
case MIDM_ADDBUFFER:
return midAddBuffer(wDevID,(LPMIDIHDR)dwParam1, dwParam2);
case MIDM_PREPARE:
return midPrepare(wDevID,(LPMIDIHDR)dwParam1, dwParam2);
case MIDM_UNPREPARE:
return midUnprepare(wDevID,(LPMIDIHDR)dwParam1, dwParam2);
case MIDM_GETDEVCAPS:
return midGetDevCaps(wDevID,(LPMIDIINCAPS16)dwParam1,dwParam2);
case MIDM_GETNUMDEVS:
return MIDM_NUMDEVS;
case MIDM_RESET:
return midReset(wDevID);
case MIDM_START:
return midStart(wDevID);
case MIDM_STOP:
return midStop(wDevID);
default:
TRACE(midi, "Unsupported message\n");
}
return MMSYSERR_NOTSUPPORTED;
}
/*-----------------------------------------------------------------------*/
#ifdef HAVE_OSS
@ -1487,6 +1455,43 @@ static DWORD modReset(WORD wDevID)
* MIDI entry points *
*======================================================================*/
/**************************************************************************
* midMessage [sample driver]
*/
DWORD WINAPI midMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2)
{
TRACE(midi, "(%04X, %04X, %08lX, %08lX, %08lX);\n",
wDevID, wMsg, dwUser, dwParam1, dwParam2);
switch (wMsg) {
#ifdef SNDCTL_MIDI_INFO
case MIDM_OPEN:
return midOpen(wDevID,(LPMIDIOPENDESC)dwParam1, dwParam2);
case MIDM_CLOSE:
return midClose(wDevID);
case MIDM_ADDBUFFER:
return midAddBuffer(wDevID,(LPMIDIHDR)dwParam1, dwParam2);
case MIDM_PREPARE:
return midPrepare(wDevID,(LPMIDIHDR)dwParam1, dwParam2);
case MIDM_UNPREPARE:
return midUnprepare(wDevID,(LPMIDIHDR)dwParam1, dwParam2);
case MIDM_GETDEVCAPS:
return midGetDevCaps(wDevID,(LPMIDIINCAPS16)dwParam1,dwParam2);
case MIDM_GETNUMDEVS:
return MIDM_NUMDEVS;
case MIDM_RESET:
return midReset(wDevID);
case MIDM_START:
return midStart(wDevID);
case MIDM_STOP:
return midStop(wDevID);
#endif
default:
TRACE(midi, "Unsupported message\n");
}
return MMSYSERR_NOTSUPPORTED;
}
/**************************************************************************
* modMessage [sample driver]
*/