svn rev #21888: trunk/src/include/
raeburn@MIT.EDU
raeburn at MIT.EDU
Wed Feb 4 21:16:25 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=21888
Commit By: raeburn
Log Message:
ticket: 6364
subject: declare replacement [v]asprintf functions
target_version: 1.7
tags: pullup
If HAVE_VASPRINTF is not defined, make sure krb5int_{,v}asprintf
functions always get declared, applying the preprocessor conditional
test only to the GCC format attribute. If HAVE_VASPRINTF is defined,
don't declare them at all.
This fixes a bunch of function-not-declared warnings under Sun cc.
Changed Files:
U trunk/src/include/k5-platform.h
Modified: trunk/src/include/k5-platform.h
===================================================================
--- trunk/src/include/k5-platform.h 2009-02-05 01:49:21 UTC (rev 21887)
+++ trunk/src/include/k5-platform.h 2009-02-05 02:16:22 UTC (rev 21888)
@@ -912,15 +912,19 @@
#endif /* win32? */
#endif /* no vsnprintf */
+#ifndef HAVE_VASPRINTF
+
+extern int krb5int_vasprintf(char **, const char *, va_list)
#if !defined(__cplusplus) && (__GNUC__ > 2)
-extern int krb5int_vasprintf(char **, const char *, va_list)
- __attribute__((__format__(__printf__, 2, 0)));
+ __attribute__((__format__(__printf__, 2, 0)))
+#endif
+ ;
extern int krb5int_asprintf(char **, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+#if !defined(__cplusplus) && (__GNUC__ > 2)
+ __attribute__((__format__(__printf__, 2, 3)))
#endif
+ ;
-#ifndef HAVE_VASPRINTF
-
#define vasprintf krb5int_vasprintf
/* Assume HAVE_ASPRINTF iff HAVE_VASPRINTF. */
#define asprintf krb5int_asprintf
More information about the cvs-krb5
mailing list