[Liboss-commit] CVS: liboss/include soundcard.h,1.4,1.5
Brought to you by:
thesin
|
From: Alexander S. <mrv...@us...> - 2002-10-23 01:28:16
|
Update of /cvsroot/liboss/liboss/include
In directory usw-pr-cvs1:/tmp/cvs-serv23624/include
Modified Files:
soundcard.h
Log Message:
Now soundcard.h uses inline functions. We need to write liboss-config or use pkgconfig, but arts may compile (manually) now
Index: soundcard.h
===================================================================
RCS file: /cvsroot/liboss/liboss/include/soundcard.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- soundcard.h 18 Oct 2002 22:00:24 -0000 1.4
+++ soundcard.h 23 Oct 2002 01:28:13 -0000 1.5
@@ -285,23 +285,33 @@
/* Make sure we don't override the headers by accident! */
#include <fcntl.h>
#include <sys/ioctl.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <unistd.h>
+#undef ioctl
+#undef open
+#undef close
#ifndef LIBOSS_INTERNAL
-#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)
-#define open(x,y,z...) oss_open(x,y,z)
-#define close(x) oss_close(x)
-#endif
+extern int oss_ioctl (int,unsigned long,va_list);
+extern int oss_open (const char *,int,va_list);
+extern void oss_close (int);
-#include <sys/cdefs.h>
+static inline int ioctl (int x, unsigned long y,...)
+{
+ va_list l;
+ va_start(l,y);
+ return oss_ioctl(x,y,l);
+}
-__BEGIN_DECLS
-//int oss_ioctl __P((int fd, request_t request, ...));
-//int oss_open __P((const char *pathname, int flags, ...));
-__END_DECLS
+static inline int open (const char* x, int y,...)
+{
+ va_list l;
+ va_start(l,y);
+ return oss_open(x,y,l);
+}
+
+static inline void close (int x) {oss_close(x);}
#endif
#endif /* !_SOUNDCARD_H_ */
|