Re: NO_AMANDA (was Re: RAIT in 2.4.3b4)
2003-01-28 17:52:25
On Mon, Jan 27, 2003 at 11:48:06PM -0500, Scott Mcdermott wrote:
> John R. Jackson on Mon 27/01 21:37 -0500:
> > > - the #ifdef NO_AMANDA stuff is pretty much exact duplication.
> > > Anyone consider just moving this out into a library instead of
> > > duplicating whole routines in rait-*.c ?
> >
> > Yes, but Marc Mengel really (really :-) wanted to keep the code
> > isolated from Amanda so it could be used in other packages, so we
> > ended up with the "NO_AMANDA" stuff.
>
> Yeah but I mean...there's two copies of each of those routines :)
>
> How would moving the needed routines into a library that both Amanda
> itself, and amdd could link to (I gather that's what it's for, so an
> amdd can be compiled standalone), prevent it from being used in other
> packages?
>
> here is a list of duplicated symbols:
>
> struct am_mt_status
> amfree()
> amtable_alloc()
> tapeio_init_devname()
> P()
>
> I'm looking at these notes:
>
> * tape-src/amdd.c: Make sure this compiles "stand-alone". To do so,
> use: gcc -Wall -DNO_AMANDA amdd.c output-rait.c output-tape.c.
> * tape-src/ammt.c: Make sure this compiles "stand-alone". To do so,
> use: gcc -Wall -DNO_AMANDA ammt.c output-rait.c output-tape.c.
>
> for one, it looks like stralloc() changes in 2.5 prevent these from
> compiling anyways. So looks like now you have to duplicate that
> function too.
I changed that recently, I didn't know that they should compile stand-alone.
I will fix it.
> How about we just move the functions to a library
> installed as /usr/lib/am* and the other stuff to a common header they
> both include?
He probably want a static binary that doesn't need amanda at all.
> one more thing I'm curious about: is the backwards C idiom
>
> if (0 != sometestfunc())
>
> instead of the usual
>
> if (sometestfunc() != 0)
>
> preferred by amanda developers, or Mr. Mengel? It's very strange to
> read, I've never seen it before :)
Marc's style.
--
Jean-Louis Martineau email: martineau AT IRO.UMontreal DOT CA
Departement IRO, Universite de Montreal
C.P. 6128, Succ. CENTRE-VILLE Tel: (514) 343-6111 ext. 3529
Montreal, Canada, H3C 3J7 Fax: (514) 343-5834
|
|
|