----
static int
timed_read (int fd, char *buf, int max, int timeout, int one_line)
{
fd_set rmask;
struct timeval tv; /* = {timeout, 0}; */
char c = 0;
int nbytes = 0;
int r;
tv.tv_sec = timeout;
tv.tv_usec = 0;
FD_ZERO(&rmask);
FD_SET(fd, &rmask);
do
{
r = select(fd + 1, &rmask, NULL, NULL, &tv);
----
gir:
/local/source/src/xemacs-20.4/lib-src/gnuserv.c:399: storage size of
`tv' isn't known
(nei, *egentlig* kan jeg ikke C).
--
Rolf Lindgren http://www.uio.no/~roffe/
ro...@ask.uio.no
> Fra xemacs 20.4, SunOS 4.1.3_U1:
>
> ----
> static int
> timed_read (int fd, char *buf, int max, int timeout, int one_line)
> {
> fd_set rmask;
> struct timeval tv; /* = {timeout, 0}; */
> char c = 0;
> int nbytes = 0;
> int r;
>
> tv.tv_sec = timeout;
> tv.tv_usec = 0;
>
> FD_ZERO(&rmask);
> FD_SET(fd, &rmask);
>
> do
> {
> r = select(fd + 1, &rmask, NULL, NULL, &tv);
> ----
>
> gir:
>
> /local/source/src/xemacs-20.4/lib-src/gnuserv.c:399: storage size of
> `tv' isn't known
Det hadde hjulpet å vite hvilken linje som er 399.
Har du husket å #include <sys/select.h> ?
Harald
"Harald Ljøen" <Blac...@NoSpam.damn.it> writes:
> Rolf Marvin B|e Lindgren wrote:
>
> > Fra xemacs 20.4, SunOS 4.1.3_U1:
> >
> > ----
> > static int
> > timed_read (int fd, char *buf, int max, int timeout, int one_line)
> > {
> > fd_set rmask;
> > struct timeval tv; /* = {timeout, 0}; */
> > char c = 0;
> > [...]
> >
> > gir:
> >
> > /local/source/src/xemacs-20.4/lib-src/gnuserv.c:399: storage size of
> > `tv' isn't known
>
> Det hadde hjulpet å vite hvilken linje som er 399.
>
> Har du husket å #include <sys/select.h> ?
Tja, struct timeval er av ukjent type, det kan vel ikke være
så mystisk?
struct timeval er (skal være¹) definert i sys/time.h, så en linje
`#include <sys/time.h>' i begynnelsen av gnuserv.c elns. skulle hjelpe.
¹) Se http://www.rdg.opengroup.org/onlinepubs/7908799/xsh/systime.h.html
Men jeg vet ikke om SunOS 4 (er ikke det et BSD-system?) sikter seg inn
mot denne spesifikasjonen.
TTFN,
--
Hans Peter Verne ( h...@kjemi.uio.no ) Phone: (+47) 22 85 54 14
Dept. of Chemistry, University of Oslo. Fax: (+47) 22 85 54 41
`It would seem that you have no useful skill or talent whatsoever,
have you thought of going into teaching?' -- Terry Pratchett, "Mort"
struct timeval er vanligvis definert i sys/time.h, men det kan tenkes
at SunOS 4.1.x har den et annet sted?
-Bjørn
--
Bjørn Borud <bo...@guardian.no> | "The Net interprets censorship
<URL:http://www.pvv.unit.no/~borud/> | as damage and routes around it."
UNIX person, one of "them" | - John Gilmore