patch 8.0.0753: no size reports to a job running in a terminal

Problem:    A job running in a terminal does not get notified of changes in
            the terminal size.
Solution:   Use ioctl() and SIGWINCH to report the terminal size.
diff --git a/src/os_unix.c b/src/os_unix.c
index 4caf38b..f2ab7b1 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3918,6 +3918,44 @@
     return OK;
 }
 
+#if defined(FEAT_TERMINAL) || defined(PROTO)
+/*
+ * Report the windows size "rows" and "cols" to tty "fd".
+ */
+    int
+mch_report_winsize(int fd, int rows, int cols)
+{
+# ifdef TIOCSWINSZ
+    struct winsize	ws;
+
+    ws.ws_col = cols;
+    ws.ws_row = rows;
+    ws.ws_xpixel = cols * 5;
+    ws.ws_ypixel = rows * 10;
+    if (ioctl(fd, TIOCSWINSZ, &ws) == 0)
+    {
+	ch_log(NULL, "ioctl(TIOCSWINSZ) success");
+	return OK;
+    }
+    ch_log(NULL, "ioctl(TIOCSWINSZ) failed");
+# else
+#  ifdef TIOCSSIZE
+    struct ttysize	ts;
+
+    ts.ts_cols = cols;
+    ts.ts_lines = rows;
+    if (ioctl(fd, TIOCSSIZE, &ws) == 0)
+    {
+	ch_log(NULL, "ioctl(TIOCSSIZE) success");
+	return OK;
+    }
+    ch_log(NULL, "ioctl(TIOCSSIZE) failed");
+#  endif
+# endif
+    return FAIL;
+}
+#endif
+
 /*
  * Try to set the window size to Rows and Columns.
  */
@@ -5473,6 +5511,10 @@
 	sig = SIGINT;
     else if (STRCMP(how, "kill") == 0)
 	sig = SIGKILL;
+#ifdef SIGWINCH
+    else if (STRCMP(how, "winch") == 0)
+	sig = SIGWINCH;
+#endif
     else if (isdigit(*how))
 	sig = atoi((char *)how);
     else