2 printf("(in-package \"SB-WIN32\")\n\n");
4 defconstant ("input-record-size", sizeof (INPUT_RECORD));
6 defconstant ("MAX_PATH", MAX_PATH);
10 defconstant ("CSIDL_DESKTOP", CSIDL_DESKTOP);
11 defconstant ("CSIDL_INTERNET", CSIDL_INTERNET);
12 defconstant ("CSIDL_PROGRAMS", CSIDL_PROGRAMS);
13 defconstant ("CSIDL_CONTROLS", CSIDL_CONTROLS);
14 defconstant ("CSIDL_PRINTERS", CSIDL_PRINTERS);
15 defconstant ("CSIDL_PERSONAL", CSIDL_PERSONAL);
16 defconstant ("CSIDL_FAVORITES", CSIDL_FAVORITES);
17 defconstant ("CSIDL_STARTUP", CSIDL_STARTUP);
18 defconstant ("CSIDL_RECENT", CSIDL_RECENT);
19 defconstant ("CSIDL_SENDTO", CSIDL_SENDTO);
20 defconstant ("CSIDL_BITBUCKET", CSIDL_BITBUCKET);
21 defconstant ("CSIDL_STARTMENU", CSIDL_STARTMENU);
22 defconstant ("CSIDL_DESKTOPDIRECTORY", CSIDL_DESKTOPDIRECTORY);
23 defconstant ("CSIDL_DRIVES", CSIDL_DRIVES);
24 defconstant ("CSIDL_NETWORK", CSIDL_NETWORK);
25 defconstant ("CSIDL_NETHOOD", CSIDL_NETHOOD);
26 defconstant ("CSIDL_FONTS", CSIDL_FONTS);
27 defconstant ("CSIDL_TEMPLATES", CSIDL_TEMPLATES);
28 defconstant ("CSIDL_COMMON_STARTMENU", CSIDL_COMMON_STARTMENU);
29 defconstant ("CSIDL_COMMON_PROGRAMS", CSIDL_COMMON_PROGRAMS);
30 defconstant ("CSIDL_COMMON_STARTUP", CSIDL_COMMON_STARTUP);
31 defconstant ("CSIDL_COMMON_DESKTOPDIRECTORY", CSIDL_COMMON_DESKTOPDIRECTORY);
32 defconstant ("CSIDL_APPDATA", CSIDL_APPDATA);
33 defconstant ("CSIDL_PRINTHOOD", CSIDL_PRINTHOOD);
34 defconstant ("CSIDL_LOCAL_APPDATA", CSIDL_LOCAL_APPDATA);
35 defconstant ("CSIDL_ALTSTARTUP", CSIDL_ALTSTARTUP);
36 defconstant ("CSIDL_COMMON_ALTSTARTUP", CSIDL_COMMON_ALTSTARTUP);
37 defconstant ("CSIDL_COMMON_FAVORITES", CSIDL_COMMON_FAVORITES);
38 defconstant ("CSIDL_INTERNET_CACHE", CSIDL_INTERNET_CACHE);
39 defconstant ("CSIDL_COOKIES", CSIDL_COOKIES);
40 defconstant ("CSIDL_HISTORY", CSIDL_HISTORY);
41 defconstant ("CSIDL_COMMON_APPDATA", CSIDL_COMMON_APPDATA);
42 defconstant ("CSIDL_WINDOWS", CSIDL_WINDOWS);
43 defconstant ("CSIDL_SYSTEM", CSIDL_SYSTEM);
44 defconstant ("CSIDL_PROGRAM_FILES", CSIDL_PROGRAM_FILES);
45 defconstant ("CSIDL_MYPICTURES", CSIDL_MYPICTURES);
46 defconstant ("CSIDL_PROFILE", CSIDL_PROFILE);
47 defconstant ("CSIDL_SYSTEMX86", CSIDL_SYSTEMX86);
48 defconstant ("CSIDL_PROGRAM_FILESX86", CSIDL_PROGRAM_FILESX86);
49 defconstant ("CSIDL_PROGRAM_FILES_COMMON", CSIDL_PROGRAM_FILES_COMMON);
50 defconstant ("CSIDL_PROGRAM_FILES_COMMONX86", CSIDL_PROGRAM_FILES_COMMONX86);
51 defconstant ("CSIDL_COMMON_TEMPLATES", CSIDL_COMMON_TEMPLATES);
52 defconstant ("CSIDL_COMMON_DOCUMENTS", CSIDL_COMMON_DOCUMENTS);
53 defconstant ("CSIDL_COMMON_ADMINTOOLS", CSIDL_COMMON_ADMINTOOLS);
54 defconstant ("CSIDL_ADMINTOOLS", CSIDL_ADMINTOOLS);
55 defconstant ("CSIDL_CONNECTIONS", CSIDL_CONNECTIONS);
56 defconstant ("CSIDL_COMMON_MUSIC", CSIDL_COMMON_MUSIC);
57 defconstant ("CSIDL_COMMON_PICTURES", CSIDL_COMMON_PICTURES);
58 defconstant ("CSIDL_COMMON_VIDEO", CSIDL_COMMON_VIDEO);
59 defconstant ("CSIDL_RESOURCES", CSIDL_RESOURCES);
60 defconstant ("CSIDL_RESOURCES_LOCALIZED", CSIDL_RESOURCES_LOCALIZED);
61 defconstant ("CSIDL_COMMON_OEM_LINKS", CSIDL_COMMON_OEM_LINKS);
62 defconstant ("CSIDL_CDBURN_AREA", CSIDL_CDBURN_AREA);
63 defconstant ("CSIDL_COMPUTERSNEARME", CSIDL_COMPUTERSNEARME);
64 defconstant ("CSIDL_FLAG_DONT_VERIFY", CSIDL_FLAG_DONT_VERIFY);
65 defconstant ("CSIDL_FLAG_CREATE", CSIDL_FLAG_CREATE);
66 defconstant ("CSIDL_FLAG_MASK", CSIDL_FLAG_MASK);
68 printf(";;; Exceptions\n");
69 defconstant("+exception-access-violation+", EXCEPTION_ACCESS_VIOLATION);
70 defconstant("+exception-array-bounds-exceeded+", EXCEPTION_ARRAY_BOUNDS_EXCEEDED);
71 defconstant("+exception-breakpoint+", EXCEPTION_BREAKPOINT);
72 defconstant("+exception-datatype-misalignment+", EXCEPTION_DATATYPE_MISALIGNMENT);
73 defconstant("+exception-flt-denormal-operand+", EXCEPTION_FLT_DENORMAL_OPERAND);
74 defconstant("+exception-flt-divide-by-zero+", EXCEPTION_FLT_DIVIDE_BY_ZERO);
75 defconstant("+exception-flt-inexact-result+", EXCEPTION_FLT_INEXACT_RESULT);
76 defconstant("+exception-flt-invalid-operation+", EXCEPTION_FLT_INVALID_OPERATION);
77 defconstant("+exception-flt-overflow+", EXCEPTION_FLT_OVERFLOW);
78 defconstant("+exception-flt-stack-check+", EXCEPTION_FLT_STACK_CHECK);
79 defconstant("+exception-flt-underflow+", EXCEPTION_FLT_UNDERFLOW);
80 defconstant("+exception-heap-corruption+", STATUS_HEAP_CORRUPTION);
81 defconstant("+exception-illegal-instruction+", EXCEPTION_ILLEGAL_INSTRUCTION);
82 defconstant("+exception-in-page-error+", EXCEPTION_IN_PAGE_ERROR);
83 defconstant("+exception-int-divide-by-zero+", EXCEPTION_INT_DIVIDE_BY_ZERO);
84 defconstant("+exception-int-overflow+", EXCEPTION_INT_OVERFLOW);
85 defconstant("+exception-invalid-disposition+", EXCEPTION_INVALID_DISPOSITION);
86 defconstant("+exception-noncontinuable-exception+", EXCEPTION_NONCONTINUABLE_EXCEPTION);
87 defconstant("+exception-priv-instruction+", EXCEPTION_PRIV_INSTRUCTION);
88 defconstant("+exception-single-step+", EXCEPTION_SINGLE_STEP);
89 defconstant("+exception-stack-overflow+", EXCEPTION_STACK_OVERFLOW);
90 defconstant("+dbg-printexception-c+", DBG_PRINTEXCEPTION_C);
91 #ifdef DBG_PRINTEXCEPTION_WIDE_C
92 defconstant("+dbg-printexception-wide-c+", DBG_PRINTEXCEPTION_WIDE_C);
94 defconstant("+dbg-printexception-wide-c+", 0x4001000a);
97 defconstant("+exception-maximum-parameters+", EXCEPTION_MAXIMUM_PARAMETERS);
99 printf(";;; FormatMessage\n");
101 defconstant("format-message-allocate-buffer", FORMAT_MESSAGE_ALLOCATE_BUFFER);
102 defconstant("format-message-from-system", FORMAT_MESSAGE_FROM_SYSTEM);
103 defconstant("format-message-max-width-mask", FORMAT_MESSAGE_MAX_WIDTH_MASK);
104 defconstant("format-message-ignore-inserts", FORMAT_MESSAGE_IGNORE_INSERTS);
106 printf(";;; Errors\n");
108 printf(";;; Errors\n");
110 defconstant("ERROR_ENVVAR_NOT_FOUND", ERROR_ENVVAR_NOT_FOUND);
111 defconstant("ERROR_ALREADY_EXISTS", ERROR_ALREADY_EXISTS);
112 defconstant("ERROR_FILE_EXISTS", ERROR_FILE_EXISTS);
113 defconstant("ERROR_FILE_NOT_FOUND", ERROR_FILE_NOT_FOUND);
114 defconstant("ERROR_ACCESS_DENIED", ERROR_ACCESS_DENIED);
116 defconstant("error-io-pending", ERROR_IO_PENDING);
117 defconstant("error-broken-pipe", ERROR_BROKEN_PIPE);
118 defconstant("error-no-data", ERROR_NO_DATA);
119 defconstant("error-handle-eof", ERROR_HANDLE_EOF);
122 printf(";;; GetComputerName\n");
124 defconstant ("MAX_COMPUTERNAME_LENGTH", MAX_COMPUTERNAME_LENGTH);
125 defconstant ("ERROR_BUFFER_OVERFLOW", ERROR_BUFFER_OVERFLOW);
127 printf(";;; Windows Types\n");
128 DEFTYPE("int-ptr", INT_PTR);
129 DEFTYPE("dword", DWORD);
130 DEFTYPE("bool", BOOL);
131 DEFTYPE("uint", UINT);
132 DEFTYPE("ulong", ULONG);
134 printf(";;; File Desired Access\n");
135 defconstant ("FILE_GENERIC_READ", FILE_GENERIC_READ);
136 defconstant ("FILE_GENERIC_WRITE", FILE_GENERIC_WRITE);
137 defconstant ("FILE_GENERIC_EXECUTE", FILE_GENERIC_EXECUTE);
138 defconstant ("FILE_SHARE_READ", FILE_SHARE_READ);
139 defconstant ("FILE_SHARE_WRITE", FILE_SHARE_WRITE);
140 defconstant ("FILE_SHARE_DELETE", FILE_SHARE_DELETE);
142 printf(";;; File Creation Dispositions\n");
143 defconstant("CREATE_NEW", CREATE_NEW);
144 defconstant("CREATE_ALWAYS", CREATE_ALWAYS);
145 defconstant("OPEN_EXISTING", OPEN_EXISTING);
146 defconstant("OPEN_ALWAYS", OPEN_ALWAYS);
147 defconstant("TRUNCATE_EXISTING", TRUNCATE_EXISTING);
149 printf(";;; Desired Access\n");
150 defconstant("ACCESS_GENERIC_READ", GENERIC_READ);
151 defconstant("ACCESS_GENERIC_WRITE", GENERIC_WRITE);
152 defconstant("ACCESS_GENERIC_EXECUTE", GENERIC_EXECUTE);
153 defconstant("ACCESS_GENERIC_ALL", GENERIC_ALL);
154 defconstant("ACCESS_FILE_APPEND_DATA", FILE_APPEND_DATA);
155 defconstant("ACCESS_DELETE", DELETE);
157 printf(";;; Handle Information Flags\n");
158 defconstant("HANDLE_FLAG_INHERIT", HANDLE_FLAG_INHERIT);
159 defconstant("HANDLE_FLAG_PROTECT_FROM_CLOSE", HANDLE_FLAG_PROTECT_FROM_CLOSE);
161 printf(";;; Standard Handle Keys\n");
162 defconstant("STD_INPUT_HANDLE", STD_INPUT_HANDLE);
163 defconstant("STD_OUTPUT_HANDLE", STD_OUTPUT_HANDLE);
164 defconstant("STD_ERROR_HANDLE", STD_ERROR_HANDLE);
166 printf(";;; WinCrypt\n");
167 defconstant("crypt-verifycontext", CRYPT_VERIFYCONTEXT);
168 defconstant("crypt-silent", CRYPT_SILENT);
169 defconstant("prov-rsa-full", PROV_RSA_FULL);
171 defconstant("pipe-access-duplex", PIPE_ACCESS_DUPLEX);
172 defconstant("pipe-access-inbound", PIPE_ACCESS_INBOUND);
173 defconstant("pipe-access-outbound", PIPE_ACCESS_OUTBOUND);
174 defconstant("pipe-type-byte", PIPE_TYPE_BYTE);
176 defconstant("wait-abandoned", WAIT_ABANDONED);
177 defconstant("wait-object-0", WAIT_OBJECT_0);
178 defconstant("wait-timeout", WAIT_TIMEOUT);
179 defconstant("wait-failed", WAIT_FAILED);
181 defconstant("still-active", STILL_ACTIVE);
183 /* FIXME: SB-UNIX and SB-WIN32 really need to be untangled. */
184 printf("(in-package \"SB-UNIX\")\n\n");
185 printf(";;; Unix-like constants and types on Windows\n");
186 defconstant("o_rdonly", _O_RDONLY);
187 defconstant("o_wronly", _O_WRONLY);
188 defconstant("o_rdwr", _O_RDWR);
189 defconstant("o_creat", _O_CREAT);
190 defconstant("o_trunc", _O_TRUNC);
191 defconstant("o_append", _O_APPEND);
192 defconstant("o_excl", _O_EXCL);
193 defconstant("o_binary", _O_BINARY);
194 defconstant("o_noinherit", _O_NOINHERIT);
196 defconstant("enoent", ENOENT);
197 defconstant("eexist", EEXIST);
198 defconstant("eintr", EINTR);
199 defconstant("eagain", EAGAIN);
200 defconstant("ebadf", EBADF);
202 defconstant("s-ifmt", S_IFMT);
203 defconstant("s-ifdir", S_IFDIR);
204 defconstant("s-ifreg", S_IFREG);
206 DEFTYPE("ino-t", ino_t);
207 DEFTYPE("time-t", time_t);
208 DEFTYPE("off-t", off_t);
209 DEFTYPE("size-t", size_t);
210 DEFTYPE("ssize-t", size_t);
211 DEFTYPE("mode-t", mode_t);
213 DEFTYPE("wst-dev-t", wst_dev_t);
214 DEFTYPE("wst-ino-t", wst_ino_t);
215 DEFTYPE("wst-off-t", wst_off_t);
216 DEFTYPE("wst-blksize-t", wst_blksize_t);
217 DEFTYPE("wst-blkcnt-t", wst_blkcnt_t);
218 DEFTYPE("wst-nlink-t", wst_nlink_t);
219 DEFTYPE("wst-uid-t", wst_uid_t);
220 DEFTYPE("wst-gid-t", wst_gid_t);
223 defconstant("fd-setsize", 1024);
226 defconstant("sizeof-sigset_t", sizeof (sigset_t));
227 defconstant("sig_block", SIG_BLOCK);
228 defconstant("sig_unblock", SIG_UNBLOCK);
229 defconstant("sig_setmask", SIG_SETMASK);