svn commit: r203479 - head/games/morse

Warner Losh imp at FreeBSD.org
Thu Feb 4 07:08:07 UTC 2010


Author: imp
Date: Thu Feb  4 07:08:06 2010
New Revision: 203479
URL: http://svn.freebsd.org/changeset/base/203479

Log:
  Always compile in the speaker code.  There's little savings by
  omitting it, and other platforms may implement /dev/speaker in the
  future.

Modified:
  head/games/morse/Makefile
  head/games/morse/morse.c

Modified: head/games/morse/Makefile
==============================================================================
--- head/games/morse/Makefile	Thu Feb  4 06:45:14 2010	(r203478)
+++ head/games/morse/Makefile	Thu Feb  4 07:08:06 2010	(r203479)
@@ -4,8 +4,4 @@
 PROG=	morse
 MAN=	morse.6
 
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
-CFLAGS += -DSPEAKER=\"/dev/speaker\"
-.endif
-
 .include <bsd.prog.mk>

Modified: head/games/morse/morse.c
==============================================================================
--- head/games/morse/morse.c	Thu Feb  4 06:45:14 2010	(r203478)
+++ head/games/morse/morse.c	Thu Feb  4 07:08:06 2010	(r203479)
@@ -63,6 +63,9 @@ static const char rcsid[] =
 #include <termios.h>
 #include <unistd.h>
 
+/* Always use the speaker, let the open fail if -p is selected */
+#define SPEAKER "/dev/speaker"
+
 #ifdef SPEAKER
 #include <dev/speaker/speaker.h>
 #endif


More information about the svn-src-head mailing list