Hi, Alle giovedì 11 ottobre 2012, Svante Signell ha scritto: > > Should be updated: > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636568 > > Next package on the list: xerces-c > > Attached is an updated patch for bug #636568, use_posix_fcns.patch, > the *.dsc and *.debian.tar.gz files to enable a successful build for > GNU/Hurd. > use_posix_fcns.patch > --- > a/src/xercesc/util/FileManagers/PosixFileMgr.cpp.orig > b/src/xercesc/util/FileManagers/PosixFileMgr.cpp > @@ -187,27 +187,32 @@ > ArrayJanitor<char> janText(newSrc, manager); > > // Use a local buffer that is big enough for the largest legal path > - char absPath[PATH_MAX + 1]; > - > + char *absPath; > + XMLCh *ret; > + You are turning a whitespace line into an empty line, which is not needed. Also this is C++, so you can declare "ret" right at assign time, like it is done also elsewhere. > // get the absolute path > - if (!realpath(newSrc, absPath)) > + absPath = realpath(newSrc, NULL); > + if (absPath == NULL) Looking at the rest of the file, the style for NULL pointer checks is !foo, so adapt to that. > - char dirBuf[PATH_MAX + 2]; > - char *curDir = getcwd(&dirBuf, PATH_MAX + 1); > + XMLCh *ret; Same as above (declare at assign). > - if (!curDir) > + if (curDir == NULL) Why did you change this? Also, when done with the above fixed, do not forget to: a) send the patch upstream b) send the updated patch to the Debian bug, otherwise there's only and old (and wrong) patch -- Pino Toscano
Description: This is a digitally signed message part.