[m-users.] "posix" extra library won't compile
Zoltan Somogyi
zoltan.somogyi at runbox.com
Fri Mar 15 04:51:36 AEDT 2019
On Thu, 14 Mar 2019 18:39:48 +0100, Volker Wysk <post at volker-wysk.de> wrote:
> posix.select.m:049: Error: This declaration for type `fdset_ptr'/0 says it is
> posix.select.m:049: private, while the previous declaration says it is
> posix.select.m:049: exported.
> posix.select.m:021: The previous declaration was here.
I have fixed this. The cause is the fact that we have change the compiler generate
either warnings or errors about redundant declarations, depending on whether
they are consistent with each other or not.
> After fixing this in the code and trying again, I get more errors:
>
> Making Mercury/os/posix.open.o
> In file included from /usr/include/fcntl.h:290:0,
> from /usr/local/mercury-rotd-2019-01-03/lib/mercury/inc/
> io.mh:268,
> from Mercury/cs/posix.open.c:28:
> In function ‘open’,
> inlined from ‘posix__open_module4’ at posix.open.m:74:15:
> /usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:4: error: call to
> ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or
> O_TMPFILE in second argument needs 3 arguments
> In function ‘open’,
> inlined from ‘posix__open_module0’ at posix.open.m:74:15:
> /usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:4: error: call to
> ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or
> O_TMPFILE in second argument needs 3 arguments
>
> Could this be a compiler version problem...? Any chances to get this fixed
> soon?
That one looks like your problem. ANSI C has both two and three argument
versions of open, and so posix.open.m has two different copies of the open
predicate, with different arities. It looks like you called the wrong one.
Zoltan.
More information about the users
mailing list