home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / GNU_1OF3.ZIP / HEADERS.ZIP / g++-include / memory.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-17  |  1.1 KB  |  50 lines

  1.  
  2. #ifndef _memory_h
  3. #define _memory_h 1
  4.  
  5. #include <stddef.h>
  6.  
  7. extern "C" {
  8.  
  9. void*     memalign(size_t, size_t);
  10. void*     memccpy(void*, const void*, int, size_t);
  11. void*     memchr(const void*, int, size_t);
  12. int       memcmp(const void*, const void*, size_t);
  13. void*     memcpy(void*, const void*, size_t);
  14. void*     memset(void*, int, size_t);
  15. int       ffs(int);
  16. size_t    getpagesize(void);
  17. void*     valloc(size_t);
  18.  
  19. }
  20.  
  21. #ifdef USG
  22. void  libgxx_bcopy(const void*, void*, size_t);
  23. inline void  bcopy(const void* s, void* d, size_t n) { libgxx_bcopy(s, d, n); }
  24. inline void  bzero(void* s, int l) { memset(s, 0, l); }
  25. inline int   bcmp(const void* s, const void* t, int l) {return memcmp(s,t,l);}
  26.  
  27. #else /* not USG */
  28.  
  29. extern "C" {
  30. void      bcopy(const void*, void*, size_t); // USG uses version in bcopy.c
  31. int       bcmp(const void*, const void*, int);
  32. void      bzero(void*, int);
  33. }
  34.  
  35. #endif /* USG */
  36.  
  37. #ifdef __GNUG__
  38. #ifndef alloca
  39. #define alloca(x)  __builtin_alloca(x)
  40. #endif
  41. #else
  42. #ifndef IV
  43. extern "C" void* alloca(size_t);
  44. #else
  45. extern "C" void* alloca(unsigned long);
  46. #endif /* IV */
  47. #endif
  48.  
  49. #endif
  50.