summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2000-02-29 13:55:48 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2000-02-29 13:55:48 +0000
commit582b092ce6b6fa3d74e5e6c1f1fdeab8b97e0d24 (patch)
tree599aa60da12b95fc78c4e0a652d05dd95352964b /otherlibs/unix
parent26442fab85e1a916d72bacc00c4186c1176b36e3 (diff)
Utilisation de limits.h plutot que de sys/param.h (norme POSIX)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2883 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/unix')
-rw-r--r--otherlibs/unix/getgroups.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/otherlibs/unix/getgroups.c b/otherlibs/unix/getgroups.c
index 6ce250d5a..3e4242672 100644
--- a/otherlibs/unix/getgroups.c
+++ b/otherlibs/unix/getgroups.c
@@ -18,17 +18,20 @@
#ifdef HAS_GETGROUPS
#include <sys/types.h>
-#include <sys/param.h>
+#ifdef HAS_UNISTD
+#include <unistd.h>
+#endif
+#include <limits.h>
#include "unixsupport.h"
value unix_getgroups(value unit) /* ML */
{
- gid_t gidset[NGROUPS];
+ gid_t gidset[NGROUPS_MAX];
int n;
value res;
int i;
- n = getgroups(NGROUPS, gidset);
+ n = getgroups(NGROUPS_MAX, gidset);
if (n == -1) uerror("getgroups", Nothing);
res = alloc_tuple(n);
for (i = 0; i < n; i++)