[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mpop-users] total_size and new_size long long patch



As I needed to download a full POP3 inbox over LONG_MAX bytes, I've
changed all total_size and new_size to use long long instead of long
integers. Hope you don't need to download an inbox over LLONG_MAX
bytes, though. :D

The patch is for mpop 1.0.17 release tarball hosted on SF.net.

8<--------------- CUT HERE ------------------

diff long/mpop.c longlong/mpop.c
820c820
< char *mpop_hr_size(long size)
---
> char *mpop_hr_size(long long size)
diff long/pop3.c longlong/pop3.c
1007c1007
<     session->total_size = strtol(p + 1, &q, 10);
---
>     session->total_size = strtoll(p + 1, &q, 10);
1009c1009
< 	    || (session->total_size == LONG_MAX && errno == ERANGE))
---
> 	    || (session->total_size == LLONG_MAX && errno == ERANGE))
diff long/pop3.h longlong/pop3.h
185c185
<     long total_size;		/* total size of messages */
---
>     long long total_size;		/* total size of messages */
190c190
<     long new_size;		/* size of new messages */
---
>     long long new_size;		/* size of new messages */


------------------------------------------- >8


Regards,
Renato Schmidt