Make midi_attach_mi() and audioprint() available also if MIDIBUS

(but not necessarily MIDI) is defined.
Fixes PR port-i386/6615 (Krister Walfridsson <cato@ulysses.df.lth.se>).
(XXX this should probably go into a separate file to get rid of
the #ifdef mess)
This commit is contained in:
drochner 1998-12-20 14:26:44 +00:00
parent 051cc552ae
commit 6292c7eda0
3 changed files with 15 additions and 11 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: files,v 1.261 1998/12/10 15:07:01 christos Exp $
# $NetBSD: files,v 1.262 1998/12/20 14:26:44 drochner Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
@ -410,10 +410,10 @@ file ddb/db_watch.c ddb
file ddb/db_write_cmd.c ddb
file ddb/db_xxx.c ddb
file dev/auconv.c auconv
file dev/audio.c audio | midi needs-flag
file dev/audio.c audio | midi | midibus needs-flag
file dev/ccd.c ccd needs-flag
file dev/md.c md needs-count
file dev/midi.c midi needs-flag
file dev/midi.c midi | midibus needs-flag
file dev/midisyn.c midisyn
file dev/mulaw.c mulaw
file dev/sequencer.c sequencer needs-flag

View File

@ -1,4 +1,4 @@
/* $NetBSD: audio.c,v 1.107 1998/11/25 13:44:13 mycroft Exp $ */
/* $NetBSD: audio.c,v 1.108 1998/12/20 14:26:44 drochner Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@ -2796,7 +2796,7 @@ mixer_ioctl(dev, cmd, addr, flag, p)
#include "midi.h"
#if NAUDIO == 0 && NMIDI > 0
#if NAUDIO == 0 && (NMIDI > 0 || NMIDIBUS > 0)
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
@ -2804,7 +2804,7 @@ mixer_ioctl(dev, cmd, addr, flag, p)
#include <dev/audio_if.h>
#endif
#if NAUDIO > 0 || NMIDI > 0
#if NAUDIO > 0 || (NMIDI > 0 || NMIDIBUS > 0)
int
audioprint(aux, pnp)
void *aux;
@ -2835,4 +2835,4 @@ audioprint(aux, pnp)
return (UNCONF);
}
#endif /* NAUDIO > 0 || NMIDI > 0 */
#endif /* NAUDIO > 0 || (NMIDI > 0 || NMIDIBUS > 0) */

View File

@ -1,4 +1,4 @@
/* $NetBSD: midi.c,v 1.9 1998/12/15 18:03:07 augustss Exp $ */
/* $NetBSD: midi.c,v 1.10 1998/12/20 14:26:44 drochner Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -37,8 +37,6 @@
*/
#include "midi.h"
#if NMIDI > 0
#include "sequencer.h"
#include <sys/param.h>
@ -62,6 +60,8 @@
#include <dev/midi_if.h>
#include <dev/midivar.h>
#if NMIDI > 0
#ifdef AUDIO_DEBUG
#define DPRINTF(x) if (mididebug) printf x
#define DPRINTFN(n,x) if (mididebug >= (n)) printf x
@ -727,6 +727,10 @@ midi_getinfo(dev, mi)
sc->hw_if->getinfo(sc->hw_hdl, mi);
}
#endif /* NMIDI > 0 */
#if NMIDI > 0 || NMIDIBUS > 0
int audioprint __P((void *, const char *));
void
@ -749,4 +753,4 @@ midi_attach_mi(mhwp, hdlp, dev)
(void)config_found(dev, &arg, audioprint);
}
#endif /* NMIDI > 0 */
#endif /* NMIDI > 0 || NMIDIBUS > 0 */