From 62d1e7cc112c02dda6b63fef3d2a884eefef072c Mon Sep 17 00:00:00 2001 From: "K. Noel Belcourt" Date: Tue, 8 Feb 2011 18:46:03 +0000 Subject: [PATCH] Another try at this commit. With gcc-4.5.2, the stuct option defined in option.h conflicts with an identically named struct in the gcc headers. Renamed the bjam struct to bjam_option in all places where referenced. [SVN r68730] --- v2/engine/jam.c | 2 +- v2/engine/option.c | 4 ++-- v2/engine/option.h | 8 ++++---- 3 files changed, 7 insertions(+), 7 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 );