summaryrefslogtreecommitdiff
path: root/lib/libossaudio
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2002-04-24 21:59:54 +0000
committerMarc Espie <espie@cvs.openbsd.org>2002-04-24 21:59:54 +0000
commit0dc8c7c0726801a62672019dd62ef1a484646dea (patch)
treeff51a6b7fe2545eec62a7417f385dc00b1dafabd /lib/libossaudio
parentb52b85be70837f3789f679055047a4763e81eefc (diff)
make oss_ioctl varargs.
this is not standard C, but it works on the arches we support, and osscompat is a dirty hack in the first place. ok millert@, tested naddy@
Diffstat (limited to 'lib/libossaudio')
-rw-r--r--lib/libossaudio/ossaudio.c11
-rw-r--r--lib/libossaudio/shlib_version4
-rw-r--r--lib/libossaudio/soundcard.h9
3 files changed, 13 insertions, 11 deletions
diff --git a/lib/libossaudio/ossaudio.c b/lib/libossaudio/ossaudio.c
index 1e2b9356c4e..76877f02ec3 100644
--- a/lib/libossaudio/ossaudio.c
+++ b/lib/libossaudio/ossaudio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ossaudio.c,v 1.4 2001/08/18 19:33:30 brad Exp $ */
+/* $OpenBSD: ossaudio.c,v 1.5 2002/04/24 21:59:53 espie Exp $ */
/* $NetBSD: ossaudio.c,v 1.14 2001/05/10 01:53:48 augustss Exp $ */
/*-
@@ -43,6 +43,7 @@
* With some preprocessor magic it could be the same file.
*/
+#include <stdarg.h>
#include <string.h>
#include <sys/types.h>
#include <sys/ioctl.h>
@@ -71,8 +72,14 @@ static int enum_to_mask(struct audiodevinfo *di, int enm);
#define INTARG (*(int*)argp)
int
-_oss_ioctl(int fd, unsigned long com, void *argp)
+_oss_ioctl(int fd, unsigned long com, ...)
{
+ va_list ap;
+ void *argp;
+
+ va_start(ap, com);
+ argp = va_arg(ap, void *);
+ va_end(ap);
if (IOCGROUP(com) == 'P')
return audio_ioctl(fd, com, argp);
else if (IOCGROUP(com) == 'M')
diff --git a/lib/libossaudio/shlib_version b/lib/libossaudio/shlib_version
index 775b406a106..f1183efe1b1 100644
--- a/lib/libossaudio/shlib_version
+++ b/lib/libossaudio/shlib_version
@@ -1,5 +1,5 @@
-# $OpenBSD: shlib_version,v 1.1 1998/05/01 09:23:00 provos Exp $
+# $OpenBSD: shlib_version,v 1.2 2002/04/24 21:59:53 espie Exp $
# $NetBSD: shlib_version,v 1.4 1998/01/05 07:41:13 perry Exp $
#
-major=0
+major=1
minor=0
diff --git a/lib/libossaudio/soundcard.h b/lib/libossaudio/soundcard.h
index 63bd7ed1f52..20fbccc4408 100644
--- a/lib/libossaudio/soundcard.h
+++ b/lib/libossaudio/soundcard.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: soundcard.h,v 1.8 2002/03/23 20:38:10 millert Exp $ */
+/* $OpenBSD: soundcard.h,v 1.9 2002/04/24 21:59:53 espie Exp $ */
/* $NetBSD: soundcard.h,v 1.11 2001/05/09 21:49:58 augustss Exp $ */
/*-
@@ -304,17 +304,12 @@ typedef struct buffmem_desc {
int size;
} buffmem_desc;
-#if 0
-/* This is what we'd like to have, but it causes prototype conflicts. */
#define ioctl _oss_ioctl
-#else
-#define ioctl(x,y,z) _oss_ioctl(x,y,z)
-#endif
#include <sys/cdefs.h>
__BEGIN_DECLS
-int _oss_ioctl(int fd, unsigned long com, void *argp);
+int _oss_ioctl(int, unsigned long com, ...);
__END_DECLS
#endif /* !_SOUNDCARD_H_ */