#1 Port to C99 (#2186195)
Merged a year ago by fweimer. Opened a year ago by submachine.
rpms/ submachine/jabberd rawhide  into  rawhide

Port to C99 (#2186195)
Arjun Shankar • a year ago  
file added
+132
@@ -0,0 +1,132 @@ 

+ diff --git a/configure b/configure

+ index 551a963ae06a3624..06ba2c4ebde3e9ab 100755

+ --- a/configure

+ +++ b/configure

+ @@ -16341,8 +16341,9 @@ else

+  /* end confdefs.h.  */

+  #include <stdio.h>

+                                      #include <signal.h>

+ -                                    segv() { exit(1); }

+ -                                    main() { char b[10]; signal(SIGSEGV,segv); snprintf(b,10,"%s",NULL); exit(0); }

+ +                                    #include <stdlib.h>

+ +                                    void segv() { exit(1); }

+ +                                    int main() { char b[10]; signal(SIGSEGV,segv); snprintf(b,10,"%s",NULL); exit(0); }

+  _ACEOF

+  if ac_fn_c_try_run "$LINENO"; then :

+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5

+ @@ -16373,9 +16374,10 @@ else

+  #include <stdio.h>

+                                      #include <signal.h>

+                                      #include <stdarg.h>

+ -                                    segv() { exit(1); }

+ -                                    expand(char *f,...) { va_list ap; char b[10]; va_start(ap,f); vsnprintf(b,10,f,ap); va_end(ap); }

+ -                                    main() { char b[10]; signal(SIGSEGV,segv); expand("%s", NULL); exit(0); }

+ +                                    #include <stdlib.h>

+ +                                    void segv() { exit(1); }

+ +                                    void expand(char *f,...) { va_list ap; char b[10]; va_start(ap,f); vsnprintf(b,10,f,ap); va_end(ap); }

+ +                                    int main() { char b[10]; signal(SIGSEGV,segv); expand("%s", NULL); exit(0); }

+  _ACEOF

+  if ac_fn_c_try_run "$LINENO"; then :

+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5

+ diff --git a/configure.ac b/configure.ac

+ index af173540785271fd..071933830f3676b2 100644

+ --- a/configure.ac

+ +++ b/configure.ac

+ @@ -323,8 +323,9 @@ if test "x-$ac_cv_func_snprintf" = "x-yes" ; then

+      AC_MSG_CHECKING([if snprintf can handle NULL arguments])

+      AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>

+                                      #include <signal.h>

+ -                                    segv() { exit(1); }

+ -                                    main() { char b[10]; signal(SIGSEGV,segv); snprintf(b,10,"%s",NULL); exit(0); }]])],

+ +                                    #include <stdlib.h>

+ +                                    void segv() { exit(1); }

+ +                                    int main() { char b[10]; signal(SIGSEGV,segv); snprintf(b,10,"%s",NULL); exit(0); }]])],

+                    AC_MSG_RESULT(yes),

+                    [AC_MSG_RESULT(no)

+                     AC_DEFINE(HAVE_BROKEN_SNPRINTF,1,[Define to 1 if 'snprintf' cannot handle NULL arguments.])])

+ @@ -334,9 +335,10 @@ if test "x-$ac_cv_func_vsnprintf" = "x-yes" ; then

+      AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>

+                                      #include <signal.h>

+                                      #include <stdarg.h>

+ -                                    segv() { exit(1); }

+ -                                    expand(char *f,...) { va_list ap; char b[10]; va_start(ap,f); vsnprintf(b,10,f,ap); va_end(ap); }

+ -                                    main() { char b[10]; signal(SIGSEGV,segv); expand("%s", NULL); exit(0); }]])],

+ +                                    #include <stdlib.h>

+ +                                    void segv() { exit(1); }

+ +                                    void expand(char *f,...) { va_list ap; char b[10]; va_start(ap,f); vsnprintf(b,10,f,ap); va_end(ap); }

+ +                                    int main() { char b[10]; signal(SIGSEGV,segv); expand("%s", NULL); exit(0); }]])],

+                    AC_MSG_RESULT(yes),

+                    [AC_MSG_RESULT(no)

+                     AC_DEFINE(HAVE_BROKEN_VSNPRINTF,1,[Define to 1 if 'vsnprintf' cannot handle NULL arguments.])])

+ diff --git a/storage/authreg_ldapfull.c b/storage/authreg_ldapfull.c

+ index 6dbf202bf8627925..a545ad1dcb6cccb9 100644

