-
Notifications
You must be signed in to change notification settings - Fork 412
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
Include <stddef.h> for size_t
#404
Conversation
Add link to Xojo implementation by Eugene Dakin
Removed experimental on Pi4 paragraph.
Not so, unless I missed the part about pigpio declaring to be ISO C compliant.
|
As it stands, I'm not sure that ISO C or not really matters, it's just that its better to include the header that defines the type being used rather than rely on it being indirectly defined by pthread. (Context: i'm passing If pi@raspberrypi:/tmp $ cat foo.c
size_t x = 3;
pi@raspberrypi:/tmp $ gcc -c foo.c
foo.c:1:1: error: unknown type name ‘size_t’
size_t x = 3;
^~~~~~
foo.c:1:1: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’? |
Ok, that makes sense. Thanks. |
@notinaboat , I tried to edit this PR to merge it into the develop branch but it looks like that creates a ton of commits and I'm not sure why. Can you make sure your fork is up to date then re-submit the PR against the develop branch? |
Hi @guymcswain, maybe its easier for you to just paste |
Merged in v79 |
pigpio.h
usessize_t
, so it should include<stddef.h>
.https://www.gnu.org/software/libc/manual/html_node/Important-Data-Types.html