Re: [PATCH] mingw: use modern strftime implementation if possible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Johannes Schindelin via GitGitGadget" <gitgitgadget@xxxxxxxxx>
writes:

> From: =?UTF-8?q?Matthias=20A=C3=9Fhauer?= <mha1993@xxxxxxx>
>
> Microsoft introduced a new "Universal C Runtime Library" (UCRT) with
> Visual Studio 2015. The UCRT comes with a new strftime() implementation
> that supports more date formats. We link git against the older
> "Microsoft Visual C Runtime Library" (MSVCRT), so to use the UCRT
> strftime() we need to load it from ucrtbase.dll using
> DECLARE_PROC_ADDR()/INIT_PROC_ADDR().
>
> Most supported Windows systems should have recieved the UCRT via Windows
> update, but in some cases only MSVCRT might be available. In that case
> we fall back to using that implementation.
>
> With this change, it is possible to use e.g. the `%g` and `%V` date
> format specifiers, e.g.
>
> 	git show -s --format=%cd --date=format:‘%g.%V’ HEAD
>
> Without this change, the user would see this error message on Windows:
>
> 	fatal: invalid strftime format: '‘%g.%V’'
>
> This fixes https://github.com/git-for-windows/git/issues/2495
>
> Signed-off-by: Matthias Aßhauer <mha1993@xxxxxxx>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx>
> ---
>     Use a modern strftime() on Windows when available
>     
>     This is another contribution that came in via Git for Windows.

Sure.  It would be very surprising if contribution to compat/mingw.c
came in via Git on Macintosh ;-)

Will apply, together with the other one.  Thanks.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux