conflicting types for getline

conflicting types for getline

Post by Eric Stewar » Thu, 10 Jul 2003 20:34:07

        On RedHat Linux 9.0, with Apache 1.3.27, PHP 4.3.2, and mod_perl 1.28,
I'm getting a compile error.  These, near as I know, are the latest
"stable" versions of everything - which is why I suspect I'm running
into this problem:

make[2]: Entering directory `/usr/local/src/apache_1.3.27/src/support'
gcc -c  -I../os/unix -I../include   -DLINUX=22 -D_REENTRANT
-I/usr/include/gdbm  -I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE
  `../apaci` htpasswd.c
htpasswd.c:145: conflicting types for `getline'
/usr/include/stdio.h:473: previous declaration of `getline'
make[2]: *** [htpasswd.o] Error 1
make[2]: Leaving directory `/usr/local/src/apache_1.3.27/src/support'
make[1]: *** [build-support] Error 1
make[1]: Leaving directory `/usr/local/src/apache_1.3.27'
make: *** [build] Error 2

        I've seen posts that point the finger at mod_perl.  This may be the
case as I've managed to compile another Apache server without mod_perl
on a different system (RH 9 with PHP).  However, I'm thinking it's more
along the lines of a compiler (IOW, RedHat's use of gcc 3.2.2) issue.
        What I could really use is a solution to get past this point - I'd
rather like to avoid "downgrading" either my OS or compiler.  I also
kind of need the support tools including htpasswd, so skipping them in
the compile is highly undesired.  ./configure options or even Makefile
modifications are preferred.  Code patches are acceptable, even to some
extent expected, but I'm a lazy systems admin, not a programmer ...
        Of course, any assistance at all (as repeated and varied searches on and only verify the problem's existence and
have yet to provide a solution) is welcome and appreciated.

Eric Stewart - take out the "spamisbad." if you'd like to email me


1. g++ fd.getline() and msvc fd.getline()??

Question:  I've written a program that reads records from a text file.

sorta like thsi..

int main() {
ifstream in;;
while(!in.eof()) {
        in.getline(inbuff, 199);
        cout << inbuff;
return 0;

Well it compiles fine, but it doesn't read from the file (300+ lines) I
get eof returned after the first
read attempt.  Is there a bug or something in fd.getline()?  I've never
used this in linux but it works
great in msvc++.  or is there a different syntax in using this
statment?  any help would be great


2. Sed question

3. gnu/types.h and bits/types.h conflict

4. getting linux/Win2k network to talk

5. compile now yields 'conflicting types'

6. NIC, SB 16

7. New kernel build failure - conflicting types for `proc_lookup' - Help?

8. Spelling fixes for relevent -> relevant in 15 files.

9. compile now yields 'conflicting types'

10. can't compile apache source "conflicting types for 'rlmi_t'

11. HELP-Conflicting types and casting float to NULL errors on GCC 2.7.0 Linux

12. "Conflicting type for 'setproctitle'

13. help: wchar_t type conflict stddef.h & Xlib.h