summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-06-09 18:22:25 +0200
committerJim Meyering <meyering@redhat.com>2010-06-10 15:16:51 +0200
commitdb74d417293e937ab171addd937b7b6c00d44444 (patch)
tree0fe8790cef6e3d582bc911ea5bf848427da4c56e /modules
parent47e899ad11a04647942b39dd501bfc2381e9b2f0 (diff)
downloadgnulib-db74d417293e937ab171addd937b7b6c00d44444.tar.gz
inttostr: add a new function, inttostr, and tests
The namesake function was not available. The existence of the template file, inttostr.c makes its addition nontrivial. * lib/anytostr.c: Rename from inttostr.c. (anytostr): Rename from inttostr. * lib/inttostr.c: New file. * modules/inttostr (Files): Add anytostr.c. (Makefile.am): Set lib_SOURCES instead of ... * m4/inttostr.m4: Remove uses of AC_LIBOBJ. * lib/imaxtostr.c: Update use. s/inttostr/anytostr/ * lib/offtostr.c: Likewise. * lib/uinttostr.c: Likewise. * lib/umaxtostr.c: Likewise. * modules/inttostr-tests: New file. * tests/test-inttostr.c: New file. Test these functions.
Diffstat (limited to 'modules')
-rw-r--r--modules/inttostr7
-rw-r--r--modules/inttostr-tests13
2 files changed, 20 insertions, 0 deletions
diff --git a/modules/inttostr b/modules/inttostr
index 2c2b76e5bb..495ef25cf5 100644
--- a/modules/inttostr
+++ b/modules/inttostr
@@ -2,6 +2,7 @@ Description:
Convert integers to printable strings.
Files:
+lib/anytostr.c
lib/imaxtostr.c
lib/inttostr.c
lib/inttostr.h
@@ -19,6 +20,12 @@ configure.ac:
gl_INTTOSTR
Makefile.am:
+lib_SOURCES += \
+ imaxtostr.c \
+ inttostr.c \
+ offtostr.c \
+ uinttostr.c \
+ umaxtostr.c
Include:
"inttostr.h"
diff --git a/modules/inttostr-tests b/modules/inttostr-tests
new file mode 100644
index 0000000000..69716d2827
--- /dev/null
+++ b/modules/inttostr-tests
@@ -0,0 +1,13 @@
+Files:
+tests/test-inttostr.c
+
+Depends-on:
+intprops
+inttypes
+snprintf-posix
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-inttostr
+check_PROGRAMS += test-inttostr