Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Feb 2010 07:08:07 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r203479 - head/games/morse
Message-ID:  <201002040708.o14787P4043168@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002040708.o14787P4043168>