On May 28, 2:51 pm, "Wei Dai" <[EMAIL PROTECTED]> wrote:
> It doesn't look like an official build of GCC 4.2 for MINGW is available. I
> do see an unofficial one athttp://www.thisiscool.com/gcc_mingw.htm#gcj42.
> Is that where you obtained your copy?
mingw's "official" builds seem to be stuck in purgatory;) while the
rest of the world has moved on. They have not released an official
build in almost 3 years. You can however try the candidate build (v
3.4.5) and you should be able to reproduce the problem. I didnt
download the 4.2 version from the link you mentioned as that is an old
build with one of the beta snapshots. I downloaded mine from here
http://forum.doom9.org/showthread.php?p=1004932. which is build from
the final release of 4.2 on may 13. This build supports multithreading
using OpenMP :). If the download link do not work please let me know
and i will upload it somewhere.

> The reason _mm_alloc is defined to be __mingw_aligned_malloc is that
> _mm_alloc doesn't exist in my build of GCC (3.4.2) for MINGW.
You are right, v3.4.2 does not define _mm_alloc at all. However v3.4.5
and above do. You can check if the following file exists.
C:\mingw\lib\gcc\i686-pc-mingw32\4.2.0\include\mm_malloc.h
Even in the latest gcc builds _mm_alloc is not defined in malloc.h .
It is only if you include one of the sse/sse2/sse3 headers emmintrin.h/
xmmintrin.h/pmmintrin.h , that _mm_alloc gets defined through
mm_malloc.h


>I'm not sure if either of your suggested fixes is backwards compatible.
You are right, they arent. I didnt bother to check with 3.4.2 or
older.

> The simplest fix would be to remove all of the following from config.h:
>
> #elif defined(__MINGW32__)
>  #if (CRYPTOPP_GCC_VERSION < 40100) && !defined(_mm_malloc)
>   #define _mm_malloc(a, b)    __mingw_aligned_malloc(a, b)
>   #define _mm_free(a)   __mingw_aligned_free(a)
>  #endif
>  #define CRYPTOPP_MM_MALLOC_AVAILABLE
>
> and just let the code in Crypto++ do the malloc alignment. Can you try that
> and let me know if it works?

Yup this works fine. This probably is the simplest fix as opposed to
version checking.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to