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

Converts 'capsicum.h' to C code #3

wants to merge 2 commits into
base: dev


None yet
2 participants

influenza commented Feb 14, 2014

This pull request updates the included 'capsicum.h' file to be C code, rather than C++ code. The tests still compile and pass. Additionally, users may now include this header in their other C (or C++) projects to provide access to capsicum features. The capsicum-linux project doesn't create this header file anyplace on the system, so the version included in this project is the best place for Linux users to grab it.

The conversion was trivial and consisted of replacing the bool type and it's values with the corresponding int representations.

influenza added some commits Feb 13, 2014

Convert capsicum.h from C++ to C code
This allows us to include capsicum.h in C based projects, such as the
libcapsicum code. The conversion was done with these simple rules:

1. replace 'true' with '1'
2. replace 'bool' with 'int'

This comment has been minimized.


daviddrysdale commented Feb 17, 2014

I prefer to keep the current signatures (using bool) to match FreeBSD10.x.

Use of bool should be OK in C99 anyway....provided <stdbool.h> is included somewhere. I've added that in commit 98f943a.

Thanks for pointing out the problem, though – it will be useful to keep in mind when I get as far as libc/userspace libraries (although this particular chunk of code will become irrelevant for the Linux version once I move it over to FreeBSD10-style cap_rights_t structures).


This comment has been minimized.


influenza commented Feb 18, 2014

I understand. We are discussing strategies on porting libcapsicum to capsicum-linux in #capsicum on freenode if you're available to drop by some time. Haven't put the code up on github yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment