<div dir="ltr">No idea. I was mainly trying to fix the format mismatch for fprintf + an uint64_t that ended up mired in cross-platform compatibility issues. I wasn't about to go mucking around in yet more areas I know nothing about (the build systems) just to fix a warning from a single fprintf statement in some new code that was causing some builds to break. I welcome someone who knows more about the build system or the involved compiler-rt code to provide a cleaner solution to the original problem and/or the subsequent changes I committed to make my original simple fix work on darwin.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 6, 2014 at 4:40 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hrm. Everything else in llvm already assumes that these are defined.<br>
Should the compiler-rt makefiles do the same?<br>
<span class="HOEnZb"><font color="#888888"><br>
-eric<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Mon, Jan 6, 2014 at 4:29 PM, Kaelyn Uhrain <<a href="mailto:rikka@google.com">rikka@google.com</a>> wrote:<br>
> Author: rikka<br>
> Date: Mon Jan  6 18:29:19 2014<br>
> New Revision: 198650<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=198650&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=198650&view=rev</a><br>
> Log:<br>
> Explicitly enable PRIu64 by defining __STDC_FORMAT_MACROS if it isn't<br>
> yet defined.<br>
><br>
> Modified:<br>
>     compiler-rt/trunk/lib/profile/PGOProfiling.c<br>
><br>
> Modified: compiler-rt/trunk/lib/profile/PGOProfiling.c<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/PGOProfiling.c?rev=198650&r1=198649&r2=198650&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/PGOProfiling.c?rev=198650&r1=198649&r2=198650&view=diff</a><br>

> ==============================================================================<br>
> --- compiler-rt/trunk/lib/profile/PGOProfiling.c (original)<br>
> +++ compiler-rt/trunk/lib/profile/PGOProfiling.c Mon Jan  6 18:29:19 2014<br>
> @@ -10,6 +10,12 @@<br>
>  #include <stdio.h><br>
>  #include <stdlib.h><br>
><br>
> +// Explicitly request that the format macros like PRIu64 be enabled if they<br>
> +// haven't already been enabled.<br>
> +#ifndef __STDC_FORMAT_MACROS<br>
> +#define __STDC_FORMAT_MACROS 1<br>
> +#endif<br>
> +<br>
>  #if !defined(__APPLE__)<br>
>  #include <inttypes.h><br>
>  #endif<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>