Mercurial > hg > octave-nkf > gnulib-hg
comparison m4/getline.m4 @ 7016:518e17651b9d
Avoid causing trouble in relocatable.c.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 22 Jul 2006 15:08:58 +0000 |
parents | cf3d0bf4fc6f |
children | d445de86b311 |
comparison
equal
deleted
inserted
replaced
7015:a84d5045e247 | 7016:518e17651b9d |
---|---|
1 # getline.m4 serial 13 | 1 # getline.m4 serial 14 |
2 | 2 |
3 dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 Free Software | 3 dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 Free Software |
4 dnl Foundation, Inc. | 4 dnl Foundation, Inc. |
5 dnl | 5 dnl |
6 dnl This file is free software; the Free Software Foundation | 6 dnl This file is free software; the Free Software Foundation |
7 dnl gives unlimited permission to copy and/or distribute it, | 7 dnl gives unlimited permission to copy and/or distribute it, |
8 dnl with or without modifications, as long as this notice is preserved. | 8 dnl with or without modifications, as long as this notice is preserved. |
45 len = getline (&line, &siz, in); | 45 len = getline (&line, &siz, in); |
46 exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1); | 46 exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1); |
47 } | 47 } |
48 ], am_cv_func_working_getline=yes dnl The library version works. | 48 ], am_cv_func_working_getline=yes dnl The library version works. |
49 , am_cv_func_working_getline=no dnl The library version does NOT work. | 49 , am_cv_func_working_getline=no dnl The library version does NOT work. |
50 , am_cv_func_working_getline=no dnl We're cross compiling. | 50 , dnl We're cross compiling. Assume it works on glibc2 systems. |
51 [AC_EGREP_CPP([Lucky GNU user], | |
52 [ | |
53 #include <features.h> | |
54 #ifdef __GNU_LIBRARY__ | |
55 #if (__GLIBC__ >= 2) | |
56 Lucky GNU user | |
57 #endif | |
58 #endif | |
59 ], | |
60 [am_cv_func_working_getline=yes], | |
61 [am_cv_func_working_getline=no])] | |
51 )]) | 62 )]) |
52 fi | 63 fi |
53 | 64 |
54 if test $am_cv_func_working_getline = no; then | 65 if test $am_cv_func_working_getline = no; then |
55 dnl We must choose a different name for our function, since on ELF systems | 66 dnl We must choose a different name for our function, since on ELF systems |