Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site noscvax.UUCP Path: utzoo!watmath!clyde!floyd!harpo!decvax!ittvax!dcdwest!sdcsvax!noscvax!sloane From: sloane@noscvax.UUCP Newsgroups: net.unix-wizards Subject: 4.2BSD ctime() arguments Message-ID: <398@noscvax.UUCP> Date: Mon, 9-Apr-84 16:54:04 EST Article-I.D.: noscvax.398 Posted: Mon Apr 9 16:54:04 1984 Date-Received: Wed, 11-Apr-84 07:18:15 EST Organization: Naval Ocean Systems Center Lines: 36 Whenever I use gmtime() lint complains about arguments, saying that the 1st argument to gmtime() is used inconsistently. I mucked about and found the following: from 'man ctime': struct tm *gmtime(clock); long *clock; from /usr/lib/lint/llib-lc: struct tm * gmtime(c) time_t *c {returns gmtime(c)} from /usr/include/sys/types.h: typedef int time_t; This seems to indicate that the argument to gmtime() should be of type time_t (according to llib-lc) which is an int (according to sys/types.h) rather than a long (as man ctime would lead one to believe). Compiling my program with the argument declared as an int both worked and stopped lint from complaining. Is the man page in error or am I hopelessly lost? And is it safe to use an int for the argument to gmtime()? Gary K. Sloane c/o Naval Ocean Systems Center COTD Building 1 Room B205 San Diego, California 92152 MILNET: sloane@nosc UUCP: ...{sdcsvax}!nosc-cc!sloane DDD: (619) 225-8401 x391