Re: 01-getnline.diff (was Re: getline & getline_safe)
Steve McIntyre <[email protected]>
| Newsgroups | gmane.comp.lib.gnulib.bugs,gmane.comp.version-control.cvs.bugs |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jul 16, 2003 at 03:56:33PM -0400, Derek Robert Price wrote: > >Okay, here's my first pass. It configures, builds, and passes `make >check' with CVS, so I updated modules/getline, created modules/getnline, >and am resubmitting to bug-gnulib. Please let me know what you think. > >I call it a first pass only because I wasn't sure how to document this >complex dependency. I think what I did was acceptable, but notice that >I duplicated the getnline.* stuff between the two module descriptions. >The basic difference is that if you want getline compiled conditionally >but getnline compiled unconditionally then you add a call to >gl_PREREQ_GETNLINE to configure.ac. This is what I did with CVS. If >you just include the info as per the modules/getline file, getnline.c >will only be compiled when it is needed for getline.c. > >I still need to write the ChangeLog for CVS but I should commit these >changes there soon. > >Incidentally, my glibc defines both getdelim & getline to return >ssize_t. Is it intentional that the GNULIB versions return int instead? Actually, that was exactly the cause of the original bug! ssize_t and int are equivalent on most 32-bit platforms, but not on 64-bit Linux. Thus the definition of getline() clashes and does not match the one included from stdio.h... -- Steve McIntyre, Cambridge, UK. [email protected] "It's actually quite entertaining to watch ag129 prop his foot up on the desk so he can get a better aim." [ seen in ucam.chat ]