home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.minix
- Path: sparky!uunet!email!hp
- From: hp@vmars.tuwien.ac.at (Peter Holzer)
- Subject: Re: Question init.c <--> /etc/utmp
- Message-ID: <1992Aug27.120305.1001@email.tuwien.ac.at>
- Keywords: init login utmp wtmp
- Sender: news@email.tuwien.ac.at
- Nntp-Posting-Host: quasi.vmars.tuwien.ac.at
- Organization: Technical University Vienna, Dept. for Realtime Systems, AUSTRIA
- References: <1992Aug25.135457.26129@walter.cray.com> <meulenbr.714819852@cstw168> <8341@sirius.ucs.adelaide.edu.au>
- Date: Thu, 27 Aug 1992 12:03:05 GMT
- Lines: 33
-
- newton@iagu.itd.adelaide.edu.au (Mark Newton) writes:
-
- >Actually, there is a need to change init to handle wtmp properly in the
- >Amiga MINIX Prentice-Hall distribution (and probably the other m68k
- >MINIXes as well).
-
- >There's a call to time() that looks something like "ut.ut_time = time()"
- >which doesn't work due to the fact that init.c doesn't #include <time.h>.
-
- Is init different on 68k and PC-Minix? Init.c on PC-Minix 1.5 _does_
- include <time.h> and the parameter is (time_t *)0, so there is no
- problem.
-
- >The compiler thinks, "Duh! time() hasn't been prototyped, so I'll
- >assume that it returns an int!" when it should be returning a long.
- >m68k byte ordering no doubt makes it work properly under PC MINIX,
- >but the 68000 version of the ACK compiler makes time() (and most other
- >functions, for that matter) return incorrect values if they're not
- >prototyped.
-
- Byte ordering has nothing to do with that. The upper 16 bits of the
- return value are simply discarded, and the resulting value is sign
- extended by the assignment to a long. Both PC-Minix and 68k-Minix
- should deliver the same resultsvalue are simply discarded, and the resulting value is sign
- extended by the assignment to a long. Both PC-Minix and 68k-Minix
- should deliver the same results.
-
- Peter
- --
- | _ | Peter J. Holzer | Think of it |
- | |_|_) | Technical University Vienna | as evolution |
- | | | | Dept. for Real-Time Systems | in action! |
- | __/ | hp@vmars.tuwien.ac.at | Tony Rand |
-