summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ConfigureChecks.cmake1
-rw-r--r--config.h.cmake1
-rw-r--r--kscd/libwm/plat_sun.c48
-rw-r--r--kscd/libwm/plat_sun_cdda.c14
4 files changed, 42 insertions, 22 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 16381307..e18c67f1 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -177,6 +177,7 @@ if( BUILD_ARTS )
if( NOT XINE_FOUND )
tde_message_fatal( "xine is requested, but not found on your system" )
endif( )
+ check_include_file( alloca.h HAVE_ALLOCA_H )
endif( WITH_ARTS_XINE )
endif( BUILD_ARTS )
diff --git a/config.h.cmake b/config.h.cmake
index 812818bb..dbf72b47 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -57,4 +57,5 @@
/* xine_artsplugin */
#cmakedefine HAVE_XSHMGETEVENTBASE 1
+#cmakedefine HAVE_ALLOCA_H 1
#cmakedefine ao_new_port @ao_new_port@
diff --git a/kscd/libwm/plat_sun.c b/kscd/libwm/plat_sun.c
index 824da881..d891859c 100644
--- a/kscd/libwm/plat_sun.c
+++ b/kscd/libwm/plat_sun.c
@@ -36,7 +36,7 @@ static char plat_sun_id[] = "$Id$";
#include <string.h>
#include <sys/param.h>
#include <sys/stat.h>
-#include <sys/statfs.h>
+#include <sys/statvfs.h>
#include <sys/time.h>
#include <sys/ioctl.h>
@@ -44,6 +44,7 @@ static char plat_sun_id[] = "$Id$";
#include "include/wm_helpers.h"
#include "include/wm_cdrom.h"
#include "include/wm_cdtext.h"
+#include "include/wm_scsi.h"
#include <unistd.h>
#include <signal.h>
@@ -237,14 +238,16 @@ wmcd_open( struct wm_drive *d )
*/
#if defined(BUILD_CDDA)
if(d->cdda) {
- if (!gen_cdda_init(d))
+ if (!gen_cdda_init(d)) {
/* WARNING: Old GUI call. How could this survive? */
- enable_cdda_controls(1);
- else {
+ /* FIXME: undeclared function */
+ /* enable_cdda_controls(1); */
+ } else {
wm_lib_message(WM_MSG_LEVEL_DEBUG|WM_MSG_CLASS, "wmcd_open(): failed in gen_cdda_init\n");
gen_close(d);
return -1;
}
+ }
#endif
/* Can we figure out the drive type? */
@@ -602,7 +605,7 @@ int
gen_eject( struct wm_drive *d )
{
struct stat stbuf;
- struct statfs sfsbuf;
+ struct statvfs sfsbuf;
if (fstat(d->fd, &stbuf) != 0)
return (-2);
@@ -628,7 +631,8 @@ gen_eject( struct wm_drive *d )
if (d->cdda_slave > -1)
{
write(d->cdda_slave, "E", 1);
- cdda_get_ack(d->cdda_slave);
+ /* FIXME: undeclared */
+ /* cdda_get_ack(d->cdda_slave); */
}
}
@@ -699,7 +703,12 @@ gen_get_volume( struct wm_drive *d, int *left, int *right )
return (wm_scsi2_get_volume(d, left, right));
} /* gen_get_volume() */
-#ifdef BUILD_CDDA
+#if 0 /* def BUILD_CDDA */
+/* FIXME:
+ld: fatal: symbol 'gen_cdda_init' is multiply-defined:
+ (file kscd/libwm/libworkman.a(plat_sun.c.o) type=FUNC; file kscd/libwm/libworkman.a(cdda.c.o) type=FUNC);
+ld: fatal: file processing errors. No output written to kaudiocreator/kaudiocreator
+*/
/*
* Try to initialize the CDDA slave. Returns 0 on success.
@@ -727,10 +736,11 @@ gen_cdda_init( struct wm_drive *d )
close(slavefds[1]);
close(d->fd);
/* Try the default path first. */
- execl(cddaslave_path, cddaslave_path, d->cd_device, (void *)0);
+ /* FIXME: cddaslave_path is undeclared */
+ /* execl(cddaslave_path, cddaslave_path, d->cd_device, (void *)0); */
/* Search $PATH if that didn't work. */
execlp("cddaslave", "cddaslave", d->cd_device, (void *)0);
- perror(cddaslave_path);
+ /* perror(cddaslave_path); */
exit(1);
case -1:
@@ -743,12 +753,15 @@ gen_cdda_init( struct wm_drive *d )
close(slavefds[1]);
d->cdda_slave = slavefds[0];
+#if 0
+/* FIXME: undeclared */
if (!cdda_get_ack(d->cdda_slave))
{
d->cdda_slave = -1;
codec_start();
return (-3);
}
+#endif
return (0);
}
@@ -790,9 +803,9 @@ typedef int audio_device_t;
* Also, don't do anything real if it's not Solaris.
*/
#if !defined(AUDIO_ENCODING_LINEAR) || !defined(CODEC) || !defined(SYSV) /* { */
-codec_init() { return 0; }
-codec_start() { return 0; }
-codec_stop() { return 0; }
+int codec_init(void) { return 0; }
+int codec_start(void) { return 0; }
+int codec_stop(void) { return 0; }
#else
#ifndef AUDIO_INTERNAL_CD_IN
@@ -805,6 +818,7 @@ static int ctl_fd = -1;
static int port = AUDIO_LINE_IN;
int internal_audio = 1;
+int
codec_init( void )
{
int i;
@@ -873,9 +887,10 @@ codec_init( void )
foo.record.port = port;
foo.record.balance = foo.play.balance = AUDIO_MID_BALANCE;
#ifdef BUILD_CDDA
- if (d->cdda_slave > -1)
+/* FIXME: d is undeclared */
+/* if (d->cdda_slave > -1)
foo.monitor_gain = 0;
- else
+ else */
#endif
foo.monitor_gain = AUDIO_MAX_GAIN;
/*
@@ -893,7 +908,7 @@ codec_init( void )
return 0;
}
-static int
+int
kick_codec( void )
{
audio_info_t foo;
@@ -928,6 +943,7 @@ kick_codec( void )
return retval;
} /* kick_codec() */
+int
codec_start( void )
{
audio_info_t foo;
@@ -954,7 +970,7 @@ codec_start( void )
return 0;
} /* codec_start() */
-codec_stop( void ) { return 0; }
+int codec_stop( void ) { return 0; }
#endif /* CODEC } */
diff --git a/kscd/libwm/plat_sun_cdda.c b/kscd/libwm/plat_sun_cdda.c
index 54a7b9bb..c0ddd86e 100644
--- a/kscd/libwm/plat_sun_cdda.c
+++ b/kscd/libwm/plat_sun_cdda.c
@@ -39,6 +39,8 @@
#include <sys/ioctl.h>
#include <malloc.h>
#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
#define WM_MSG_CLASS WM_MSG_CLASS_PLATFORM
@@ -94,7 +96,7 @@ static long wmcdda_normalize(struct cdda_block *block);
* need to exit right away so the UI doesn't show the user any CDDA controls.
*/
int
-wmcdda_init(struct cdda_device* pdev, struct cdda_block *block)
+wmcdda_init(struct cdda_device* pdev)
{
struct cdrom_cdda cdda;
int i;
@@ -123,14 +125,14 @@ wmcdda_init(struct cdda_device* pdev, struct cdda_block *block)
if (ioctl(pdev->fd, CDROMCDDA, &cdda) < 0)
{
- block->status = WM_CDM_STOPPED;
+ pdev->status = WM_CDM_STOPPED;
return -1;
} else {
- block->status = WM_CDM_STOPPED;
+ pdev->status = WM_CDM_STOPPED;
return 0;
}
} else {
- block->status = WM_CDM_EJECTED;
+ pdev->status = WM_CDM_EJECTED;
return -1;
}
}
@@ -189,10 +191,10 @@ wmcdda_read(struct cdda_device* pdev, struct cdda_block *block)
struct cdrom_cdda cdda;
int blk;
unsigned char *q;
- extern int speed;
+ int speed; /* it should be extern but where exactly? */
unsigned char* rawbuf = block->buf;
- if(pdev->fd < 0 && (wmcdda_init(pdev, block) < 0)) {
+ if(pdev->fd < 0 && (wmcdda_init(pdev) < 0)) {
return -1;
}