X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Ftime.h;h=3cc0d28ad923d4f6a66d62b707464a5e129ef3c0;hp=4cec647d9041919adc3c27c5eb88e6ab7fdadda9;hb=de05a2ac22d33bd7631f182143ecea6dd01d9406;hpb=4e30249643271212ba76bb62e3f7eacc99f62f8c diff --git a/include/time.h b/include/time.h index 4cec647d..3cc0d28a 100644 --- a/include/time.h +++ b/include/time.h @@ -18,11 +18,13 @@ extern "C" { #define __NEED_clock_t #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ + || defined(_BSD_SOURCE) #define __NEED_struct_timespec #define __NEED_clockid_t #define __NEED_timer_t #define __NEED_pid_t +#define __NEED_locale_t #endif #include @@ -56,7 +58,10 @@ char *ctime (const time_t *); #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ + || defined(_BSD_SOURCE) + +size_t strftime_l (char *, size_t, const char *, const struct tm *, locale_t); struct tm *gmtime_r (const time_t *, struct tm *); struct tm *localtime_r (const time_t *, struct tm *); @@ -85,7 +90,6 @@ int clock_settime (clockid_t, const struct timespec *); int clock_nanosleep (clockid_t, int, const struct timespec *, struct timespec *); int clock_getcpuclockid (pid_t, clockid_t *); -/* FIXME..?? */ struct sigevent; int timer_create (clockid_t, struct sigevent *, timer_t *); int timer_delete (timer_t); @@ -102,10 +106,15 @@ extern int daylight; extern long timezone; extern char *tzname[2]; extern int getdate_err; -extern struct tm *getdate (const char *); +struct tm *getdate (const char *); #endif +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +int stime(time_t *); +time_t timegm(struct tm *); +#endif + #ifdef __cplusplus } #endif