print/a2ps: fix build with clang buildins

This commit is contained in:
Dirk Meyer 2021-07-28 07:51:52 +02:00
parent cfe15eaebe
commit 70984f1ada
6 changed files with 21 additions and 11 deletions

View file

@ -1,6 +1,6 @@
--- lib/options.c.orig 1999-08-31 17:42:41 UTC --- lib/options.c.orig 1999-08-31 17:42:41 UTC
+++ lib/options.c +++ lib/options.c
@@ -493,6 +493,15 @@ a2ps_handle_options (a2ps_job * job, int @@ -493,6 +493,15 @@ a2ps_handle_options (a2ps_job * job, int argc, char *a
/* A font size is given */ /* A font size is given */
job->fontsize = get_length ("--font-size", cp, job->fontsize = get_length ("--font-size", cp,
0.0, 0.0, "pt", range_min_strict); 0.0, 0.0, "pt", range_min_strict);

View file

@ -1,8 +1,6 @@
Fix for CVE-2015-8107
http://www.openwall.com/lists/oss-security/2015/11/16/4
--- lib/output.c.orig 1999-08-31 17:42:41 UTC --- lib/output.c.orig 1999-08-31 17:42:41 UTC
+++ lib/output.c 2015-11-18 07:08:31.672864000 +0100 +++ lib/output.c
@@ -525,7 +525,7 @@ @@ -525,7 +525,7 @@ output_file (struct output * out, a2ps_job * job,
expand_user_string (job, FIRST_FILE (job), expand_user_string (job, FIRST_FILE (job),
(const uchar *) "Expand: requirement", (const uchar *) "Expand: requirement",
(const uchar *) token)); (const uchar *) token));

View file

@ -0,0 +1,11 @@
--- lib/path-concat.c.orig 1999-10-10 18:34:46 UTC
+++ lib/path-concat.c
@@ -31,7 +31,7 @@
#endif
#include <sys/types.h>
-char *malloc ();
+#include <stdlib.h>
#ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/'

View file

@ -1,6 +1,6 @@
--- lib/printers.c.orig 1999-10-11 22:01:59 UTC --- lib/printers.c.orig 1999-10-11 22:01:59 UTC
+++ lib/printers.c +++ lib/printers.c
@@ -315,8 +315,8 @@ a2ps_printers_new (struct a2ps_common_s @@ -315,8 +315,8 @@ a2ps_printers_new (struct a2ps_common_s * common)
res->ppd = NULL; /* Printer's ppd are not read yet */ res->ppd = NULL; /* Printer's ppd are not read yet */
/* Output */ /* Output */

View file

@ -1,6 +1,6 @@
--- lib/printlen.c.orig 1999-08-31 17:42:42 UTC --- lib/printlen.c.orig 1999-08-31 17:42:42 UTC
+++ lib/printlen.c +++ lib/printlen.c
@@ -28,14 +28,11 @@ Foundation, Inc., 59 Temple Place - Suit @@ -28,15 +28,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston,
unsigned long strtoul (); unsigned long strtoul ();
static int static int
@ -11,12 +11,13 @@
int total_width = 0; int total_width = 0;
int width = 0; int width = 0;
- va_list ap; - va_list ap;
-
- memcpy (&ap, args, sizeof (va_list));
- memcpy (&ap, args, sizeof (va_list));
-
for (cp = format ; *cp ; cp++) for (cp = format ; *cp ; cp++)
{ {
@@ -99,7 +96,7 @@ int_printflen (const char *format, va_li if (*cp != '%')
@@ -99,7 +96,7 @@ int_printflen (const char *format, va_list *args)
int int
vprintflen (const char *format, va_list args) vprintflen (const char *format, va_list args)
{ {

View file

@ -1,6 +1,6 @@
--- lib/title.c.orig 1999-08-28 16:54:19 UTC --- lib/title.c.orig 1999-08-28 16:54:19 UTC
+++ lib/title.c +++ lib/title.c
@@ -88,6 +88,8 @@ title (stream, c, center_p, format, va_a @@ -88,6 +88,8 @@ title (stream, c, center_p, format, va_alist)
if (center_p) if (center_p)
for (padding = 0 ; padding < 79 - len ; padding += 2) for (padding = 0 ; padding < 79 - len ; padding += 2)
putc (' ', stream); putc (' ', stream);