Files
2026-08-09 10:47:07 +02:00

23 lines
781 B
C

/*
* <time.h> overlay for the MontaukOS git port.
*
* Adds the reentrant conversions on top of the libc's own <time.h>. The libc
* has localtime()/gmtime() with the usual static buffer; the _r forms below
* are thin wrappers that copy that buffer out. Single-threaded programs see
* no difference, and git is built NO_PTHREADS here, so there is no shared
* buffer to race over.
*
* Implementations in montauk-compat.c.
*/
#ifndef _MONTAUK_GIT_TIME_H_
#define _MONTAUK_GIT_TIME_H_
#include_next <time.h>
struct tm *localtime_r(const time_t *timep, struct tm *result);
struct tm *gmtime_r(const time_t *timep, struct tm *result);
char *ctime_r(const time_t *timep, char *buf);
char *asctime_r(const struct tm *tm, char *buf);
#endif /* _MONTAUK_GIT_TIME_H_ */