-/* $Id: bfile.c,v 1.43 2005-05-17 08:50:48 adam Exp $
+/* $Id: bfile.c,v 1.44 2005-06-14 20:28:53 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <assert.h>
#ifdef WIN32
#include <io.h>
-#else
+#endif
+
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-/* $Id: mfile.c,v 1.61 2005-05-17 08:50:48 adam Exp $
+/* $Id: mfile.c,v 1.62 2005-06-14 20:28:53 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <fcntl.h>
#ifdef WIN32
#include <io.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <direntz.h>
-/* $Id: agrep.c,v 1.15 2005-03-30 09:25:23 adam Exp $
+/* $Id: agrep.c,v 1.16 2005-06-14 20:28:53 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <fcntl.h>
#ifdef WIN32
-
#include <io.h>
-
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-/* $Id: dopen.c,v 1.11 2005-01-15 19:38:21 adam Exp $
+/* $Id: dopen.c,v 1.12 2005-06-14 20:28:53 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <sys/types.h>
#include <fcntl.h>
-#ifndef WIN32
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdio.h>
-/* $Id: drdwr.c,v 1.16 2005-01-15 19:38:21 adam Exp $
+/* $Id: drdwr.c,v 1.17 2005-06-14 20:28:53 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <sys/types.h>
#include <fcntl.h>
-#ifndef WIN32
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <string.h>
-/* $Id: dir.c,v 1.30 2005-01-15 19:38:24 adam Exp $
+/* $Id: dir.c,v 1.31 2005-06-14 20:28:53 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <stdio.h>
#include <string.h>
#include <assert.h>
-#ifndef WIN32
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <direntz.h>
-/* $Id: extract.c,v 1.185 2005-06-07 14:53:39 adam Exp $
+/* $Id: extract.c,v 1.186 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <ctype.h>
#ifdef WIN32
#include <io.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <fcntl.h>
-/* $Id: kdump.c,v 1.28 2005-01-15 19:38:26 adam Exp $
+/* $Id: kdump.c,v 1.29 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <assert.h>
#ifdef WIN32
#include <io.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <assert.h>
-/* $Id: kinput.c,v 1.65 2005-04-13 13:03:47 adam Exp $
+/* $Id: kinput.c,v 1.66 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <fcntl.h>
#ifdef WIN32
#include <io.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
-/* $Id: lockidx.c,v 1.24 2005-01-15 19:38:26 adam Exp $
+/* $Id: lockidx.c,v 1.25 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <assert.h>
#ifdef WIN32
#include <io.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <fcntl.h>
-/* $Id: locksrv.c,v 1.19 2005-01-15 19:38:26 adam Exp $
+/* $Id: locksrv.c,v 1.20 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <assert.h>
#ifdef WIN32
#include <io.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/stat.h>
-/* $Id: lockutil.c,v 1.20 2005-01-15 19:38:26 adam Exp $
+/* $Id: lockutil.c,v 1.21 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#ifdef WIN32
#include <io.h>
#include <sys/locking.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-/* $Id: main.c,v 1.124 2005-05-11 12:39:36 adam Exp $
+/* $Id: main.c,v 1.125 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <assert.h>
#ifdef WIN32
#include <io.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
+#endif
+#if HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <time.h>
int trans_started=0;
#if HAVE_SYS_TIMES_H
struct tms tms1, tms2;
- struct timeval start_time, end_time;
double usec;
#endif
+#if HAVE_SYS_TIME_H
+ struct timeval start_time, end_time;
+#endif
#ifndef WIN32
char nbuf[100];
#endif
#endif
#if HAVE_SYS_TIMES_H
times(&tms1);
+#endif
+#if HAVE_SYS_TIME_H
gettimeofday(&start_time, 0);
#endif
prog = *argv;
zebra_close (zh);
zebra_stop (zs);
#if HAVE_SYS_TIMES_H
+#if HAVE_SYS_TIME_H
if (trans_started)
{
gettimeofday(&end_time, 0);
(double) (tms2.tms_stime - tms1.tms_stime)/100);
}
#endif
+#endif
nmem_exit();
exit (0);
return 0;
-/* $Id: rank1.c,v 1.24 2005-03-08 14:41:37 adam Exp $
+/* $Id: rank1.c,v 1.25 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <assert.h>
#ifdef WIN32
#include <io.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-/* $Id: recstat.c,v 1.13 2005-01-15 19:38:26 adam Exp $
+/* $Id: recstat.c,v 1.14 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <assert.h>
#include <string.h>
#include <fcntl.h>
-#ifndef WIN32
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "recindxp.h"
-/* $Id: retrieve.c,v 1.31 2005-06-07 11:36:38 adam Exp $
+/* $Id: retrieve.c,v 1.32 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#ifdef WIN32
#include <io.h>
#include <process.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-/* $Id: trav.c,v 1.48 2005-05-09 19:57:35 adam Exp $
+/* $Id: trav.c,v 1.49 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <io.h>
#define S_ISREG(x) (x & _S_IFREG)
#define S_ISDIR(x) (x & _S_IFDIR)
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <direntz.h>
-/* $Id: zebraapi.c,v 1.177 2005-06-13 10:29:20 adam Exp $
+/* $Id: zebraapi.c,v 1.178 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <io.h>
#include <process.h>
#include <direct.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-/* $Id: zebrash.c,v 1.33 2005-03-09 12:14:42 adam Exp $
+/* $Id: zebrash.c,v 1.34 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-#include <unistd.h> /* for isatty */
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#if HAVE_READLINE_READLINE_H
#include <readline/readline.h>
-/* $Id: zrpn.c,v 1.199 2005-06-14 12:42:48 adam Exp $
+/* $Id: zrpn.c,v 1.200 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <assert.h>
#ifdef WIN32
#include <io.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <ctype.h>
-/* $Id: zserver.c,v 1.135 2005-06-13 10:29:20 adam Exp $
+/* $Id: zserver.c,v 1.136 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <io.h>
#include <process.h>
#include <sys/locking.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-/* $Id: rstemp.c,v 1.64 2005-05-24 11:35:43 adam Exp $
+/* $Id: rstemp.c,v 1.65 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <string.h>
#ifdef WIN32
#include <io.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/types.h>
-/* $Id: testlib.c,v 1.22 2005-06-14 20:02:30 adam Exp $
+/* $Id: testlib.c,v 1.23 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
/** testlib - utilities for the api tests */
+#if HAVE_SYS_TIME_H
#include <sys/time.h>
+#endif
+#if HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
+#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
*/
ZebraService start_up(char *cfgname, int argc, char **argv)
{
+#if HAVE_SYS_RESOURCE_H
+#if HAVE_SYS_TIME_H
struct rlimit rlim;
rlim.rlim_cur = 20;
rlim.rlim_max = 20;
setrlimit(RLIMIT_CPU, &rlim);
+#endif
+#endif
nmem_init();
start_log(argc, argv);
return start_service(cfgname);
-/* $Id: res.c,v 1.42 2005-06-13 10:27:52 adam Exp $
+/* $Id: res.c,v 1.43 2005-06-14 20:28:54 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <assert.h>
#ifdef WIN32
#include <io.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif