[Fakeroot-commits] fakeroot configure.ac,1.45,1.46 wrapfunc.inp,1.4,1.5

schizo@haydn.debian.org schizo@haydn.debian.org


Update of /cvsroot/fakeroot/fakeroot
In directory haydn:/tmp/cvs-serv911

Modified Files:
	configure.ac wrapfunc.inp 
Log Message:
  * Handle platforms where first argument to setgroups() is int.


Index: configure.ac
===================================================================
RCS file: /cvsroot/fakeroot/fakeroot/configure.ac,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- configure.ac	18 Jun 2004 16:33:26 -0000	1.45
+++ configure.ac	18 Jun 2004 17:06:57 -0000	1.46
@@ -34,7 +34,7 @@
 dnl Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h unistd.h features.h sys/feature_tests.h pthread.h stdint.h inttypes.h)
+AC_CHECK_HEADERS(fcntl.h unistd.h features.h sys/feature_tests.h pthread.h stdint.h inttypes.h grp.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -68,6 +68,24 @@
 AC_DEFINE_UNQUOTED(READLINK_BUF_TYPE, $readlink_buf_arg)
 AC_DEFINE_UNQUOTED(READLINK_BUFSIZE_TYPE, $readlink_bufsize_arg)
 
+AC_MSG_CHECKING([for first argument of setgroups])
+setgroups_size_arg=unknown
+for first in size_t int; do
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _BSD_SOURCE
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include <unistd.h>
+#ifdef HAVE_GRP_H
+#include <grp.h>
+#endif
+  int setgroups($first size, const gid_t *list);]], [[puts("hello, world");]])],[setgroups_size_arg=$first],[])
+done
+AC_MSG_RESULT([$setgroups_size_arg])
+AH_TEMPLATE([SETGROUPS_SIZE_TYPE], [type of setgroups size])
+AC_DEFINE_UNQUOTED(SETGROUPS_SIZE_TYPE, $setgroups_size_arg)
+
+
 AH_TEMPLATE([HAVE_SEMUN_DEF], [have the semun union])
 AC_MSG_CHECKING([for union semun])
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -296,6 +314,9 @@
 		;;
 	(*:osf*)
 		libcpath="/shlib/libc.so"
+		;;
+	(*:solaris*)
+		libcpath="/lib/libc.so.1"
 		;;
 	(*)
 		AC_MSG_WARN([don't know where libc is for $target_os on

Index: wrapfunc.inp
===================================================================
RCS file: /cvsroot/fakeroot/fakeroot/wrapfunc.inp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- wrapfunc.inp	10 Jun 2004 16:31:22 -0000	1.4
+++ wrapfunc.inp	18 Jun 2004 17:06:57 -0000	1.5
@@ -70,4 +70,4 @@
 setresuid;int;(uid_t ruid, uid_t euid, uid_t suid);(ruid, euid, suid)
 setresgid;int;(gid_t rgid, gid_t egid, gid_t sgid);(rgid, egid, sgid)
 initgroups;int;(const char *user, INITGROUPS_SECOND_ARG group);(user, group)
-setgroups;int;(size_t size, const gid_t *list);(size, list)
+setgroups;int;(SETGROUPS_SIZE_TYPE size, const gid_t *list);(size, list)