Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

hvorfor virker ikke dette?

0 views
Skip to first unread message

Rolf Marvin B|e Lindgren

unread,
Apr 23, 1998, 3:00:00 AM4/23/98
to

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

(nei, *egentlig* kan jeg ikke C).

--
Rolf Lindgren http://www.uio.no/~roffe/
ro...@ask.uio.no

Harald Ljřen

unread,
Apr 24, 1998, 3:00:00 AM4/24/98
to

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;
> 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


Hans Peter Verne

unread,
Apr 24, 1998, 3:00:00 AM4/24/98
to

"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"

Bjorn Borud

unread,
Apr 25, 1998, 3:00:00 AM4/25/98
to

[Rolf Marvin B|e Lindgren <ro...@tag.uio.no>]

|
| /local/source/src/xemacs-20.4/lib-src/gnuserv.c:399: storage size of
| `tv' isn't known

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

0 new messages