pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/gmake/patches



Module Name:    pkgsrc
Committed By:   joerg
Date:           Thu Sep  8 22:46:58 UTC 2016

Added Files:
        pkgsrc/devel/gmake/patches: patch-main.c patch-makeint.h

Log Message:
Readd two forgotten patches.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.6 pkgsrc/devel/gmake/patches/patch-main.c
cvs rdiff -u -r0 -r1.5 pkgsrc/devel/gmake/patches/patch-makeint.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/devel/gmake/patches/patch-main.c
diff -u /dev/null pkgsrc/devel/gmake/patches/patch-main.c:1.6
--- /dev/null   Thu Sep  8 22:46:58 2016
+++ pkgsrc/devel/gmake/patches/patch-main.c     Thu Sep  8 22:46:58 2016
@@ -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.  */

Index: pkgsrc/devel/gmake/patches/patch-makeint.h
diff -u /dev/null pkgsrc/devel/gmake/patches/patch-makeint.h:1.5
--- /dev/null   Thu Sep  8 22:46:58 2016
+++ pkgsrc/devel/gmake/patches/patch-makeint.h  Thu Sep  8 22:46:58 2016
@@ -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