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

Convert minunit.h to be ANSI C89 compliant (range comments and variable ... #7

Merged
merged 1 commit into from
Jan 13, 2015
Merged

Conversation

cr1901
Copy link
Contributor

@cr1901 cr1901 commented Dec 8, 2014

...declarations at beginning of scope.

I have a need to use minunit.h in a source tree that may be compiled using compilers that do not recognize extensions to C89 (yes they exist :P), so I made minunit.h compile successfully when gcc's -pedantic-errors is enabled.

However, the C compiler must still provide the C99 snprintf, which is fine for now. There exist ANSI C89 snprintf implementations which I could use in the worst case.

Ideally, I'd like to make the dependencies on the stdlib and timer optional, where users must provide a logging function (replace printf) and timer (also optional if it weren't for the #error directive in minunit.h) if one does not exist.

@siu
Copy link
Owner

siu commented Jan 13, 2015

Merged. About making the dependencies optional, I don't want to make the implementation more complicated now, the library is so small that one can fork and customize it as needed. In any case if you come up with a nice solution I will be happy to merge it.

@siu siu closed this Jan 13, 2015
@siu siu reopened this Jan 13, 2015
siu added a commit that referenced this pull request Jan 13, 2015
Convert minunit.h to be ANSI C89 compliant (range comments and variable ...
@siu siu merged commit 374af43 into siu:master Jan 13, 2015
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

Successfully merging this pull request may close these issues.

2 participants