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

Add #pragma once to all header files #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

inequation
Copy link

I'm trying to use detex as an inline-included library (i.e. by #including source .c files into a translation unit of my own) to circumvent library building issues. I've encountered a problem where bits.h would be included from several files, causing an error of redefinition of the struct and the functions in it.

This is a simple and non-invasive change that fixes it. #pragma once is functionally equivalent to header guards and has wide support from compilers all across the board. It does not impact any other aspect of the project.

This makes inline inclusion of the library easier by preventing symbol redefinition and/or redeclaration.
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.

1 participant