Re: [netatalk-admins] atalk for Digital Unix 4.0 (fwd)


Subject: Re: [netatalk-admins] atalk for Digital Unix 4.0 (fwd)
From: Bob Krzaczek (rskpci@cis.rit.edu)
Date: Wed Mar 24 1999 - 18:45:42 EST


On Wed, 24 Mar 1999, a sun wrote:
; erk. i certainly hope there aren't too many ugly #ifdefs. netatalk
; basically needs the following info to get afp/tcp running on platform
; x:

Sorry, should have been more clear; the ugly ifdef's are my own, just to
get things rolling. When I clean things up, I'm sure many will go away.

Bear in mind, I compiled in a strict environment "cc -std1 -w2" (includes
aborting compilations on even warnings), so there were lots of little
things that had to be dealt with, like: mismatched const attributes,
mismatched sign attributes (mostly in char vs. uchar). I've found that
when porting code, especially to alphas, that it's worth it in the long
run to take the time to hunt down and kill these bugs, even warnings.

There was also something in netatalk that triggered the (ugh) X/Open
environment. I haven't found (and yet killed) that trigger, so I also have
some ugly hacking to get around older function prototypes (ints instead of
size_t's (which are unsigned), socklen_t, stuff like that).

Actually, the quota stuff wasn't that bad. ;-) (I'm used to porting
between different environments, so my tolerance for these things is pretty
high... I guess "I'm used to it"... (which is why I always port with
strict compiler options, especially when porting to Alphas... you wouldn't
believe how often people make bogus assumptions like sizeof(int) ==
sizeof(int*), for example).

All in all, it wasn't that tough a nut to crack; take it as a compliment,
the code was cleaner than I had expected.

(Although, I can't help wondering how much faster netatalk will be if we
can eliminate even *some* of the bazillion-or-so bcopy's floating around
in there... bleah! ;-)

; 1) something to stick in endian.h. i'm hoping that's there's some
; sort of convergence in what header files to use. digital unix
; uses <machine/endian.h>. i also need to know if
; int32_t/int8_t/etc. are defined somewhere, or if some
; guesswork has to be done.

There are some useful definitions in machlimits.h, and from them you can
derive those types. Since I tend to avoid those sort of definitions
(except where absolutely necessary, like networking and driver code), I
just hardcoded them in there with some ifdef's for now. I'll clean this up
later, for sure.

; 2) quota information. all these different operating systems do
; things different ways.

Done; just to get things rolling, I defined netatalk's osf/1 as a svr4
system, but used BSDish code in the quotas. I'll probably go back through
and see if compiling as BSD makes life easier or not. (OSF/1 has both BSD
and SVR4 APIs, so either is pretty easy to support; on the other hand, 4.4
BSD diverged far enough that "#define BSD4_4" isn't best for OSF/1
either... :-(

Love them standards, so many to choose from...

; 3) some Makefile twiddling to disable compilation of the
; appletalk stuff.

Your NO_AFPTCP did most of the work for me!

-- 
// Bob Krzaczek, RIT Center for Imaging Science, <krz@cis.rit.edu>



This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:16:29 EST