Re: [Boost-bugs] [Boost C++ Libraries] #5725: Different ordering of includes can lead to compilation errors ( ‘SEEK_SET’ cannot appear in a constant-expression etc )

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5725: Different ordering of includes can lead to compilation errors ( ‘SEEK_SET’ cannot appear in a constant-expression etc )
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-12-24 16:59:26


#5725: Different ordering of includes can lead to compilation errors ( ‘SEEK_SET’
cannot appear in a constant-expression etc )
----------------------------------------------------------------+-----------
  Reporter: Relja Arandjelovic <arandjelovic.relja@…> | Owner: igaztanaga
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: interprocess
   Version: Boost 1.46.1 | Severity: Problem
Resolution: wontfix | Keywords: SEEK_SET, include ordering, compilation error, interprocess, mpi, asio
----------------------------------------------------------------+-----------

Comment (by marshall):

 Reija --
 I think you should spend a bit more time investigating.
 * What does including ASIO bring to the table - why does it fail when you
 include ASIO (and not when you don't)?
 * Also, what version of Boost are you using?

 The code the compiler is whining about is:
 {{{
 typedef enum { file_begin = SEEK_SET
              , file_end = SEEK_END
              , file_current = SEEK_CUR
              } file_pos_t;
 }}}
 which (given sane values for SEEK_SET, etc) looks fine to me.
 What's the definition of SEEK_SET, etc on your machine?

 Here's the one from my (Mac):
 {{{
 $ grep SEEK_SET /usr/include/stdio.h
 #ifndef SEEK_SET
 #define SEEK_SET 0 /* set file offset to offset */
 }}}

 I'm also wondering about this define in mph/config.h:
 {{{
 /* Force MPICH not to define SEEK_SET, SEEK_CUR, and SEEK_END, which
    conflict with the versions in <stdio.h> and <cstdio>. */
 #define MPICH_IGNORE_CXX_SEEK 1
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5725#comment:3>
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:08 UTC