preload-hacks: Some patches to make it work.
[termux-packages] / packages / coreutils / src-ls.c.patch
index 989acb4..1109184 100644 (file)
@@ -1,18 +1,13 @@
-diff -u -r ../coreutils-8.22/src/ls.c ./src/ls.c
---- ../coreutils-8.22/src/ls.c 2013-12-04 15:48:30.000000000 +0100
-+++ ./src/ls.c 2014-02-14 16:11:48.000000000 +0100
-@@ -2098,11 +2089,13 @@
-             }
-         }
-
-+#ifndef __ANDROID__
-       /* Note we leave %5b etc. alone so user widths/flags are honored.  */
-       if (strstr (long_time_format[0], "%b")
-           || strstr (long_time_format[1], "%b"))
-         if (!abmon_init ())
-           error (0, 0, _("error initializing month strings"));
-+#endif
-     }
-
-   return optind;
-
+diff -u -r ../coreutils-8.26/src/ls.c ./src/ls.c
+--- ../coreutils-8.26/src/ls.c 2016-11-22 15:04:32.000000000 -0500
++++ ./src/ls.c 2016-11-30 20:27:28.910732105 -0500
+@@ -1749,6 +1749,9 @@
+       }
+   }
++  /* Termux patch: Default to colors if terminal. The --color option may override this. */
++  print_with_color = isatty(STDOUT_FILENO);
++
+   while (true)
+     {
+       int oi = -1;