patch-include_my_global_h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --- mysql-5.1.48.orig/include/my_global.h 2010-06-03 17:50:27.000000000 +0200
  2. +++ mysql-5.1.48/include/my_global.h 2010-07-12 22:51:23.369609493 +0200
  3. @@ -18,6 +18,8 @@
  4. #ifndef _global_h
  5. #define _global_h
  6. +#include <sys/param.h>
  7. +
  8. /*
  9. InnoDB depends on some MySQL internals which other plugins should not
  10. need. This is because of InnoDB's foreign key support, "safe" binlog
  11. @@ -428,7 +430,7 @@ C_MODE_END
  12. #ifdef HAVE_FLOAT_H
  13. #include <float.h>
  14. #endif
  15. -#ifdef HAVE_FENV_H
  16. +#if defined(HAVE_FENV_H) && !defined(BSD)
  17. #include <fenv.h> /* For fesetround() */
  18. #endif
  19. @@ -458,15 +460,20 @@ C_MODE_END
  20. #undef HAVE_ALLOCA
  21. #undef HAVE_ALLOCA_H
  22. #endif
  23. -#ifdef HAVE_ALLOCA_H
  24. +#if defined(HAVE_ALLOCA_H) && !defined(BSD)
  25. #include <alloca.h>
  26. #endif
  27. #include <errno.h> /* Recommended by debian */
  28. /* We need the following to go around a problem with openssl on solaris */
  29. +#ifdef BSD
  30. +#include <pwd.h>
  31. +#include <unistd.h>
  32. +#else
  33. #if defined(HAVE_CRYPT_H)
  34. #include <crypt.h>
  35. #endif
  36. +#endif
  37. /*
  38. A lot of our programs uses asserts, so better to always include it
  39. @@ -883,9 +890,11 @@ typedef SOCKET_SIZE_TYPE size_socket;
  40. #endif /* HAVE_FINITE */
  41. #endif /* isfinite */
  42. +/*
  43. #ifndef HAVE_ISNAN
  44. #define isnan(x) ((x) != (x))
  45. #endif
  46. +*/
  47. #ifdef HAVE_ISINF
  48. /* Check if C compiler is affected by GCC bug #39228 */