Commit 49748963 authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

win32: use _WIN32 macro instead of WIN32

parent e1f34777
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "linphonec.h" #include "linphonec.h"
#include "lpconfig.h" #include "lpconfig.h"
#ifndef WIN32 #ifndef _WIN32
#include <sys/wait.h> #include <sys/wait.h>
#include <unistd.h> #include <unistd.h>
#endif #endif
...@@ -118,7 +118,7 @@ static void linphonec_friend_display(LinphoneFriend *fr); ...@@ -118,7 +118,7 @@ static void linphonec_friend_display(LinphoneFriend *fr);
static int linphonec_friend_list(LinphoneCore *lc, char *arg); static int linphonec_friend_list(LinphoneCore *lc, char *arg);
static void linphonec_display_command_help(LPC_COMMAND *cmd); static void linphonec_display_command_help(LPC_COMMAND *cmd);
static int linphonec_friend_call(LinphoneCore *lc, unsigned int num); static int linphonec_friend_call(LinphoneCore *lc, unsigned int num);
#ifndef WIN32 #ifndef _WIN32
static int linphonec_friend_add(LinphoneCore *lc, const char *name, const char *addr); static int linphonec_friend_add(LinphoneCore *lc, const char *name, const char *addr);
#endif #endif
static int linphonec_friend_delete(LinphoneCore *lc, int num); static int linphonec_friend_delete(LinphoneCore *lc, int num);
...@@ -949,7 +949,7 @@ lpc_cmd_firewall(LinphoneCore *lc, char *args) ...@@ -949,7 +949,7 @@ lpc_cmd_firewall(LinphoneCore *lc, char *args)
return 1; return 1;
} }
#ifndef WIN32 #ifndef _WIN32
/* Helper function for processing freind names */ /* Helper function for processing freind names */
static int static int
lpc_friend_name(char **args, char **name) lpc_friend_name(char **args, char **name)
...@@ -1034,7 +1034,7 @@ lpc_cmd_friend(LinphoneCore *lc, char *args) ...@@ -1034,7 +1034,7 @@ lpc_cmd_friend(LinphoneCore *lc, char *args)
} }
else if ( !strncmp(args, "add", 3) ) else if ( !strncmp(args, "add", 3) )
{ {
#ifndef WIN32 #ifndef _WIN32
char *name; char *name;
char addr[80]; char addr[80];
char *addr_p = addr; char *addr_p = addr;
...@@ -1886,7 +1886,7 @@ linphonec_friend_call(LinphoneCore *lc, unsigned int num) ...@@ -1886,7 +1886,7 @@ linphonec_friend_call(LinphoneCore *lc, unsigned int num)
return 1; return 1;
} }
#ifndef WIN32 #ifndef _WIN32
static int static int
linphonec_friend_add(LinphoneCore *lc, const char *name, const char *addr) linphonec_friend_add(LinphoneCore *lc, const char *name, const char *addr)
{ {
...@@ -2139,7 +2139,7 @@ static int lpc_cmd_param(LinphoneCore *lc, char *args) ...@@ -2139,7 +2139,7 @@ static int lpc_cmd_param(LinphoneCore *lc, char *args)
} }
static int lpc_cmd_speak(LinphoneCore *lc, char *args){ static int lpc_cmd_speak(LinphoneCore *lc, char *args){
#ifndef WIN32 #ifndef _WIN32
char voice[64]; char voice[64];
char *sentence; char *sentence;
char cl[128]; char cl[128];
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include "linphonec.h" #include "linphonec.h"
#ifdef WIN32 #ifdef _WIN32
#include <ws2tcpip.h> #include <ws2tcpip.h>
#include <ctype.h> #include <ctype.h>
#ifndef _WIN32_WCE #ifndef _WIN32_WCE
...@@ -439,7 +439,7 @@ static void start_prompt_reader(void){ ...@@ -439,7 +439,7 @@ static void start_prompt_reader(void){
#if !defined(_WIN32_WCE) #if !defined(_WIN32_WCE)
static ortp_pipe_t create_server_socket(void){ static ortp_pipe_t create_server_socket(void){
char path[128]; char path[128];
#ifndef WIN32 #ifndef _WIN32
snprintf(path,sizeof(path)-1,"linphonec-%i",getuid()); snprintf(path,sizeof(path)-1,"linphonec-%i",getuid());
#else #else
{ {
...@@ -459,7 +459,7 @@ static void *pipe_thread(void*p){ ...@@ -459,7 +459,7 @@ static void *pipe_thread(void*p){
if (server_sock==ORTP_PIPE_INVALID) return NULL; if (server_sock==ORTP_PIPE_INVALID) return NULL;
while(pipe_reader_run){ while(pipe_reader_run){
while(client_sock!=ORTP_PIPE_INVALID){ /*sleep until the last command is finished*/ while(client_sock!=ORTP_PIPE_INVALID){ /*sleep until the last command is finished*/
#ifndef WIN32 #ifndef _WIN32
usleep(20000); usleep(20000);
#else #else
Sleep(20); Sleep(20);
...@@ -537,7 +537,7 @@ char *linphonec_readline(char *prompt){ ...@@ -537,7 +537,7 @@ char *linphonec_readline(char *prompt){
} }
ms_mutex_unlock(&prompt_mutex); ms_mutex_unlock(&prompt_mutex);
linphonec_idle_call(); linphonec_idle_call();
#ifdef WIN32 #ifdef _WIN32
{ {
MSG msg; MSG msg;
Sleep(20); Sleep(20);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#ifdef WIN32 #ifdef _WIN32
#include <ws2tcpip.h> #include <ws2tcpip.h>
#include <windows.h> #include <windows.h>
#include <winbase.h> #include <winbase.h>
...@@ -82,7 +82,7 @@ static int send_command(const char *command, char *reply, int reply_len, int pri ...@@ -82,7 +82,7 @@ static int send_command(const char *command, char *reply, int reply_len, int pri
int i; int i;
int err; int err;
char path[128]; char path[128];
#ifndef WIN32 #ifndef _WIN32
snprintf(path,sizeof(path)-1,"linphonec-%i",getuid()); snprintf(path,sizeof(path)-1,"linphonec-%i",getuid());
#else #else
{ {
...@@ -130,7 +130,7 @@ static void print_usage(void){ ...@@ -130,7 +130,7 @@ static void print_usage(void){
exit(-1); exit(-1);
} }
#ifdef WIN32 #ifdef _WIN32
static char *argv_to_line(int argc, char *argv[]) { static char *argv_to_line(int argc, char *argv[]) {
int i; int i;
int line_length; int line_length;
...@@ -157,7 +157,7 @@ static char *argv_to_line(int argc, char *argv[]) { ...@@ -157,7 +157,7 @@ static char *argv_to_line(int argc, char *argv[]) {
#define MAX_ARGS 10 #define MAX_ARGS 10
#ifndef WIN32 #ifndef _WIN32
static void spawn_linphonec(int argc, char *argv[]){ static void spawn_linphonec(int argc, char *argv[]){
char * args[MAX_ARGS]; char * args[MAX_ARGS];
int i,j; int i,j;
......
...@@ -459,7 +459,7 @@ int main(int argc, char *argv[]) ...@@ -459,7 +459,7 @@ int main(int argc, char *argv[])
while (run_cond){ while (run_cond){
sipomatic_iterate(&sipomatic); sipomatic_iterate(&sipomatic);
#ifndef WIN32 #ifndef _WIN32
usleep(20000); usleep(20000);
#else #else
Sleep(20); Sleep(20);
......
...@@ -68,7 +68,7 @@ static gchar *get_record_file(void){ ...@@ -68,7 +68,7 @@ static gchar *get_record_file(void){
time_t curtime=time(NULL); time_t curtime=time(NULL);
struct tm loctime; struct tm loctime;
#ifdef WIN32 #ifdef _WIN32
loctime=*localtime(&curtime); loctime=*localtime(&curtime);
#else #else
localtime_r(&curtime,&loctime); localtime_r(&curtime,&loctime);
...@@ -296,7 +296,7 @@ void display_popup(GtkMessageType type,const gchar *message){ ...@@ -296,7 +296,7 @@ void display_popup(GtkMessageType type,const gchar *message){
static void open_mixer(void){ static void open_mixer(void){
GError *error = NULL; GError *error = NULL;
#ifdef WIN32 #ifdef _WIN32
if(!g_spawn_command_line_async("control mmsys.cpl",&error)){ if(!g_spawn_command_line_async("control mmsys.cpl",&error)){
display_popup(GTK_MESSAGE_WARNING,_("Sound preferences not found ")); display_popup(GTK_MESSAGE_WARNING,_("Sound preferences not found "));
g_error_free(error); g_error_free(error);
......
...@@ -31,7 +31,7 @@ char *linphone_gtk_call_logs_storage_get_db_file(const char *filename){ ...@@ -31,7 +31,7 @@ char *linphone_gtk_call_logs_storage_get_db_file(const char *filename){
if (access(CONFIG_FILE,F_OK)==0){ if (access(CONFIG_FILE,F_OK)==0){
snprintf(db_file,path_max,"%s",filename); snprintf(db_file,path_max,"%s",filename);
}else{ }else{
#ifdef WIN32 #ifdef _WIN32
const char *appdata=getenv("APPDATA"); const char *appdata=getenv("APPDATA");
if (appdata){ if (appdata){
snprintf(db_file,path_max,"%s\\%s",appdata,LINPHONE_CONFIG_DIR); snprintf(db_file,path_max,"%s\\%s",appdata,LINPHONE_CONFIG_DIR);
......
...@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <gtkosxapplication.h> #include <gtkosxapplication.h>
#endif #endif
#if defined(WIN32) && !defined(F_OK) #if defined(_WIN32) && !defined(F_OK)
#define F_OK 00 /*visual studio does not define F_OK*/ #define F_OK 00 /*visual studio does not define F_OK*/
#endif #endif
...@@ -65,7 +65,7 @@ char *linphone_gtk_message_storage_get_db_file(const char *filename){ ...@@ -65,7 +65,7 @@ char *linphone_gtk_message_storage_get_db_file(const char *filename){
if (access(CONFIG_FILE,F_OK)==0){ if (access(CONFIG_FILE,F_OK)==0){
snprintf(db_file,path_max,"%s",filename); snprintf(db_file,path_max,"%s",filename);
}else{ }else{
#ifdef WIN32 #ifdef _WIN32
const char *appdata=getenv("APPDATA"); const char *appdata=getenv("APPDATA");
if (appdata){ if (appdata){
snprintf(db_file,path_max,"%s\\%s",appdata,LINPHONE_CONFIG_DIR); snprintf(db_file,path_max,"%s\\%s",appdata,LINPHONE_CONFIG_DIR);
......
...@@ -996,7 +996,7 @@ char *linphone_gtk_friends_storage_get_db_file(const char *filename){ ...@@ -996,7 +996,7 @@ char *linphone_gtk_friends_storage_get_db_file(const char *filename){
if (access(CONFIG_FILE,F_OK)==0){ if (access(CONFIG_FILE,F_OK)==0){
snprintf(db_file,path_max,"%s",filename); snprintf(db_file,path_max,"%s",filename);
}else{ }else{
#ifdef WIN32 #ifdef _WIN32
const char *appdata=getenv("APPDATA"); const char *appdata=getenv("APPDATA");
if (appdata){ if (appdata){
snprintf(db_file,path_max,"%s\\%s",appdata,LINPHONE_CONFIG_DIR); snprintf(db_file,path_max,"%s\\%s",appdata,LINPHONE_CONFIG_DIR);
......
...@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
#ifdef WIN32 #ifdef _WIN32
// alloca is already defined by gtk // alloca is already defined by gtk
#undef alloca #undef alloca
#endif #endif
......
...@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "linphone.h" #include "linphone.h"
#ifndef WIN32 #ifndef _WIN32
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#endif #endif
...@@ -88,7 +88,7 @@ static FILE *linphone_gtk_log_init(void) ...@@ -88,7 +88,7 @@ static FILE *linphone_gtk_log_init(void)
/* arrange for _logdir to contain a /* arrange for _logdir to contain a
directory that has been created and _logfname to contain the directory that has been created and _logfname to contain the
path to a file to which we will log */ path to a file to which we will log */
#ifdef WIN32 #ifdef _WIN32
const char *appdata=getenv("LOCALAPPDATA"); const char *appdata=getenv("LOCALAPPDATA");
if (appdata) { if (appdata) {
snprintf(_logdir, sizeof(_logdir),"%s\\Linphone", appdata); snprintf(_logdir, sizeof(_logdir),"%s\\Linphone", appdata);
......
...@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifndef WIN32 #ifndef _WIN32
#include <unistd.h> #include <unistd.h>
#endif #endif
...@@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <gtkosxapplication.h> #include <gtkosxapplication.h>
#endif #endif
#ifdef WIN32 #ifdef _WIN32
#define chdir _chdir #define chdir _chdir
#include "direct.h" #include "direct.h"
#ifndef F_OK #ifndef F_OK
...@@ -148,7 +148,7 @@ static GOptionEntry linphone_options[]={ ...@@ -148,7 +148,7 @@ static GOptionEntry linphone_options[]={
#define RELATIVE_XML_DIR #define RELATIVE_XML_DIR
#define BUILD_TREE_XML_DIR "gtk" #define BUILD_TREE_XML_DIR "gtk"
#ifndef WIN32 #ifndef _WIN32
#define CONFIG_FILE ".linphonerc" #define CONFIG_FILE ".linphonerc"
#define SECRETS_FILE ".linphone-zidcache" #define SECRETS_FILE ".linphone-zidcache"
#define CERTIFICATES_PATH ".linphone-usr-crt" #define CERTIFICATES_PATH ".linphone-usr-crt"
...@@ -165,7 +165,7 @@ char *linphone_gtk_get_config_file(const char *filename){ ...@@ -165,7 +165,7 @@ char *linphone_gtk_get_config_file(const char *filename){
if (g_path_is_absolute(filename)) { if (g_path_is_absolute(filename)) {
snprintf(config_file,path_max,"%s",filename); snprintf(config_file,path_max,"%s",filename);
} else{ } else{
#ifdef WIN32 #ifdef _WIN32
const char *appdata=getenv("APPDATA"); const char *appdata=getenv("APPDATA");
if (appdata){ if (appdata){
snprintf(config_file,path_max,"%s\\%s",appdata,LINPHONE_CONFIG_DIR); snprintf(config_file,path_max,"%s\\%s",appdata,LINPHONE_CONFIG_DIR);
...@@ -194,7 +194,7 @@ static const char *linphone_gtk_get_factory_config_file(void){ ...@@ -194,7 +194,7 @@ static const char *linphone_gtk_get_factory_config_file(void){
if (progpath != NULL) { if (progpath != NULL) {
char *basename; char *basename;
progdir = strdup(progpath); progdir = strdup(progpath);
#ifdef WIN32 #ifdef _WIN32
basename = strrchr(progdir, '\\'); basename = strrchr(progdir, '\\');
if (basename != NULL) { if (basename != NULL) {
basename ++; basename ++;
...@@ -837,7 +837,7 @@ gchar *linphone_gtk_get_record_path(const LinphoneAddress *address, gboolean is_ ...@@ -837,7 +837,7 @@ gchar *linphone_gtk_get_record_path(const LinphoneAddress *address, gboolean is_
int i; int i;
const char *ext="wav"; const char *ext="wav";
#ifdef WIN32 #ifdef _WIN32
loctime=*localtime(&curtime); loctime=*localtime(&curtime);
#else #else
localtime_r(&curtime,&loctime); localtime_r(&curtime,&loctime);
...@@ -1449,7 +1449,7 @@ void linphone_gtk_open_browser(const char *uri) { ...@@ -1449,7 +1449,7 @@ void linphone_gtk_open_browser(const char *uri) {
g_warning("Could not open %s: %s", uri, error->message); g_warning("Could not open %s: %s", uri, error->message);
g_error_free(error); g_error_free(error);
} }
#elif defined(WIN32) #elif defined(_WIN32)
HINSTANCE instance = ShellExecute(NULL, "open", uri, NULL, NULL, SW_SHOWNORMAL); HINSTANCE instance = ShellExecute(NULL, "open", uri, NULL, NULL, SW_SHOWNORMAL);
if ((int)instance <= 32) { if ((int)instance <= 32) {
g_warning("Could not open %s (error #%i)", uri, (int)instance); g_warning("Could not open %s (error #%i)", uri, (int)instance);
...@@ -2068,7 +2068,7 @@ static void sigint_handler(int signum){ ...@@ -2068,7 +2068,7 @@ static void sigint_handler(int signum){
} }
static void populate_xdg_data_dirs_envvar(void) { static void populate_xdg_data_dirs_envvar(void) {
#ifndef WIN32 #ifndef _WIN32
int i; int i;
gchar *value; gchar *value;
gchar **paths; gchar **paths;
...@@ -2125,7 +2125,7 @@ int main(int argc, char *argv[]){ ...@@ -2125,7 +2125,7 @@ int main(int argc, char *argv[]){
if (!lang) lang = g_getenv("LANG"); if (!lang) lang = g_getenv("LANG");
} }
if (lang && lang[0]!='\0'){ if (lang && lang[0]!='\0'){
#ifdef WIN32 #ifdef _WIN32
if (strncmp(lang,"zh",2)==0){ if (strncmp(lang,"zh",2)==0){
workaround_gtk_entry_chinese_bug=TRUE; workaround_gtk_entry_chinese_bug=TRUE;
} }
...@@ -2143,7 +2143,7 @@ int main(int argc, char *argv[]){ ...@@ -2143,7 +2143,7 @@ int main(int argc, char *argv[]){
#else #else
g_message("NLS disabled.\n"); g_message("NLS disabled.\n");
#endif #endif
#ifdef WIN32 #ifdef _WIN32
gtk_rc_add_default_file("./gtkrc"); gtk_rc_add_default_file("./gtkrc");
#endif #endif
gdk_threads_enter(); gdk_threads_enter();
......
...@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <gtkosxapplication.h> #include <gtkosxapplication.h>
#endif #endif
#if !defined(WIN32) && !defined(__APPLE__) && GLIB_CHECK_VERSION(2, 26, 0) #if !defined(_WIN32) && !defined(__APPLE__) && GLIB_CHECK_VERSION(2, 26, 0)
#define STATUS_NOTIFIER_IS_USABLE 1 #define STATUS_NOTIFIER_IS_USABLE 1
#endif #endif
......
...@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "linphone.h" #include "linphone.h"
#ifdef WIN32 #ifdef _WIN32
#include <wininet.h> #include <wininet.h>
......
...@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#elif defined(WIN32) #elif defined(_WIN32)
#include <gdk/gdkwin32.h> #include <gdk/gdkwin32.h>
#elif defined(__APPLE__) #elif defined(__APPLE__)
extern void *gdk_quartz_window_get_nswindow(GdkWindow *window); extern void *gdk_quartz_window_get_nswindow(GdkWindow *window);
...@@ -103,7 +103,7 @@ static gboolean drag_drop(GtkWidget *widget, GdkDragContext *drag_context, gint ...@@ -103,7 +103,7 @@ static gboolean drag_drop(GtkWidget *widget, GdkDragContext *drag_context, gint
static void *get_native_handle(GdkWindow *gdkw){ static void *get_native_handle(GdkWindow *gdkw){
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
return (void *)GDK_WINDOW_XID(gdkw); return (void *)GDK_WINDOW_XID(gdkw);
#elif defined(WIN32) #elif defined(_WIN32)
return (void *)GDK_WINDOW_HWND(gdkw); return (void *)GDK_WINDOW_HWND(gdkw);
#elif defined(__APPLE__) #elif defined(__APPLE__)
return (void *)gdk_quartz_window_get_nsview(gdkw); return (void *)gdk_quartz_window_get_nsview(gdkw);
......
mediastreamer2 @ 2900d2af
Subproject commit a3ef55cdb23f59600fe62d86f927d15754f5effd Subproject commit 2900d2af5cedf1e8107bbb63291ddacf08d0a5c4
oRTP @ 140df465
Subproject commit b3d69baf234bb933fdd978cd9b132574f54e93ac Subproject commit 140df4654b5bd9318273a6f08d1e0c0a2e639d43
...@@ -59,8 +59,6 @@ if(NOT IOS OR NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") ...@@ -59,8 +59,6 @@ if(NOT IOS OR NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
endif() endif()
endif() endif()
add_definitions(-DBC_CONFIG_FILE="config.h")
if(IOS) if(IOS)
add_library(linphonetester STATIC ${SOURCE_FILES}) add_library(linphonetester STATIC ${SOURCE_FILES})
target_include_directories(linphonetester PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIRS}) target_include_directories(linphonetester PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIRS})
......
...@@ -74,7 +74,7 @@ RCFILES = \ ...@@ -74,7 +74,7 @@ RCFILES = \
IMAGE_FILES = images/nowebcamCIF.jpg IMAGE_FILES = images/nowebcamCIF.jpg
COMMON_FILE = common/vcards.vcf common/thousand_vcards.vcf VCARDS_FILE = vcards/vcards.vcf vcards/thousand_vcards.vcf
EXTRA_DIST = tester_hosts\ EXTRA_DIST = tester_hosts\
messages.db\ messages.db\
...@@ -83,7 +83,7 @@ EXTRA_DIST = tester_hosts\ ...@@ -83,7 +83,7 @@ EXTRA_DIST = tester_hosts\
$(CERTIFICATE_FILES)\ $(CERTIFICATE_FILES)\
$(RCFILES)\ $(RCFILES)\
$(IMAGE_FILES)\ $(IMAGE_FILES)\
$(COMMON_FILE) $(VCARDS_FILE)
if ENABLE_TESTS if ENABLE_TESTS
...@@ -99,8 +99,8 @@ rcfilesdir = $(datadir)/liblinphone_tester/rcfiles ...@@ -99,8 +99,8 @@ rcfilesdir = $(datadir)/liblinphone_tester/rcfiles
rcfiles_DATA = $(RCFILES) rcfiles_DATA = $(RCFILES)
imagesdir = $(datadir)/liblinphone_tester/images imagesdir = $(datadir)/liblinphone_tester/images
images_DATA = $(IMAGE_FILES) images_DATA = $(IMAGE_FILES)
commondir = $(datadir)/liblinphone_tester/common vcardsdir = $(datadir)/liblinphone_tester/vcards
common_DATA = $(COMMON_FILE) vcards_DATA = $(VCARDS_FILE)
# there are 2 targets: liblinphonetester.la and the executable liblinphone_tester # there are 2 targets: liblinphonetester.la and the executable liblinphone_tester
...@@ -147,7 +147,7 @@ liblinphone_testerdir = $(datadir)/liblinphone_tester ...@@ -147,7 +147,7 @@ liblinphone_testerdir = $(datadir)/liblinphone_tester
dist_liblinphone_tester_DATA = tester_hosts messages.db dist_liblinphone_tester_DATA = tester_hosts messages.db
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/coreapi -I$(top_srcdir)/tester/common AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/coreapi
AM_CFLAGS = -DBC_CONFIG_FILE=\"config.h\" $(STRICT_OPTIONS) $(STRICT_OPTIONS_CC) \ AM_CFLAGS = -DBC_CONFIG_FILE=\"config.h\" $(STRICT_OPTIONS) $(STRICT_OPTIONS_CC) \
-DIN_LINPHONE $(ORTP_CFLAGS) $(MEDIASTREAMER_CFLAGS) $(BCTOOLBOXTESTER_CFLAGS) \ -DIN_LINPHONE $(ORTP_CFLAGS) $(MEDIASTREAMER_CFLAGS) $(BCTOOLBOXTESTER_CFLAGS) \
$(BELLESIP_CFLAGS) $(LIBXML2_CFLAGS) $(SQLITE3_CFLAGS) $(BELCARD_CFLAGS) $(BELLESIP_CFLAGS) $(LIBXML2_CFLAGS) $(SQLITE3_CFLAGS) $(BELCARD_CFLAGS)
......
...@@ -32,7 +32,7 @@ static void linphone_vcard_import_export_friends_test(void) { ...@@ -32,7 +32,7 @@ static void linphone_vcard_import_export_friends_test(void) {
LinphoneCoreManager* manager = linphone_core_manager_new2("empty_rc", FALSE); LinphoneCoreManager* manager = linphone_core_manager_new2("empty_rc", FALSE);
LinphoneFriendList *lfl = linphone_core_get_default_friend_list(manager->lc); LinphoneFriendList *lfl = linphone_core_get_default_friend_list(manager->lc);
const MSList *friends = linphone_friend_list_get_friends(lfl); const MSList *friends = linphone_friend_list_get_friends(lfl);
char *import_filepath = bc_tester_res("common/vcards.vcf"); char *import_filepath = bc_tester_res("vcards/vcards.vcf");
char *export_filepath = create_filepath(bc_tester_get_writable_dir_prefix(), "export_vcards", "vcf"); char *export_filepath = create_filepath(bc_tester_get_writable_dir_prefix(), "export_vcards", "vcf");
int count = 0; int count = 0;
BC_ASSERT_EQUAL(ms_list_size(friends), 0, int, "%d"); BC_ASSERT_EQUAL(ms_list_size(friends), 0, int, "%d");
...@@ -60,7 +60,7 @@ static void linphone_vcard_import_export_friends_test(void) { ...@@ -60,7 +60,7 @@ static void linphone_vcard_import_export_friends_test(void) {
static void linphone_vcard_import_a_lot_of_friends_test(void) { static void linphone_vcard_import_a_lot_of_friends_test(void) {
LinphoneCoreManager* manager = linphone_core_manager_new2("empty_rc", FALSE); LinphoneCoreManager* manager = linphone_core_manager_new2("empty_rc", FALSE);
LinphoneFriendList *lfl = linphone_core_get_default_friend_list(manager->lc); LinphoneFriendList *lfl = linphone_core_get_default_friend_list(manager->lc);
char *import_filepath = bc_tester_res("common/thousand_vcards.vcf"); char *import_filepath = bc_tester_res("vcards/thousand_vcards.vcf");
clock_t start, end; clock_t start, end;
double elapsed = 0; double elapsed = 0;
const MSList *friends = NULL; const MSList *friends = NULL;
......