[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] DragonFly BSD support - reworked
From: |
VOROSKOI Andras |
Subject: |
Re: [PATCH] DragonFly BSD support - reworked |
Date: |
Mon, 2 Jun 2008 00:50:56 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Sun, Jun 01, 2008 at 06:43:19PM +0200, Bruno Haible wrote:
> The first hunk (file freadahead.c) is correct when looking at the DragonFlyBSD
> I applied that.
Thanks.
> The second hunk (file freading.c) appears to be a nop to me; why should I
> apply
> this?
Well, skip that. testdir-stdioext compiles without that, but the test is
skipped. Is that normal?
> The third hunk (file fseeko.c) is lacking a rationale.
OK. If we can solve the compile problem mentioned later that's unnecessary.
> More generally, what were the problems that you encountered when you ran
> "./configure; make; make check" in the testdir-stdioext.tar.gz that I posted?
First I've applied this patch:
diff -aur testdir-stdioext/gllib/freadahead.c
testdir-stdioext-dfly/gllib/freadahead.c
--- testdir-stdioext/gllib/freadahead.c 2008-05-01 16:38:47 +0200
+++ testdir-stdioext-dfly/gllib/freadahead.c 2008-06-02 00:35:43 +0200
@@ -33,8 +33,12 @@
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD,
DragonFly, MacOS X, Cygwin */
if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0)
return 0;
+# if defined __DragonFly__
+ return __sreadahead (fp);
+# else
return fp_->_r
+ (HASUB (fp) ? fp_->_ur : 0);
+# endif
#elif defined __EMX__ /* emx+gcc */
if ((fp->_flags & _IOWRT) != 0)
return 0;
diff -aur testdir-stdioext/gllib/stdio-impl.h
testdir-stdioext-dfly/gllib/stdio-impl.h
--- testdir-stdioext/gllib/stdio-impl.h 2008-05-01 16:38:47 +0200
+++ testdir-stdioext-dfly/gllib/stdio-impl.h 2008-06-01 22:52:47 +0200
@@ -35,7 +35,7 @@
struct { unsigned char *_base; int _size; } _ub; \
int _ur; \
unsigned char _ubuf[3]; \
- unsigned cahr _nbuf[1]; \
+ unsigned char _nbuf[1]; \
struct { unsigned char *_base; int _size; } _lb; \
int _blksize; \
fpos_t _offset; \
Then I got these errors:
fflush.c:38: error: dereferencing pointer to incomplete type
fseeko.c:67: error: dereferencing pointer to incomplete type
So there is some problem with
#define fp_ub fp->_ub
line on DragonFly, but I have no clue what to do with that.
If I workaround those make check's output is the following:
voroskoi ~/temp/testdir-stdioext-dfly $ make check
Making check in gllib
make check-am
Making check in glm4
Making check in gltests
make check-recursive
make check-TESTS
PASS: test-EOVERFLOW
PASS: test-binary-io.sh
PASS: test-fbufmode
File offset is wrong after fseek: 17.
FAIL: test-fflush
PASS: test-fflush2.sh
PASS: test-fpending.sh
PASS: test-fpurge
Skipping test: file operations failed.
SKIP: test-freadable
PASS: test-freadahead.sh
Skipping test: file operations failed.
SKIP: test-freading
PASS: test-freadptr.sh
PASS: test-freadptr2.sh
PASS: test-freadseek.sh
PASS: test-fseek.sh
PASS: test-fseeko.sh
PASS: test-fseterr
PASS: test-ftell.sh
PASS: test-ftello.sh
Skipping test: file operations failed.
SKIP: test-fwritable
Skipping test: file operations failed.
SKIP: test-fwriting
test-lseek.c:49: assertion failed
Abort trap (core dumped)
FAIL: test-lseek.sh
PASS: test-stdbool
PASS: test-stdio
PASS: test-unistd
======================
2 of 20 tests failed
(4 tests were not run)
======================
--
voroskoi