From 4d6b6865e995dc496b617882d635b027d81e8616 Mon Sep 17 00:00:00 2001 From: "K. Noel Belcourt" Date: Tue, 8 Feb 2011 18:34:53 +0000 Subject: [PATCH] With gcc-4.5.2, the stuct option conflicts with an identically named struct in the gcc headers. Renamed the bjam struct to bjam_option in all places where referenced. [SVN r68728] --- v2/engine/jam.c | 2 +- v2/engine/option.c | 4 +- v2/engine/option.h | 8 +-- v2/user-config.jam | 120 ++++++++++++++------------------------------- 4 files changed, 43 insertions(+), 91 deletions(-) diff --git a/v2/engine/jam.c b/v2/engine/jam.c index 550d78a8e..e11d082bc 100644 --- a/v2/engine/jam.c +++ b/v2/engine/jam.c @@ -217,7 +217,7 @@ int main( int argc, char * * argv, char * * arg_environ ) { int n; char * s; - struct option optv[N_OPTS]; + struct bjam_option optv[N_OPTS]; char const * all = "all"; int status; int arg_c = argc; diff --git a/v2/engine/option.c b/v2/engine/option.c index 69f3bf802..d25e5e8ad 100644 --- a/v2/engine/option.c +++ b/v2/engine/option.c @@ -17,7 +17,7 @@ * was supplied for an option that does not require one." */ -int getoptions( int argc, char * * argv, char * opts, option * optv ) +int getoptions( int argc, char * * argv, char * opts, bjam_option * optv ) { int i; int optc = N_OPTS; @@ -84,7 +84,7 @@ int getoptions( int argc, char * * argv, char * opts, option * optv ) * Name: getoptval() - find an option given its character. */ -char * getoptval( option * optv, char opt, int subopt ) +char * getoptval( bjam_option * optv, char opt, int subopt ) { int i; for ( i = 0; i < N_OPTS; ++i, ++optv ) diff --git a/v2/engine/option.h b/v2/engine/option.h index 872bf1ff4..99ef620da 100644 --- a/v2/engine/option.h +++ b/v2/engine/option.h @@ -11,13 +11,13 @@ * \ -) "Command line option." */ -typedef struct option +typedef struct bjam_option { char flag; /* filled in by getoption() */ char *val; /* set to random address if true */ -} option; +} bjam_option; # define N_OPTS 256 -int getoptions( int argc, char **argv, char *opts, option *optv ); -char * getoptval( option *optv, char opt, int subopt ); +int getoptions( int argc, char **argv, char *opts, bjam_option *optv ); +char * getoptval( bjam_option *optv, char opt, int subopt ); diff --git a/v2/user-config.jam b/v2/user-config.jam index fbbf13fd0..b30b89737 100644 --- a/v2/user-config.jam +++ b/v2/user-config.jam @@ -1,92 +1,44 @@ -# Copyright 2003, 2005 Douglas Gregor -# Copyright 2004 John Maddock -# Copyright 2002, 2003, 2004, 2007 Vladimir Prus -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +# Copyright 2003, 2005 Douglas Gregor +# Copyright 2004 John Maddock +# Copyright 2002, 2003, 2004 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -# This file is used to configure your Boost.Build installation. You can modify -# this file in place, or you can place it in a permanent location so that it -# does not get overwritten should you get a new version of Boost.Build. See: -# -# http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html -# -# for documentation about possible permanent locations. +# This file is used to configure your Boost.Build installation. Please read +# the user manual to find out where to put it. -# This file specifies which toolsets (C++ compilers), libraries, and other -# tools are available. Often, you should be able to just uncomment existing -# example lines and adjust them to taste. The complete list of supported tools, -# and configuration instructions can be found at: -# -# http://boost.org/boost-build2/doc/html/bbv2/reference/tools.html -# +# Toolset declarations are most important in this file. They tell Boost.Build +# what compilers are available and where to look for them. The first toolset +# will become "default" one. +# Some important libraries can also be configured. +# Uncomment relevant parts to suite your local configuration and preferences. -# This file uses Jam language syntax to describe available tools. Mostly, -# there are 'using' lines, that contain the name of the used tools, and -# parameters to pass to those tools -- where paremeters are separated by -# semicolons. Important syntax notes: -# -# - Both ':' and ';' must be separated from other tokens by whitespace -# - The '\' symbol is a quote character, so when specifying Windows paths you -# should use '/' or '\\' instead. -# -# More details about the syntax can be found at: -# -# http://boost.org/boost-build2/doc/html/bbv2/advanced.html#bbv2.advanced.jam_language -# +import toolset : using ; -# ------------------ -# GCC configuration. -# ------------------ +using python + : 2.5 + : /home/kbelco/bin/python/linux + ; -# Configure gcc (default version). -# using gcc ; +# : /sierra/Sntools/extras/mpi/RHEL5/openmpi-1.4.1/pgi-10.1-64Bit/bin/mpicxx +# : /scratch/pgi/linux86-64/2010/mpi/mpich/bin/mpicxx +using mpi + : /sierra/Sntools/extras/mpi/RHEL5/openmpi-1.4.1/pgi-10.1-64Bit/bin/mpicxx + ; -# Configure specific gcc version, giving alternative name to use. -# using gcc : 3.2 : g++-3.2 ; +using gcc + ; +using pgi + : 10.9 + : /scratch/pgi/linux86-64/10.9/bin/pgCC + : "-Wc,-a --brief_diagnostics --error_limit1 --compress_names --diag_suppress450 --no_using_std --zc_eh" + "--zc_eh" + ; -# ------------------- -# MSVC configuration. -# ------------------- - -# Configure msvc (default version, searched for in standard locations and PATH). -# using msvc ; - -# Configure specific msvc version (searched for in standard locations and PATH). -# using msvc : 8.0 ; - - -# ---------------------- -# Borland configuration. -# ---------------------- -# using borland ; - - -# ---------------------- -# STLPort configuration. -# ---------------------- - -# Configure specifying location of STLPort headers. Libraries must be either -# not needed or available to the compiler by default. -# using stlport : : /usr/include/stlport ; - -# Configure specifying location of both headers and libraries explicitly. -# using stlport : : /usr/include/stlport /usr/lib ; - - -# ----------------- -# QT configuration. -# ----------------- - -# Configure assuming QTDIR gives the installation prefix. -# using qt ; - -# Configure with an explicit installation prefix. -# using qt : /usr/opt/qt ; - -# --------------------- -# Python configuration. -# --------------------- - -# Configure specific Python version. -# using python : 3.1 : /usr/bin/python3 : /usr/include/python3.1 : /usr/lib ; +using pgi + : 10.1 + : /sierra/Sntools/extras/compilers/pgi/linux86-64/10.1/bin/pgCC + : "-Wc,-a --brief_diagnostics --error_limit1 --compress_names --diag_suppress450 --no_using_std --zc_eh" + "--zc_eh" + ;