From d95617e806181713546d4d6d3864e9a01004fc86 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Thu, 17 Dec 2015 21:56:11 -0500 Subject: Fix cabal builds NB. Cabal has sanity-destroying (undocumented?) restriction: cannot have a .c source with the same basename as a .hs source. TODO: make cabal output a syntax error (instead of an inscrutable linker error!) when the user attempts this. Or, at least, file a bug report. --- AlsaShutUp.c | 5 ----- alsa_shut_up.c | 5 +++++ axis-of-eval.cabal | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 AlsaShutUp.c create mode 100644 alsa_shut_up.c diff --git a/AlsaShutUp.c b/AlsaShutUp.c deleted file mode 100644 index 1d38891..0000000 --- a/AlsaShutUp.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include - -void sufferInSilence(const char *file, int line, const char *function, int err, const char *fmt,...) { return; } -int alsaShutUp() { return snd_lib_error_set_handler(sufferInSilence); } diff --git a/alsa_shut_up.c b/alsa_shut_up.c new file mode 100644 index 0000000..1d38891 --- /dev/null +++ b/alsa_shut_up.c @@ -0,0 +1,5 @@ +#include +#include + +void sufferInSilence(const char *file, int line, const char *function, int err, const char *fmt,...) { return; } +int alsaShutUp() { return snd_lib_error_set_handler(sufferInSilence); } diff --git a/axis-of-eval.cabal b/axis-of-eval.cabal index 852d040..7042669 100644 --- a/axis-of-eval.cabal +++ b/axis-of-eval.cabal @@ -22,6 +22,7 @@ executable axis main-is: axis.hs ghc-options: -threaded -W -Wall -O2 other-modules: AlsaSeq, AlsaShutUp + c-sources: alsa_shut_up.c executable rtq default-language: Haskell2010 @@ -42,3 +43,4 @@ executable midi-dump main-is: midi-dump.hs other-modules: AlsaSeq, Midi, RealTimeQueue, AlsaShutUp ghc-options: -threaded -W -Wall -O2 -rtsopts + c-sources: alsa_shut_up.c -- cgit v1.2.3