diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-02-24 01:28:21 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-02-24 01:28:21 (GMT) |
commit | f30e7608484d48ec9a3f3073f4b7a351a44d90a9 (patch) | |
tree | 48b306d35d39e00747cd3c32e8a6cf51c1d2ed82 /Utilities/cmxmlrpc/casprintf.h | |
parent | a8770ccc193371d19f16bad6e4cf7ef6932a4ad5 (diff) | |
download | CMake-f30e7608484d48ec9a3f3073f4b7a351a44d90a9.zip CMake-f30e7608484d48ec9a3f3073f4b7a351a44d90a9.tar.gz CMake-f30e7608484d48ec9a3f3073f4b7a351a44d90a9.tar.bz2 |
COMP: Several Windows fixes
Diffstat (limited to 'Utilities/cmxmlrpc/casprintf.h')
-rw-r--r-- | Utilities/cmxmlrpc/casprintf.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Utilities/cmxmlrpc/casprintf.h b/Utilities/cmxmlrpc/casprintf.h new file mode 100644 index 0000000..eab336a --- /dev/null +++ b/Utilities/cmxmlrpc/casprintf.h @@ -0,0 +1,19 @@ +#ifndef CASPRINTF_H_INCLUDED + +/* GNU_PRINTF_ATTR lets the GNU compiler check pm_message() and pm_error() + calls to be sure the arguments match the format string, thus preventing + runtime segmentation faults and incorrect messages. +*/ +#ifdef __GNUC__ +#define GNU_PRINTF_ATTR(a,b) __attribute__ ((format (printf, a, b))) +#else +#define GNU_PRINTF_ATTR(a,b) +#endif + +void GNU_PRINTF_ATTR(2,3) +casprintf(const char ** const retvalP, const char * const fmt, ...); + +void +strfree(const char * const string); + +#endif |