Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.3 KiB

  1. #ifndef __glimports_h_
  2. #define __glimports_h_
  3. /*
  4. ** Copyright 1991, 1992, Silicon Graphics, Inc.
  5. ** All Rights Reserved.
  6. **
  7. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  8. ** the contents of this file may not be disclosed to third parties, copied or
  9. ** duplicated in any form, in whole or in part, without the prior written
  10. ** permission of Silicon Graphics, Inc.
  11. **
  12. ** RESTRICTED RIGHTS LEGEND:
  13. ** Use, duplication or disclosure by the Government is subject to restrictions
  14. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  15. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  16. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  17. ** rights reserved under the Copyright Laws of the United States.
  18. **
  19. ** Imports from outside libraries.
  20. **
  21. ** $Revision: 1.8 $
  22. ** $Date: 1993/12/09 01:57:59 $
  23. */
  24. #include <memory.h>
  25. #include <math.h>
  26. #if defined(NT)
  27. /*
  28. ** MEMMOVE handles overlapping memory (slower)
  29. ** MEMCOPY does not handle overlapping memory (faster)
  30. */
  31. #define __GL_MEMCOPY(to,from,count) RtlCopyMemory(to,from,(size_t)(count))
  32. #define __GL_MEMMOVE(to,from,count) RtlMoveMemory(to,from,(size_t)(count))
  33. #define __GL_MEMZERO(to,count) RtlZeroMemory(to,(size_t)(count))
  34. #else
  35. #define __GL_MEMCOPY(to,from,count) memcpy(to,from,(size_t)(count))
  36. #define __GL_MEMMOVE(to,from,count) memmove(to,from,(size_t)(count))
  37. #define __GL_MEMZERO(to,count) memset(to,0,(size_t)(count))
  38. #endif
  39. #ifdef _ALPHA_
  40. extern float fpow(float, float);
  41. #define __GL_POWF(a,b) ((__GLfloat)fpow((__GLfloat)(a), (__GLfloat)(b)))
  42. #else
  43. #define __GL_POWF(a,b) ((__GLfloat)pow((double)(a),(double)(b)))
  44. #endif
  45. #define __GL_CEILF(f) ((__GLfloat)ceil((double) (f)))
  46. #define __GL_SQRTF(f) ((__GLfloat)sqrt((double) (f)))
  47. #define __GL_ABSF(f) ((__GLfloat)fabs((double) (f)))
  48. #define __GL_FLOORF(f) ((__GLfloat)floor((double) (f)))
  49. #define __GL_FLOORD(f) floor(f)
  50. #define __GL_SINF(f) ((__GLfloat)sin((double) (f)))
  51. #define __GL_COSF(f) ((__GLfloat)cos((double) (f)))
  52. #define __GL_ATANF(f) ((__GLfloat)atan((double) (f)))
  53. #define __GL_ATAN2F(x, y) ((__GLfloat)atan2((double) (x), (double) (y)))
  54. #define __GL_LOGF(f) ((__GLfloat)log((double) (f)))
  55. #endif /* __glimports_h_ */