+2001-12-17 Bruno Haible <bruno@clisp.org>
+
+ * getline.m4 (AM_FUNC_GETLINE): Include <stdlib.h>, not <sys/types.h>,
+ for declaring size_t and exit(). #define getline to a different
+ symbol at linkage level.
+
2001-12-11 Bruno Haible <bruno@clisp.org>
* javacomp.m4 (gt_JAVACOMP): Fix typo in jikes test.
-#serial 4
+#serial 5
dnl See if there's a working, system-supplied version of the getline function.
dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems
[echo fooN |tr -d '\012'|tr N '\012' > conftest.data
AC_TRY_RUN([
# include <stdio.h>
-# include <sys/types.h>
+# include <stdlib.h>
# include <string.h>
int main ()
{ /* Based on a test program from Karl Heuer. */
fi
if test $am_cv_func_working_getline = no; then
+ dnl We must choose a different name for our function, since on ELF systems
+ dnl a broken getline() in libc.so would override our getline() in
+ dnl libgettextlib.so.
+ AC_DEFINE([getline], [gnu_getline],
+ [Define to a replacement function name for getline().])
LIBOBJS="$LIBOBJS getline.${ac_objext}"
AC_SUBST(LIBOBJS)
fi