os.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef _OS_H
  2. #define _OS_H
  3. /********************************************************************
  4. * *
  5. * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. *
  6. * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
  7. * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. *
  8. * PLEASE READ THESE TERMS DISTRIBUTING. *
  9. * *
  10. * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 *
  11. * by Monty <monty@xiph.org> and The XIPHOPHORUS Company *
  12. * http://www.xiph.org/ *
  13. * *
  14. ********************************************************************
  15. function: #ifdef jail to whip a few platforms into the UNIX ideal.
  16. last mod: $Id: os.h,v 1.5.2.1 2000/05/24 21:17:01 xiphmont Exp $
  17. ********************************************************************/
  18. #include <math.h>
  19. #ifndef _V_IFDEFJAIL_H_
  20. #define _V_IFDEFJAIL_H_
  21. #ifndef M_PI
  22. #define M_PI (3.1415926539)
  23. #endif
  24. #ifndef __GNUC__
  25. #ifdef _WIN32
  26. # define alloca(x) (_alloca(x))
  27. # define rint(x) (floor((x)+0.5))
  28. #endif
  29. #endif
  30. #ifdef _WIN32
  31. # define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b))
  32. #else // if not _WIN32
  33. # define FAST_HYPOT hypot
  34. #endif
  35. #endif
  36. #include "../include/vorbis/os_types.h"
  37. #endif // _OS_H