summaryrefslogtreecommitdiffstats
path: root/src/windows/kfwlogon/kfwlogon.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2007-06-20 01:09:10 +0000
committerKen Raeburn <raeburn@mit.edu>2007-06-20 01:09:10 +0000
commitd275e06d0cb0f248aa54a6f134a59f84aa563e14 (patch)
tree908926aa3d5f3be981ceb9b6d6081d07d9f65cef /src/windows/kfwlogon/kfwlogon.c
parent4711fe7c1cd4761c893c371b84757d6bfcda82e8 (diff)
downloadkrb5-d275e06d0cb0f248aa54a6f134a59f84aa563e14.tar.gz
krb5-d275e06d0cb0f248aa54a6f134a59f84aa563e14.tar.xz
krb5-d275e06d0cb0f248aa54a6f134a59f84aa563e14.zip
provide asprintf functionality for internal use
I plan to use asprintf in some gssapi error-message management routines, so let's make sure we have the functionality available, implementing it locally if necessary. This implementation assumes vsnprintf is available, an assumption that the support library is already making at the moment. Since this implementation requires calling vsnprintf potentially multiple times with the same va_list, use va_copy if it's available, or provide a hack version (which should work okay if va_list is a scalar or array type that requires no other special handling, and if va_end does nothing interesting, which is usually the case) if the compiler doesn't provide it. I also changed a couple bits of code to use asprintf, to make sure we exercise our implementation in testing. (C99 requires vsnprintf and va_copy; vasprintf is a GNU/BSD extension, but an oh so useful one....) * configure.in: Check for va_copy, or if va_list objects can be simply assigned. Define HAS_VA_COPY and CAN_COPY_VA_LIST as appropriate. * include/k5-platform.h: Define a va_copy macro if the compiler doesn't provide it. * include/k5-platform.h: If vsnprintf isn't available from the OS, abort compilation. If vasprintf isn't available from the OS, provide k5_{v,}asprintf based on vsnprintf and define {v,}asprintf macros. * lib/krb5/keytab/t_keytab.c (do_test): Use asprintf. * util/support/errors.c (krb5int_vset_error): Use asprintf unconditionally. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19595 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows/kfwlogon/kfwlogon.c')
0 files changed, 0 insertions, 0 deletions