Add SunCC code path to GetAlignmentOf

It looks like GetAlignmentOf was returning the "UnsignedMin(4U, sizeof(T))" for SunCC. It was causing SIGBUSes on Sparc when T=word64. OpenCSW provided access to their build farm and we were able to test "__alignof__(T)" back to an early SunCC on Solaris 9.
This commit is contained in:
Jeffrey Walton 2018-07-21 06:29:20 -04:00
parent baff390f28
commit d4f86d7320
No known key found for this signature in database
GPG Key ID: B36AB348921B1838

2
misc.h
View File

@ -1058,6 +1058,8 @@ inline unsigned int GetAlignmentOf()
return __alignof(T);
#elif defined(__GNUC__)
return __alignof__(T);
#elif defined(__SUNPRO_CC)
return __alignof__(T);
#elif CRYPTOPP_BOOL_SLOW_WORD64
return UnsignedMin(4U, sizeof(T));
#else