You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-admin/logrotate/files/logrotate-3.8.0-noasprintf....

56 lines
1.4 KiB

diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN logrotate-3.8.0.orig/config.c logrotate-3.8.0/config.c
--- logrotate-3.8.0.orig/config.c 2011-06-21 04:12:02.000000000 -0400
+++ logrotate-3.8.0/config.c 2011-07-12 13:47:36.274319050 -0400
@@ -41,39 +41,6 @@
#endif
#endif
-#if !defined(asprintf)
-#include <stdarg.h>
-
-int asprintf(char **string_ptr, const char *format, ...)
-{
- va_list arg;
- char *str;
- int size;
- int rv;
-
- va_start(arg, format);
- size = vsnprintf(NULL, 0, format, arg);
- size++;
- va_start(arg, format);
- str = malloc(size);
- if (str == NULL) {
- va_end(arg);
- /*
- * Strictly speaking, GNU asprintf doesn't do this,
- * but the caller isn't checking the return value.
- */
- fprintf(stderr, "failed to allocate memory\\n");
- exit(1);
- }
- rv = vsnprintf(str, size, format, arg);
- va_end(arg);
-
- *string_ptr = str;
- return (rv);
-}
-
-#endif
-
enum {
STATE_DEFAULT = 2,
STATE_SKIP_LINE = 4,
diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN logrotate-3.8.0.orig/logrotate.h logrotate-3.8.0/logrotate.h
--- logrotate-3.8.0.orig/logrotate.h 2011-06-21 04:12:02.000000000 -0400
+++ logrotate-3.8.0/logrotate.h 2011-07-12 13:47:38.949285608 -0400
@@ -66,8 +66,5 @@ extern int numLogs;
extern int debug;
int readAllConfigPaths(const char **paths);
-#if !defined(asprintf)
-int asprintf(char **string_ptr, const char *format, ...);
-#endif
#endif