This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.21-124-gfd1f2f1


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  fd1f2f1c3de842b84a0ee9667c3172b2169f1b10 (commit)
      from  d19df6ac5ace81ca8412f8bf160ae63f44f6f0cf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd1f2f1c3de842b84a0ee9667c3172b2169f1b10

commit fd1f2f1c3de842b84a0ee9667c3172b2169f1b10
Author: Roland McGrath <roland@hack.frob.com>
Date:   Wed Feb 25 15:55:08 2015 -0800

    Convert tst-iconv5 to use test-skeleton.

diff --git a/ChangeLog b/ChangeLog
index d35a29b..0f2d1d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2015-02-25  Roland McGrath  <roland@hack.frob.com>
 
+	* iconv/tst-iconv5.c (testcode, number): Make variables static const.
+	(convert): Make function static.
+	(test_unalign): Likewise.  Add const to argument pointee types.
+	(main): Replace with static function do_test.
+	Print "Succeeded." only if RET is zero.
+	(TEST_FUNCTION): New macro.
+	Include test-skeleton.c.
+
 	* iconv/gconv_conf.c (__gconv_get_path): Don't crash if __getcwd
 	returns a null pointer.
 
diff --git a/iconv/tst-iconv5.c b/iconv/tst-iconv5.c
index 6640ac9..b17e484 100644
--- a/iconv/tst-iconv5.c
+++ b/iconv/tst-iconv5.c
@@ -38,7 +38,7 @@ struct convcode
 };
 
 /* test builtin transformation */
-struct convcode testcode[] = {
+static const struct convcode testcode[] = {
   {"ASCII", "ASCII"},
   {"UTF-8", "ASCII"},
   {"UCS-2BE", "ASCII"},
@@ -47,9 +47,9 @@ struct convcode testcode[] = {
   {"UCS-4LE", "ASCII"},
 };
 
-int number = (int) sizeof (testcode) / sizeof (struct convcode);
+static const int number = (int) sizeof (testcode) / sizeof (struct convcode);
 
-int
+static int
 convert (const char *tocode, const char *fromcode, char *inbufp,
 	 size_t inbytesleft, char *outbufp, size_t outbytesleft)
 {
@@ -88,8 +88,8 @@ convert (const char *tocode, const char *fromcode, char *inbufp,
 }
 
 
-int
-test_unalign (struct convcode *codes, char *str, int len)
+static int
+test_unalign (const struct convcode *codes, const char *str, int len)
 {
   struct unalign *inbufp, *outbufp;
   char *inbuf, *outbuf;
@@ -137,8 +137,8 @@ test_unalign (struct convcode *codes, char *str, int len)
   return 0;
 }
 
-int
-main (int argc, char *argv[])
+static int
+do_test (void)
 {
   int i;
   int ret = 0;
@@ -151,7 +151,11 @@ main (int argc, char *argv[])
       printf ("iconv: %s <-> %s: ok\n",
 	      testcode[i].fromcode, testcode[i].tocode);
     }
-  printf ("Succeeded.\n");
+  if (ret == 0)
+    printf ("Succeeded.\n");
 
   return ret;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          |    8 ++++++++
 iconv/tst-iconv5.c |   20 ++++++++++++--------
 2 files changed, 20 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]