Stripped down the library to something approaching the ANSI C minimum and replaced most of the header files, to provide a reasonably consistent base to work up from.
This commit is contained in:
@@ -3,28 +3,15 @@
|
||||
*/
|
||||
/* $Id$ */
|
||||
|
||||
#if !defined(_TIME_H)
|
||||
#ifndef _TIME_H
|
||||
#define _TIME_H
|
||||
|
||||
#define NULL ((void *)0)
|
||||
#include <stddef.h>
|
||||
|
||||
#if defined(__BSD4_2)
|
||||
#define CLOCKS_PER_SEC 1000000 /* ticks per second */
|
||||
#else
|
||||
#define CLOCKS_PER_SEC 60
|
||||
#endif /* __BSD4_2 */
|
||||
#define CLOCKS_PER_SEC 1000000
|
||||
|
||||
#if !defined(_SIZE_T)
|
||||
#define _SIZE_T
|
||||
typedef unsigned int size_t; /* type returned by sizeof */
|
||||
#endif /* _SIZE_T */
|
||||
|
||||
#if !defined(_TIME_T)
|
||||
#define _TIME_T
|
||||
typedef unsigned long time_t; /* type returned by TOD clock */
|
||||
#endif /* _TIME_T */
|
||||
|
||||
typedef unsigned long clock_t; /* type returned by real time clock */
|
||||
typedef unsigned long time_t; /* type returned by TOD clock */
|
||||
typedef unsigned long clock_t; /* type returned by real time clock */
|
||||
|
||||
struct tm {
|
||||
int tm_sec; /* seconds after the minute - [0, 59] */
|
||||
@@ -38,27 +25,20 @@ struct tm {
|
||||
int tm_isdst; /* Daylight Saving Time flag */
|
||||
};
|
||||
|
||||
clock_t clock(void);
|
||||
double difftime(time_t _time1, time_t _time0);
|
||||
time_t mktime(struct tm *_timeptr);
|
||||
time_t time(time_t *_timeptr);
|
||||
char *asctime(const struct tm *_timeptr);
|
||||
char *ctime(const time_t *_timer);
|
||||
struct tm *gmtime(const time_t *_timer);
|
||||
struct tm *localtime(const time_t *_timer);
|
||||
size_t strftime(char *_s, size_t _maxsize,
|
||||
extern clock_t clock(void);
|
||||
extern double difftime(time_t _time1, time_t _time0);
|
||||
extern time_t mktime(struct tm *_timeptr);
|
||||
extern time_t time(time_t *_timeptr);
|
||||
extern char* asctime(const struct tm *_timeptr);
|
||||
extern char* ctime(const time_t *_timer);
|
||||
extern struct tm* gmtime(const time_t *_timer);
|
||||
extern struct tm* localtime(const time_t *_timer);
|
||||
extern size_t strftime(char *_s, size_t _maxsize,
|
||||
const char *_format,
|
||||
const struct tm *_timeptr);
|
||||
|
||||
#if defined(__USG) || defined(_POSIX_SOURCE)
|
||||
/* Extensions not in the standard */
|
||||
|
||||
void tzset(void);
|
||||
#define ctime(t) asctime(localtime(t))
|
||||
|
||||
#if defined(__USG)
|
||||
extern long timezone;
|
||||
extern int daylight;
|
||||
extern char *tzname[2];
|
||||
#endif
|
||||
#endif /* __USG || _POSIX_SOURCE */
|
||||
|
||||
#endif /* _TIME_H */
|
||||
|
||||
Reference in New Issue
Block a user