projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pazpar2 compiles on Windows. But does not yet work
[pazpar2-moved-to-github.git]
/
src
/
http_command.c
diff --git
a/src/http_command.c
b/src/http_command.c
index
24928d9
..
0de007b
100644
(file)
--- a/
src/http_command.c
+++ b/
src/http_command.c
@@
-23,12
+23,18
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <stdio.h>
#include <sys/types.h>
#include <stdio.h>
#include <sys/types.h>
+#if HAVE_SYS_UIO_H
#include <sys/uio.h>
#include <sys/uio.h>
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#include <unistd.h>
+#endif
#include <stdlib.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include <ctype.h>
#include <ctype.h>
+#if HAVE_SYS_TIME_H
#include <sys/time.h>
#include <sys/time.h>
+#endif
#include <yaz/snprintf.h>
#if HAVE_CONFIG_H
#include <config.h>
#include <yaz/snprintf.h>
#if HAVE_CONFIG_H
#include <config.h>
@@
-166,6
+172,9
@@
unsigned int make_sessionid()
res = seq;
else
{
res = seq;
else
{
+#ifdef WIN32
+ res = seq;
+#else
struct timeval t;
if (gettimeofday(&t, 0) < 0)
struct timeval t;
if (gettimeofday(&t, 0) < 0)
@@
-177,6
+186,7
@@
unsigned int make_sessionid()
(long long would be more appropriate)*/
res = t.tv_sec;
res = ((res << 8) | (seq & 0xff)) & ((1U << 31) - 1);
(long long would be more appropriate)*/
res = t.tv_sec;
res = ((res << 8) | (seq & 0xff)) & ((1U << 31) - 1);
+#endif
}
return res;
}
}
return res;
}