X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftstlogthread.c;h=b35da023cc2ee1aed4c57d6ba45fb3b5d5e88bb6;hb=e6f45fddb3d4267340ad320dbedfbf5cb68c4d21;hp=501795f1cfe73abf937d75faaade0310715c7e1a;hpb=d8c29911dfa8d98b9adcc843bbc43fa6f139fe9b;p=yaz-moved-to-github.git diff --git a/test/tstlogthread.c b/test/tstlogthread.c index 501795f..b35da02 100644 --- a/test/tstlogthread.c +++ b/test/tstlogthread.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 1998-2005, Index Data. + * Copyright (c) 1998-2007, Index Data. * See the file LICENSE for details. * - * $Id: tstlogthread.c,v 1.1 2005-09-08 13:25:33 adam Exp $ + * $Id: tstlogthread.c,v 1.6 2007-04-18 11:50:47 mike Exp $ */ #if HAVE_CONFIG_H @@ -14,7 +14,7 @@ #include #include -#if HAVE_POSIX_THREADS +#if YAZ_POSIX_THREADS #include @@ -33,7 +33,7 @@ static void *t_loop2(void *vp) return 0; } -static void t_test() +static void t_test(void) { pthread_t tids[4]; @@ -49,7 +49,7 @@ static void t_test() exit(0); } #else -static void t_test() +static void t_test(void) { } @@ -60,6 +60,7 @@ int main(int argc, char **argv) char *arg; int ret; + /* t_test is only invoked if a non-option arg is given .. */ while ((ret = options("v:l:", argv, argc, &arg)) != -2) { switch (ret) @@ -70,11 +71,13 @@ int main(int argc, char **argv) case 'l': yaz_log_init_file(arg); break; + case 0: + t_test(); + break; default: - return 1; + exit(1); } } - t_test(); return 0; } /*