#include "ardour/route.h"
#include "ardour/route_group.h"
#include "ardour/session.h"
+#include "ardour/debug.h"
#include "i18n.h"
}
}
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
/* clang complains: 'operator<<' should be declared prior to the call site or in an associated namespace of one of its
* arguments std::ostream& operator<<(std::ostream& o, ARDOUR::PresentationInfo const& rid)"
*/
#include <sys/vfs.h>
#endif
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__FreeBSD__)
#include <sys/param.h>
#include <sys/mount.h>
#endif
void
Session::refresh_disk_space ()
{
-#if __APPLE__ || (HAVE_SYS_VFS_H && HAVE_SYS_STATVFS_H)
+#if __APPLE__ || __FreeBSD__ || (HAVE_SYS_VFS_H && HAVE_SYS_STATVFS_H)
Glib::Threads::Mutex::Lock lm (space_lock);
#include <iostream>
#if defined(PLATFORM_WINDOWS)
#include <winsock.h>
-#elif defined(__FREE_BSD__)
+#elif defined(__FreeBSD__)
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/_sockaddr_storage.h>
{
#if defined(PTW32_VERSION) || defined(__hpux)
return pthread_num_processors_np();
-#elif defined(__APPLE__) || defined(__FreeBSD__)
+#elif defined(__APPLE__)
int count;
size_t size=sizeof(count);
return sysctlbyname("hw.physicalcpu",&count,&size,NULL,0)?0:count;
+#elif defined(__FreeBSD__)
+ int count;
+ size_t size=sizeof(count);
+ return sysctlbyname("hw.ncpu",&count,&size,NULL,0)?0:count;
#elif defined(HAVE_UNISTD) && defined(_SC_NPROCESSORS_ONLN)
int const count=sysconf(_SC_NPROCESSORS_ONLN);
return (count>0)?count:0;
#include <stdint.h>
+#include <cstdlib> // abs(int)
#include <cmath>
#include "pbd/libpbd_visibility.h"
#undef interface // VKamyshniy: to avoid "include/giomm-2.4/giomm/dbusmessage.h:270:94: error: expected ',' or '...' before 'struct'"
#endif
+#else // posix
+#include <sys/types.h>
+#include <sys/wait.h> /* WNOHANG is part of the exposed API */
#endif
#include <string>
*/
#include <stdio.h>
+#include <stdlib.h>
#include <string>
#include <string.h>
#include <assert.h>
from waflib.extras import autowaf as autowaf
from waflib import Options
import os
+import re
+import sys
# Mandatory variables
top = '.'
obj.source = [ 'abicheck.c' ]
obj.target = 'gcc-glibmm-abi-check'
obj.name = 'gcc-glibmm-abi-check'
- obj.lib = 'dl'
+ if re.search ("freebsd", sys.platform) == None:
+ obj.lib = 'dl'
obj.install_path = None
if opt.stl_debug:
cxx_flags.append("-D_GLIBCXX_DEBUG")
+ if re.search ("freebsd", sys.platform) != None:
+ linker_flags.append('-lexecinfo')
+
if conf.env['DEBUG_RT_ALLOC']:
compiler_flags.append('-DDEBUG_RT_ALLOC')
linker_flags.append('-ldl')
# executing a test program is n/a when cross-compiling
if Options.options.dist_target != 'mingw':
if Options.options.dist_target != 'msvc':
- conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL')
+ if re.search ("freebsd", sys.platform) != None:
+ conf.check_cc(function_name='dlopen', header_name='dlfcn.h', uselib_store='DL')
+ else:
+ conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL')
conf.check_cxx(fragment = "#include <boost/version.hpp>\nint main(void) { return (BOOST_VERSION >= 103900 ? 0 : 1); }\n",
execute = "1",
mandatory = True,