tests: fix compilation of tests on FreeBSD 11
Some includes were missing in .h files, and the tests must be linked with intl and execinfo on FreeBSD.
This commit is contained in:
parent
b547bf6bbb
commit
1361602ea5
@ -23,6 +23,7 @@
|
||||
|
||||
#include <regex.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#include "wee-config-file.h"
|
||||
|
||||
struct t_gui_buffer;
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_HDATA_H
|
||||
#define WEECHAT_HDATA_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define HDATA_VAR(__struct, __name, __type, __update_allowed, \
|
||||
__array_size, __hdata_name) \
|
||||
hdata_new_var (hdata, #__name, offsetof (__struct, __name), \
|
||||
|
@ -22,6 +22,7 @@
|
||||
#define WEECHAT_HOOK_H 1
|
||||
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef HAVE_GNUTLS
|
||||
#include <gnutls/gnutls.h>
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_INFOLIST_H
|
||||
#define WEECHAT_INFOLIST_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
/* list structures */
|
||||
|
||||
enum t_infolist_type
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_UTIL_H
|
||||
#define WEECHAT_UTIL_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
struct t_rlimit_resource
|
||||
{
|
||||
|
@ -26,6 +26,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_GUI_CHAT_H
|
||||
#define WEECHAT_GUI_CHAT_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
struct t_hashtable;
|
||||
struct t_gui_window;
|
||||
struct t_gui_buffer;
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_GUI_KEY_H
|
||||
#define WEECHAT_GUI_KEY_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
struct t_hashtable;
|
||||
|
||||
#define GUI_KEY_BUFFER_BLOCK_SIZE 256
|
||||
|
@ -20,6 +20,7 @@
|
||||
#ifndef WEECHAT_GUI_LINE_H
|
||||
#define WEECHAT_GUI_LINE_H 1
|
||||
|
||||
#include <time.h>
|
||||
#include <regex.h>
|
||||
|
||||
struct t_infolist;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#ifndef WEECHAT_EXEC_H
|
||||
#define WEECHAT_EXEC_H 1
|
||||
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
#define weechat_plugin weechat_exec_plugin
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_IRC_CHANNEL_H
|
||||
#define WEECHAT_IRC_CHANNEL_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define IRC_CHANNEL_DEFAULT_CHANTYPES "#&+!"
|
||||
|
||||
/* channel types */
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_IRC_CTCP_H
|
||||
#define WEECHAT_IRC_CTCP_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
struct t_irc_server;
|
||||
struct t_irc_channel;
|
||||
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_IRC_PROTOCOL_H
|
||||
#define WEECHAT_IRC_PROTOCOL_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define IRC_PROTOCOL_CALLBACK(__command) \
|
||||
int \
|
||||
irc_protocol_cb_##__command (struct t_irc_server *server, \
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_IRC_RAW_H
|
||||
#define WEECHAT_IRC_RAW_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define IRC_RAW_BUFFER_NAME "irc_raw"
|
||||
|
||||
#define IRC_RAW_PREFIX_RECV "-->"
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_IRC_REDIRECT_H
|
||||
#define WEECHAT_IRC_REDIRECT_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define IRC_REDIRECT_TIMEOUT_DEFAULT 60
|
||||
|
||||
struct t_irc_server;
|
||||
|
@ -21,6 +21,7 @@
|
||||
#ifndef WEECHAT_IRC_SERVER_H
|
||||
#define WEECHAT_IRC_SERVER_H 1
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <regex.h>
|
||||
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_PLUGIN_API_H
|
||||
#define WEECHAT_PLUGIN_API_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
struct t_plugin_api_hdata
|
||||
{
|
||||
char *name; /* hdata name */
|
||||
|
@ -21,6 +21,8 @@
|
||||
#ifndef WEECHAT_PLUGIN_SCRIPT_API_H
|
||||
#define WEECHAT_PLUGIN_SCRIPT_API_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
extern void plugin_script_api_charset_set (struct t_plugin_script *script,
|
||||
const char *charset);
|
||||
extern struct t_config_file *plugin_script_api_config_new (struct t_weechat_plugin *weechat_plugin,
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_RELAY_CLIENT_H
|
||||
#define WEECHAT_RELAY_CLIENT_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifdef HAVE_GNUTLS
|
||||
#include <gnutls/gnutls.h>
|
||||
#endif /* HAVE_GNUTLS */
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_RELAY_RAW_H
|
||||
#define WEECHAT_RELAY_RAW_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "relay-client.h"
|
||||
|
||||
#define RELAY_RAW_BUFFER_NAME "relay_raw"
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_RELAY_SERVER_H
|
||||
#define WEECHAT_RELAY_SERVER_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifdef HAVE_GNUTLS
|
||||
#define RELAY_SERVER_GNUTLS_DH_BITS 1024
|
||||
#endif /* HAVE_GNUTLS */
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_RELAY_WEECHAT_MSG_H
|
||||
#define WEECHAT_RELAY_WEECHAT_MSG_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
struct t_relay_weechat_nicklist;
|
||||
|
||||
#define RELAY_WEECHAT_MSG_INITIAL_ALLOC 4096
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_SCRIPT_REPO_H
|
||||
#define WEECHAT_SCRIPT_REPO_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
/* status for script */
|
||||
#define SCRIPT_STATUS_INSTALLED 1
|
||||
#define SCRIPT_STATUS_AUTOLOADED 2
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_TRIGGER_CALLBACK_H
|
||||
#define WEECHAT_TRIGGER_CALLBACK_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define TRIGGER_CALLBACK_CB_INIT(__rc) \
|
||||
struct t_trigger *trigger; \
|
||||
struct t_hashtable *pointers, *extra_vars; \
|
||||
|
@ -26,6 +26,7 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
|
@ -21,7 +21,9 @@
|
||||
#define WEECHAT_XFER_H 1
|
||||
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#include <gcrypt.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#define weechat_plugin weechat_xfer_plugin
|
||||
#define XFER_PLUGIN_NAME "xfer"
|
||||
|
@ -42,6 +42,13 @@ set(LIB_WEECHAT_UNIT_TESTS_SRC
|
||||
)
|
||||
add_library(weechat_unit_tests STATIC ${LIB_WEECHAT_UNIT_TESTS_SRC})
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
list(APPEND EXTRA_LIBS "intl")
|
||||
if(HAVE_BACKTRACE)
|
||||
list(APPEND EXTRA_LIBS "execinfo")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# binary to run tests
|
||||
set(WEECHAT_TESTS_SRC tests.cpp tests.h)
|
||||
add_executable(tests ${WEECHAT_TESTS_SRC})
|
||||
|
Loading…
x
Reference in New Issue
Block a user