This adds a dependency on mLib 2.4.1.
AC_SUBST([CATACOMB_LIBS])
dnl Necessary support libraries.
AC_SUBST([CATACOMB_LIBS])
dnl Necessary support libraries.
-PKG_CHECK_MODULES([mLib], [mLib >= 2.3.0])
+PKG_CHECK_MODULES([mLib], [mLib >= 2.4.1])
AM_CFLAGS="$AM_CFLAGS $mLib_CFLAGS"
dnl--------------------------------------------------------------------------
AM_CFLAGS="$AM_CFLAGS $mLib_CFLAGS"
dnl--------------------------------------------------------------------------
Section: libs
Priority: extra
Build-Depends: debhelper (>= 10), python, valgrind [!armel], pkg-config,
Section: libs
Priority: extra
Build-Depends: debhelper (>= 10), python, valgrind [!armel], pkg-config,
Maintainer: Mark Wooding <mdw@distorted.org.uk>
Standards-Version: 3.1.1
Maintainer: Mark Wooding <mdw@distorted.org.uk>
Standards-Version: 3.1.1
#include <string.h>
#include <mLib/bits.h>
#include <string.h>
#include <mLib/bits.h>
+#include <mLib/macros.h>
#include <mLib/sub.h>
#include "grand.h"
#include <mLib/sub.h>
#include "grand.h"
/* --- Now reduce mod p --- *
*
/* --- Now reduce mod p --- *
*
- * I'm using shifts and adds to do the multiply step here. This needs to
- * be changed if @D@ ever becomes something other than 5.
+ * I'm using shifts and adds to do the multiply step here.
-#if D != 5
-# error "Change shift sequence!"
-#endif
-
+ STATIC_ASSERT(D == 5, "Shift sequence doesn't match prime");
const octet *c = p;
int i, rot;
const octet *c = p;
int i, rot;
-#if RAND_POOLSZ != 128
-# error Polynomial in rand_add is out of date. Fix it.
-#endif
+ STATIC_ASSERT(RAND_POOLSZ == 128, "Polynomial doesn't match pool size");