Skip to content

Commit 5bcce22

Browse files
committed
include: add GX_EXPORT markers
PHP Warning: PHP Startup: Unable to load dynamic library 'mapi.so' (tried: /usr/lib64/php8/extensions/mapi.so (/usr/lib64/php8/extensions/mapi.so: undefined symbol: _ZN13ZNOTIFICATION5clearEv), /usr/lib64/php8/extensions/mapi.so.so (/usr/lib64/php8/extensions/mapi.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Fixes: gromox-2.44-86-gc8ee6980f
1 parent 549ad3b commit 5bcce22

39 files changed

+156
-155
lines changed

include/gromox/ab_tree.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ enum class userinfo {
8787
* The ID of the (user or domain) object is used with an offset of 0x10, since
8888
* the lower minid values are reserved for special purposes.
8989
*/
90-
struct minid {
90+
struct GX_EXPORT minid {
9191
enum Type : uint32_t {
9292
address = 0,
9393
domain = 1,
@@ -138,7 +138,7 @@ struct minid {
138138
/**
139139
* @brief Address book domain node
140140
*/
141-
struct ab_domain {
141+
struct GX_EXPORT ab_domain {
142142
uint32_t id;
143143
sql_domain info;
144144
std::vector<minid> userref; ///< List of minids of contained objects
@@ -332,7 +332,7 @@ extern class ab AB;
332332
*
333333
* Provides easy access to a specific node in an ab_tree.
334334
*/
335-
struct ab_node {
335+
struct GX_EXPORT ab_node {
336336
public:
337337
ab_node() = default;
338338
ab_node(const ab::const_base_ref &br, minid m) : base(br.get()), mid(m) {}

include/gromox/arcfour.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
#include <cstdint>
33
#include <gromox/mapidefs.h>
44

5-
struct ARCFOUR_STATE {
5+
struct GX_EXPORT ARCFOUR_STATE {
66
uint8_t sbox[256];
77
uint8_t index_i;
88
uint8_t index_j;
99
};
1010

11-
void arcfour_init(ARCFOUR_STATE *pstate, const uint8_t *key, size_t keylen);
12-
void arcfour_crypt_sbox(ARCFOUR_STATE *pstate, uint8_t *pdata, int len);
13-
void arcfour_crypt(uint8_t *pdata, const uint8_t keystr[16], int len);
11+
extern GX_EXPORT void arcfour_init(ARCFOUR_STATE *pstate, const uint8_t *key, size_t keylen);
12+
extern GX_EXPORT void arcfour_crypt_sbox(ARCFOUR_STATE *pstate, uint8_t *pdata, int len);
13+
extern GX_EXPORT void arcfour_crypt(uint8_t *pdata, const uint8_t keystr[16], int len);

include/gromox/authmgr.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22
#include <cstdint>
33
#include <string>
4+
#include <gromox/defs.h>
45

56
/**
67
* Services that a user is allowed to exercise:
@@ -57,7 +58,7 @@ enum {
5758
* @have_xid: Whether an externid is set
5859
* (0=no / 1=yes / 0xFF=indeterminate)
5960
*/
60-
struct sql_meta_result {
61+
struct GX_EXPORT sql_meta_result {
6162
std::string username, maildir, lang, timezone, enc_passwd, errstr;
6263
std::string ldap_uri, ldap_binddn, ldap_bindpw, ldap_basedn;
6364
std::string ldap_mail_attr;

include/gromox/bounce_gen.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ struct tarray_set;
99

1010
namespace gromox {
1111

12-
struct bounce_template {
12+
struct GX_EXPORT bounce_template {
1313
std::string from, subject;
1414
std::unique_ptr<char[], stdlib_delete> content;
1515
size_t ctlen = 0, body_start = 0;

include/gromox/common_types.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <cstdint>
44
#ifndef BOOL
55
#if defined(__cplusplus) && defined(BOOLCHK)
6-
struct BOOL {
6+
struct GX_EXPORT BOOL {
77
int v;
88
#if 0
99
constexpr BOOL() noexcept = default;

include/gromox/config_file.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ enum cfg_flags {
2020
* If %CFG_ALIAS is in effect however, this specifies the actual key.
2121
* @min,@max: clamp value to minimum/maximum (only if %CFG_SIZE,%CFG_TIME)
2222
*/
23-
struct cfg_directive {
23+
struct GX_EXPORT cfg_directive {
2424
const char *key = nullptr, *deflt = nullptr;
2525
unsigned int flags = 0;
2626
const char *min = nullptr, *max = nullptr;

include/gromox/contexts_pool.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#define MAX_TURN_COUNTS 0x7FFFFFFF
66

77
/* enumeration for distinguishing parameters of contexts pool */
8-
enum{
8+
enum {
99
MAX_CONTEXTS_NUM,
1010
CONTEXTS_PER_THR,
1111
CUR_VALID_CONTEXTS,
@@ -30,7 +30,7 @@ enum class sctx_status {
3030
switching, /* context is switching between scheduling (polling, idling to turning) queues */
3131
};
3232

33-
struct schedule_context {
33+
struct GX_EXPORT schedule_context {
3434
DOUBLE_LIST_NODE node{};
3535
sctx_status type = sctx_status::free;
3636
BOOL b_waiting = false; /* is still in epoll queue */

include/gromox/database_mysql.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ namespace gromox {
88
using DB_LENGTHS = unsigned long *;
99
using DB_ROW = char **;
1010

11-
struct mysql_delete {
11+
struct GX_EXPORT mysql_delete {
1212
inline void operator()(MYSQL *x) const { mysql_close(x); }
1313
};
1414

15-
class GX_EXPORT DB_RESULT final {
15+
class GX_EXPORT DB_RESULT {
1616
public:
1717
DB_RESULT() = default;
1818
DB_RESULT(MYSQL_RES *r) noexcept : m_res(r) {}

include/gromox/dcerpc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct NDR_PUSH;
1212
* Used for proc plugins to det DCERPC information.
1313
* Pointee lifetime is bound by the PDU processor object.
1414
*/
15-
struct DCERPC_INFO {
15+
struct GX_EXPORT DCERPC_INFO {
1616
const char *client_addr = nullptr;
1717
const char *server_addr = nullptr; /* HTTP server address */
1818
const char *ep_host = nullptr; /* endpoint host name */

include/gromox/defs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ namespace gromox {
113113

114114
static constexpr uint32_t SEQ_STAR = -1;
115115

116-
struct seq_node {
116+
struct GX_EXPORT seq_node {
117117
using value_type = unsigned int;
118118
value_type min = SEQ_STAR, max = SEQ_STAR;
119119
};
120120

121-
struct stdlib_delete {
121+
struct GX_EXPORT stdlib_delete {
122122
inline void operator()(void *x) const { free(x); }
123123
};
124124
template<typename T> static inline T *me_alloc() {
@@ -146,7 +146,7 @@ template<typename U, typename V> static int three_way_compare(U &&a, V &&b)
146146
}
147147

148148
#if defined(COMPILE_DIAG) && !defined(__clang__)
149-
struct errno_t {
149+
struct GX_EXPORT errno_t {
150150
constexpr errno_t(int x) : m_value(x) {
151151
#ifdef COVERITY
152152
assert(x >= 0);

0 commit comments

Comments
 (0)