summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2007-08-22 12:54:21 +0000
committerEric Blake <ebb9@byu.net>2007-08-22 12:54:21 +0000
commitd68417c03e69fde605af699ba9a9671c663d8baf (patch)
tree5ab8a71b84ce6ae1e24722666f0c106523060201 /modules
parent7042775894700f8be0e6bc2a5ff3c49fc77296bc (diff)
downloadgnulib-d68417c03e69fde605af699ba9a9671c663d8baf.tar.gz
Move getline and getdelim into stdio.h, per POSIX 200x.
* modules/getline (Files): Remove getline.h. (Depends-on): Add stdio. (configure.ac): Add module indicator. * modules/getdelim (Files): Remove getdelim.h. (Depends-on): Add stdio. (configure.ac): Add module indicator. * modules/stdio (Makefile.am): Work with new indicators. * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults. * m4/getdelim.m4 (gl_FUNC_GETDELIM): Work with stdio needs. * m4/getline.m4 (gl_FUNC_GETLINE): Likewise. * lib/getdelim.h: Delete. * lib/getline.h: Delete. * lib/stdio_.h (getdelim, getline): Declare. * modules/getdelim-tests: New module. * modules/getline-tests: Likewise. * tests/test-getdelim.c: New file. * tests/test-getline.c: Likewise. * NEWS: Document the change. * lib/getline.c: Update choice of header. * lib/csharpcomp.c: Likewise. * lib/getpass.c: Likewise. * lib/javacomp.c: Likewise. * lib/javaversion.c: Likewise. * lib/yesno.c: Likewise. * lib/getdelim.c: Likewise. (getdelim): Set errno on failure, and avoid memory leak.
Diffstat (limited to 'modules')
-rw-r--r--modules/getdelim5
-rw-r--r--modules/getdelim-tests11
-rw-r--r--modules/getline5
-rw-r--r--modules/getline-tests11
-rw-r--r--modules/stdio5
5 files changed, 33 insertions, 4 deletions
diff --git a/modules/getdelim b/modules/getdelim
index b198443dec..3c70791940 100644
--- a/modules/getdelim
+++ b/modules/getdelim
@@ -2,19 +2,20 @@ Description:
Read character delimited data from a stream.
Files:
-lib/getdelim.h
lib/getdelim.c
m4/getdelim.m4
Depends-on:
+stdio
configure.ac:
gl_FUNC_GETDELIM
+gl_STDIO_MODULE_INDICATOR([getdelim])
Makefile.am:
Include:
-"getdelim.h"
+<stdio.h>
License:
LGPLv2+
diff --git a/modules/getdelim-tests b/modules/getdelim-tests
new file mode 100644
index 0000000000..33e04e38ac
--- /dev/null
+++ b/modules/getdelim-tests
@@ -0,0 +1,11 @@
+Files:
+tests/test-getdelim.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-getdelim
+check_PROGRAMS += test-getdelim
+MOSTLYCLEANFILES += test-getdelim.txt
diff --git a/modules/getline b/modules/getline
index 345850b285..82901293bd 100644
--- a/modules/getline
+++ b/modules/getline
@@ -2,20 +2,21 @@ Description:
Read a line from a stream.
Files:
-lib/getline.h
lib/getline.c
m4/getline.m4
Depends-on:
getdelim
+stdio
configure.ac:
gl_FUNC_GETLINE
+gl_STDIO_MODULE_INDICATOR([getline])
Makefile.am:
Include:
-"getline.h"
+<stdio.h>
License:
LGPLv2+
diff --git a/modules/getline-tests b/modules/getline-tests
new file mode 100644
index 0000000000..dae21bec92
--- /dev/null
+++ b/modules/getline-tests
@@ -0,0 +1,11 @@
+Files:
+tests/test-getline.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-getline
+check_PROGRAMS += test-getline
+MOSTLYCLEANFILES += test-getline.txt
diff --git a/modules/stdio b/modules/stdio
index 924630a5bf..1a6f0b5cc9 100644
--- a/modules/stdio
+++ b/modules/stdio
@@ -36,6 +36,8 @@ stdio.h: stdio_.h
-e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
-e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
-e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
+ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
+ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
-e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
-e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
-e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
@@ -53,6 +55,9 @@ stdio.h: stdio_.h
-e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
-e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
-e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
+ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
+ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/stdio_.h; \
} > $@-t