summaryrefslogtreecommitdiff
path: root/audio/rio/patches
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1999-12-31 21:19:49 +0000
committeragc <agc@pkgsrc.org>1999-12-31 21:19:49 +0000
commit1d481447fef7c2257693c2e9c7a674629568aef4 (patch)
tree75fd1a17b95b96cb6f7e0dcacf87a9b56f60d699 /audio/rio/patches
parentc83bac661c4f697b0c9b965b03290ec027ead676 (diff)
downloadpkgsrc-1d481447fef7c2257693c2e9c7a674629568aef4.tar.gz
Import the Snowblind Alliance rio tools into the NetBSD packages
collection: 'rio' is a simple command line utility which allows you to display and manage files on your Diamond Rio portable music player. At present the Rio utility supports the Diamond Rio PMP300 with 32M internal flash memory. Additional external flash memory is now supported thanks to the work done by Guido March (march@pc40.mpier.uni-frankfurt.de).
Diffstat (limited to 'audio/rio/patches')
-rw-r--r--audio/rio/patches/patch-aa27
-rw-r--r--audio/rio/patches/patch-ab61
2 files changed, 88 insertions, 0 deletions
diff --git a/audio/rio/patches/patch-aa b/audio/rio/patches/patch-aa
new file mode 100644
index 00000000000..b4eb5efa254
--- /dev/null
+++ b/audio/rio/patches/patch-aa
@@ -0,0 +1,27 @@
+$NetBSD: patch-aa,v 1.1.1.1 1999/12/31 21:19:50 agc Exp $
+
+Add support for NetBSD and Solaris
+
+--- app.cpp 1999/12/17 17:39:52 1.1
++++ app.cpp 1999/12/17 17:41:47
+@@ -67,6 +67,20 @@
+ #define SIZE_MAXPATH MAXPATH
+ #define DELETEARRAY delete
+
++#elif defined(__NetBSD__)
++ // NetBSD g++
++ #include <unistd.h>
++ #include <sys/syslimits.h>
++ #define SIZE_MAXPATH PATH_MAX
++ #define DELETEARRAY delete[]
++
++#elif defined(__sun__) && defined(__svr4__)
++ // Solaris 2.x g++
++ #include <unistd.h>
++ #include <limits.h>
++ #define SIZE_MAXPATH PATH_MAX
++ #define DELETEARRAY delete[]
++
+ #else
+ // not supported
+ #error ! ! compiler/platform not supported ! !
diff --git a/audio/rio/patches/patch-ab b/audio/rio/patches/patch-ab
new file mode 100644
index 00000000000..da45d68c780
--- /dev/null
+++ b/audio/rio/patches/patch-ab
@@ -0,0 +1,61 @@
+$NetBSD: patch-ab,v 1.1.1.1 1999/12/31 21:19:50 agc Exp $
+
+Add NetBSD and Solaris platforms
+Add inb() and outb() from XFree86 sources.
+
+--- rio.cpp 1999/12/17 17:42:31 1.1
++++ rio.cpp 1999/12/17 17:44:25
+@@ -109,9 +109,53 @@
+ #define CLOCK_SECOND ((int)CLOCKS_PER_SEC)
+ #define DELETEARRAY delete
+
++#elif defined(__NetBSD__)
++ // NetBSD g++
++ #include <fcntl.h>
++ #include <unistd.h>
++ #include <machine/cpufunc.h>
++ #define OUTPORT(p,v) outb( p, v )
++ #define INPORT(p) inb( p )
++ #define CLOCK_SECOND CLOCKS_PER_SEC
++ #define DELETEARRAY delete[]
++
++#elif defined(__sun__) && defined(__svr4__)
++ // NetBSD g++
++ #include <fcntl.h>
++ #include <unistd.h>
++ #include <sys/cpupart.h>
++ #include <sys/cpuvar.h>
++ #include <sys/ddi.h>
++ #include <sys/sunddi.h>
++ #define OUTPORT(p,v) outb( p, v )
++ #define INPORT(p) inb( p )
++ #define CLOCK_SECOND CLOCKS_PER_SEC
++ #define DELETEARRAY delete[]
++
+ #else
+ // not supported
+ #error ! ! compiler/platform not supported ! !
++#endif
++
++#if defined(__NetBSD__)
++/* copied from the XFree86 sources */
++/* xc/programs/Xserver/hw/xfree86/common/compiler.h */
++static __inline__ unsigned int
++inb(unsigned short int port)
++{
++ unsigned char ret;
++
++ __asm__ __volatile__("inb %1,%0" :
++ "=a" (ret) :
++ "d" (port));
++ return ret;
++}
++
++static __inline__ void
++outb(unsigned short int port, unsigned char val)
++{
++ __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port));
++}
+ #endif
+
+ // port offset constants