HTCondor Project List Archives



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Condor-devel] stopping the GLIBC madness



From your YDL port:

-#if defined(LINUX) && (defined(GLIBC21) || defined(GLIBC22) || defined(GLIBC23)) +#if defined(LINUX) && (defined(GLIBC21) || defined(GLIBC22) || defined(GLIBC23) || defined(GLIBC24))

Please... can't we stop this madness?  Why not just this:

#if defined(LINUX)

??

Is it because it doesn't work on GLIBC20 or something? Do we even support any GLIBC20 platforms anymore? Do we support any non-glibc Linuxes anymore?

If the answer is "yes, we support non-GLIBC and GLIBC20", then the above should be:

#if defined(LINUX) && (!defined(GLIBC) || defined(GLIBC20))
// Weird case
#else
// What we expect
#endif

Let's try to be sane as we move forward...

Thanks,
-Derek

p.s. I'm CC'ing condor-devel since Erik keeps nagging me about using it more, not to publicly criticize your porting efforts. I understand why you did it the way you did (it's arguably a less dangerous change), I'm just raising the point that it seems like I see the same kind of diff everytime you port to a new platform. It appears as though we're just making porting harder by continuing these practices.

p.p.s. This whole approach is fundamentally wrong.  Instead of:

#if defined(LINUX) && (defined(GLIBC21) || defined(GLIBC22) || defined (GLIBC23))
// foo
#endif

it should be:

#if HAVE_WHATEVER_WE_EXPECT
// something for foo
#elsif HAVE_SOMETHING_STRANGE
// something else for foo
#elsif HAVE_SOMETHING_REALLY_STRANGE
// the Irix case
#else
#error This platform is too weird, configure could not figure out how to handle foo.
#endif

Yes, I know we'll never be allocated time to "fix everything", but we can certainly make incremental improvements like this, especially while porting. E.g. in this case:

#if HAVE_RLIM_T_DEFINE
#  undef rlim_t
#elsif !HAVE_RLIM_T
   typedef long rlim_t;
#endif

And of course, the roughly 2 line change to configure.ac to check if rlim_t is a defined preprocessor symbol at configure time or what...