home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / armlinux / alpha / PARTITIONS / USR_GZ / usr / include / syscall.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-14  |  706 b   |  39 lines

  1. #ifndef _SYSCALL_H
  2. #define _SYSCALL_H
  3.  
  4. #include <features.h>
  5. #include <sys/syscall.h>
  6. #include <errno.h>
  7.  
  8. #ifndef __MAX_ERRNO
  9. #define __MAX_ERRNO 4096
  10. #endif
  11.  
  12. /* In case of returning a memory address, negative values may
  13.  * not mean error.
  14.  */
  15. #ifdef __CHECK_RETURN_ADDR
  16. #define __check_errno(__res)    \
  17.     ((__res) >= 0 || (__res) < -__MAX_ERRNO)
  18. #else
  19. #define __check_errno(__res)    ((__res) >= 0)
  20. #endif
  21.  
  22. __BEGIN_DECLS
  23.  
  24. extern    int syscall __P ((int __number, ...));
  25.  
  26. __END_DECLS
  27.  
  28. #if defined(__i386__)
  29. # include <i386/syscall.h>
  30. #elif defined (__mc68000__)
  31. # include <m68k/syscall.h>
  32. #elif defined (__arm__)
  33. # include <arm/syscall.h>
  34. #else
  35. # error architecture not supported by Linux C library
  36. #endif
  37.  
  38. #endif
  39.