|
|
| Author |
Message |
|
| klacke at bluetail.com |
Posted: Thu Aug 05, 1999 12:31 pm |
|
|
|
Guest
|
I've been having some trouble with erlang 47.4.1 + Mnesia on
FreeBSD 3.2. It appears as if pwrite() isn't working
correctly on FreeBSD 3.2.
For example the following program coredumps.
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
main() { pwrite(0, "abc", 3, 0); exit(0); }
The call to pwrite() should simply fail (0 is not a seekable device),
not coredump.
Anyway, the dets/mnesia modules uses pwrite() and the autoconf test
just checks that pread exists, not that pwrite works.
I've changed erts/autoconf/configure.in to do just that.
That is:
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
main() { pwrite(0, "abc", 3, 0); exit(0); }],
pwrite_works=yes,
pwrite_works=no,)
if test $pwrite_works = yes; then
AC_DEFINE(HAVE_PREADWRITE)
fi
instead of
AC_CHECK_FUNC(pread, [AC_DEFINE(HAVE_PREADWRITE)])dnl FIXME convbreak
This means that each call to pread/pwrite will be transformed
into a call to seek, followed by a call to read/write. This is
of cource not good, but it's better than a core dump.
Possibly some of the more FreeBSD oriented people here on the
list knows about this problem ?? I can't be the first person
that calls pwrite() on FreeBSD 3.2 !!!! Or is my local system
screwed ??
autoconf complains with "AC_TRY_RUN called without default to allow cross compiling", but I've been told that the error message can be safely ignored.
Furthermore I've only tested this stuff on BSD and Linux.
Cheers
/klacke
Post generated using Mail2Forum (http://m2f.sourceforge.net) |
|
|
| Back to top |
|
| dwyer at serc.rmit.edu.au |
Posted: Thu Aug 05, 1999 11:41 pm |
|
|
|
Guest
|
>
> I've been having some trouble with erlang 47.4.1 + Mnesia on
> FreeBSD 3.2. It appears as if pwrite() isn't working
> correctly on FreeBSD 3.2.
> For example the following program coredumps.
>
> #include <sys/types.h>
> #include <sys/uio.h>
> #include <unistd.h>
> main() { pwrite(0, "abc", 3, 0); exit(0); }
>
> The call to pwrite() should simply fail (0 is not a seekable device),
> not coredump.
The above code works on my 3.2 box. (FreeBSD amber.serc.rmit.edu.au 3.2-RELEASE FreeBSD 3.2-RELEASE #0: Wed Jul 7 13:41:45 EST 1999 root_at_medusa.serc.rmit.edu.au:/usr/src/sys/compile/FBSDX i386)
However, the code does not link on 2.2.8 or 3.1-RELEASE.
--
Mick Dwyer
-==================================================================-
Software Engineering Research Centre Phone: 9925-4026
Level 3, Fax: 9925-4094
110 Victoria Street, dwyer_at_serc.rmit.edu.au
Melbourne, Australia. http://www.serc.rmit.edu.au
-==================================================================-
Post generated using Mail2Forum (http://m2f.sourceforge.net) |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|