[cfe-dev] Trouble cross-compiling llvm/clang

NAKAMURA Takumi geek4civic at gmail.com
Sat Jun 23 03:15:00 PDT 2012


I wonder why msvc builders had not warn about strerror_s...

I have checked cmake-msvc chooses HAVE_DECL_STRERROR_S.

I will look into it later.

2012/6/23 Anton Korobeynikov <anton at korobeynikov.info>:
>> any hints?
> Sounds like a bug. Does the following fix the problem for you:
>
> Index: Errno.cpp
> ===================================================================
> --- Errno.cpp   (revision 157900)
> +++ Errno.cpp   (working copy)
> @@ -52,7 +52,7 @@
>  # endif
>  #elif HAVE_DECL_STRERROR_S // "Windows Secure API"
>     if (errnum)
> -      strerror_s(buffer, errnum);
> +      strerror_s(buffer, MaxErrStrLen-1, errnum);
>  #elif defined(HAVE_STRERROR)
>   // Copy the thread un-safe result of strerror into
>   // the buffer as fast as possible to minimize impact
>
> ?
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list