The <sys/time.h> header file prototypes it asQuote:>Solaris 2.4 (have to tryed with 2.3) gives back an error of
>two few argumants when using gettimeofday(struct timeval *tp)
>when using CC
int gettimeofday(struct timeval *, void *);
and requires two arguments.
There's a bit of history behind this. "gettimeofday()" first appeared
in 4.2BSD; it took two arguments there, a "struct timeval *" and a
"struct timezone *", and, if an argument was non-NULL, it filled in the
structure to which it pointed. The only way to get time zone
information in 4.2BSD was to get it with "gettimeofday()" (or something
that used "gettimeofday()"; the second argument had to be non-NULL in
calls to get time zone information.
In System V, you get time zone information by calling "tzset()" and
fetching it from various global variables; SVR4 picked up
"gettimeofday()", but changed its calling sequence so that it only took
*one* argument, and didn't give back time zone information.
They prototyped it as
int gettimeofday(struct timeval *);
rather than
int gettimeofday(struct timeval *, ...);
which meant that BSDish calls would get compiler errors.
The group working on the "Single UNIX spec" put a bunch of BSDisms into
the spec, to make it easier to port BSDish code to systems implementing
the Single UNIX spec; one such BSDism was the notion of "gettimeofday()"
taking two arguments, although I think the Single UNIX spec says that
one should *ALWAYS* pass a NULL pointer as the second argument, and that
one has no guarantee whatsoever that such an OS will bother to fill in a
"struct timezone" whose address is passed as a second argument.
The bug is in the man page.Quote:>Solaris 2.4 (have to tryed with 2.3) gives back an error of
>two few argumants when using gettimeofday(struct timeval *tp)
>when using CC
If you check /usr/include/sys/time.h you'll find:
int gettimeofday(struct timeval *, void *) ;
I think the second argument used to be : struct timezone *.
In any case you can just make it NULL, and everything will work fine.
1. 3C507-TP (EtherLink 16 TP) ???
So, has anyone here gotten this card (3C507-TP EtherLink 16 TP) to
work? I tried it on 2.2.7, then upgraded with my 2.2.8 subscription
CD, but still I get:
Dec 23 21:05:12 /kernel: ie0: unknown board_id: f000
Dec 23 21:05:12 /kernel: ie0 not found at 0x300
I even tried changing the '0x300' entry to '0x360' as seen in LINT
(without changing the irq entry), but still the device is unknown:
Dec 23 22:20:19 /kernel: ie0: unknown board_id: f000
Dec 23 22:20:19 /kernel: ie0 not found at 0x360
The cards are both printed and stamped with the above 3Com
identifiers (3C507-TP / EtherLink 16 TP).
Any suggestions?
It should work, right?
Please Advise.
Barry Masterson
--
FreeBSD 2.2.8
<---<---<---<---<---<
3. gettimeofday prototype in /usr/include/sys/time.h on Solaris 2.4
4. Need help with nic ... please
5. gettimeofday Multi-thread, Linux RH7.2, libc2.2.4
7. calling value from timeval struct
8. Help: Cirrus Logic cl6420 chipset config
9. incomplete struct/union/enum timeval: ru_utime
10. a question about struct "timeval"
11. How to access seconds field in struct timeval
12. hrtime_t -> struct timeval