]> code.citadel.org Git - citadel.git/blobdiff - citadel/clientsocket.c
- port to Cygwin (DLL support, etc.)
[citadel.git] / citadel / clientsocket.c
index a7a7e82c23445b7edff09c4428f8ad0d6294b66a..286659aef946e8e4787c3253972ae740d196a51c 100644 (file)
@@ -8,6 +8,10 @@
  *
  */
 
+#ifdef DLL_EXPORT
+#define IN_LIBCIT
+#endif
+
 #include "sysdep.h"
 #include <stdlib.h>
 #include <unistd.h>
@@ -23,6 +27,8 @@
 #include <errno.h>
 #include <stdarg.h>
 #include "citadel.h"
+#include "server.h"
+#include "dynloader.h"
 #ifndef HAVE_SNPRINTF
 #include "snprintf.h"
 #endif
@@ -138,13 +144,13 @@ int sock_gets(int sock, char *buf)
         */
        for (i = 0;; i++) {
                if (sock_read(sock, &buf[i], 1) < 0) return(-1);
-               if (buf[i] == '\n' || i == 255)
+               if (buf[i] == '\n' || i == (SIZ-1))
                        break;
        }
 
        /* If we got a long line, discard characters until the newline.
         */
-       if (i == 255)
+       if (i == (SIZ-1))
                while (buf[i] != '\n')
                        if (sock_read(sock, &buf[i], 1) < 0) return(-1);