Subject: [Boost-bugs] [Boost C++ Libraries] #5355: boost filesystem on Qnx trouble
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-22 15:58:33
#5355: boost filesystem on Qnx trouble
------------------------------+---------------------------------------------
Reporter: wim@⦠| Owner:
Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
Version: Boost 1.45.0 | Severity: Problem
Keywords: |
------------------------------+---------------------------------------------
I had two problems with boost.filesystem in boost 1.46.1 that are
addressed with the following patch:
1. Compilation failure due to missing declaration of ::rename, which is
resolved by including stdio.h. See also ticket:5277
2. Runtime crash (segmentation fault) of boost::filesystem::file_size(...)
because struct stat is 60 bytes in operations.cpp whereas everywhere else
it is 72 bytes.
This patch fixes both issues (but probably needs to be guarded by proper
preprocessor conditionals?)
{{{
diff -ru boost_1_46_1/libs/filesystem/v3/src/operations.cpp
../boost_1_46_1/libs/filesystem/v3/src/operations.cpp
--- boost_1_46_1/libs/filesystem/v3/src/operations.cpp 2011-03-03
18:00:21.000000000 +0000
+++ ../boost_1_46_1/libs/filesystem/v3/src/operations.cpp 2011-03-22
15:40:32.000000000 +0000
@@ -32,7 +32,7 @@
#if !(defined(__HP_aCC) && defined(_ILP32) && \
!defined(_STATVFS_ACPP_PROBLEMS_FIXED))
-#define _FILE_OFFSET_BITS 64 // at worst, these defines may have no
effect,
+//#define _FILE_OFFSET_BITS 64 // at worst, these defines may have no
effect,
#endif
#if !defined(__PGI)
#define __USE_FILE_OFFSET64 // but that is harmless on Windows and on
POSIX
@@ -182,6 +182,7 @@
#include <string>
#include <cstring>
#include <cstdio> // for remove, rename
+#include <stdio.h>
#include <cerrno>
#include <cassert>
// #include <iostream> // for debugging only; comment out when not in
use
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5355> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC