pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/gmake/patches Readd two forgotten patches.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/10cc9b1bcd99
branches:  trunk
changeset: 352193:10cc9b1bcd99
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Sep 08 22:46:58 2016 +0000

description:
Readd two forgotten patches.

diffstat:

 devel/gmake/patches/patch-main.c    |  30 ++++++++++++++++++++++++++++++
 devel/gmake/patches/patch-makeint.h |  19 +++++++++++++++++++
 2 files changed, 49 insertions(+), 0 deletions(-)

diffs (57 lines):

diff -r 027011ceb311 -r 10cc9b1bcd99 devel/gmake/patches/patch-main.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gmake/patches/patch-main.c  Thu Sep 08 22:46:58 2016 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-main.c,v 1.6 2016/09/08 22:46:58 joerg Exp $
+
+* [SV 43434] Handle NULL returns from ttyname().
+
+--- main.c.orig        2014-10-05 16:24:51.000000000 +0000
++++ main.c
+@@ -1401,13 +1401,18 @@ main (int argc, char **argv, char **envp
+ #ifdef HAVE_ISATTY
+     if (isatty (fileno (stdout)))
+       if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMOUT")))
+-        define_variable_cname ("MAKE_TERMOUT", TTYNAME (fileno (stdout)),
+-                               o_default, 0)->export = v_export;
+-
++        {
++          const char *tty = TTYNAME (fileno (stdout));
++          define_variable_cname ("MAKE_TERMOUT", tty ? tty : DEFAULT_TTYNAME,
++                                 o_default, 0)->export = v_export;
++        }
+     if (isatty (fileno (stderr)))
+       if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMERR")))
+-        define_variable_cname ("MAKE_TERMERR", TTYNAME (fileno (stderr)),
+-                               o_default, 0)->export = v_export;
++        {
++          const char *tty = TTYNAME (fileno (stderr));
++          define_variable_cname ("MAKE_TERMERR", tty ? tty : DEFAULT_TTYNAME,
++                                 o_default, 0)->export = v_export;
++        }
+ #endif
+ 
+   /* Reset in case the switches changed our minds.  */
diff -r 027011ceb311 -r 10cc9b1bcd99 devel/gmake/patches/patch-makeint.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gmake/patches/patch-makeint.h       Thu Sep 08 22:46:58 2016 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-makeint.h,v 1.5 2016/09/08 22:46:58 joerg Exp $
+
+* [SV 43434] Handle NULL returns from ttyname().
+
+--- makeint.h.orig     2014-10-05 16:24:51.000000000 +0000
++++ makeint.h
+@@ -424,10 +424,11 @@ extern struct rlimit stack_limit;
+ /* The number of bytes needed to represent the largest integer as a string.  */
+ #define INTSTR_LENGTH         CSTRLEN ("18446744073709551616")
+ 
++#define DEFAULT_TTYNAME "true"
+ #ifdef HAVE_TTYNAME
+ # define TTYNAME(_f) ttyname (_f)
+ #else
+-# define TTYNAME(_f) "true"
++# define TTYNAME(_f) DEFAULT_TTYNAME
+ #endif
+ 
+ 



Home | Main Index | Thread Index | Old Index