+ --- a/storage/authreg_ldapfull.c

+ +++ b/storage/authreg_ldapfull.c

+ @@ -35,6 +35,7 @@

+  #ifdef STORAGE_LDAP

+  #ifdef HAVE_CRYPT

+  #include <unistd.h>

+ +#include <crypt.h>

+  #endif

+  

+  #ifdef HAVE_SSL

+ diff --git a/storage/authreg_mysql.c b/storage/authreg_mysql.c

+ index 0b35d6ddfd40c3af..5e15143837e66c08 100644

+ --- a/storage/authreg_mysql.c

+ +++ b/storage/authreg_mysql.c

+ @@ -34,6 +34,7 @@

+  #else

+  #ifdef HAVE_CRYPT

+  #include <unistd.h>

+ +#include <crypt.h>

+  #endif

+  #endif

+  

+ diff --git a/storage/authreg_pgsql.c b/storage/authreg_pgsql.c

+ index 446fa1f8217b162a..1065c5d35b629737 100644

+ --- a/storage/authreg_pgsql.c

+ +++ b/storage/authreg_pgsql.c

+ @@ -32,6 +32,7 @@

+  #else

+  #ifdef HAVE_CRYPT

+  #include <unistd.h>

+ +#include <crypt.h>

+  #endif

+  #endif

+  

+ diff --git a/storage/authreg_sqlite.c b/storage/authreg_sqlite.c

+ index 25058ee639238a91..dcd4cadba3504fa5 100644

+ --- a/storage/authreg_sqlite.c

+ +++ b/storage/authreg_sqlite.c

+ @@ -41,6 +41,7 @@

+  #else

+  #ifdef HAVE_CRYPT

+  #include <unistd.h>

+ +#include <crypt.h>

+  #endif

+  #endif

+  

+ diff --git a/sx/websocket.c b/sx/websocket.c

+ index b08e135f4966c592..4df051559850dfe1 100644

+ --- a/sx/websocket.c

+ +++ b/sx/websocket.c

+ @@ -22,6 +22,7 @@

+   * http://tools.ietf.org/html/rfc7395

+   */

+  

+ +#define _GNU_SOURCE

+  #include "sx.h"

+  #include <stdarg.h>

+  #include <string.h>

+ diff --git a/util/crypt_blowfish.h b/util/crypt_blowfish.h

+ index d81e8cbdea9473d0..8ba1a917a84e9276 100644

+ --- a/util/crypt_blowfish.h

+ +++ b/util/crypt_blowfish.h

+ @@ -23,7 +23,6 @@

+  #endif

+  

+  extern char *bcrypt(__const char *key, __const char *setting);

+ -extern char *crypt_r(__const char *key, __const char *setting, void *data);

+  

+  #ifndef __SKIP_OW

+  extern char *crypt_rn(__const char *key, __const char *setting,

file modified
+6 -1
@@ -14,7 +14,7 @@ 

  Summary:        OpenSource server implementation of the Jabber protocols

  Name:           jabberd

  Version:        2.6.1

- Release:        23%{?dist}

+ Release:        24%{?dist}

  License:        GPLv2+

  Source0:        https://github.com/jabberd2/jabberd2/releases/download/jabberd-%{version}/jabberd-%{version}.tar.xz

  Source1:        README.fedora
@@ -29,6 +29,7 @@ 

  Patch6:         0001-Fix-build-errors-with-MariaDB-10.2.patch

  # rhbz1510642

  Patch7:         181e736dcbb19c828266d88837f4343510b4d20e.patch

+ Patch8:         jabberd-c99.patch

  URL:            http://jabberd2.org/

  BuildRequires:  openssl-devel libidn-devel expat-devel

  BuildRequires:  perl-generators
@@ -111,6 +112,7 @@ 

  %patch4 -p1

  %patch5 -p1

  %patch7 -p1

+ %patch8 -p1

  autoreconf --verbose --force --install

  %endif

  %patch6 -p1
@@ -355,6 +357,9 @@ 

  %attr(700, jabber, jabber) %{_var}/lib/%{name}

  

  %changelog

+ * Wed Apr 12 2023 Arjun Shankar <arjun@redhat.com> - 2.6.1-24

+ - Port to C99 (#2186195)

+ 

  * Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-23

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

  

rebased onto 6649168

a year ago

The minimal changes look okay to me. Will merge and build. Thanks.

Pull-Request has been merged by fweimer

a year ago
Metadata