X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftstnmem.c;h=2ed2e56a85ed1d089111cad64d586399b0d582c5;hb=f517f60a95e2f94edd1efd750024642b5941ef08;hp=284e0a8854ca980c88bf0c22010b287b9a1fd9ab;hpb=c6e47cbbff56f39f6d81b079ebaeac41d793d4d9;p=yaz-moved-to-github.git diff --git a/test/tstnmem.c b/test/tstnmem.c index 284e0a8..2ed2e56 100644 --- a/test/tstnmem.c +++ b/test/tstnmem.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 2002-2003, Index Data + * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: tstnmem.c,v 1.1 2003-10-27 12:21:38 adam Exp $ + * $Id: tstnmem.c,v 1.4 2005-01-15 19:47:15 adam Exp $ */ #if HAVE_CONFIG_H @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -30,6 +31,14 @@ int main (int argc, char **argv) cp = nmem_malloc(n, j); if (!cp) exit(2); + if (sizeof(long) >= j) + *(long*) cp = 123L; +#if HAVE_LONG_LONG + if (sizeof(long long) >= j) + *(long long*) cp = 123L; +#endif + if (sizeof(double) >= j) + *(double*) cp = 12.2; } for (j = 2000; j<20000; j+= 2000)