Skip site navigation (1)Skip section navigation (2)
Date:      24 Jan 2003 20:38:59 -0500
From:      Joe Marcus Clarke <marcus@marcuscom.com>
To:        "Mezz bsdforums.org" <reigncracks@hotmail.com>
Cc:        FreeBSD GNOME Users <gnome@freebsd.org>
Subject:   Re: question about timeval in gaim-cvs..
Message-ID:  <1043458738.12343.6.camel@shumai.marcuscom.com>
In-Reply-To: <F85hW4jtTqQX6eZ02GN0000c153@hotmail.com>
References:  <F85hW4jtTqQX6eZ02GN0000c153@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-bvrAK6iA21hsXFKyFNqT
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Fri, 2003-01-24 at 20:13, Mezz bsdforums.org wrote:
> Today, I upgraded gaim-cvs and compile on my own. I got error by related=20
> with timeval like this..
>=20
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> BROKEN -I/usr/local/include -c proxy.c
> proxy.c: In function `gaim_gethostbyname_async':
> proxy.c:427: variable `tv' has initializer but incomplete type
> proxy.c:427: unknown field `tv_sec' specified in initializer
> proxy.c:427: warning: excess elements in struct initializer
> proxy.c:427: warning: (near initialization for `tv')
> proxy.c:427: unknown field `tv_usec' specified in initializer
> proxy.c:427: warning: excess elements in struct initializer
> proxy.c:427: warning: (near initialization for `tv')
> proxy.c:427: storage size of `tv' isn't known
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> So, I figured out to solve it by added "#include <sys/time.h>". My questi=
on=20
> is which way is better or correct?
>=20
> struct timeval tv =3D { .tv_sec =3D 40 , .tv_usec =3D 0 };

I've never used this syntax myself.

>=20
> or
>=20
> struct timeval tv;
> tv.tv_sec =3D 40;
> tv.tv_usec =3D 0;

This is what I'm more used to.

>=20
> The first one is what gaim-cvs has, so if second one is better then I can=
=20
> email to gaim about bug of forgot to add include sys/time.h and tweak (if=
=20
> need) the timeval part. I don't program anything in C, but able to guess =
in=20
> somehow. :-)

It's really up to the programmer.  However, getting them to check for,
and add sys/time.h if it exists is a good idea.

Joe

>=20
> Cheers,
> Mezz
>=20
> _________________________________________________________________
> Help STOP SPAM with the new MSN 8 and get 2 months FREE* =20
> http://join.msn.com/?page=3Dfeatures/junkmail
>=20
>=20
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-gnome" in the body of the message
--=20
PGP Key : http://www.marcuscom.com/pgp.asc

--=-bvrAK6iA21hsXFKyFNqT
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQA+Meqyb2iPiv4Uz4cRApVFAJsGBzeK17oUgbS0lRN8ARlmJdlYewCfUac6
DOv/edCFRVD8bMBRgFqukKw=
=LfVx
-----END PGP SIGNATURE-----

--=-bvrAK6iA21hsXFKyFNqT--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-gnome" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1043458738.12343.6.camel>