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 / nt.h < prev    next >
C/C++ Source or Header  |  2000-12-05  |  3KB  |  133 lines

  1. /* -*-C-*-
  2.  
  3. $Id: nt.h,v 1.9 2000/12/05 21:23:45 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. /* NT system include file */
  23.  
  24. #ifndef SCM_NT_H
  25. #define SCM_NT_H
  26.  
  27. #include <windows.h>
  28. #include <sys/types.h>
  29.  
  30. #include <io.h>
  31. #include <conio.h>
  32. #include <sys/stat.h>
  33. #include <stdio.h>
  34. #include <stdlib.h>
  35. #include <direct.h>
  36. #include <signal.h>
  37. #include <errno.h>
  38.  
  39. #include <fcntl.h>
  40.  
  41. enum windows_type { wintype_unknown, wintype_31, wintype_95, wintype_nt };
  42. extern enum windows_type NT_windows_type;
  43.  
  44. #ifndef ERRNO_NONBLOCK
  45. #define ERRNO_NONBLOCK    1998
  46. #endif
  47. #ifndef EINTR
  48. #define EINTR        1999
  49. #endif
  50.  
  51. #include "config.h"
  52.  
  53. #include "intext.h"
  54. #include "dstack.h"
  55. #include "osscheme.h"
  56. #include "ntsys.h"
  57. #include "syscall.h"
  58. #include "ntapi.h"
  59. #include <limits.h>
  60. #include <time.h>
  61.  
  62. /* Crufty, but it will work here. */
  63. #ifndef ENOSYS
  64. #define ENOSYS 0
  65. #endif
  66.  
  67. /* constants for access() */
  68. #ifndef R_OK
  69. #define R_OK 4
  70. #define W_OK 2
  71. #define X_OK 1
  72. #define F_OK 0
  73. #endif
  74.  
  75. #ifndef MAXPATHLEN
  76. #define MAXPATHLEN 128
  77. #endif
  78.  
  79. #define ALERT_CHAR '\a'
  80. #define ALERT_STRING "\a"
  81.  
  82. #ifndef GUI
  83.   extern HANDLE  STDIN_HANDLE,  STDOUT_HANDLE,  STDERR_HANDLE;
  84. #endif
  85.  
  86. /* constants for open() and fcntl() */
  87. #ifndef O_RDONLY
  88. #define O_RDONLY 0
  89. #define O_WRONLY 1
  90. #define O_RDWR 2
  91. #endif
  92.  
  93. /* mode bit definitions for open(), creat(), and chmod() */
  94. #ifndef S_IRWXU
  95. #define S_IRWXU 0700
  96. #define S_IRWXG 0070
  97. #define S_IRWXO 0007
  98. #endif
  99.  
  100. #ifndef S_IRUSR
  101. #define S_IRUSR 0400
  102. #define S_IWUSR 0200
  103. #define S_IXUSR 0100
  104. #define S_IRGRP 0040
  105. #define S_IWGRP 0020
  106. #define S_IXGRP 0010
  107. #define S_IROTH 0004
  108. #define S_IWOTH 0002
  109. #define S_IXOTH 0001
  110. #endif
  111.  
  112. #define MODE_REG (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
  113. #define MODE_DIR (MODE_REG | S_IXUSR | S_IXGRP | S_IXOTH)
  114.  
  115. /* constants for lseek() */
  116. #ifndef SEEK_SET
  117. #define SEEK_SET 0
  118. #define SEEK_CUR 1
  119. #define SEEK_END 2
  120. #endif
  121.  
  122. #ifndef DECL_GETLOGIN
  123. extern char * EXFUN (getlogin, (void));
  124. #endif
  125.  
  126. #ifdef _NFILE
  127. #define NT_SC_OPEN_MAX() _NFILE
  128. #else
  129. #define NT_SC_OPEN_MAX() 16
  130. #endif
  131.  
  132. #endif /* SCM_NT_H */
  133.