casprintf.h 511 B

12345678910111213141516171819
  1. #ifndef CASPRINTF_H_INCLUDED
  2. /* GNU_PRINTF_ATTR lets the GNU compiler check pm_message() and pm_error()
  3. calls to be sure the arguments match the format string, thus preventing
  4. runtime segmentation faults and incorrect messages.
  5. */
  6. #ifdef __GNUC__
  7. #define GNU_PRINTF_ATTR(a,b) __attribute__ ((format (printf, a, b)))
  8. #else
  9. #define GNU_PRINTF_ATTR(a,b)
  10. #endif
  11. void GNU_PRINTF_ATTR(2,3)
  12. casprintf(const char ** const retvalP, const char * const fmt, ...);
  13. void
  14. strfree(const char * const string);
  15. #endif