1
0
mirror of https://github.com/git/git.git synced 2024-10-02 08:51:27 +02:00

Merge branch 'js/ming-strftime'

* js/ming-strftime:
  mingw: abort on invalid strftime formats
This commit is contained in:
Junio C Hamano 2018-03-21 11:30:14 -07:00
commit 4c5dbf1c14
2 changed files with 14 additions and 0 deletions

@ -761,6 +761,17 @@ revert_attrs:
return rc;
}
#undef strftime
size_t mingw_strftime(char *s, size_t max,
const char *format, const struct tm *tm)
{
size_t ret = strftime(s, max, format, tm);
if (!ret && errno == EINVAL)
die("invalid strftime format: '%s'", format);
return ret;
}
unsigned int sleep (unsigned int seconds)
{
Sleep(seconds*1000);

@ -361,6 +361,9 @@ int mingw_fstat(int fd, struct stat *buf);
int mingw_utime(const char *file_name, const struct utimbuf *times);
#define utime mingw_utime
size_t mingw_strftime(char *s, size_t max,
const char *format, const struct tm *tm);
#define strftime mingw_strftime
pid_t mingw_spawnvpe(const char *cmd, const char **argv, char **env,
const char *dir,