CANopenNode / CANopenSocket

Obsolete repository, replaced by CANopenDemo and CANopenLinux
Apache License 2.0
208 stars 119 forks source link

Typedef conflict with an std macro #6

Closed PeroKetStory closed 3 years ago

PeroKetStory commented 6 years ago

Hi all, There is a conflict between a typedef in CO_OD.h and a macro defined in math.h typedef domain_t DOMAIN; (l.53)

I've also notified this on the CANopenNode project repository, but I think it is more important here, regarding the philosophy of the CANopenSocket project. As it provides a full-exploitable app to use CANopen with user-purpose entry points in the "app.c/h" source, this issue can arrive pretty fast. For instance, I wanted to log some data with a timestamp in a file (with 1ms period). I just needed the ' round ' function, and so 'math.h'. And boom.

Of course, it is not dramatic at all, but hey, worth the shot to say it.

Regards.

geoffrey-vl commented 4 years ago

Is this still relevant? If not, please close.

CANopenNode commented 4 years ago

To be updated with new OD interface

PeroKetStory commented 4 years ago

I'm not working on it anymore, but for what it worth, there still is the typedef domain_t DOMAIN in CO_OD.h and I think it was in conflict with a macro defined here: https://users.pja.edu.pl/~jms/qnx/help/watcom/clibref/src/matherr.html

CANopenNode commented 3 years ago

DOMAIN is not used any more in latest edition (New Object Dictionary).