X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fnmem.c;h=947a492fdb669e009b863e28016005a2116af811;hb=8aa7ee02ee4abdda2f19b42236600f2954ce6c05;hp=2a09b75d71e7773a5de95fc61fa72c535b2886b9;hpb=9320dd82ebf2e4c0e656139618b897c26331702c;p=yaz-moved-to-github.git diff --git a/src/nmem.c b/src/nmem.c index 2a09b75..947a492 100644 --- a/src/nmem.c +++ b/src/nmem.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2004, Index Data. * See the file LICENSE for details. * - * $Id: nmem.c,v 1.9 2005-01-04 01:25:20 adam Exp $ + * $Id: nmem.c,v 1.10 2005-01-04 21:27:54 mike Exp $ */ /** @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -40,7 +41,21 @@ #endif #define NMEM_CHUNK (4*1024) -#define NMEM_ALIGN (sizeof(long)*2) + +struct align { + char x; + union { + char c; + short s; + int i; + long l; + long long ll; + float f; + double d; + } u; +}; + +#define NMEM_ALIGN (offsetof(struct align, u)) static int log_level=0; static int log_level_initialized=0;