]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Rename getline function, because of shared library use.
authorBruno Haible <bruno@clisp.org>
Tue, 18 Dec 2001 13:39:38 +0000 (13:39 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 21:49:58 +0000 (23:49 +0200)
m4/ChangeLog
m4/getline.m4

index 2641aa326f0ac5936fe6df9f0b71c21aebaa841c..90853af06fca3caf836cfad0d753b960be12fb9d 100644 (file)
@@ -1,3 +1,9 @@
+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.
index ebf437b8252752b33e066085dad3630154aadc37..39beb88484281592636074ba1f88ec753fb31132 100644 (file)
@@ -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 <stdio.h>
-#    include <sys/types.h>
+#    include <stdlib.h>
 #    include <string.h>
     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