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
Raise the bar to ISO C99 (drop support for C89) #601
Conversation
1484063
to
fc997ea
Compare
I think this is all for C99. After this is merged, I'll suggest raising the bar even further, to POSIX.1-2001 (#602). That PR for POSIX.1-2001 will be a draft until this one is merged, since it depends on these changes. |
281b719
to
11dd482
Compare
Rebased to master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from a little comment inline, I'd also like to ask you to add the reference to the issue fixed in the commit messages. Something like:
Resolves: https://github.com/shadow-maint/shadow/issues/600
Yep, I think that would be conventionally |
ISO C99 requires <stdbool.h>. Many files in the project already include <stdbool.h> unconditionally, so it's reasonable to assume that it is always available. Link: <shadow-maint#600> Cc: Christian Göttsche <cgzones@googlemail.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
ISO C99 requires <errno.h>. Many files in the project already include <errno.h> unconditionally, so it's reasonable to assume that it is always available. Link: <shadow-maint#600> Cc: Christian Göttsche <cgzones@googlemail.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Link: <shadow-maint#600> Cc: Christian Göttsche <cgzones@googlemail.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
ISO C99 requires <locale.h>. Other files in the project already include <locale.h> unconditionally, so it's reasonable to assume that it is always available. Link: <shadow-maint#600> Cc: Christian Göttsche <cgzones@googlemail.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
ISO C99 requires fputs(3). Link: <shadow-maint#600> Cc: Christian Göttsche <cgzones@googlemail.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
ISO C99 requires strerror(3). Link: <shadow-maint#600> Cc: Christian Göttsche <cgzones@googlemail.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
ISO C99 requires NULL. Link: <shadow-maint#600> Cc: Christian Göttsche <cgzones@googlemail.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
11dd482
to
3780433
Compare
Changes:
|
I didn't understand |
ISO C99 requires rename(2). Link: <shadow-maint#600> Cc: Christian Göttsche <cgzones@googlemail.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
ISO C99 requires snprintf(3). Link: <shadow-maint#600> Cc: Christian Göttsche <cgzones@googlemail.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
ISO C99 requires strstr(3). Link: <shadow-maint#600> Cc: Christian Göttsche <cgzones@googlemail.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Okay, now it should be ready. Changes:
|
As long as you reference the issue I'm fine. LGTM. Thanks for the patches! |
:-) |
I'm happy to help. And BTW, I learnt a lot with these patches. Just FYI, I started rewriting some of the Linux man-pages about strings, and plan a new As a starter, I already killed Oh, and it just feels great chopping old code :) |
Great! :-) |
#600