Skip to content

Commit 1329ebe

Browse files
committed
{R,W,X,F}_OK are not constants for the Cosmopolitan libc
1 parent c04f7b0 commit 1329ebe

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/unix/unix_c/unix_access_job.c

+12-12
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@
3333
| Converters |
3434
+-----------------------------------------------------------------+ */
3535

36-
/* Table mapping constructors of ocaml type Unix.access_permission to C values. */
37-
static int access_permission_table[] = {
38-
/* Constructor R_OK. */
39-
R_OK,
40-
/* Constructor W_OK. */
41-
W_OK,
42-
/* Constructor X_OK. */
43-
X_OK,
44-
/* Constructor F_OK. */
45-
F_OK
46-
};
47-
4836
/* Convert ocaml values of type Unix.access_permission to a C int. */
4937
static int int_of_access_permissions(value list)
5038
{
39+
/* Table mapping constructors of ocaml type Unix.access_permission to C values. */
40+
int access_permission_table[] = {
41+
/* Constructor R_OK. */
42+
R_OK,
43+
/* Constructor W_OK. */
44+
W_OK,
45+
/* Constructor X_OK. */
46+
X_OK,
47+
/* Constructor F_OK. */
48+
F_OK
49+
};
50+
5151
int result = 0;
5252
while (list != Val_emptylist) {
5353
result |= access_permission_table[Int_val(Field(list, 0))];

0 commit comments

Comments
 (0)