Ticket #70 (closed task: fixed)
Opened 7 years ago
Last modified 7 years 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: |
Description
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/fpurge.c
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/freadahead.c
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/freading.c
These three trip up builds of m4, coreutils, findutils and probably many others.
Attachments
Change History
comment:1 Changed 7 years ago by scottmc
- Type changed from defect to task
comment:2 Changed 7 years ago by scottmc
- Priority changed from high to normal
comment:3 follow-up: ↓ 4 Changed 7 years 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
comment:4 in reply to: ↑ 3 Changed 7 years 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
| 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.
comment:5 Changed 7 years 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?
comment:6 Changed 7 years ago by scottmc
Related to Haiku ticket 2696?
http://dev.haiku-os.org/ticket/2696
comment:7 Changed 7 years ago by scottmc
Add cvs to the list of packages blocked by this one.
comment:8 Changed 7 years ago by bonefish
fpurge() and freading() have been implemented in Haiku. freadahead() needs to be fixed in gnulib.
comment:9 Changed 7 years ago by scottmc
- Resolution set to fixed
- Status changed from new to closed
fixed recently in gnulib by Bruno Haible:
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=a2c5f8d99ec52594aae96afeb29e0aeb7a841872

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
making it:
after changing those 11 files, make finishes without any further troubles.
make check then fails 4 of 24 tests. Output attached.