I just noticed that isync 1.1.0 has been officially released.
I've been using the git version rather heavily for quite some
time now as it has some options for handling an IMAP account of
mine with some unique configurations.

That said, there have been some changes from the version in git
that I built and the released version. The more serious of these
is due to some confusion about the symbol timezone in
src/drv_imap.c:

clang -DHAVE_CONFIG_H -I. -I..    -D_GNU_SOURCE
-I/usr/local/include -I/usr/local/include/db42 -pipe -W -Wall
-Wshadow -Wstrict-prototypes -ansi -pedantic
-Wno-overlength-strings -MT drv_imap.o -MD -MP -MF
.deps/drv_imap.Tpo -c -o drv_imap.o drv_imap.c
drv_imap.c:842:41: error: invalid operands to binary expression ('long' and 
'char *(*)(int, int)')
        return date - (hours * 60 + mins) * 60 - timezone;
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~

The issue here is that my FreeBSD system, in <time.h>, defines
timezone as follows:

char *timezone(int, int); 

which is obviously not an integral type and thus not suitable as
an operand for the - operator. A friend says that she's able to
build it without issue on her Funtoo Linux machine, which leads
me to suspect that this is a Linux-specific symbol of some sort.

It would appear that this code should probably be using the
tm_gmtoff field of the local datetime symbol defined in
parse_date(). Fixing this, the code builds after I fix another
issue (see following), but I haven't tested it yet.

As for the other issue, the isync code incorrectly adheres to
POSIX regarding _POSIX_SYNCHRONIZED_IO. According to
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html ,
the value of _POSIX_SYNCHRONIZED_IO shall be -1 if the feature is
unsupported. And indeed, on my FreeBSD system:

sys/unistd.h:#define    _POSIX_SYNCHRONIZED_IO          (-1)

Therefore, the code that does these conditional checks appears to
be adhering incorrectly to the standard. A simple way of fixing
this would be to test if the value of the symbol is 200809L as
specified by POSIX, rather than just testing if it's defined.

This affects src/{drv_maildir,sync}.c. I'm fairly certain that
this is a correct, valid fix, as I've been using isync this way
for rather large accounts for a few months now.

-- 
Chris Nehren

Attachment: pgpceVt7fZTRc.pgp
Description: PGP signature

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to