[ECOS] DEVIO table change
Mon Dec 11 09:27:00 GMT 2000
>>>>> "Grant" == Grant Edwards <firstname.lastname@example.org> writes:
Grant> How do I determine (at compile time) with which version of
Grant> the kernel a driver is being used?
Grant> Maintaining parallel drivers for 1.3.1 and CVS would
Grant> require a lot of work, so I'd like my driver to work with
Grant> both 1.3.1 and CVS code. But the DEVIO table has changed. I
Grant> can't seem to find a kernel version or devio version macro
Grant> to test in my driver sources to determine whether to
Grant> include a select function in the DEVIO macro.
Grant> It looks like I might be able to make the decision on
Grant> whether CHAR_DEVIO_TABLE is defined.
Grant> Would it be possible to include some sort of kernel version
Grant> or kernel API version macro in the one of the eCos kernel
Grant> header files so that a single driver can support multiple
Grant> versions of the kernel?
Actually, the kernel version macros do exist:
With current versions of the host-side tools there will also be
definitions for CYGNUM_KERNEL_VERSION_MAJOR, _MINOR and _RELEASE which
can be used for numerical comparisons in a #if, but that functionality
was added after the 1.3.1 release.
More information about the Ecos-discuss