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

From: Bob Krzaczek <[email-masked]>
Date: Wed, 24 Mar 1999 17:54:35 -0500 (EST)

[ apologies if you see this twice, I wasn't paying attention to the To:
  line ]

Just to confirm...

After some quick hacking, I currently have a TCP-only version of afpd
compiled and running on a Digital Unix platform (4.0D), based on
asun2.1.3, built with native tools. It's not really tested yet, but it
*does* work. I want to redo some of the changes before I send the patches
out (there are some ugly #ifdef's in there... ;-)

Drop me a quick mail message, and I'll put you on a list that I'll use
when I've got a patch set to distribute.

// bob

On Tue, 23 Mar 1999, a sun wrote:
; the appletalk parts of netatalk need some kernel code to work. i
; believe systems like Digital Unix allow for STREAMS modules. so, if
; you're interested in getting it running under Digital Unix, you'll
; need to port the Solaris STREAMS driver. i'm more than happy to accept
; patches to netatalk that get appletalk support working on other
; systems.
; 
; in the future, i plan to create an "unknown" platform that just
; compiles afpd with AFP/tcp support to help ease things along. 

-- 
// Bob Krzaczek, RIT Center for Imaging Science, <[email-masked]>

---

From: Bob Krzaczek <[email-masked]>
Date: Wed, 24 Mar 1999 18:45:42 -0500 (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!

---

From: a sun <[email-masked]>
Date: Wed, 24 Mar 1999 15:16:01 -0800 (PST)

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:
     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. 

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

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

#1 is critical. however, it can use something generic like
-DHAVE_64BITLONGS for machines that don't specify intX_t types. #2 can
have -DNO_QUOTA_SUPPORT if all else fails. 

-a