updates.
authorPekka Riikonen <priikone@silcnet.org>
Fri, 29 Jun 2001 11:22:31 +0000 (11:22 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 29 Jun 2001 11:22:31 +0000 (11:22 +0000)
includes/silcincludes.h
lib/silcutil/silcbuffer.h
lib/silcutil/silctask.h

index 7ea22a48a8e9600aa596b357c85b6b47fe2818e3..1c4ef761c8fa2c9fd2df20d056a5e92d09d68258 100644 (file)
 /* Automatically generated configuration header */
 #include "silcdefs.h"
 
+#ifdef WIN32
+#ifndef SILC_WIN32
+#define SILC_WIN32
+#endif
+#endif
+
 #ifdef SILC_WIN32
 #include "silcwin32.h"
 #endif
index 124911031f8741a8174d61a615ffe8730df147a4..34e30c1c1f863f7fa299f79d34aaa26e3d81f36f 100644 (file)
@@ -136,10 +136,10 @@ SilcBuffer silc_buffer_alloc(uint32 len)
   SilcBuffer sb;
 
   /* Allocate new SilcBuffer */
-  sb = silc_calloc(1, sizeof(*sb));
+  sb = (SilcBuffer)silc_calloc(1, sizeof(*sb));
 
   /* Allocate the actual data area */
-  sb->head = silc_calloc(len, sizeof(*sb->head));
+  sb->head = (unsigned char *)silc_calloc(len, sizeof(*sb->head));
 
   /* Set pointers to the new buffer */
   sb->truelen = len;
@@ -309,7 +309,7 @@ unsigned char *silc_buffer_put_head(SilcBuffer sb,
 #ifdef SILC_DEBUG
   assert((sb->data - sb->head) >= len);
 #endif
-  return memcpy(sb->head, data, len);
+  return (unsigned char *)memcpy(sb->head, data, len);
 }
 
 /* Puts data at the start of the valid data area. Returns a pointer 
@@ -331,7 +331,7 @@ unsigned char *silc_buffer_put(SilcBuffer sb,
 #ifdef SILC_DEBUG
   assert((sb->tail - sb->data) >= len);
 #endif
-  return memcpy(sb->data, data, len);
+  return (unsigned char *)memcpy(sb->data, data, len);
 }
 
 /* Puts data at the tail of the buffer. Returns pointer to the copied
@@ -353,7 +353,7 @@ unsigned char *silc_buffer_put_tail(SilcBuffer sb,
 #ifdef SILC_DEBUG
   assert((sb->end - sb->tail) >= len);
 #endif
-  return memcpy(sb->tail, data, len);
+  return (unsigned char *)memcpy(sb->tail, data, len);
 }
 
 #endif
index 9cd4547ef8f6e0cad30540c4765b488c120f6063..744c2f8d5630eda1346c24fe953051c41a4a6207 100644 (file)
@@ -235,12 +235,12 @@ static void func(void *qptr, int type, void *context, int fd)
 void func(void *qptr, int type, void *context, int fd)
 
 /* Prototypes */
-void silc_task_queue_alloc(SilcSchedule schedule, SilcTaskQueue *new
+void silc_task_queue_alloc(SilcSchedule schedule, SilcTaskQueue *queue
                           bool valid);
 void silc_task_queue_free(SilcTaskQueue queue);
-SilcTask silc_task_add(SilcTaskQueue queue, SilcTask new
+SilcTask silc_task_add(SilcTaskQueue queue, SilcTask task
                       SilcTaskPriority priority);
-SilcTask silc_task_add_timeout(SilcTaskQueue queue, SilcTask new,
+SilcTask silc_task_add_timeout(SilcTaskQueue queue, SilcTask task,
                               SilcTaskPriority priority);
 SilcTask silc_task_register(SilcTaskQueue queue, int fd, 
                            SilcTaskCallback cb, void *context,