1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

C99 compatibility fixes for gnupg 1

--
Include <stdlib.h> for the exit function.  This avoids a failing
GNUPG_CHECK_IPC check in case the compiler no longer supports implicit
function declarations.

Explicitly declare the return type of main as int.  This too avoids
failures with future compilers.
This commit is contained in:
Florian Weimer via Gnupg-devel 2023-01-27 13:11:08 +01:00 committed by Werner Koch
parent b3c130eb25
commit 23745cddcc
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 2 additions and 1 deletions

View File

@ -314,6 +314,7 @@ define(GNUPG_CHECK_IPC,
#include <sys/types.h> #include <sys/types.h>
#include <sys/ipc.h> #include <sys/ipc.h>
#include <sys/shm.h> #include <sys/shm.h>
#include <stdlib.h>
int main() int main()
{ {
int id; int id;

View File

@ -1272,7 +1272,7 @@ if test "$use_regex" = yes ; then
AC_TRY_RUN([ AC_TRY_RUN([
#include <unistd.h> #include <unistd.h>
#include <regex.h> #include <regex.h>
main() { regex_t blah ; regmatch_t p; p.rm_eo = p.rm_eo; return regcomp(&blah, "foo.*bar", REG_NOSUB) || regexec (&blah, "foobar", 0, NULL, 0); }], int main(void) { regex_t blah ; regmatch_t p; p.rm_eo = p.rm_eo; return regcomp(&blah, "foo.*bar", REG_NOSUB) || regexec (&blah, "foobar", 0, NULL, 0); }],
gnupg_cv_regex_broken=no, gnupg_cv_regex_broken=yes, gnupg_cv_regex_broken=yes)) gnupg_cv_regex_broken=no, gnupg_cv_regex_broken=yes, gnupg_cv_regex_broken=yes))
if test $gnupg_cv_regex_broken = yes ; then if test $gnupg_cv_regex_broken = yes ; then