[scponly] moving SOLARIS_COMPAT to UNIX_COMPAT -> building on AIX

Sven Hoexter sven at timegate.de
Sun Oct 31 17:27:45 EST 2004


On Sun, Oct 31, 2004 at 08:25:43PM +0100, Lupe Christoph wrote:
> On Sunday, 2004-10-31 at 18:36:14 +0100, Sven Hoexter wrote:
> 
> > the attached patch renames SOLARIS_COMPAT to UNIX_COMPAT and adds an temp_os
> > hack for AIX so that AIX will be detected aswell.
> > With this patch I can compile scponly on a AIX 5.1L box with the needed gnu
> > tools [1] installed.
> 
> I don't think this should be "UNIX". If at all, maybe POSIX. (I don't
> know if this *is* POSIXly, I'm only assuming that that may be the
> case.)
> 
> But I think it would be better to test for feature (pre|ab)sence or bug
> (pre|ab)sence and name the symbols accordingly. The autoconf tools like
> to think that way.
Hmpf what have I done? Ok my intention with this patch was just to provide
something for aix users to compile scponly. I've read through my old mails
and found out that someone compiled scponly on aix with "SOLARIS_COMPAT"
and thought that it would be quite easy to use the same #ifdef for aix.
Well looks like I've to fight now with the monster ;)
I don't know much about auto* tools yet so it looks like I've to read
lot of manuals - do you've a hint for a newbie where to start?
 
> > -#ifdef SOLARIS_COMPAT
> > +#ifdef UNIX_COMPAT
> >  char* solaris_needs_strsep(char** str, char* delims)
> 
> Why leave this as solaris_? Which version of Solaris, anyway? The
> Solaris 8 I have access to does not have strsep. But maybe Solaris 9 or
> the upcoming Solaris 10? Should it be named
> solaris_2.0_upto_i_dont_know_needs_strsep() or
> solaris_before_9_needs_strsep() ? :-P
:)

> > -#ifndef SOLARIS_COMPAT
> > +#ifndef UNIX_COMPAT
> 
> #ifdef HAS_LOG_PERROR
> 
> >  	if (debuglevel > 1) // debuglevel 1 will still log to syslog
> >  		logopts |= LOG_PERROR;
> >  #endif
> 
> ... etc ...
There are also some IRIX_COMPAT #ifdef looking similar to those for
Solaris, but I've no Irix box to test so I did not touch them.
 
> Sven, if you want to change this, can you please add tests for these
> features to the automake(?) files. I played with those tools only once,
> so I'm not really sure what needs to be done.
> 
> That should make scponly more portable to unknown POSIX variants.
Well, aehm I put this on my todo list but no estimation when I've time
to learn about all those new things. Maybe someone else with more knowledge
has the time to work on it.

Sven

-- 
Revolution is not a dinner party, not an essay, nor a painting, nor a piece of
embroidery; it cannot be advanced softly, gradually, carefully, considerately,
respectfully, politely, plainly, and modestly.
- Mao Zedong (Mao Tse-tung)



More information about the scponly mailing list