[krbdev.mit.edu #2883] 64-bit time_t issues

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[krbdev.mit.edu #2883] 64-bit time_t issues

Greg Hudson via RT
In order to ensure that we do not affect third party application
developers that wish to use 64-bit time_t on 32-bit Windows, we will
only define _USE_32BIT_TIME_T if win-mac.h is loaded by k5-int.h.   This
means that we must ensure that our library source files include k5-int.h
instead of krb5.h. (see ticket 3236)

The current change for win-mac.h now reads:

/* To ensure backward compatibility of the ABI use 32-bit time_t on
 * 32-bit Windows.
 */
#ifdef _KRB5_INT_H
#ifdef KRB5_GENERAL__
#error krb5.h included before k5-int.h
#endif /* KRB5_GENERAL__ */
#if _INTEGRAL_MAX_BITS >= 64 && _MSC_VER >= 1400 && !defined(_WIN64) &&
!defined(_USE_32BIT_TIME_T)
#if defined(_TIME_T_DEFINED) || defined(_INC_IO) || defined(_INC_TIME)
|| defined(_INC_WCHAR)
#error time_t has been defined as a 64-bit integer which is incompatible
with Kerberos on this platform.
#endif /* _TIME_T_DEFINED */
#define _USE_32BIT_TIME_T
#endif
#endif

and we also include the following check in krb5.h to ensure that krb5.h
is not loading win-mac.h before k5-int.h would have done so.

#ifdef KRB5_GENERAL__
#error krb5.h included before k5-int.h
#endif /* KRB5_GENERAL__ */


_______________________________________________
krb5-bugs mailing list
[hidden email]
https://mailman.mit.edu/mailman/listinfo/krb5-bugs