Skip to content

Commit

Permalink
fix for non-windows non-linux builds for isnan
Browse files Browse the repository at this point in the history
  • Loading branch information
milkie committed May 9, 2012
1 parent ccc9b9e commit f15931d
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/mongo/platform/basic.h
Expand Up @@ -3,19 +3,20 @@
#pragma once

#ifdef _WIN32
#include "windows_basic.h"
#endif
# include "windows_basic.h"
#else

#if defined(__linux__)
// glibc's optimized versions are better than g++ builtins
# define __builtin_strcmp strcmp
# define __builtin_strlen strlen
# define __builtin_memchr memchr
# define __builtin_memcmp memcmp
# define __builtin_memcpy memcpy
# define __builtin_memset memset
# define __builtin_memmove memmove
# define mongo_isnan(x) isnan(x)

#define mongo_isnan(x) isnan(x)
#endif
# if defined(__linux__)
// glibc's optimized versions are better than g++ builtins
# define __builtin_strcmp strcmp
# define __builtin_strlen strlen
# define __builtin_memchr memchr
# define __builtin_memcmp memcmp
# define __builtin_memcpy memcpy
# define __builtin_memset memset
# define __builtin_memmove memmove
# endif // if defined(__linux__)

#endif // ifdef _WIN32

0 comments on commit f15931d

Please sign in to comment.