pkgsrc/audio/rio/patches/patch-aa
agc 1e43bb2f84 Make this program work.
+ add -li386, and a check to make sure that root is running the program
  (for obvious reasons)
+ add a small shell script to find the lpt port easily

Initialisation of flash RAM on the rio is slow, but upload works quite
well and fast. Not yet tested with external flash media.
2000-01-11 11:31:18 +00:00

42 lines
1.1 KiB
Text

$NetBSD: patch-aa,v 1.2 2000/01/11 11:31:19 agc Exp $
Add support for NetBSD and Solaris
Make sure the program is being run by effective uid 0
--- 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 ! !
@@ -519,6 +533,13 @@
Help();
CLEANUP_RETURN( FALSE );
}
+#if defined(__NetBSD__)
+ if (geteuid() != 0) {
+ ERRORSTR("You need to be root to run this program,\n");
+ ERRORSTR("because access is made to the parallel port directly.\n");
+ CLEANUP_RETURN(FALSE);
+ }
+#endif
for( int iA=1; iA<iCountArg; ++iA )
{
// check for display directory request