mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
ff77f2a6af
- This change fixes a bug that allowed unbuffered printf() output (to streams like stderr) to be truncated. This regression was introduced some time between now and the last release. - POSIX specifies all functions as thread safe by default. This change works towards cleaning up our use of the @threadsafe / @threadunsafe documentation annotations to reflect that. The goal is (1) to use @threadunsafe to document functions which POSIX say needn't be thread safe, and (2) use @threadsafe to document functions that we chose to implement as thread safe even though POSIX didn't mandate it. - Tidy up the clock_gettime() implementation. We're now trying out a cleaner approach to system call support that aims to maintain the Linux errno convention as long as possible. This also fixes bugs that existed previously, where the vDSO errno wasn't being translated properly. The gettimeofday() system call is now a wrapper for clock_gettime(), which reduces bloat in apps that use both. - The recently-introduced improvements to the execute bit on Windows has had bugs fixed. access(X_OK) on a directory on Windows now succeeds. fstat() will now perform the MZ/#! ReadFile() operation correctly. - Windows.h is no longer included in libc/isystem/, because it confused PCRE's build system into thinking Cosmopolitan is a WIN32 platform. Cosmo's Windows.h polyfill was never even really that good, since it only defines a subset of the subset of WIN32 APIs that Cosmo defines. - The setlongerjmp() / longerjmp() APIs are removed. While they're nice APIs that are superior to the standardized setjmp / longjmp functions, they weren't superior enough to not be dead code in the monorepo. If you use these APIs, please file an issue and they'll be restored. - The .com appending magic has now been removed from APE Loader.
32 lines
877 B
C
32 lines
877 B
C
#ifndef COSMOPOLITAN_LIBC_TIME_TIME_H_
|
|
#define COSMOPOLITAN_LIBC_TIME_TIME_H_
|
|
|
|
#define TIME_UTC 1
|
|
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
COSMOPOLITAN_C_START_
|
|
|
|
extern char *tzname[2];
|
|
extern long timezone;
|
|
extern int daylight;
|
|
|
|
char *ctime(const int64_t *);
|
|
char *ctime_r(const int64_t *, char[hasatleast 26]);
|
|
double difftime(int64_t, int64_t) pureconst;
|
|
int64_t posix2time(int64_t) pureconst;
|
|
int64_t time2posix(int64_t) pureconst;
|
|
int stime(const int64_t *);
|
|
void tzset(void);
|
|
|
|
#ifdef _COSMO_SOURCE
|
|
extern const char kWeekdayNameShort[7][4];
|
|
extern const char kWeekdayName[7][10];
|
|
extern const char kMonthNameShort[12][4];
|
|
extern const char kMonthName[12][10];
|
|
extern const unsigned short kMonthYearDay[2][12];
|
|
void RefreshTime(void);
|
|
#endif /* _COSMO_SOURCE */
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_LIBC_TIME_TIME_H_ */
|