pdf-devel
[Top][All Lists]
Advanced

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

Re: [pdf-devel] [PATCH] Fix compilation on Open/FreeBSD


From: Zac Brown
Subject: Re: [pdf-devel] [PATCH] Fix compilation on Open/FreeBSD
Date: Wed, 03 Sep 2008 08:01:37 -0400
User-agent: Thunderbird 2.0.0.16 (X11/20080724)

Aleksander Morgado wrote:
Hi there,

I spent a little time over the three day weekend fixing compilation on
Open/FreeBSD. NetBSD still isn't working, it seems to be an issue with
linking to libiconv.

Which issue? If there is not an iconv() implementation already in the
system, the user can install GNU libiconv and it should work (in my
Ubuntu at home it worked even better with the GNU replacement, with no
'invalid reads' notified by valgrind).

If you give me more detail on the problem maybe I can help.

Well on all the BSD systems, I've not been able to get autotools to realize that iconv is there. This results in a ./configure resembling the following:

CFLAGS="-L/usr/local/lib -I/usr/local/include -liconv" ./configure

Ya its ugly, and maybe I should be using LDFLAGS for "-L/usr/local/lib", I forget, however that above example works on both OpenBSD and FreeBSD. Even when I tell it where the iconv.h headers are, the ./configure script still says libiconv is present and thus won't link to it, and that lead to explicitly adding "-liconv".

* Fix time function init to use struct tm rather than the linux-only
"daylight/timezone" global variables. As a side note, using those was
setting it incorrectly anyway with regard to daylight savings time and
GMT offsets.

Which where the problems with the GMT offset and the daylight saving
time? Can you detail them? I didn't fully test those functions, so
probably you're right, but anyway I would like to have more details.

Well in the case of using the daylight/timezone variables, even if daylight reports "1" or "true" or what have you, the GMT offset still reported 18000 which (regardless of pos/neg) is incorrect for my timezone (EST5EDT). If its daylight savings time then my timezone should have an offset of 14400. In the case of struct tm, it reports GMT offset in seconds *East* of GMT, so its -14400.

In the case of daylight/timezone variables, it reports seconds *West* of GMT, as well as only reporting the non-DST offset.

All the tests pass with this patch on Linux, FreeBSD and OpenBSD.

What about Windows and Mac OS X?

Passed on Windows, I hadn't had a chane to check Mac OS X, but I'll do it now and post results :).

-Zac




reply via email to

[Prev in Thread] Current Thread [Next in Thread]