build on the mac

This commit is contained in:
Joel Reymont 2013-07-10 16:20:59 +01:00
parent 2895f468c4
commit 719e5d2dc0
5 changed files with 18 additions and 6 deletions

View file

@ -17,7 +17,7 @@
#include "geventloop.h"
// #include "valgrind/memcheck.h"
#ifndef __FreeBSD__
#if !defined(__FreeBSD__) && !defined(__APPLE__)
#include "malloc.h"
#endif
#include <algorithm>
@ -417,7 +417,7 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
purple_accounts_delete_wrapped(account);
#ifndef WIN32
#ifndef __FreeBSD__
#if !defined(__FreeBSD__) && !defined(__APPLE__)
malloc_trim(0);
#endif
#endif
@ -1583,7 +1583,7 @@ static void signed_on(PurpleConnection *gc, gpointer unused) {
PurpleAccount *account = purple_connection_get_account_wrapped(gc);
np->handleConnected(np->m_accounts[account]);
#ifndef WIN32
#ifndef __FreeBSD__
#if !defined(__FreeBSD__) && !defined(__APPLE__)
// force returning of memory chunks allocated by libxml2 to kernel
malloc_trim(0);
#endif
@ -1782,7 +1782,7 @@ static void transportDataReceived(gpointer data, gint source, PurpleInputConditi
int main(int argc, char **argv) {
#ifndef WIN32
#ifndef __FreeBSD__
#if !defined(__FreeBSD__) && !defined(__APPLE__)
mallopt(M_CHECK_ACTION, 2);
mallopt(M_PERTURB, 0xb);
#endif

View file

@ -23,7 +23,11 @@
* freebsd, crypt works properly on those systems. i hate solaris */
#if HAVE_CONFIG_H
# include <config.h>
# include <config.h>
#endif
#ifdef __APPLE__
#define HAVE_STRING_H 1
#endif
#if HAVE_STRING_H

View file

@ -51,6 +51,10 @@
# include <config.h>
#endif
#if __APPLE__
#define STDC_HEADERS 1
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif

View file

@ -23,6 +23,10 @@
# include <config.h>
#endif
#if __APPLE__
#define STDC_HEADERS 1
#endif
#if STDC_HEADERS
# include <string.h>
#else

View file

@ -64,7 +64,7 @@ void *y_memdup(const void *addr, int n);
char **y_strsplit(char *str, char *sep, int nelem);
void y_strfreev(char **vector);
#ifndef _WIN32
#if !defined(_WIN32) && !defined(__APPLE__)
int strncasecmp(const char *s1, const char *s2, size_t n);
int strcasecmp(const char *s1, const char *s2);