From 4f18c7af2f193c8f12a96c1cad718f9f9fd20b9d Mon Sep 17 00:00:00 2001 From: pav Date: Fri, 2 Jan 2004 20:12:37 +0000 Subject: - Add patch for this problem: The XMLPlatformUtils::openFile function opens files with fopen and passes it "r+" string as mode argument. This makes(according to fopen(3)) it try to open file for reading and writing while it should be opened for reading only. As a result you can't work with files not owned by you which is rather common case for dtd files. - Raise PORTREVISION PR: ports/59499 Submitted by: Konstantin Oznobihin Approved by: maintainer --- textproc/xerces-c2-devel/Makefile | 1 + ...c-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp | 20 ++++++++++++++++++++ textproc/xerces-c2/Makefile | 1 + ...c-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp | 20 ++++++++++++++++++++ textproc/xerces-c27/Makefile | 1 + ...c-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp | 20 ++++++++++++++++++++ 6 files changed, 63 insertions(+) create mode 100644 textproc/xerces-c2-devel/files/patch-src-xercesc-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp create mode 100644 textproc/xerces-c2/files/patch-src-xercesc-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp create mode 100644 textproc/xerces-c27/files/patch-src-xercesc-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp diff --git a/textproc/xerces-c2-devel/Makefile b/textproc/xerces-c2-devel/Makefile index 51264bbe808a..9966df9232dc 100644 --- a/textproc/xerces-c2-devel/Makefile +++ b/textproc/xerces-c2-devel/Makefile @@ -7,6 +7,7 @@ PORTNAME= xerces-c2 PORTVERSION= 2.3.0 +PORTREVISION= 1 CATEGORIES= textproc MASTER_SITES= ${MASTER_SITE_APACHE_XML} MASTER_SITE_SUBDIR= xerces-c/source diff --git a/textproc/xerces-c2-devel/files/patch-src-xercesc-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp b/textproc/xerces-c2-devel/files/patch-src-xercesc-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp new file mode 100644 index 000000000000..9b0f6629c8af --- /dev/null +++ b/textproc/xerces-c2-devel/files/patch-src-xercesc-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp @@ -0,0 +1,20 @@ +--- src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp Wed Nov 12 20:32:33 2003 ++++ src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp Wed Nov 12 20:31:16 2003 +@@ -298,7 +298,7 @@ + XMLExcepts::CPtr_PointerIsZero); + const char* tmpFileName = XMLString::transcode(fileName, fgMemoryManager); + ArrayJanitor janText((char*)tmpFileName, fgMemoryManager); +- FileHandle retVal = (FileHandle)fopen( tmpFileName , "r+" ); ++ FileHandle retVal = (FileHandle)fopen( tmpFileName , "r" ); + return retVal; + } + +@@ -307,7 +307,7 @@ + if (fileName == NULL) + ThrowXML(XMLPlatformUtilsException, + XMLExcepts::CPtr_PointerIsZero); +- FileHandle retVal = (FileHandle)fopen( fileName , "r+" ); ++ FileHandle retVal = (FileHandle)fopen( fileName , "r" ); + return retVal; + } + diff --git a/textproc/xerces-c2/Makefile b/textproc/xerces-c2/Makefile index 51264bbe808a..9966df9232dc 100644 --- a/textproc/xerces-c2/Makefile +++ b/textproc/xerces-c2/Makefile @@ -7,6 +7,7 @@ PORTNAME= xerces-c2 PORTVERSION= 2.3.0 +PORTREVISION= 1 CATEGORIES= textproc MASTER_SITES= ${MASTER_SITE_APACHE_XML} MASTER_SITE_SUBDIR= xerces-c/source diff --git a/textproc/xerces-c2/files/patch-src-xercesc-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp b/textproc/xerces-c2/files/patch-src-xercesc-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp new file mode 100644 index 000000000000..9b0f6629c8af --- /dev/null +++ b/textproc/xerces-c2/files/patch-src-xercesc-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp @@ -0,0 +1,20 @@ +--- src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp Wed Nov 12 20:32:33 2003 ++++ src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp Wed Nov 12 20:31:16 2003 +@@ -298,7 +298,7 @@ + XMLExcepts::CPtr_PointerIsZero); + const char* tmpFileName = XMLString::transcode(fileName, fgMemoryManager); + ArrayJanitor janText((char*)tmpFileName, fgMemoryManager); +- FileHandle retVal = (FileHandle)fopen( tmpFileName , "r+" ); ++ FileHandle retVal = (FileHandle)fopen( tmpFileName , "r" ); + return retVal; + } + +@@ -307,7 +307,7 @@ + if (fileName == NULL) + ThrowXML(XMLPlatformUtilsException, + XMLExcepts::CPtr_PointerIsZero); +- FileHandle retVal = (FileHandle)fopen( fileName , "r+" ); ++ FileHandle retVal = (FileHandle)fopen( fileName , "r" ); + return retVal; + } + diff --git a/textproc/xerces-c27/Makefile b/textproc/xerces-c27/Makefile index 51264bbe808a..9966df9232dc 100644 --- a/textproc/xerces-c27/Makefile +++ b/textproc/xerces-c27/Makefile @@ -7,6 +7,7 @@ PORTNAME= xerces-c2 PORTVERSION= 2.3.0 +PORTREVISION= 1 CATEGORIES= textproc MASTER_SITES= ${MASTER_SITE_APACHE_XML} MASTER_SITE_SUBDIR= xerces-c/source diff --git a/textproc/xerces-c27/files/patch-src-xercesc-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp b/textproc/xerces-c27/files/patch-src-xercesc-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp new file mode 100644 index 000000000000..9b0f6629c8af --- /dev/null +++ b/textproc/xerces-c27/files/patch-src-xercesc-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp @@ -0,0 +1,20 @@ +--- src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp Wed Nov 12 20:32:33 2003 ++++ src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp Wed Nov 12 20:31:16 2003 +@@ -298,7 +298,7 @@ + XMLExcepts::CPtr_PointerIsZero); + const char* tmpFileName = XMLString::transcode(fileName, fgMemoryManager); + ArrayJanitor janText((char*)tmpFileName, fgMemoryManager); +- FileHandle retVal = (FileHandle)fopen( tmpFileName , "r+" ); ++ FileHandle retVal = (FileHandle)fopen( tmpFileName , "r" ); + return retVal; + } + +@@ -307,7 +307,7 @@ + if (fileName == NULL) + ThrowXML(XMLPlatformUtilsException, + XMLExcepts::CPtr_PointerIsZero); +- FileHandle retVal = (FileHandle)fopen( fileName , "r+" ); ++ FileHandle retVal = (FileHandle)fopen( fileName , "r" ); + return retVal; + } + -- cgit a964b'/>
Commit message (Expand)AuthorAgeFilesLines
* Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1
* - Unbreak the build against Clang (non-void function should return a value)danfe2013-09-052-1/+33
* - Unbreak the build with EYECANDY option (required libGLU and fixing famousdanfe2013-08-091-5/+4
* - Provide working mirror in MASTER_SITESdanfe2013-05-132-5/+6
* - Convert to modern OPTIONS framework (courtesy of jgh@)danfe2013-04-283-57/+54
* - update png to 1.5.10dinoex2012-06-012-2/+13
* - Update devel/sdl12 to 1.2.15mva2012-02-181-1/+1
* -remove MD5ohauer2011-07-031-2/+0
* Bring unmaintained Quake ports under my wing.danfe2011-03-151-1/+1
* - Reassign ports to heaptabthorpe2011-02-271-1/+1
* - update to 1.4.1dinoex2010-03-281-2/+2
* - update to jpeg-8dinoex2010-02-051-2/+7
* - update to jpeg7dinoex2009-07-181-2/+2
* - Remove USE_GCC where it can be satisfied with base compiler on followingpav2008-07-251-1/+0
* - Add missing dependensmiwi2008-03-271-0/+1
* - Chase devel/sdl12 shlib version bumpmiwi2008-03-131-1/+1
* - Welcome X.org 7.2 \o/.flz2007-05-201-0/+1
* - Fix building with GCC 4.x.alepulver2007-03-224-0/+75
* - Update to version 0.45.alepulver2006-12-316-45/+58
* - Add PORTSCOUT variable.alepulver2006-12-281-0/+3
* - Update devel/sdl12 to version 1.2.11. Now we employ stock SDL directorystas2006-09-201-0/+1
* - Fix building on FreeBSD 4.x.alepulver2006-08-082-2/+12