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

Varying declarations of BN_print #53

Closed
pascal-cuoq opened this issue Oct 6, 2015 · 1 comment
Closed

Varying declarations of BN_print #53

pascal-cuoq opened this issue Oct 6, 2015 · 1 comment
Assignees

Comments

@pascal-cuoq
Copy link

The header bn.h defines the function BN_print differently depending whether bio.h is included:

#ifdef HEADER_BIO_H
int BN_print(BIO *fp, const BIGNUM *a);
#else
int BN_print(void *fp, const BIGNUM *a);
#endif

Only one type is allowable for BN_print, the type with which the function is defined (C11 6.2.7:2 “All declarations that refer to the same object or function shall have compatible type; otherwise, the behavior is undefined”). The types void * and BIO * are not compatible, and neither are the types of functions taking one or the other as argument.

Does anyone know what problem the hack above is supposed to solve and whether it is still useful?

@bob-beck bob-beck self-assigned this Oct 16, 2015
@bob-beck
Copy link

Whatever it was meant to solve in the 90's doesn't matter anymore... Let's just include the proper header ahead of time.. fixed in tree..

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

2 participants