[poppler] Patch: windows/msvc compilation fixes

Krzysztof Kowalczyk kkowalczyk at gmail.com
Mon Sep 10 22:11:31 PDT 2007


The attached patch makes it possible to compile Poppler on Windows
natively with Visual Studio (msvc).

The changes are:
* wrap all includes of <unistd.h> within #ifdef HAVE_UNISTD_H (msvc
doesn't have that)
* windows doesn't have fontconfig so all fontconfig related stuff is
disabled for msvc (#ifndef _MSC_VER). An alternative would be to do
#ifdef HAVE_FONTCONFIG_H but it doesn't seem to be set by current
./configure and I'm not man enough to mess with autotools
* GlobalParamsWin.cc implements font lookup functionality (i.e. the
equivalent of using fontconfig). The idea is that on Windows one has
to compile this file - it's not needed on unix.

I've tested that after those changes Unix (Ubuntu 7.04) build still works.

I also wrote native msvc makefile. Any objections to including it in
the repository? My goal is to make it easy to windows developers to
use poppler, which will hopefully lead them to contribute as well. A
native makefile that doesn't require hacks like mingw is a step in
that direction.

-- kjk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msvc.patch
Type: application/octet-stream
Size: 7599 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/poppler/attachments/20070910/87eb5600/attachment.obj 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: GlobalParamsWin.cc
Url: http://lists.freedesktop.org/archives/poppler/attachments/20070910/87eb5600/attachment.txt 


More information about the poppler mailing list