From owner-freebsd-isdn Fri Jul 31 05:37:28 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA18779 for freebsd-isdn-outgoing; Fri, 31 Jul 1998 05:37:28 -0700 (PDT) (envelope-from owner-freebsd-isdn@FreeBSD.ORG) Received: from alushta.NL.net (alushta.NL.net [193.78.240.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA18770 for ; Fri, 31 Jul 1998 05:37:25 -0700 (PDT) (envelope-from bert_driehuis@nl.compuware.com) Received: from uniface by alushta.NL.net with UUCP id <332-9308>; Fri, 31 Jul 1998 14:36:57 +0200 Received: from nl.compuware.com (bertd@c1111.nl.compuware.com [172.16.16.36]) by dewmoth.nl.compuware.com (8.6.9/961125) with ESMTP id OAA26205 for ; Fri, 31 Jul 1998 14:36:12 +0200 Message-ID: <35C1BA3B.19A3A3B8@nl.compuware.com> Date: Fri, 31 Jul 1998 14:36:11 +0200 From: Bert Driehuis Organization: Compuware Europe, Amsterdam X-Mailer: Mozilla 4.05 [en] (X11; I; BSD/OS 3.1 i386) MIME-Version: 1.0 To: freebsd-isdn@FreeBSD.ORG Subject: Preparations for BSD/OS port Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Folks, I'm working on porting ISDN4BSD to BSD/OS 3.0. The telephony part works, and at that moment I needed sleep so I don't know what the actual status is. My bits will need a major cleanup anyhow, so BSD/OS users should not hold their breath! Anyways, there are some questions I have for the developers of the FreeBSD and NetBSD ports. To reduce the number of #ifdeffed sections, I'd like to propose using some #defines, along the lines of the PDEVSTATIC and FLAGS macro's that are used to hide differences between the *BSD's. One that springs to mind is the type of the second argument to the ioctl driver routine: on NetBSD it's an int, on FreeBSD and BSD/OS it's a u_long. How 'bout doing this in i4b_ioctl.h: #if defined(__FreeBSD__) || defined(__bsdi__) #define I4B_IOCTL_CMD_T u_long #else #define I4B_IOCTL_CMD_T int #endif Another, along the lines of the FLAGS definition in layer1/i4b_isic.c, is to use a #define PARMS to pass the right info down to the probe and attach routines (I should check my current sources to see if I still need those extra arguments for BSD/OS, but for the sake of argument let's assume it is still needed). This #define of course is #undeffed at the end of the routine. The biggest gain might come from removing "all" platform dependancies from the card drivers, and moving the OS dependent probe/attach stuff into i4b_isic.c (or at least into isolated sections in the card specific file). For example, the tel_s0163_probe in i4b_tel_s0163.c is defined now in two and soon three radically different ifdeffed routines, with the guts of the probe duplicated two or three times. This would require some serious thinking. Anyway, I'm not going to even *think* about tackling that issue :-) What do you think? #ifdef or #define? And if we want to use definitions like I4B_IOCTL_CMD_T throughout ISDN4BSD, which include file do we stick it in? i4b_ioctl.h was a easy choice for the ioctl routine, but it might be handy to stick it into an include file that each routine is guaranteed to include. Cheers, -- Bert -- Bert Driehuis, MIS -- bert_driehuis@nl.compuware.com -- +31-20-3116119 The grand leap of the whale up the Fall of Niagara is esteemed, by all who have seen it, as one of the finest spectacles in nature. -- Benjamin Franklin. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message