]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
stdio-common/tst-printf.c: Remove part under a non-free license [BZ #23363]
authorFlorian Weimer <fweimer@redhat.com>
Tue, 3 Jul 2018 16:34:26 +0000 (18:34 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 3 Jul 2018 16:34:26 +0000 (18:34 +0200)
The license does not allow modification.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit 5a357506659f9a00fcf5bc9c5d8fc676175c89a7)

ChangeLog
LICENSES
NEWS
stdio-common/tst-printf.c
stdio-common/tst-printf.sh

index 7a700da223834af1b47f44193f22a55ff7e37c97..f6933f6e8ad2e51cbdbe7fdd2d70308c10f02a05 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-07-03  Florian Weimer  <fweimer@redhat.com>
+
+       [BZ #23363]
+       * stdio-common/tst-printf.c (DEC, INT, UNS, fp_test): Remove.
+       * stdio-common/tst-printf.sh: Adjust expected output.
+       * LICENSES: Update.
+
 2018-06-26  Florian Weimer  <fweimer@redhat.com>
 
        * libio/Makefile (tests-internal): Add tst-vtables,
index 80f7f1487947f57815b9fe076fadc8c7f94eeb8e..858076d9d3b8f8fb1db441e29b59cb332e0a169f 100644 (file)
--- a/LICENSES
+++ b/LICENSES
@@ -441,15 +441,6 @@ Permission to use, copy, modify, and distribute this
 software is freely granted, provided that this notice
 is preserved.
 \f
-Part of stdio-common/tst-printf.c is copyright C E Chew:
-
-(C) Copyright C E Chew
-
-Feel free to copy, use and distribute this software provided:
-
-     1. you do not pretend that you wrote it
-     2. you leave this copyright notice intact.
-\f
 Various long double libm functions are copyright Stephen L. Moshier:
 
 Copyright 2001 by Stephen L. Moshier <moshier@na-net.ornl.gov>
diff --git a/NEWS b/NEWS
index c0b9398e8377d2363bb2ab932f11a8b50e630d51..fa6218105ac9e279fddcd82981af7c09aeded1de 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -146,6 +146,7 @@ The following bugs are resolved with this release:
   [23236] Harden function pointers in _IO_str_fields
   [23313] libio: Disable vtable validation in case of interposition
   [23349] Various glibc headers no longer compatible with <linux/time.h>
+  [23363] stdio-common/tst-printf.c has non-free license
 \f
 Version 2.26
 
index b6d62a5a2f840db64948f88a98346a05282422b4..9829e3ec6a9914aec7b1c4e3ab0556e406bc6f4b 100644 (file)
@@ -69,75 +69,7 @@ fmtst2chk (const char *fmt)
   (void) printf(fmt, 4, 4, 0x12);
   (void) printf("'\n");
 }
-\f
-/* This page is covered by the following copyright: */
-
-/* (C) Copyright C E Chew
- *
- * Feel free to copy, use and distribute this software provided:
- *
- *     1. you do not pretend that you wrote it
- *     2. you leave this copyright notice intact.
- */
-
-/*
- * Extracted from exercise.c for glibc-1.05 bug report by Bruce Evans.
- */
 
-#define DEC -123
-#define INT 255
-#define UNS (~0)
-
-/* Formatted Output Test
- *
- * This exercises the output formatting code.
- */
-
-static void
-fp_test (void)
-{
-  int i, j, k, l;
-  char buf[7];
-  char *prefix = buf;
-  char tp[20];
-
-  puts("\nFormatted output test");
-  printf("prefix  6d      6o      6x      6X      6u\n");
-  strcpy(prefix, "%");
-  for (i = 0; i < 2; i++) {
-    for (j = 0; j < 2; j++) {
-      for (k = 0; k < 2; k++) {
-       for (l = 0; l < 2; l++) {
-         strcpy(prefix, "%");
-         if (i == 0) strcat(prefix, "-");
-         if (j == 0) strcat(prefix, "+");
-         if (k == 0) strcat(prefix, "#");
-         if (l == 0) strcat(prefix, "0");
-         printf("%5s |", prefix);
-         strcpy(tp, prefix);
-         strcat(tp, "6d |");
-         printf(tp, DEC);
-         strcpy(tp, prefix);
-         strcat(tp, "6o |");
-         printf(tp, INT);
-         strcpy(tp, prefix);
-         strcat(tp, "6x |");
-         printf(tp, INT);
-         strcpy(tp, prefix);
-         strcat(tp, "6X |");
-         printf(tp, INT);
-         strcpy(tp, prefix);
-         strcat(tp, "6u |");
-         printf(tp, UNS);
-         printf("\n");
-       }
-      }
-    }
-  }
-  printf("%10s\n", (char *) NULL);
-  printf("%-10s\n", (char *) NULL);
-}
-\f
 static int
 do_test (void)
 {
@@ -235,8 +167,6 @@ I am ready for my first lesson today.";
            snprintf(buf2, sizeof(buf2), "%.999999u", 10));
   }
 
