[scponly] moving SOLARIS_COMPAT to UNIX_COMPAT -> building on AIX
Lupe Christoph
lupe at lupe-christoph.de
Sun Oct 31 14:25:43 EST 2004
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.
> Kudos to Jan van Beers for lending me his good old RS/6k
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.
> -#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 HAS_STRSEP is much better.
> -#ifdef SOLARIS_COMPAT
> +#ifdef UNIX_COMPAT
> int flags = GLOB_NOCHECK;
> #else
> int flags = GLOB_NOCHECK | GLOB_TILDE;
Dunno what this is for, but probably the same appiles here.
> -#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 ...
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.
Thank you,
Lupe Christoph
--
| lupe at lupe-christoph.de | http://www.lupe-christoph.de/ |
| "... putting a mail server on the Internet without filtering is like |
| covering yourself with barbecue sauce and breaking into the Charity |
| Home for Badgers with Rabies. Michael Lucas |
More information about the scponly
mailing list