Skip to content

Commit

Permalink
mail/cyrus-imapd{25,30,32}: Fix build with more recent Perl
Browse files Browse the repository at this point in the history
PR:		273093
Reported by:	delphij
Submitted by:	delphij
  • Loading branch information
Hajimu UMEMOTO authored and Hajimu UMEMOTO committed Aug 13, 2023
1 parent ba7720b commit 1822350
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 12 deletions.
16 changes: 16 additions & 0 deletions mail/cyrus-imapd25/files/patch-lib_assert.h
@@ -0,0 +1,16 @@
--- lib/assert.h.orig 2021-03-09 02:28:07 UTC
+++ lib/assert.h
@@ -43,11 +43,13 @@
#ifndef INCLUDED_ASSERT_H
#define INCLUDED_ASSERT_H

+#ifndef PERL_POLLUTE
#ifdef __STDC__
#define assert(ex) {if (!(ex))assertionfailed(__FILE__, __LINE__, #ex);}
void assertionfailed(const char *file, int line, const char *expr);
#else
#define assert(ex) {if (!(ex))assertionfailed(__FILE__, __LINE__, (char*)0);}
+#endif
#endif

#endif /* INCLUDED_ASSERT_H */
14 changes: 8 additions & 6 deletions mail/cyrus-imapd30/files/patch-lib_assert.h
@@ -1,22 +1,24 @@
--- lib/assert.h.orig 2017-09-02 01:09:05 UTC
--- lib/assert.h.orig 2023-02-12 23:06:46 UTC
+++ lib/assert.h
@@ -43,6 +43,10 @@
@@ -43,11 +43,21 @@
#ifndef INCLUDED_ASSERT_H
#define INCLUDED_ASSERT_H

+#ifndef PERL_POLLUTE
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef __STDC__
#define assert(ex) {if (!(ex))assertionfailed(__FILE__, __LINE__, #ex);}
void assertionfailed(const char *file, int line, const char *expr);
@@ -50,4 +54,8 @@ void assertionfailed(const char *file, i
#else
#define assert(ex) {if (!(ex))assertionfailed(__FILE__, __LINE__, (char*)0);}
#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
#endif

#endif /* INCLUDED_ASSERT_H */
14 changes: 8 additions & 6 deletions mail/cyrus-imapd32/files/patch-lib_assert.h
@@ -1,22 +1,24 @@
--- lib/assert.h.orig 2017-09-02 01:09:05 UTC
--- lib/assert.h.orig 2023-02-12 23:06:46 UTC
+++ lib/assert.h
@@ -43,6 +43,10 @@
@@ -43,11 +43,21 @@
#ifndef INCLUDED_ASSERT_H
#define INCLUDED_ASSERT_H

+#ifndef PERL_POLLUTE
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef __STDC__
#define assert(ex) {if (!(ex))assertionfailed(__FILE__, __LINE__, #ex);}
void assertionfailed(const char *file, int line, const char *expr);
@@ -50,4 +54,8 @@ void assertionfailed(const char *file, i
#else
#define assert(ex) {if (!(ex))assertionfailed(__FILE__, __LINE__, (char*)0);}
#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
#endif

#endif /* INCLUDED_ASSERT_H */

0 comments on commit 1822350

Please sign in to comment.