-  fp_test ();
-
   printf ("%e should be 1.234568e+06\n", 1234567.8);
   printf ("%f should be 1234567.800000\n", 1234567.8);
   printf ("%g should be 1.23457e+06\n", 1234567.8);
index c413980dd3552f9a4f8336210c9c50ea719fe85b..5948ca2ca329cbe3685114bf0efedb844d9d27e8 100644 (file)
@@ -103,27 +103,6 @@ something really insane: 1.00000000000000000000000000000000000000000000000000000
 | 123456.0000|  1.2346e+05|   1.235e+05|
 snprintf ("%30s", "foo") == 30, "                   "
 snprintf ("%.999999u", 10) == 999999
-
-Formatted output test
-prefix  6d      6o      6x      6X      6u
-%-+#0 |-123   |0377   |0xff   |0XFF   |4294967295 |
- %-+# |-123   |0377   |0xff   |0XFF   |4294967295 |
- %-+0 |-123   |377    |ff     |FF     |4294967295 |
-  %-+ |-123   |377    |ff     |FF     |4294967295 |
- %-#0 |-123   |0377   |0xff   |0XFF   |4294967295 |
-  %-# |-123   |0377   |0xff   |0XFF   |4294967295 |
-  %-0 |-123   |377    |ff     |FF     |4294967295 |
-   %- |-123   |377    |ff     |FF     |4294967295 |
- %+#0 |-00123 |000377 |0x00ff |0X00FF |4294967295 |
-  %+# |  -123 |  0377 |  0xff |  0XFF |4294967295 |
-  %+0 |-00123 |000377 |0000ff |0000FF |4294967295 |
-   %+ |  -123 |   377 |    ff |    FF |4294967295 |
-  %#0 |-00123 |000377 |0x00ff |0X00FF |4294967295 |
-   %# |  -123 |  0377 |  0xff |  0XFF |4294967295 |
-   %0 |-00123 |000377 |0000ff |0000FF |4294967295 |
-    % |  -123 |   377 |    ff |    FF |4294967295 |
-    (null)
-(null)    
 1.234568e+06 should be 1.234568e+06
 1234567.800000 should be 1234567.800000
 1.23457e+06 should be 1.23457e+06
@@ -219,27 +198,6 @@ something really insane: 1.00000000000000000000000000000000000000000000000000000
 | 123456.0000|  1.2346e+05|   1.235e+05|
 snprintf ("%30s", "foo") == 30, "                   "
 snprintf ("%.999999u", 10) == 999999
-
-Formatted output test
-prefix  6d      6o      6x      6X      6u
-%-+#0 |-123   |0377   |0xff   |0XFF   |4294967295 |
- %-+# |-123   |0377   |0xff   |0XFF   |4294967295 |
- %-+0 |-123   |377    |ff     |FF     |4294967295 |
-  %-+ |-123   |377    |ff     |FF     |4294967295 |
- %-#0 |-123   |0377   |0xff   |0XFF   |4294967295 |
-  %-# |-123   |0377   |0xff   |0XFF   |4294967295 |
-  %-0 |-123   |377    |ff     |FF     |4294967295 |
-   %- |-123   |377    |ff     |FF     |4294967295 |
- %+#0 |-00123 |000377 |0x00ff |0X00FF |4294967295 |
-  %+# |  -123 |  0377 |  0xff |  0XFF |4294967295 |
-  %+0 |-00123 |000377 |0000ff |0000FF |4294967295 |
-   %+ |  -123 |   377 |    ff |    FF |4294967295 |
-  %#0 |-00123 |000377 |0x00ff |0X00FF |4294967295 |
-   %# |  -123 |  0377 |  0xff |  0XFF |4294967295 |
-   %0 |-00123 |000377 |0000ff |0000FF |4294967295 |
-    % |  -123 |   377 |    ff |    FF |4294967295 |
-    (null)
-(null)    
 1.234568e+06 should be 1.234568e+06
 1234567.800000 should be 1234567.800000
 1.23457e+06 should be 1.23457e+06