X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fnmem.c;h=093b5b3a12a7e75f8b78f184589c620f33de5fc4;hb=4e82b831a8ac31e25b246a631acde354d8161688;hp=2a09b75d71e7773a5de95fc61fa72c535b2886b9;hpb=9320dd82ebf2e4c0e656139618b897c26331702c;p=yaz-moved-to-github.git diff --git a/src/nmem.c b/src/nmem.c index 2a09b75..093b5b3 100644 --- a/src/nmem.c +++ b/src/nmem.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 1995-2004, Index Data. + * Copyright (C) 1995-2005, Index Data ApS * 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.13 2005-01-17 13:03:27 adam Exp $ */ /** @@ -20,8 +20,10 @@ #endif #include +#include #include #include +#include #include #include #include @@ -40,7 +42,23 @@ #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; +#if HAVE_LONG_LONG + long long ll; +#endif + float f; + double d; + } u; +}; + +#define NMEM_ALIGN (offsetof(struct align, u)) static int log_level=0; static int log_level_initialized=0;