tags 324342 +patch
thanks
Hi,
On Thu, Aug 25, 2005 at 03:37:18PM +0200, Love Hörnquist Åstrand wrote:
> Michael Banck <[EMAIL PROTECTED]> writes:
> > There is no kernel AFS support in the Hurd yet (though this issue might
> > have stirred up some interest to write a translator for it), so the
> > syscalls in afssys.c fail.
> >
> > I am not sure what should be done in the generic case (I saw there is
> > some code for various other operating systems), but I think it makes no
> > sense to call these syscalls without kernel support? There was quite a
> > discussion whether a bogus ioctl should be added to glibc on the Hurd
> > for this issue, but this got (rightfully, IMHO) discarded by the
> > maintainers.
>
> I agree that the ioctl should not be added to the glibc just for this, that
> why we define the cpp symbols ourself in kafs.h/afssys.c.
>
> In other unixes _IOW creates something standalone, apprently Hurd is born
> diffrently.
>
> In case of hurd we can use something other then _IOW and things will work
> jus fine, the resulting numbers from _IOW are used in pioctl calls and can
> overlap with ioctl numbers.
>
> So defineing _VICEIOCTL to
>
> #define _VICEIOCTL(v) ((unsigned int ) (0x56000000 | v)
> #define VIOC_SYSCALL ((unsigned int ) (0x43000000 | 1)
>
> for Hurd should work just fine.
>
> #define _(v) ((unsigned int ) (0x56000000 | v)
Thanks, I was able to build heimdal successfully with the attached
patch, though I am not sure this is the most elegant way to put those
defines, or how the resulting libkafs will react.
cheers,
Michael
--
Michael Banck
Debian Developer
[EMAIL PROTECTED]
http://www.advogato.org/person/mbanck/diary.html
--- heimdal-0.7.1/lib/kafs/kafs.h 2005-11-02 00:43:06.000000000 +0100
+++ heimdal-0.7.1.new/lib/kafs/kafs.h 2005-11-02 00:43:27.000000000 +0100
@@ -46,7 +46,11 @@
#define AFSCALL_SETPAG 21
#ifndef _VICEIOCTL
+#ifdef __GNU__
+#define _VICEIOCTL(v) ((unsigned int ) (0x56000000 | v))
+#else
#define _VICEIOCTL(id) ((unsigned int ) _IOW('V', id, struct ViceIoctl))
+#endif /* __GNU__ */
#endif /* _VICEIOCTL */
#define VIOCSETAL _VICEIOCTL(1)
--- heimdal-0.7.1/lib/kafs/afssys.c 2005-11-02 00:43:06.000000000 +0100
+++ heimdal-0.7.1.new/lib/kafs/afssys.c 2005-11-02 00:43:27.000000000 +0100
@@ -42,7 +42,11 @@
unsigned long param1;
unsigned long syscall;
};
+#ifdef __GNU__
+#define VIOC_SYSCALL (unsigned int ) (0x43000000 | 1)
+#else
#define VIOC_SYSCALL _IOW('C', 1, void *)
+#endif
int _kafs_debug; /* this should be done in a better way */