From: Ken Raeburn Date: Thu, 28 Apr 2005 09:45:37 +0000 (+0000) Subject: * k5-int.h: Include fcntl.h only if HAVE_FCNTL_H is defined. X-Git-Tag: ms-bug-test-20060525~269 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b6da92b7a29028dfe5024f6cc312ebeab84fe2b1;p=krb5.git * k5-int.h: Include fcntl.h only if HAVE_FCNTL_H is defined. (krb5int_zap_data): For PalmOS without gcc, call memset but without the volatile cast. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17203 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/ChangeLog b/src/include/ChangeLog index a4430b90c..64e8de6f7 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,5 +1,9 @@ 2005-04-28 Ken Raeburn + * k5-int.h: Include fcntl.h only if HAVE_FCNTL_H is defined. + (krb5int_zap_data): For PalmOS without gcc, call memset but + without the volatile cast. + * port-sockets.h: On PalmOS, include autoconf.h and netdb.h, and define socklen_t. * socket-utils.h: Include k5-platform.h. diff --git a/src/include/k5-int.h b/src/include/k5-int.h index d32a44546..5c62c1476 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -462,7 +462,9 @@ extern char *strdup (const char *); friends */ #endif +#ifdef HAVE_FCNTL_H #include +#endif #endif /* KRB5_SYSINCL__ */ /* @@ -668,6 +670,10 @@ krb5_error_code krb5int_pbkdf2_hmac_sha1 (const krb5_data *, unsigned long, /* Make this a function eventually? */ #ifdef _WIN32 # define krb5int_zap_data(ptr, len) SecureZeroMemory(ptr, len) +#elif defined(__palmos__) && !defined(__GNUC__) +/* CodeWarrior 8.3 complains about passing a pointer to volatile in to + memset. On the other hand, we probably want it for gcc. */ +# define krb5int_zap_data(ptr, len) memset(ptr, 0, len) #else # define krb5int_zap_data(ptr, len) memset((volatile void *)ptr, 0, len) # if defined(__GNUC__) && defined(__GLIBC__)