- fix: --excludepath was broken (#24434).
- fix: s390 (and ppc?) could return CPIOERR_BAD_HEADER (#28645).
- fix: Fwrite's are optimized out by aggressive compiler(irix) (#34711).
+ - portability: vsnprintf/snprintf wrappers for those without (#34657).
4.0 -> 4.0.[12]
- add doxygen and lclint annotations most everywhere.
dnl Better not use fchmod at all.
AC_CHECK_FUNC(fchmod)
+AC_CHECK_FUNCS(vsnprintf snprintf)
+
dnl Temporary hack for MiNT. Some functions (writev, snprintf) are
dnl not in the libc but in libport (for political reasons). This check
dnl can hopefully be removed soon. Please use the default action
}
}
+#if !defined(HAVE_VSNPRINTF)
+static inline int vsnprintf(char * buf, /*@unused@*/ int nb,
+ const char * fmt, va_list ap)
+{
+ return vsprintf(buf, fmt, ap);
+}
+#endif
+#if !defined(HAVE_SNPRINTF)
+static inline int snprintf(char * buf, int nb, const char * fmt, ...)
+{
+ va_list ap;
+ int rc;
+ va_start(ap, fmt);
+ rc = vsnprintf(buf, nb, fmt, ap);
+ va_end(ap);
+ return rc;
+}
+#endif
+
const char * rpmProblemString(rpmProblem prob) /*@*/
{
int nb = (prob->pkgNEVR ? strlen(prob->pkgNEVR) : 0) +
"D: ", /*!< RPMLOG_DEBUG */
};
+#if !defined(HAVE_VSNPRINTF)
+static inline int vsnprintf(char * buf, /*@unused@*/ int nb,
+ const char * fmt, va_list ap)
+{
+ return vsprintf(buf, fmt, ap);
+}
+#endif
+
static void vrpmlog (unsigned code, const char *fmt, va_list ap)
{
int pri = RPMLOG_PRI(code);