Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poet_math.h overrides div function in stdlib.h #2

Closed
connorimes opened this issue Mar 29, 2016 · 0 comments
Closed

poet_math.h overrides div function in stdlib.h #2

connorimes opened this issue Mar 29, 2016 · 0 comments

Comments

@connorimes
Copy link
Member

poet.h includes poet_math.h which specifies the div macro. If poet.h is included from another library or binary before stdlib.h, a compile error occurs:

/usr/include/stdlib.h:788:14: error: expected identifier or ‘(’ before ‘int’
 extern div_t div (int __numer, int __denom)
              ^
/usr/local/include/poet/poet_math.h:199:27: error: expected ‘)’ before ‘/’ token
 #define DB_DIV(a, b) ((a) / (b))
                           ^

Applications that use the div function from the standard library will have problems. poet.h probably should not depend on the internal poet_math.h - the real_t typedef should handled differently.

connorimes added a commit that referenced this issue Mar 30, 2016
Remove poet.h dependency on poet_math.h. Fixes #2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant