From 99318edd3ca768e57e52675225b240ec9b12871a Mon Sep 17 00:00:00 2001 From: Kristofer Berggren Date: Sun, 3 Dec 2023 18:13:10 +0800 Subject: [PATCH] fixes #146 - workaround for shadow compilation warnings on linux --- src/imap.cpp | 1 + src/libetpan_help.h | 29 +++++++++++++++++++++++++++++ src/loghelp.cpp | 1 + src/nmail.1 | 2 +- src/sasl.cpp | 1 + src/smtp.cpp | 1 + src/util.cpp | 1 + src/version.cpp | 2 +- 8 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 src/libetpan_help.h diff --git a/src/imap.cpp b/src/imap.cpp index 32a6ac0..b3dfe58 100644 --- a/src/imap.cpp +++ b/src/imap.cpp @@ -7,6 +7,7 @@ #include "imap.h" +#include "libetpan_help.h" #include #include diff --git a/src/libetpan_help.h b/src/libetpan_help.h new file mode 100644 index 0000000..8c99298 --- /dev/null +++ b/src/libetpan_help.h @@ -0,0 +1,29 @@ +// libetpan_help.h +// +// Copyright (c) 2023 Kristofer Berggren +// All rights reserved. +// +// nmail is distributed under the MIT license, see LICENSE for details. + +#pragma once + +// @todo: This is a temporary workaround to fix shadowing compilation warnings, +// to be removed eventually. + +#ifdef __cplusplus +extern "C" { +#endif + +struct _mailstream; +typedef struct _mailstream mailstream; +void mailstream_cancel(mailstream * s); + +struct mailimap; +typedef struct mailimap mailimap; +struct mailimap_capability_data; +typedef struct mailimap_capability_data mailimap_capability_data; +int mailimap_capability(mailimap*, mailimap_capability_data**); + +#ifdef __cplusplus +} +#endif diff --git a/src/loghelp.cpp b/src/loghelp.cpp index 5b59ef9..bdef596 100644 --- a/src/loghelp.cpp +++ b/src/loghelp.cpp @@ -11,6 +11,7 @@ #include #include +#include "libetpan_help.h" #include #include diff --git a/src/nmail.1 b/src/nmail.1 index 675c8b1..8bf0f36 100644 --- a/src/nmail.1 +++ b/src/nmail.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man. -.TH NMAIL "1" "November 2023" "nmail v4.33" "User Commands" +.TH NMAIL "1" "November 2023" "nmail v4.34" "User Commands" .SH NAME nmail \- ncurses mail .SH SYNOPSIS diff --git a/src/sasl.cpp b/src/sasl.cpp index 13dfd4b..45c6dc3 100644 --- a/src/sasl.cpp +++ b/src/sasl.cpp @@ -7,6 +7,7 @@ #include "sasl.h" +#include "libetpan_help.h" #include #include diff --git a/src/smtp.cpp b/src/smtp.cpp index a50ee62..fc05ad5 100644 --- a/src/smtp.cpp +++ b/src/smtp.cpp @@ -14,6 +14,7 @@ #include +#include "libetpan_help.h" #include #include #include diff --git a/src/util.cpp b/src/util.cpp index 753ce4a..984cc36 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -33,6 +33,7 @@ #include #endif +#include "libetpan_help.h" #include #include #include diff --git a/src/version.cpp b/src/version.cpp index c19f5e9..363cbfb 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -7,7 +7,7 @@ #include "version.h" -#define NMAIL_VERSION "4.33" +#define NMAIL_VERSION "4.34" std::string Version::GetBuildOs() {