Ticket #70 (closed task: fixed)

Opened 7 months ago

Last modified 7 weeks ago

[gnulib] port fpurge.c, freadahead.c and freading.c + others for Haiku

Reported by: scottmc Owned by: brecht
Priority: normal Milestone: Haiku self-hosting
Component: BePorts Version:
Severity: normal Keywords:
Cc:

Attachments

testdir-stdioext-tests (2.5 kB) - added by scottmc 7 months ago.
make check output

Change History

  Changed 7 months ago by scottmc

  • type changed from defect to task

  Changed 7 months ago by scottmc

  • priority changed from high to normal

follow-up: ↓ 4   Changed 7 months ago by scottmc

  • summary changed from [gnulib] port fpurge.c, freadahead.c and freading.c for Haiku to [gnulib] port fpurge.c, freadahead.c and freading.c + others for Haiku

Trying to debug this with testdir-stdioext from: http://www.nabble.com/-PATCH--DragonFly-BSD-support-to17576603.html got make errors in: fbufmode.c, fpurge.c, freadahead.c, freading.c, freadptr.c, freadseek.c, fseterr.c, freadable.c, fwritable.c, fwriting.c and fseeko.c

Got pass each of those by addining in an defined HAIKU in the line with:

#if defined _IO_ferror_unlocked GNU_LIBRARY ==1 /* blah blah */ making it:

#if defined _IO_ferror_unlocked GNU_LIBRARY ==1 defined HAIKU /* blah

after changing those 11 files, make finishes without any further troubles. make check then fails 4 of 24 tests. Output attached.

in reply to: ↑ 3   Changed 7 months ago by scottmc

Trying to debug this with testdir-stdioext from: http://www.nabble.com/-PATCH--DragonFly-BSD-support-to17576603.html got make errors in: fbufmode.c, fpurge.c, freadahead.c, freading.c, freadptr.c, freadseek.c, fseterr.c, freadable.c, fwritable.c, fwriting.c and fseeko.c

Got pass each of those by addining in an defined HAIKU in the line with: #if defined _IO_ferror_unlocked || __GNU_LIBRARY__ ==1 /* blah blah */

making it: #if defined _IO_ferror_unlocked || __GNU_LIBRARY__ ==1 || defined __HAIKU__ /* blah blah */

after changing those 11 files, make finishes without any further troubles. make check then fails 4 of 24 tests. Output attached.

Changed 7 months ago by scottmc

make check output

  Changed 4 months ago by scottmc

I added a check for "defined __HAIKU__" on the "if defined _IO_ferror_unlocked" line in fpurge.c and it then allowed it to build, then tripped up on the next occurance of that same line in fflush.c. I did a grep on the coreutils tree and this is the result:

~> grep -nri 'IO_ferror_unlocked' coreutils-6.12
coreutils-6.12/gnulib-tests/test-fflush2.c:27:#if defined _IO_ferror_unlocked || defined __sferror /* GNU libc, BeOS; FreeBSD, NetBSD, OpenBSD, MacOS X, Cygwin */
coreutils-6.12/lib/fpurge.c:64:# if defined _IO_ferror_unlocked || (__GNU_LIBRARY__ == 1) || defined __HAIKU__ /* GNU libc, BeOS, Linux libc5 */
coreutils-6.12/lib/freadahead.c:27:#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
coreutils-6.12/lib/freading.c:34:#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
coreutils-6.12/lib/freadptr.c:32:#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
coreutils-6.12/lib/freadseek.c:37:#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
coreutils-6.12/lib/fseeko.c:47:#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
coreutils-6.12/lib/fseterr.c:32:#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
~> 

Seems those are the same files that are failing in the test program... Now should Haiku be setting _IO_ferror_unlocked or __GNU_LIBRARY__ or should i just add the defined __HAIKU__ to these files?

  Changed 4 months ago by scottmc

Related to Haiku ticket 2696? http://dev.haiku-os.org/ticket/2696

  Changed 3 months ago by scottmc

Add cvs to the list of packages blocked by this one.

  Changed 2 months ago by bonefish

fpurge() and freading() have been implemented in Haiku. freadahead() needs to be fixed in gnulib.

  Changed 7 weeks ago by scottmc

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.