libgdal: fix build

This commit is contained in:
Johannes 2018-11-08 20:40:10 +01:00 committed by maxice8
parent 8c1f8aba85
commit 8247291644
1 changed files with 51 additions and 0 deletions

View File

@ -300,3 +300,54 @@ index a3b88583425..c9ca28d3cd9 100644
# Uncomment for PDF support
--- frmts/pdf/pdfdataset.cpp.orig 2018-11-08 20:25:24.398021193 +0100
+++ frmts/pdf/pdfdataset.cpp 2018-11-08 20:35:15.305346284 +0100
@@ -2599,7 +2599,7 @@
#else
int nPos,
#endif
- char *pszMsg)
+ const char *pszMsg)
{
CPLString osError;
@@ -4442,7 +4442,7 @@
#ifdef HAVE_POPPLER
if (bUseLib.test(PDFLIB_POPPLER))
{
- PDFRectangle* psMediaBox = poPagePoppler->getMediaBox();
+ const PDFRectangle* psMediaBox = poPagePoppler->getMediaBox();
dfX1 = psMediaBox->x1;
dfY1 = psMediaBox->y1;
dfX2 = psMediaBox->x2;
@@ -4454,7 +4454,7 @@
if (bUseLib.test(PDFLIB_PODOFO))
{
CPLAssert(poPagePodofo);
- PoDoFo::PdfRect oMediaBox = poPagePodofo->GetMediaBox();
+ const PoDoFo::PdfRect oMediaBox = poPagePodofo->GetMediaBox();
dfX1 = oMediaBox.GetLeft();
dfY1 = oMediaBox.GetBottom();
dfX2 = dfX1 + oMediaBox.GetWidth();
@@ -4780,7 +4780,7 @@
GooString* poMetadata = poCatalogPoppler->readMetadata();
if (poMetadata)
{
- char* pszContent = poMetadata->getCString();
+ const char* pszContent = poMetadata->getCString();
if (pszContent != nullptr &&
STARTS_WITH(pszContent, "<?xpacket begin="))
{
@@ -4784,10 +4784,10 @@
if (pszContent != nullptr &&
STARTS_WITH(pszContent, "<?xpacket begin="))
{
- char *apszMDList[2];
+ const char *apszMDList[2];
apszMDList[0] = pszContent;
apszMDList[1] = nullptr;
- poDS->SetMetadata(apszMDList, "xml:XMP");
+ poDS->SetMetadata((char **) apszMDList, "xml:XMP");
}
delete poMetadata;
}