home *** CD-ROM | disk | FTP | other *** search
/ Serving the Web / ServingTheWeb1995.disc1of1.iso / linux / slacksrce / d / libc / libc-4.6 / libc-4 / libc-linux / stdlib / fpalloc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-18  |  406 b   |  32 lines

  1. #include <stdlib.h>
  2. #include <memory.h>
  3. #include <endian.h>
  4.  
  5. #ifdef IEEE_754
  6.  
  7. #ifdef __BIG_ENDIAN
  8. #define snan_bytes             { }
  9. #else
  10. #define snan_bytes             { }
  11. #endif
  12.              
  13. void *
  14. fpalloc (size_t n)
  15. {
  16.   void * ptr;
  17.  
  18.   ptr = malloc (n);
  19.   if (!ptr) return ptr;
  20.   return memtile (ptr, n, snan_bytes, sizeof (snan_bytes));
  21. }
  22.  
  23. #elese
  24.  
  25. void *
  26. fpalloc (size_t n)
  27. {
  28.   return malloc (n);
  29. }
  30.  
  31. #endif
  32.