]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
merge with 1.9a
authorJim Meyering <jim@meyering.net>
Mon, 15 Nov 1993 14:32:17 +0000 (14:32 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 15 Nov 1993 14:32:17 +0000 (14:32 +0000)
old/sh-utils/ChangeLog
old/sh-utils/NEWS
src/id.c
src/stty.c
src/who.c

index 6433924ba6fde400e0d6b39d0b543d04e52e951a..249f4d7a0d9bd8c673f2f28c93458e0624df0164 100644 (file)
@@ -1,3 +1,23 @@
+Sat Nov 13 00:11:19 1993  Jim Meyering  (meyering@comco.com)
+
+       * Version 1.9.1.
+
+       * configure.in [LIBS]: Add -lbsd if that is necessary to get the
+       syslog function.  With help from Kaveh Ghazi.
+
+Thu Nov 11 23:55:48 1993  Jim Meyering  (meyering@comco.com)
+
+       * id.c [NGROUPS_MAX]: Undefine before redefining.
+       From Kaveh R. Ghazi (ghazi@noc.rutgers.edu).
+
+       * who.c (list_entries): Trim any trailing blanks from ut_name
+       and make sure the string is NUL-terminated before printing it.
+       Before, `who -q' displayed 8-character names with a tty
+       (e.g. `q1') suffix.
+
+       * stty.c [CFLUSHO]: Move this definition so it follows the
+       one for VFLUSHO.
+
 Mon Nov 08 23:16:36 1993  Jim Meyering  (meyering@comco.com)
 
        * Version 1.9.
index ef4278c7cd00aa6c61bf12c20cfe49501cbbec23..4b3f4c3d5547bc17c5035b36f3b27e16e501ba21 100644 (file)
@@ -1,3 +1,7 @@
+Major changes in release 1.9.1:
+* stty can be built on Suns again
+* minor fix for who -q
+\f
 Major changes in release 1.9:
 * su fails gracefully when getpass is unable to open /dev/tty.
 * printenv and tty detect and report write errors
index a43921b93d7bd981298ba97d2d5a3599327c88a9..e5d12d16cfe364323f6307a6406532b92e768b92 100644 (file)
--- a/src/id.c
+++ b/src/id.c
@@ -42,6 +42,7 @@
 #ifdef _POSIX_VERSION
 #include <limits.h>
 #if !defined(NGROUPS_MAX) || NGROUPS_MAX < 1
+#undef NGROUPS_MAX
 #define NGROUPS_MAX sysconf (_SC_NGROUPS_MAX)
 #endif /* !NGROUPS_MAX */
 
index 07307ff37c0ce60b8ed0fd7a624a5497c8f4f97e..60f2ec9f1dff067af624bc3cda20625c00b7567b 100644 (file)
 #if defined(VLNEXT) && !defined(CLNEXT)
 #define        CLNEXT Control ('v')
 #endif
-#if defined(VFLUSHO) && !defined(CFLUSHO)
-#define CFLUSHO Control ('o')
-#endif
 #if defined(VDISCARD) && !defined(VFLUSHO)
 #define VFLUSHO VDISCARD
 #endif
+#if defined(VFLUSHO) && !defined(CFLUSHO)
+#define CFLUSHO Control ('o')
+#endif
 #if defined(VSTATUS) && !defined(CSTATUS)
 #define CSTATUS Control ('t')
 #endif
index f01da1b09568f7074e096812fe74ad46ec16b7a1..331937e08403252129fde69c5c16823a22e8cb92 100644 (file)
--- a/src/who.c
+++ b/src/who.c
@@ -327,7 +327,19 @@ list_entries (n)
 #endif
         )
        {
-         printf ("%s ", this->ut_name);
+         char trimmed_name[sizeof (this->ut_name) + 1];
+         int i;
+
+         strncpy (trimmed_name, this->ut_name, sizeof (this->ut_name));
+         trimmed_name[sizeof (this->ut_name)] = ' ';
+         for (i = 0; i <= sizeof (this->ut_name); i++)
+           {
+             if (trimmed_name[i] == ' ')
+               break;
+           }
+         trimmed_name[i] = '\0';
+
+         printf ("%s ", trimmed_name);
          entries++;
        }
       this++;