From: Bruno Haible Date: Tue, 18 Dec 2001 13:39:38 +0000 (+0000) Subject: Rename getline function, because of shared library use. X-Git-Tag: v0.11~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8bdbec0fbcd97964a544a150828dd6efd279189;p=thirdparty%2Fgettext.git Rename getline function, because of shared library use. --- diff --git a/m4/ChangeLog b/m4/ChangeLog index 2641aa326..90853af06 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,9 @@ +2001-12-17 Bruno Haible + + * getline.m4 (AM_FUNC_GETLINE): Include , not , + for declaring size_t and exit(). #define getline to a different + symbol at linkage level. + 2001-12-11 Bruno Haible * javacomp.m4 (gt_JAVACOMP): Fix typo in jikes test. diff --git a/m4/getline.m4 b/m4/getline.m4 index ebf437b82..39beb8848 100644 --- a/m4/getline.m4 +++ b/m4/getline.m4 @@ -1,4 +1,4 @@ -#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 @@ -16,7 +16,7 @@ AC_DEFUN([AM_FUNC_GETLINE], [echo fooN |tr -d '\012'|tr N '\012' > conftest.data AC_TRY_RUN([ # include -# include +# include # include int main () { /* Based on a test program from Karl Heuer. */ @@ -36,6 +36,11 @@ AC_DEFUN([AM_FUNC_GETLINE], 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