[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Broken configure...

From: Petter Skott <lps_at_dc.luth.se>
Date: 2001-11-26 15:58:31 CET

I believe that i've found a problem with configure
(subversion-r364/464).
The following piece of c-code is used to verify the version of
Berkeley-DB (generated from ac-helpers/berkeley-db.m4).

#include <stdio.h>
#include "db.h"
main ()
{
  int major, minor, patch;

  db_version (&major, &minor, &patch);

  if (major < $svn_check_berkeley_db_major)
    exit (1);
  if (major > $svn_check_berkeley_db_major)
    exit (0);

  if (minor < $svn_check_berkeley_db_minor)
    exit (1);
  if (minor > $svn_check_berkeley_db_minor)
    exit (0);

  if (patch >= $svn_check_berkeley_db_patch)
    exit (0);
  else
    exit (1);
}

Consider the fact that the required version of BerkeleyDB is 3.3.11 (major
=3, minor = 3, patch = 11) which is also the latest version, the code
should be:

#include <stdio.h>
#include "db.h"
main ()
{
  int major, minor, patch;

  db_version (&major, &minor, &patch);

  if (major < $svn_check_berkeley_db_major)
    exit (1);
  if (major >=B $svn_check_berkeley_db_major)
    exit (0);

  if (minor < $svn_check_berkeley_db_minor)
    exit (1);
  if (minor >= $svn_check_berkeley_db_minor)
    exit (0);

  if (patch >= $svn_check_berkeley_db_patch)
    exit (0);
  else
    exit (1);
}

Or to be fully correct:

#include <stdio.h>
#include "db.h"
main ()
{
        if (major < $svn_check_berkeley_db_major)
                exit (1);
        if (minor < $svn_check_berkeley_db_minor)
                exit (1);
        if (patch < $svn_check_berkeley_db_patch)
                exit (1);
        exit (0);
}
   
/Petter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:49 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.