diff options
Diffstat (limited to 'libc/include')
-rw-r--r-- | libc/include/stdlib.h | 16 | ||||
-rw-r--r-- | libc/include/sys/cdefs.h | 3 | ||||
-rw-r--r-- | libc/include/sys/times.h | 21 | ||||
-rw-r--r-- | libc/include/time.h | 7 |
4 files changed, 47 insertions, 0 deletions
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h index f67984a..7831424 100644 --- a/libc/include/stdlib.h +++ b/libc/include/stdlib.h @@ -25,6 +25,22 @@ extern void srand __P ((unsigned int seed)); extern long strtol __P ((const char * nptr, char ** endptr, int base)); extern unsigned long strtoul __P ((const char * nptr, char ** endptr, int base)); +#ifndef __HAS_NO_FLOATS__ extern double strtod __P ((const char * nptr, char ** endptr)); +#endif + +/* Returned by `div'. */ +typedef struct + { + int quot; /* Quotient. */ + int rem; /* Remainder. */ + } div_t; + +/* Returned by `ldiv'. */ +typedef struct + { + long int quot; /* Quotient. */ + long int rem; /* Remainder. */ + } ldiv_t; #endif /* __STDLIB_H */ diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h index 366b0c6..0afc883 100644 --- a/libc/include/sys/cdefs.h +++ b/libc/include/sys/cdefs.h @@ -18,7 +18,10 @@ typedef long double __long_double_t; #define __STRING(x) "x" #define __ptr_t char * + +#ifndef __HAS_NO_FLOATS__ typedef double __long_double_t; +#endif #endif diff --git a/libc/include/sys/times.h b/libc/include/sys/times.h new file mode 100644 index 0000000..b6defa8 --- /dev/null +++ b/libc/include/sys/times.h @@ -0,0 +1,21 @@ +#ifndef _SYS_TIMES_H +#define _SYS_TIMES_H + +#include <features.h> +#include <sys/types.h> +#include <time.h> + +struct tms { + clock_t tms_utime; + clock_t tms_stime; + clock_t tms_cutime; + clock_t tms_cstime; +}; + +__BEGIN_DECLS + +extern clock_t times __P ((struct tms * __tp)); + +__END_DECLS + +#endif diff --git a/libc/include/time.h b/libc/include/time.h index b9eb87c..30ae4bc 100644 --- a/libc/include/time.h +++ b/libc/include/time.h @@ -30,6 +30,11 @@ struct tm { int tm_isdst; }; +struct timezone { + int tz_minuteswest; /* minutes west of Greenwich */ + int tz_dsttime; /* type of dst correction */ +}; + #define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) @@ -43,8 +48,10 @@ extern int stime __P ((time_t* __tptr)); extern clock_t clock __P ((void)); extern time_t time __P ((time_t * __tp)); +#ifndef __HAS_NO_FLOATS__ extern __CONSTVALUE double difftime __P ((time_t __time2, time_t __time1)) __CONSTVALUE2; +#endif extern time_t mktime __P ((struct tm * __tp)); extern char * asctime __P ((__const struct tm * __tp)); |