Switch to side-by-side view

--- a/src/bincimapmime/mime-inputsource.h
+++ b/src/bincimapmime/mime-inputsource.h
@@ -25,7 +25,7 @@
  */
 #ifndef mime_inputsource_h_included
 #define mime_inputsource_h_included
-
+#include "autoconfig.h"
 // Data source for MIME parser
 
 // Note about large files: we might want to change the unsigned int
@@ -49,7 +49,7 @@
     inline MimeInputSource(int fd, unsigned int start = 0);
     virtual inline ~MimeInputSource(void);
 
-    virtual inline size_t fillRaw(char *raw, size_t nbytes);
+    virtual inline ssize_t fillRaw(char *raw, size_t nbytes);
     virtual inline void reset(void);
 
     virtual inline bool fillInputBuffer(void);
@@ -87,7 +87,7 @@
   {
   }
 
-  inline size_t MimeInputSource::fillRaw(char *raw, size_t nbytes)
+  inline ssize_t MimeInputSource::fillRaw(char *raw, size_t nbytes)
   {
       return read(fd, raw, nbytes);
   }
@@ -179,7 +179,7 @@
     class MimeInputSourceStream : public MimeInputSource {
   public:
     inline MimeInputSourceStream(istream& s, unsigned int start = 0);
-    virtual inline size_t fillRaw(char *raw, size_t nb);
+    virtual inline ssize_t fillRaw(char *raw, size_t nb);
     virtual inline void reset(void);
   private:
       istream& s;
@@ -191,7 +191,7 @@
   {
   }
 
-  inline size_t MimeInputSourceStream::fillRaw(char *raw, size_t nb)
+  inline ssize_t MimeInputSourceStream::fillRaw(char *raw, size_t nb)
   {
     // Why can't streams tell how many characters were actually read
     // when hitting eof ?
@@ -199,16 +199,16 @@
     s.seekg(0, ios::end);
     std::streampos lst = s.tellg();
     s.seekg(st);
-    size_t nbytes = lst - st;
+    size_t nbytes = size_t(lst - st);
     if (nbytes > nb) {
 	nbytes = nb;
     }
     if (nbytes <= 0) {
-	return (size_t)-1;
+	return (ssize_t)-1;
     }
 
     s.read(raw, nbytes);
-    return nbytes;
+    return static_cast<ssize_t>(nbytes);
   }
 
   inline void MimeInputSourceStream::reset(void)