don't do a strlen() if length is provided
[unix-history] / usr / src / include / time.h
index 2b8f29b..a82507f 100644 (file)
@@ -4,10 +4,32 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)time.h      5.5 (Berkeley) %G%
+ *     @(#)time.h      5.13 (Berkeley) %G%
  */
 
  */
 
-#include <sys/types.h>
+#ifndef _TIME_H_
+#define        _TIME_H_
+
+#include <machine/ansi.h>
+
+#ifndef        NULL
+#define        NULL    0
+#endif
+
+#ifdef _BSD_CLOCK_T_
+typedef        _BSD_CLOCK_T_   clock_t;
+#undef _BSD_CLOCK_T_
+#endif
+
+#ifdef _BSD_TIME_T_
+typedef        _BSD_TIME_T_    time_t;
+#undef _BSD_TIME_T_
+#endif
+
+#ifdef _BSD_SIZE_T_
+typedef        _BSD_SIZE_T_    size_t;
+#undef _BSD_SIZE_T_
+#endif
 
 struct tm {
        int     tm_sec;         /* seconds after the minute [0-60] */
 
 struct tm {
        int     tm_sec;         /* seconds after the minute [0-60] */
@@ -23,26 +45,27 @@ struct tm {
        char    *tm_zone;       /* timezone abbreviation */
 };
 
        char    *tm_zone;       /* timezone abbreviation */
 };
 
-#if __STDC__ || c_plusplus
-extern struct tm *gmtime(const time_t *);
-extern struct tm *localtime(const time_t *);
-extern time_t mktime(const struct tm *);
-extern time_t time(time_t *);
-extern double difftime(const time_t, const time_t);
-extern char *asctime(const struct tm *);
-extern char *ctime(const time_t *);
-extern char *timezone(int , int);
-extern void tzset(void);
-extern void tzsetwall(void);
-#else
-extern struct tm *gmtime();
-extern struct tm *localtime();
-extern time_t mktime();
-extern time_t time();
-extern double difftime();
-extern char *asctime();
-extern char *ctime();
-extern char *timezone();
-extern void tzset();
-extern void tzsetwall();
-#endif 
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+char *asctime __P((const struct tm *));
+clock_t clock __P((void));
+char *ctime __P((const time_t *));
+double difftime __P((time_t, time_t));
+struct tm *gmtime __P((const time_t *));
+struct tm *localtime __P((const time_t *));
+time_t mktime __P((struct tm *));
+size_t strftime __P((char *, size_t, const char *, const struct tm *));
+time_t time __P((time_t *));
+
+#ifndef _ANSI_SOURCE
+void tzset __P((void));
+#endif /* not ANSI */
+
+#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+char *timezone __P((int, int));
+void tzsetwall __P((void));
+#endif /* neither ANSI nor POSIX */
+__END_DECLS
+
+#endif /* !_TIME_H_ */