home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mitsch75.zip / scheme-7_5_17-src.zip / scheme-7.5.17 / src / microcode / syscall.h < prev    next >
C/C++ Source or Header  |  2000-12-05  |  4KB  |  161 lines

  1. /* -*-C-*-
  2.  
  3. $Id: syscall.h,v 1.13 2000/12/05 21:23:48 cph Exp $
  4.  
  5. Copyright (c) 1993-2000 Massachusetts Institute of Technology
  6.  
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or (at
  10. your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful, but
  13. WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15. General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21.  
  22. /* OS system calls and errors.
  23.    Must match utabmd.scm
  24.  */
  25.  
  26. #ifndef SCM_SYSCALL_H
  27. #define  SCM_SYSCALL_H
  28.  
  29. #include "config.h"
  30.  
  31. #ifdef __OS2__
  32.  
  33. #define DEFINE_OS2_SYSCALLS
  34. #include "os2api.h"
  35. #undef DEFINE_OS2_SYSCALLS
  36.  
  37. #else /* not __OS2__ */
  38. #ifdef __WIN32__
  39.  
  40. #define DEFINE_WIN32_SYSCALLS
  41. #include "ntapi.h"
  42. #undef DEFINE_WIN32_SYSCALLS
  43.  
  44. #else /* not __WIN32__ */
  45.  
  46. enum syscall_names
  47. {
  48.   syscall_accept,
  49.   syscall_bind,
  50.   syscall_chdir,
  51.   syscall_chmod,
  52.   syscall_close,
  53.   syscall_connect,
  54.   syscall_fcntl_GETFL,
  55.   syscall_fcntl_SETFL,
  56.   syscall_fork,
  57.   syscall_fstat,
  58.   syscall_ftruncate,
  59.   syscall_getcwd,
  60.   syscall_gethostname,
  61.   syscall_gettimeofday,
  62.   syscall_gmtime,
  63.   syscall_ioctl_TIOCGPGRP,
  64.   syscall_ioctl_TIOCSIGSEND,
  65.   syscall_kill,
  66.   syscall_link,
  67.   syscall_listen,
  68.   syscall_localtime,
  69.   syscall_lseek,
  70.   syscall_malloc,
  71.   syscall_mkdir,
  72.   syscall_open,
  73.   syscall_opendir,
  74.   syscall_pause,
  75.   syscall_pipe,
  76.   syscall_read,
  77.   syscall_readlink,
  78.   syscall_realloc,
  79.   syscall_rename,
  80.   syscall_rmdir,
  81.   syscall_select,
  82.   syscall_setitimer,
  83.   syscall_setpgid,
  84.   syscall_sighold,
  85.   syscall_sigprocmask,
  86.   syscall_sigsuspend,
  87.   syscall_sleep,
  88.   syscall_socket,
  89.   syscall_symlink,
  90.   syscall_tcdrain,
  91.   syscall_tcflush,
  92.   syscall_tcgetpgrp,
  93.   syscall_tcsetpgrp,
  94.   syscall_terminal_get_state,
  95.   syscall_terminal_set_state,
  96.   syscall_time,
  97.   syscall_times,
  98.   syscall_unlink,
  99.   syscall_utime,
  100.   syscall_vfork,
  101.   syscall_write,
  102.   syscall_stat,
  103.   syscall_lstat,
  104.   syscall_mktime,
  105.   syscall_dld,
  106.   syscall_statfs,
  107.   syscall_fstatfs
  108. };
  109.  
  110. enum syserr_names
  111. {
  112.   syserr_unknown,
  113.   syserr_arg_list_too_long,
  114.   syserr_bad_address,
  115.   syserr_bad_file_descriptor,
  116.   syserr_broken_pipe,
  117.   syserr_directory_not_empty,
  118.   syserr_domain_error,
  119.   syserr_exec_format_error,
  120.   syserr_file_exists,
  121.   syserr_file_too_large,
  122.   syserr_filename_too_long,
  123.   syserr_function_not_implemented,
  124.   syserr_improper_link,
  125.   syserr_inappropriate_io_control_operation,
  126.   syserr_interrupted_function_call,
  127.   syserr_invalid_argument,
  128.   syserr_invalid_seek,
  129.   syserr_io_error,
  130.   syserr_is_a_directory,
  131.   syserr_no_child_processes,
  132.   syserr_no_locks_available,
  133.   syserr_no_space_left_on_device,
  134.   syserr_no_such_device,
  135.   syserr_no_such_device_or_address,
  136.   syserr_no_such_file_or_directory,
  137.   syserr_no_such_process,
  138.   syserr_not_a_directory,
  139.   syserr_not_enough_space,
  140.   syserr_operation_not_permitted,
  141.   syserr_permission_denied,
  142.   syserr_read_only_file_system,
  143.   syserr_resource_busy,
  144.   syserr_resource_deadlock_avoided,
  145.   syserr_resource_temporarily_unavailable,
  146.   syserr_result_too_large,
  147.   syserr_too_many_links,
  148.   syserr_too_many_open_files,
  149.   syserr_too_many_open_files_in_system
  150. };
  151.  
  152. #endif /* not __WIN32__ */
  153. #endif /* not __OS2__ */
  154.  
  155. extern void EXFUN (error_in_system_call,
  156.            (enum syserr_names, enum syscall_names));
  157. extern void EXFUN (error_system_call, (int, enum syscall_names name));
  158. extern enum syserr_names EXFUN (OS_error_code_to_syserr, (int));
  159.  
  160. #endif /* SCM_SYSCALL_H */
  161.