1 #ifndef PORTABLE_BINARY_ARCHIVE_HPP
2 #define PORTABLE_BINARY_ARCHIVE_HPP
4 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
5 // Use, modification and distribution is subject to the Boost Software
6 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 // MS compatible compilers support #pragma once
14 #include <boost/config.hpp>
15 #include <boost/cstdint.hpp>
16 #include <boost/static_assert.hpp>
20 #error This code assumes an eight-bit byte.
23 #include <boost/archive/basic_archive.hpp>
24 #include <boost/detail/endian.hpp>
26 enum portable_binary_archive_flags {
28 endian_little = 0x8000
31 //#if ( endian_big <= boost::archive::flags_last )
32 //#error archive flags conflict
36 reverse_bytes(char size, char *address){
37 char * first = address;
38 char * last = first + size - 1;
39 for(;first < last;++first, --last){
46 #endif // PORTABLE_BINARY_ARCHIVE_HPP