+/*
+ Copyright (C) 2012 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+#ifndef COMPILER_MSVC
#include "libpbd-config.h"
#define _XOPEN_SOURCE 600
_flags = Flags (0);
+#if defined(__MINGW64__) // Vkamyshniy: under __MINGW64__ the assembler code below is not compiled
+ return;
+#endif
+
#if !( (defined __x86_64__) || (defined __i386__) ) // !ARCH_X86
return;
#else
-
#ifndef _LP64 //USE_X86_64_ASM
asm volatile (
"mov $1, %%eax\n"
supported, otherwise, it isn't.
*/
-#ifdef NO_POSIX_MEMALIGN
+#ifndef HAVE_POSIX_MEMALIGN
fxbuf = (char **) malloc (sizeof (char *));
assert (fxbuf);
*fxbuf = (char *) malloc (512);
assert (*fxbuf);
#else
- posix_memalign ((void **) &fxbuf, 16, sizeof (char *));
+ (void) posix_memalign ((void **) &fxbuf, 16, sizeof (char *));
assert (fxbuf);
- posix_memalign ((void **) fxbuf, 16, 512);
+ (void) posix_memalign ((void **) fxbuf, 16, 512);
assert (*fxbuf);
#endif
FPU::~FPU ()
{
}
+
+#else // COMPILER_MSVC
+ const char* pbd_fpu = "pbd/msvc/fpu.cc takes precedence over this file";
+#endif // COMPILER_MSVC