From c730bf62bd140f25024994a411274c36d006dc2f Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Thu, 2 Feb 2012 19:41:39 -0800 Subject: [PATCH] unix.groups: 64 ought to be enough, right? --- basis/unix/ffi/ffi.factor | 4 +--- basis/unix/groups/groups.factor | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/basis/unix/ffi/ffi.factor b/basis/unix/ffi/ffi.factor index 6798bb1307..2572a518e0 100644 --- a/basis/unix/ffi/ffi.factor +++ b/basis/unix/ffi/ffi.factor @@ -18,7 +18,7 @@ CONSTANT: PROT_NONE 0 CONSTANT: PROT_READ 1 CONSTANT: PROT_WRITE 2 CONSTANT: PROT_EXEC 4 - + CONSTANT: MAP_FILE 0 CONSTANT: MAP_SHARED 1 CONSTANT: MAP_PRIVATE 2 @@ -29,8 +29,6 @@ CONSTANT: SEEK_END 2 : MAP_FAILED ( -- alien ) -1 ; inline -CONSTANT: NGROUPS_MAX 16 - CONSTANT: DT_UNKNOWN 0 CONSTANT: DT_FIFO 1 CONSTANT: DT_CHR 2 diff --git a/basis/unix/groups/groups.factor b/basis/unix/groups/groups.factor index 70c86fab24..9abdb25e82 100644 --- a/basis/unix/groups/groups.factor +++ b/basis/unix/groups/groups.factor @@ -71,7 +71,7 @@ ERROR: no-group string ; : (user-groups) ( string -- seq ) #! first group is -1337, legacy unix code - -1337 unix.ffi:NGROUPS_MAX [ 4 * ] keep + -1337 64 [ 4 * ] keep int [ [ unix.ffi:getgrouplist ] unix-system-call drop ] 2keep [ 4 tail-slice ] [ int deref 1 - ] bi* >groups ;