The open() system call in f8 really broken...

Eric Sandeen sandeen at redhat.com
Thu Aug 16 21:24:58 UTC 2007


Jakub Jelinek wrote:

>> test_io.c: In function 'test_open':
>> test_io.c:198: error: expected identifier before '(' token
> 
> This has been mentioned here several times already in other threads.

Ah, sorry for missing that.  Can't keep up...

> In this case you are not calling open(1), but some function pointer.
> And therefore it is undesirable to let it be expanded as function-like
> macro (which POSIX allows).
> The right fix is to use one of:
> retval = (test_io_backing_manager->open)(name, flags, &data->real);
> retval = (*test_io_backing_manager->open)(name, flags, &data->real);
> retval = test_io_backing_manager->(open)(name, flags, &data->real);
> or, far less desirable, but what standard allows,
> #undef open
> above this.  The last one means that no open(1) error checking will be
> done in the rest of the source file, which is not a good idea.

Ok, thanks.

-Eric




More information about the Fedora-maintainers mailing list