From 255cc210b6bbc24cff0912782fe1dabce84c58c9 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 28 Mar 2011 22:07:26 +0200 Subject: [PATCH] winealsa.drv: Remove unnecessary ifdefs. --- configure | 5 +---- configure.ac | 3 +-- dlls/winealsa.drv/alsa.c | 6 ------ dlls/winealsa.drv/alsa.h | 2 +- dlls/winealsa.drv/dscapture.c | 4 ---- dlls/winealsa.drv/dsoutput.c | 4 ---- dlls/winealsa.drv/midi.c | 8 -------- dlls/winealsa.drv/mixer.c | 10 ---------- dlls/winealsa.drv/wavein.c | 16 ---------------- dlls/winealsa.drv/waveinit.c | 5 ----- dlls/winealsa.drv/waveout.c | 16 ---------------- include/config.h.in | 3 --- 12 files changed, 3 insertions(+), 79 deletions(-) diff --git a/configure b/configure index 3b5e8bddd0b..507791f2c3b 100755 --- a/configure +++ b/configure @@ -10985,10 +10985,7 @@ int ret = snd_pcm_hw_params_get_access_mask(NULL, NULL) } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_ALSA 1" >>confdefs.h - - ALSALIBS="-lasound" + ALSALIBS="-lasound" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi diff --git a/configure.ac b/configure.ac index 326aa301b32..a59cae9d43f 100644 --- a/configure.ac +++ b/configure.ac @@ -1513,8 +1513,7 @@ then #elif defined(HAVE_SYS_ASOUNDLIB_H) #include #endif]], [[int ret = snd_pcm_hw_params_get_access_mask(NULL, NULL)]])], - [AC_DEFINE(HAVE_ALSA,1,[Define if you have ALSA 1.x including devel headers]) - ALSALIBS="-lasound"],[])]) + [ALSALIBS="-lasound"])]) fi dnl **** Check for capi4linux **** diff --git a/dlls/winealsa.drv/alsa.c b/dlls/winealsa.drv/alsa.c index 122817c8384..dc0ef29afed 100644 --- a/dlls/winealsa.drv/alsa.c +++ b/dlls/winealsa.drv/alsa.c @@ -39,8 +39,6 @@ #include "alsa.h" -#ifdef HAVE_ALSA - #include "wine/library.h" #include "wine/unicode.h" #include "wine/debug.h" @@ -725,8 +723,6 @@ if (err<0) { \ return; } -#endif - /************************************************************************** * DriverProc (WINEALSA.@) */ @@ -737,7 +733,6 @@ LRESULT CALLBACK ALSA_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg, /* EPP dwDevID, hDriv, wMsg, dwParam1, dwParam2); */ switch(wMsg) { -#ifdef HAVE_ALSA case DRV_LOAD: case DRV_FREE: case DRV_OPEN: @@ -750,7 +745,6 @@ LRESULT CALLBACK ALSA_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg, case DRV_INSTALL: case DRV_REMOVE: return DRV_SUCCESS; -#endif default: return 0; } diff --git a/dlls/winealsa.drv/alsa.h b/dlls/winealsa.drv/alsa.h index d961dce303b..8c21b01ccfe 100644 --- a/dlls/winealsa.drv/alsa.h +++ b/dlls/winealsa.drv/alsa.h @@ -24,7 +24,7 @@ # error You must include config.h to use this header #endif -#if defined(HAVE_ALSA) && !defined(__ALSA_H) +#ifndef __ALSA_H #define __ALSA_H #ifdef interface diff --git a/dlls/winealsa.drv/dscapture.c b/dlls/winealsa.drv/dscapture.c index 0b67749f65e..edf8c136e02 100644 --- a/dlls/winealsa.drv/dscapture.c +++ b/dlls/winealsa.drv/dscapture.c @@ -54,8 +54,6 @@ #include "wine/unicode.h" #include "wine/debug.h" -#ifdef HAVE_ALSA - /* Notify timer checks every 10 ms with a resolution of 2 ms */ #define DS_TIME_DEL 10 #define DS_TIME_RES 2 @@ -1092,5 +1090,3 @@ DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc) *desc = WInDev[wDevID].ds_desc; return MMSYSERR_NOERROR; } - -#endif /* HAVE_ALSA */ diff --git a/dlls/winealsa.drv/dsoutput.c b/dlls/winealsa.drv/dsoutput.c index 5ea43f411cf..ec219d99fc2 100644 --- a/dlls/winealsa.drv/dsoutput.c +++ b/dlls/winealsa.drv/dsoutput.c @@ -58,8 +58,6 @@ #include "wine/unicode.h" #include "wine/debug.h" -#ifdef HAVE_ALSA - WINE_DEFAULT_DEBUG_CHANNEL(dsalsa); typedef struct IDsDriverImpl IDsDriverImpl; @@ -959,5 +957,3 @@ DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc) *desc = WOutDev[wDevID].ds_desc; return MMSYSERR_NOERROR; } - -#endif /* HAVE_ALSA */ diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c index 54ea2eb4643..7dd6c0fdaca 100644 --- a/dlls/winealsa.drv/midi.c +++ b/dlls/winealsa.drv/midi.c @@ -53,8 +53,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(midi); -#ifdef HAVE_ALSA - #ifndef SND_SEQ_PORT_TYPE_PORT #define SND_SEQ_PORT_TYPE_PORT (1<<19) /* Appears in version 1.0.12rc1 */ #endif @@ -1299,8 +1297,6 @@ static LONG ALSA_MidiInit(void) return TRUE; } -#endif - /************************************************************************** * midMessage (WINEALSA.@) */ @@ -1310,7 +1306,6 @@ DWORD WINAPI ALSA_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n", wDevID, wMsg, dwUser, dwParam1, dwParam2); switch (wMsg) { -#ifdef HAVE_ALSA case DRVM_INIT: ALSA_MidiInit(); case DRVM_EXIT: @@ -1338,7 +1333,6 @@ DWORD WINAPI ALSA_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, return midStart(wDevID); case MIDM_STOP: return midStop(wDevID); -#endif default: TRACE("Unsupported message\n"); } @@ -1355,7 +1349,6 @@ DWORD WINAPI ALSA_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, wDevID, wMsg, dwUser, dwParam1, dwParam2); switch (wMsg) { -#ifdef HAVE_ALSA case DRVM_INIT: ALSA_MidiInit(); case DRVM_EXIT: @@ -1385,7 +1378,6 @@ DWORD WINAPI ALSA_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, return 0; case MODM_RESET: return modReset(wDevID); -#endif default: TRACE("Unsupported message\n"); } diff --git a/dlls/winealsa.drv/mixer.c b/dlls/winealsa.drv/mixer.c index 7d5b4528a96..833d2aef3d8 100644 --- a/dlls/winealsa.drv/mixer.c +++ b/dlls/winealsa.drv/mixer.c @@ -52,8 +52,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mixer); -#ifdef HAVE_ALSA - #define WINE_MIXER_MANUF_ID 0xAA #define WINE_MIXER_PRODUCT_ID 0x55 #define WINE_MIXER_VERSION 0x0100 @@ -1557,15 +1555,12 @@ static DWORD MIX_GetLineControls(UINT wDevID, LPMIXERLINECONTROLSW mlc, DWORD_PT return MMSYSERR_NOERROR; } -#endif /*HAVE_ALSA*/ - /************************************************************************** * mxdMessage (WINEALSA.3) */ DWORD WINAPI ALSA_mxdMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, DWORD_PTR dwParam1, DWORD_PTR dwParam2) { -#ifdef HAVE_ALSA DWORD ret; TRACE("(%04X, %s, %08lX, %08lX, %08lX);\n", wDevID, getMessage(wMsg), dwUser, dwParam1, dwParam2); @@ -1611,9 +1606,4 @@ DWORD WINAPI ALSA_mxdMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, TRACE("Returning %08X\n", ret); return ret; -#else /*HAVE_ALSA*/ - TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n", wDevID, wMsg, dwUser, dwParam1, dwParam2); - - return MMSYSERR_NOTENABLED; -#endif /*HAVE_ALSA*/ } diff --git a/dlls/winealsa.drv/wavein.c b/dlls/winealsa.drv/wavein.c index 32442fa0874..3a2fad84df9 100644 --- a/dlls/winealsa.drv/wavein.c +++ b/dlls/winealsa.drv/wavein.c @@ -59,8 +59,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wave); -#ifdef HAVE_ALSA - WINE_WAVEDEV *WInDev; DWORD ALSA_WidNumMallocedDevs; DWORD ALSA_WidNumDevs; @@ -778,17 +776,3 @@ DWORD WINAPI ALSA_widMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, } return MMSYSERR_NOTSUPPORTED; } - -#else /* HAVE_ALSA */ - -/************************************************************************** - * widMessage (WINEALSA.@) - */ -DWORD WINAPI ALSA_widMessage(WORD wDevID, WORD wMsg, DWORD_PTR dwUser, - DWORD_PTR dwParam1, DWORD_PTR dwParam2) -{ - FIXME("(%u, %04X, %08lX, %08lX, %08lX):stub\n", wDevID, wMsg, dwUser, dwParam1, dwParam2); - return MMSYSERR_NOTENABLED; -} - -#endif /* HAVE_ALSA */ diff --git a/dlls/winealsa.drv/waveinit.c b/dlls/winealsa.drv/waveinit.c index 4ae93bb0124..fda1efc6551 100644 --- a/dlls/winealsa.drv/waveinit.c +++ b/dlls/winealsa.drv/waveinit.c @@ -25,9 +25,6 @@ */ #include "config.h" - -#ifdef HAVE_ALSA - #include "wine/port.h" #include @@ -1014,5 +1011,3 @@ void ALSA_WaveInit(void) if (key) RegCloseKey(key); } - -#endif /* HAVE_ALSA */ diff --git a/dlls/winealsa.drv/waveout.c b/dlls/winealsa.drv/waveout.c index ac3db1a1c7a..127e50e4ad9 100644 --- a/dlls/winealsa.drv/waveout.c +++ b/dlls/winealsa.drv/waveout.c @@ -60,8 +60,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wave); -#ifdef HAVE_ALSA - WINE_WAVEDEV *WOutDev; DWORD ALSA_WodNumMallocedDevs; DWORD ALSA_WodNumDevs; @@ -1180,17 +1178,3 @@ DWORD WINAPI ALSA_wodMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, } return MMSYSERR_NOTSUPPORTED; } - -#else /* HAVE_ALSA */ - -/************************************************************************** - * wodMessage (WINEALSA.@) - */ -DWORD WINAPI ALSA_wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser, - DWORD dwParam1, DWORD dwParam2) -{ - FIXME("(%u, %04X, %08X, %08X, %08X):stub\n", wDevID, wMsg, dwUser, dwParam1, dwParam2); - return MMSYSERR_NOTENABLED; -} - -#endif /* HAVE_ALSA */ diff --git a/include/config.h.in b/include/config.h.in index 44b6bb690fc..dbe35f9b7df 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -12,9 +12,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ALIAS_H -/* Define if you have ALSA 1.x including devel headers */ -#undef HAVE_ALSA - /* Define to 1 if you have the header file. */ #undef HAVE_ALSA_ASOUNDLIB_H