Commit 17e1289a authored by Michael Smith's avatar Michael Smith

configure.in: solaris requires -D_REENTRANT. What about other platforms?

source.c: fix bug in handling non-fatal errors like EAGAIN

svn path=/trunk/icecast/; revision=2225
parent c98a76eb
......@@ -17,9 +17,9 @@ if test -z "$GCC"; then
PROFILE="-p -g3 -O2 -signed"
;;
sparc-sun-solaris*)
DEBUG="-v -g"
CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc"
DEBUG="-v -g -D_REENTRANT"
CFLAGS="-xO4 -fast -w -fsimple -native -xcg92 -D_REENTRANT"
PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc -D_REENTRANT"
;;
*)
DEBUG="-g"
......@@ -35,9 +35,9 @@ else
PROFILE="-Wall -W -pg -g -O20 -ffast-math -fsigned-char -D_REENTRANT -D_GNU_SOURCE"
;;
sparc-sun-*)
DEBUG="-g -Wall -fsigned-char -mv8"
CFLAGS="-O20 -ffast-math -fsigned-char -mv8"
PROFILE="-pg -g -O20 -fsigned-char -mv8"
DEBUG="-g -Wall -fsigned-char -mv8 -D_REENTRANT"
CFLAGS="-O20 -ffast-math -fsigned-char -mv8 -D_REENTRANT"
PROFILE="-pg -g -O20 -fsigned-char -mv8 -D_REENTRANT"
;;
*)
DEBUG="-g -Wall -fsigned-char"
......
......@@ -190,7 +190,7 @@ void *source_main(void *arg)
client->con->error = 1;
} else {
printf("SOURCE: client had recoverable error...\n");
client->pos += sbytes;
client->pos += sbytes>0?sbytes:0;
/* put the refbuf back on top of the queue, since we didn't finish with it */
refbuf_queue_insert(&client->queue, abuf);
}
......@@ -220,7 +220,7 @@ void *source_main(void *arg)
client->con->error = 1;
} else {
printf("SOURCE: recoverable error %ld\n", bytes);
client->pos = sbytes;
client->pos = sbytes>0?sbytes:0;
refbuf_addref(refbuf);
refbuf_queue_insert(&client->queue, refbuf);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment