Uses preprocessor define WIN32 instead of WINDOWS to build code
[yaz-moved-to-github.git] / server / eventl.c
index 76a80be..c4b8b3e 100644 (file)
@@ -1,10 +1,17 @@
 /*
- * Copyright (c) 1995-1998, Index Data
+ * Copyright (c) 1995-1999, Index Data
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: eventl.c,v $
- * Revision 1.25  1998-01-29 13:30:23  adam
+ * Revision 1.27  1999-02-02 13:57:34  adam
+ * Uses preprocessor define WIN32 instead of WINDOWS to build code
+ * for Microsoft WIN32.
+ *
+ * Revision 1.26  1998/02/11 11:53:35  adam
+ * Changed code so that it compiles as C++.
+ *
+ * Revision 1.25  1998/01/29 13:30:23  adam
  * Better event handle system for NT/Unix.
  *
  * Revision 1.24  1997/09/04 14:19:13  adam
@@ -87,7 +94,7 @@
 #include <yconfig.h>
 #include <stdio.h>
 #include <assert.h>
-#ifdef WINDOWS
+#ifdef WIN32
 #include <winsock.h>
 #else
 #include <unistd.h>
@@ -107,7 +114,7 @@ IOCHAN iochan_create(int fd, IOC_CALLBACK cb, int flags)
 {
     IOCHAN new_iochan;
 
-    if (!(new_iochan = xmalloc(sizeof(*new_iochan))))
+    if (!(new_iochan = (IOCHAN)xmalloc(sizeof(*new_iochan))))
        return 0;
     new_iochan->destroyed = 0;
     new_iochan->fd = fd;
@@ -156,7 +163,7 @@ int event_loop(IOCHAN *iochans)
             else
             {
                 /* Destroy the first member in the chain, and try again */
-                association *assoc = iochan_getdata(*iochans);
+                association *assoc = (association *)iochan_getdata(*iochans);
                 COMSTACK conn = assoc->client_link;
 
                 cs_close(conn);