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

Fixes header includes to conform to Google standards #24

Merged
merged 1 commit into from Jan 2, 2019

Conversation

jamieleecho
Copy link

Fixes java_grinder include guards to conform to Google standards. See https://stackoverflow.com/questions/4867559/naming-include-guards

Note that it is NOT legal to begin include guards with leading _ or __ because doing so causes issues with system headers. For example, Linux's math.h file looks like:

#ifndef	_MATH_H
#define	_MATH_H	1

Because java_grinder defines Math.h with the identical header guard, it is not currently possible to compile java_grinder under Linux. This change brings java_grinder one step closer to compiling under Linux.

@mikeakohn mikeakohn merged commit 3687c45 into mikeakohn:master Jan 2, 2019
@mikeakohn
Copy link
Owner

Did you really have problems compiling on Linux? Linux has been my main development system for this since I started (with Mac as my secondary).

@jamieleecho
Copy link
Author

jamieleecho commented Jan 2, 2019 via email

@jamieleecho
Copy link
Author

jamieleecho commented Jan 2, 2019 via email

@mikeakohn
Copy link
Owner

The past couple days I was building with Ubuntu 18.04 and 18.10. I was also able to build it with FreeBSD (looks like clang 3.4.1).

Thanks for this merge request... I'm going to change the include guards like this in naken_asm also tonight.

@jamieleecho jamieleecho deleted the fix-include-guards branch January 3, 2019 12:35
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.

None yet

2 participants