time(0L) - history of a misconception (was Re: SCO password generator)

Conor P. Cahill cpcahil at virtech.uucp
Thu May 23 05:09:08 AEST 1991


lothar at tmcsys.UUCP (L. Hirschbiegel) writes:

>Ever tried to RTFM for yourself? 
>If you still don't understand: I'll help you! 
>For this little test program:
>main()
>{
>time(0L);
>time((long *)0);
>}
>the assembler output from my C compiler is [the same for both.]
>Repeat after me: IT DOESN'T MATTER :-)

Boy, you just showed the world that you are a junior programmer who 
hasn't yet realized that just because something works on your system
doesn't mean it is right.  

The code you show won't work reliably on systems where the size of
a pointer is different from the size of an integer (for ex: large 
model programs on an 8086 or 80286). 

Before you jump on someone elses case, be sure you know what
you are talking about.
-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 



More information about the Comp.unix.sysv386 mailing list