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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 16 Aug 2007, Jakub Jelinek wrote:
This has been mentioned here several times already in other threads.
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.

I've gone with the last of these suggestions for alsa-oss, partly because that's what someone (lpoetter?) chose to do for alsa-lib. Bad practice, perhaps, but the standard disclaimer applies: patches accepted. ;-)

     Jima

--
Fedora-maintainers mailing list
Fedora-maintainers@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers

--
Fedora-maintainers-readonly mailing list
Fedora-maintainers-readonly@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers-readonly

[Index of Archives]     [Fedora Users]     [Fedora Development]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux