-#if defined (ARCH_X86) && defined (BUILD_SSE_OPTIMIZATIONS)
-
- unsigned long use_sse = 0;
-
-#ifndef USE_X86_64_ASM
- asm (
- "mov $1, %%eax\n"
- "pushl %%ebx\n"
- "cpuid\n"
- "movl %%edx, %0\n"
- "popl %%ebx\n"
- : "=r" (use_sse)
- :
- : "%eax", "%ecx", "%edx", "memory");
-
-#else
-
- asm (
- "pushq %%rbx\n"
- "movq $1, %%rax\n"
- "cpuid\n"
- "movq %%rdx, %0\n"
- "popq %%rbx\n"
- : "=r" (use_sse)
- :
- : "%rax", "%rcx", "%rdx", "memory");
-
-#endif /* USE_X86_64_ASM */
- use_sse &= (1 << 25); // bit 25 = SSE support
-
- if (use_sse) {
- info << "Using SSE optimized routines" << endmsg;
-
- // SSE SET
- Session::compute_peak = x86_sse_compute_peak;
- Session::apply_gain_to_buffer = x86_sse_apply_gain_to_buffer;
- Session::mix_buffers_with_gain = x86_sse_mix_buffers_with_gain;
- Session::mix_buffers_no_gain = x86_sse_mix_buffers_no_gain;
-
- generic_mix_functions = false;
-
- }
-
-#elif defined (__APPLE__) && defined (BUILD_VECLIB_OPTIMIZATIONS)
- long sysVersion = 0;
-
- if (noErr != Gestalt(gestaltSystemVersion, &sysVersion))
- sysVersion = 0;
-
- if (sysVersion >= 0x00001040) { // Tiger at least
- Session::compute_peak = veclib_compute_peak;
- Session::apply_gain_to_buffer = veclib_apply_gain_to_buffer;
- Session::mix_buffers_with_gain = veclib_mix_buffers_with_gain;
- Session::mix_buffers_no_gain = veclib_mix_buffers_no_gain;
-
- generic_mix_functions = false;
-
- info << "Apple VecLib H/W specific optimizations in use" << endmsg;
- }
-#endif
- }
-
- if (generic_mix_functions) {
-
- Session::compute_peak = compute_peak;
- Session::apply_gain_to_buffer = apply_gain_to_buffer;
- Session::mix_buffers_with_gain = mix_buffers_with_gain;
- Session::mix_buffers_no_gain = mix_buffers_no_gain;
-
- info << "No H/W specific optimizations in use" << endmsg;
+ if (setrlimit (RLIMIT_NOFILE, &rl) != 0) {
+ if (rl.rlim_cur == RLIM_INFINITY) {
+ error << _("Could not set system open files limit to \"unlimited\"") << endmsg;
+ } else {
+ error << string_compose (_("Could not set system open files limit to %1"), rl.rlim_cur) << endmsg;
+ }
+ } else {
+ if (rl.rlim_cur == RLIM_INFINITY) {
+ info << _("Removed open file count limit. Excellent!") << endmsg;
+ } else {
+ info << string_compose (_("%1 will be limited to %2 open files"), PROGRAM_NAME, rl.rlim_cur) << endmsg;
+ }
+ }
+ } else {
+ error << string_compose (_("Could not get system open files limit (%1)"), strerror (errno)) << endmsg;