|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r49055 - in branches/bcbboost/tools: build/v2 build/v2/tools build/v2/tools/types inspect jam/doc jam/src jam/src/modules quickbook
From: nicola.musatti_at_[hidden]
Date: 2008-09-29 18:04:38
Author: nmusatti
Date: 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
New Revision: 49055
URL: http://svn.boost.org/trac/boost/changeset/49055
Log:
Merge from trunk
Added:
branches/bcbboost/tools/build/v2/tools/message.jam
- copied unchanged from r49051, /trunk/tools/build/v2/tools/message.jam
Text files modified:
branches/bcbboost/tools/build/v2/index.html | 2
branches/bcbboost/tools/build/v2/tools/builtin.jam | 1
branches/bcbboost/tools/build/v2/tools/gcc.jam | 162 +++++++++++++++++++++++----------------
branches/bcbboost/tools/build/v2/tools/types/exe.jam | 8 +
branches/bcbboost/tools/build/v2/tools/types/lib.jam | 24 +++--
branches/bcbboost/tools/build/v2/tools/types/obj.jam | 8 +
branches/bcbboost/tools/inspect/index.html | 6
branches/bcbboost/tools/jam/doc/bjam.qbk | 2
branches/bcbboost/tools/jam/src/builtins.c | 15 +-
branches/bcbboost/tools/jam/src/compile.c | 8 +
branches/bcbboost/tools/jam/src/debug.c | 2
branches/bcbboost/tools/jam/src/expand.c | 6
branches/bcbboost/tools/jam/src/fileunix.c | 4
branches/bcbboost/tools/jam/src/hash.c | 17 ++-
branches/bcbboost/tools/jam/src/hcache.c | 8
branches/bcbboost/tools/jam/src/hdrmacro.c | 2
branches/bcbboost/tools/jam/src/headers.c | 2
branches/bcbboost/tools/jam/src/jam.c | 10 +-
branches/bcbboost/tools/jam/src/make.c | 15 +-
branches/bcbboost/tools/jam/src/make1.c | 6
branches/bcbboost/tools/jam/src/modules/order.c | 2
branches/bcbboost/tools/jam/src/modules/property-set.c | 2
branches/bcbboost/tools/jam/src/output.c | 2
branches/bcbboost/tools/jam/src/pathunix.c | 2
branches/bcbboost/tools/jam/src/pwd.c | 40 ++++++---
branches/bcbboost/tools/jam/src/regexp.c | 2
branches/bcbboost/tools/jam/src/rules.c | 2
branches/bcbboost/tools/jam/src/search.c | 4
branches/bcbboost/tools/jam/src/timestamp.c | 2
branches/bcbboost/tools/jam/src/variable.c | 2
branches/bcbboost/tools/quickbook/index.html | 4
31 files changed, 215 insertions(+), 157 deletions(-)
Modified: branches/bcbboost/tools/build/v2/index.html
==============================================================================
--- branches/bcbboost/tools/build/v2/index.html (original)
+++ branches/bcbboost/tools/build/v2/index.html 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -67,7 +67,7 @@
<input type="submit" value="Search">
</form> -->
</ul>
- <li>Bug tracker
+ <li>Bug tracker
<!-- <li>Rate Boost.Build: Freshmeat -->
</ul>
</p>
Modified: branches/bcbboost/tools/build/v2/tools/builtin.jam
==============================================================================
--- branches/bcbboost/tools/build/v2/tools/builtin.jam (original)
+++ branches/bcbboost/tools/build/v2/tools/builtin.jam 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -27,6 +27,7 @@
import types/register ;
import utility ;
import virtual-target ;
+import message ;
# FIXME: the following generate module import is not needed here but removing it
# too hastly will break using code (e.g. the main Boost library Jamroot file)
Modified: branches/bcbboost/tools/build/v2/tools/gcc.jam
==============================================================================
--- branches/bcbboost/tools/build/v2/tools/gcc.jam (original)
+++ branches/bcbboost/tools/build/v2/tools/gcc.jam 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -67,6 +67,8 @@
# Make gcc toolset object files use the "o" suffix on all platforms.
type.set-generated-target-suffix OBJ : <toolset>gcc : o ;
+type.set-generated-target-suffix OBJ : <toolset>gcc <target-os>windows : o ;
+type.set-generated-target-suffix OBJ : <toolset>gcc <target-os>cygwin : o ;
type.set-generated-target-suffix STATIC_LIB : <toolset>gcc <target-os>cygwin : a ;
type.set-generated-target-suffix IMPORT_LIB : <toolset>gcc <target-os>cygwin : dll.a ;
@@ -306,33 +308,41 @@
toolset.flags gcc.compile OPTIONS <profiling>on : -pg ;
toolset.flags gcc.compile OPTIONS <rtti>off : -fno-rtti ;
-# On cygwin and mingw, gcc generates position independent code by default, and
-# warns if -fPIC is specified. This might not be the right way of checking if
-# we are using cygwin. For example, it is possible to run cygwin gcc from NT
-# shell, or using crosscompiling. But we shall solve that problem at a later
-# time. In that case we shall just add another parameter to 'init' and move this
-# login inside 'init'.
-if [ os.name ] != CYGWIN && [ os.name ] != NT
+rule setup-fpic ( targets * : sources * : properties * )
{
- # This logic will add -fPIC for all compilations:
- #
- # lib a : a.cpp b ;
- # obj b : b.cpp ;
- # exe c : c.cpp a d ;
- # obj d : d.cpp ;
- #
- # This all is fine, except that 'd' will be compiled with -fPIC even though
- # it is not needed, as 'd' is used only in exe. However, it is hard to
- # detect where a target is going to be used. Alternatively, we can set -fPIC
- # only when main target type is LIB but than 'b' would be compiled without
- # -fPIC which would lead to link errors on x86-64. So, compile everything
- # with -fPIC.
- #
- # Yet another alternative would be to create a propagated <sharedable>
- # feature and set it when building shared libraries, but that would be hard
- # to implement and would increase the target path length even more.
- toolset.flags gcc.compile OPTIONS <link>shared : -fPIC ;
+ local link = [ feature.get-values link : $(properties) ] ;
+ if $(link) = shared
+ {
+ local target = [ feature.get-values target-os : $(properties) ] ;
+
+ # This logic will add -fPIC for all compilations:
+ #
+ # lib a : a.cpp b ;
+ # obj b : b.cpp ;
+ # exe c : c.cpp a d ;
+ # obj d : d.cpp ;
+ #
+ # This all is fine, except that 'd' will be compiled with -fPIC even though
+ # it is not needed, as 'd' is used only in exe. However, it is hard to
+ # detect where a target is going to be used. Alternatively, we can set -fPIC
+ # only when main target type is LIB but than 'b' would be compiled without
+ # -fPIC which would lead to link errors on x86-64. So, compile everything
+ # with -fPIC.
+ #
+ # Yet another alternative would be to create a propagated <sharedable>
+ # feature and set it when building shared libraries, but that would be hard
+ # to implement and would increase the target path length even more.
+
+ # On Windows, fPIC is default, specifying -fPIC explicitly leads to
+ # a warning.
+ if $(target) != cygwin && $(target) != windows
+ {
+ OPTIONS on $(targets) += -fPIC ;
+ }
+ }
}
+
+# FIXME: this should not use os.name.
if [ os.name ] != NT && [ os.name ] != OSF && [ os.name ] != HPUX && [ os.name ] != AIX
{
# OSF does have an option called -soname but it does not seem to work as
@@ -359,8 +369,11 @@
"$(CONFIG_COMMAND)" -x c-header $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}
-rule compile.c++
+rule compile.c++ ( targets * : sources * : properties * )
{
+ setup-threading $(targets) : $(sources) : $(properties) ;
+ setup-fpic $(targets) : $(sources) : $(properties) ;
+
# Some extensions are compiled as C++ by default. For others, we need to
# pass -x c++. We could always pass -x c++ but distcc does not work with it.
if ! $(>:S) in .cc .cp .cxx .cpp .c++ .C
@@ -385,8 +398,11 @@
}
}
-rule compile.c
+rule compile.c ( targets * : sources * : properties * )
{
+ setup-threading $(targets) : $(sources) : $(properties) ;
+ setup-fpic $(targets) : $(sources) : $(properties) ;
+
# If we use the name g++ then default file suffix -> language mapping does
# not work. So have to pass -x option. Maybe, we can work around this by
# allowing the user to specify both C and C++ compiler names.
@@ -681,6 +697,7 @@
# Declare actions for linking.
rule link ( targets * : sources * : properties * )
{
+ setup-threading $(targets) : $(sources) : $(properties) ;
SPACE on $(targets) = " " ;
# Serialize execution of the 'link' action, since running N links in
# parallel is just slower. For now, serialize only gcc links, it might be a
@@ -744,6 +761,7 @@
rule link.dll ( targets * : sources * : properties * )
{
+ setup-threading $(targets) : $(sources) : $(properties) ;
SPACE on $(targets) = " " ;
JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
}
@@ -754,52 +772,64 @@
"$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
}
-# Set up threading support. It is somewhat contrived, so perform it at the end,
-# to avoid cluttering other code.
-
-if [ os.on-windows ]
+rule setup-threading ( targets * : sources * : properties * )
{
- toolset.flags gcc OPTIONS <threading>multi : -mthreads ;
-}
-else if [ modules.peek : UNIX ]
-{
- switch [ modules.peek : JAMUNAME ]
- {
- case SunOS* :
+ local threading = [ feature.get-values threading : $(properties) ] ;
+ if $(threading) = multi
+ {
+ local target = [ feature.get-values target-os : $(properties) ] ;
+ local option ;
+ local libs ;
+
+ switch $(target)
{
- toolset.flags gcc OPTIONS <threading>multi : -pthreads ;
- toolset.flags gcc FINDLIBS-SA : rt ;
- }
- case BeOS :
- {
- # BeOS has no threading options, so do not set anything here.
- }
- case *BSD :
- {
- toolset.flags gcc OPTIONS <threading>multi : -pthread ;
- # There is no -lrt on BSD.
- }
- case DragonFly :
- {
- toolset.flags gcc OPTIONS <threading>multi : -pthread ;
- # There is no -lrt on BSD - DragonFly is a FreeBSD variant, which
- # annoyingly does not say it is a *BSD.
- }
- case IRIX :
- {
- # gcc on IRIX does not support multi-threading so do not set anything
- # here.
+ case windows :
+ {
+ option = -mthreads ;
+ }
+ case cygwin :
+ {
+ option = -mthreads ;
+ }
+ case sunos :
+ {
+ option = -pthreads ;
+ libs = rt ;
+ }
+ case beos :
+ {
+ # BeOS has no threading options, so do not set anything here.
+ }
+ case *bsd :
+ {
+ option = -pthread ;
+ # There is no -lrt on BSD.
+ }
+ case sgi :
+ {
+ # gcc on IRIX does not support multi-threading so do not set anything
+ # here.
+ }
+ case darwin :
+ {
+ # Darwin has no threading options so do not set anything here.
+ }
+ case * :
+ {
+ option = -pthread ;
+ libs = rt ;
+ }
}
- case Darwin :
+
+ if $(option)
{
- # Darwin has no threading options so do not set anything here.
+ OPTIONS on $(targets) += $(option) ;
}
- case * :
+ if $(libs)
{
- toolset.flags gcc OPTIONS <threading>multi : -pthread ;
- toolset.flags gcc FINDLIBS-SA : rt ;
+ FINDLIBS-SA on $(targets) += $(libs) ;
}
- }
+ }
}
local rule cpu-flags ( toolset variable : architecture : instruction-set + : values + : default ? )
Modified: branches/bcbboost/tools/build/v2/tools/types/exe.jam
==============================================================================
--- branches/bcbboost/tools/build/v2/tools/types/exe.jam (original)
+++ branches/bcbboost/tools/build/v2/tools/types/exe.jam 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -1,5 +1,9 @@
# Copyright David Abrahams 2004. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-type EXE : exe : : NT CYGWIN ;
-type EXE ;
+
+import type ;
+
+type.register EXE ;
+type.set-generated-target-suffix EXE : <target-os>windows : "exe" ;
+type.set-generated-target-suffix EXE : <target-os>cygiwn : "exe" ;
Modified: branches/bcbboost/tools/build/v2/tools/types/lib.jam
==============================================================================
--- branches/bcbboost/tools/build/v2/tools/types/lib.jam (original)
+++ branches/bcbboost/tools/build/v2/tools/types/lib.jam 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -7,23 +7,25 @@
type.register LIB ;
-if [ os.on-unix ]
-{
- type.set-generated-target-prefix LIB : : "lib" ;
-}
-
-type STATIC_LIB : lib a : LIB : NT CYGWIN ;
-type STATIC_LIB : a : LIB : MACOSX ;
-type STATIC_LIB : a : LIB ;
+type.set-generated-target-prefix LIB : : "lib" ;
+type.set-generated-target-prefix LIB : <target-os>windows : "" ;
+type.set-generated-target-prefix LIB : <target-os>cygwin : "" ;
+
+# FIXME: should not register both extensions on both
+# platforms.
+type.register STATIC_LIB : a lib : LIB ;
+
+type.set-generated-target-suffix STATIC_LIB : <target-os>windows : lib ;
+type.set-generated-target-suffix STATIC_LIB : <target-os>cygwin : lib ;
type.set-generated-target-prefix STATIC_LIB : : lib ;
type IMPORT_LIB : : STATIC_LIB ;
type.set-generated-target-suffix IMPORT_LIB : : lib ;
type.set-generated-target-prefix IMPORT_LIB : : "" ;
-type SHARED_LIB : dll : LIB : NT CYGWIN ;
-type SHARED_LIB : dylib : LIB : MACOSX ;
-type SHARED_LIB : so : LIB ;
+type.register SHARED_LIB : so dll dylib : LIB ;
+type.set-generated-target-suffix SHARED_LIB : <target-os>windows : dll ;
+type.set-generated-target-suffix SHARED_LIB : <target-os>darwin : dylib ;
type SEARCHED_LIB : : LIB ;
# This is needed so that when we create a target of SEARCHED_LIB
Modified: branches/bcbboost/tools/build/v2/tools/types/obj.jam
==============================================================================
--- branches/bcbboost/tools/build/v2/tools/types/obj.jam (original)
+++ branches/bcbboost/tools/build/v2/tools/types/obj.jam 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -1,5 +1,9 @@
# Copyright David Abrahams 2004. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-type OBJ : obj : : NT CYGWIN ;
-type OBJ : o ;
+
+import type ;
+
+type.register OBJ : o obj ;
+type.set-generated-target-suffix OBJ : <target-os>windows : obj ;
+type.set-generated-target-suffix OBJ : <target-os>cygwin : obj ;
Modified: branches/bcbboost/tools/inspect/index.html
==============================================================================
--- branches/bcbboost/tools/inspect/index.html (original)
+++ branches/bcbboost/tools/inspect/index.html 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -33,8 +33,8 @@
inspect.cpp</a></li>
<li>link_check.hpp and <a href="link_check.cpp">
link_check.cpp</a></li>
- <li>long_name_check.hpp and
- long_name_check.cpp</li>
+ <li>path_name_check.hpp and
+ path_name_check.cpp</li>
<li>tab_check.hpp and <a href="tab_check.cpp">
tab_check.cpp</a></li>
</ul>
@@ -56,4 +56,4 @@
</body>
-</html>
\ No newline at end of file
+</html>
Modified: branches/bcbboost/tools/jam/doc/bjam.qbk
==============================================================================
--- branches/bcbboost/tools/jam/doc/bjam.qbk (original)
+++ branches/bcbboost/tools/jam/doc/bjam.qbk 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -341,7 +341,7 @@
[ [] []
[[lines
- [line [@http://www-306.ibm.com/software/awdtools/vacpp/ =vacpp=]]
+ [line [@http://www.ibm.com/software/awdtools/vacpp/ =vacpp=]]
[line IBM VisualAge C++]
]]
[[list
Modified: branches/bcbboost/tools/jam/src/builtins.c
==============================================================================
--- branches/bcbboost/tools/jam/src/builtins.c (original)
+++ branches/bcbboost/tools/jam/src/builtins.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -1135,7 +1135,7 @@
void backtrace( FRAME * frame )
{
if ( !frame ) return;
- while ( frame = frame->prev )
+ while ( ( frame = frame->prev ) )
backtrace_line( frame );
}
@@ -1289,13 +1289,12 @@
string in[ 1 ];
string out[ 1 ];
- char * end; /* Last character of the part of string still to be
- * processed.
- */
- char * current; /* Working pointer. */
- int dotdots = 0; /* Number of '..' elements seen and not processed
- /* yet.
- */
+ /* Last character of the part of string still to be processed. */
+ char * end;
+ /* Working pointer. */
+ char * current;
+ /* Number of '..' elements seen and not processed yet. */
+ int dotdots = 0;
int rooted = 0;
char * result = 0;
Modified: branches/bcbboost/tools/jam/src/compile.c
==============================================================================
--- branches/bcbboost/tools/jam/src/compile.c (original)
+++ branches/bcbboost/tools/jam/src/compile.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -295,7 +295,7 @@
{
LIST * r = 0;
LIST * l;
- while ( l = parse_evaluate( p->left, frame ) )
+ while ( ( l = parse_evaluate( p->left, frame ) ) )
{
list_free( l );
if ( r ) list_free( r );
@@ -753,12 +753,13 @@
return locals;
}
-static int python_instance_number = 0;
-
RULE *
enter_rule( char *rulename, module_t *target_module );
#ifdef HAVE_PYTHON
+
+static int python_instance_number = 0;
+
static LIST*
call_python_function(RULE* r, FRAME* frame)
{
@@ -863,6 +864,7 @@
python = bindmodule("__python__");
return python;
}
+
#endif
Modified: branches/bcbboost/tools/jam/src/debug.c
==============================================================================
--- branches/bcbboost/tools/jam/src/debug.c (original)
+++ branches/bcbboost/tools/jam/src/debug.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -114,7 +114,7 @@
profile_total.cumulative += p->net;
profile_total.memory += p->memory;
}
- printf( "%10d %12.6f %12.6f %12.8f %10d %10d %s\n", p->num_entries,
+ printf( "%10ld %12.6f %12.6f %12.8f %10ld %10ld %s\n", p->num_entries,
cumulative, net, q, p->memory, mem_each, p->name );
}
Modified: branches/bcbboost/tools/jam/src/expand.c
==============================================================================
--- branches/bcbboost/tools/jam/src/expand.c (original)
+++ branches/bcbboost/tools/jam/src/expand.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -267,14 +267,14 @@
string_copy( variable, vars->string );
varname = variable->value;
- if ( colon = strchr( varname, MAGIC_COLON ) )
+ if ( ( colon = strchr( varname, MAGIC_COLON ) ) )
{
string_truncate( variable, colon - varname );
var_edit_parse( colon + 1, &edits );
}
/* Look for [x-y] subscripting. sub1 and sub2 are x and y. */
- if ( bracket = strchr( varname, MAGIC_LEFT ) )
+ if ( ( bracket = strchr( varname, MAGIC_LEFT ) ) )
{
/* Make all syntax errors in [] subscripting result in the same
* behavior: silenty return an empty expansion (by setting sub2
@@ -577,7 +577,7 @@
fp->ptr = "";
fp->len = 0;
}
- else if ( p = strchr( mods, MAGIC_COLON ) )
+ else if ( ( p = strchr( mods, MAGIC_COLON ) ) )
{
*p = 0;
fp->ptr = ++mods;
Modified: branches/bcbboost/tools/jam/src/fileunix.c
==============================================================================
--- branches/bcbboost/tools/jam/src/fileunix.c (original)
+++ branches/bcbboost/tools/jam/src/fileunix.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -167,10 +167,8 @@
printf( "scan directory %s\n", dir );
string_new( filename );
- while ( dirent = readdir( dd ) )
+ while ( ( dirent = readdir( dd ) ) )
{
- file_info_t * ff = 0;
-
# ifdef old_sinix
/* Broken structure definition on sinix. */
f.f_base.ptr = dirent->d_name - 2;
Modified: branches/bcbboost/tools/jam/src/hash.c
==============================================================================
--- branches/bcbboost/tools/jam/src/hash.c (original)
+++ branches/bcbboost/tools/jam/src/hash.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -103,7 +103,6 @@
static unsigned int jenkins_one_at_a_time_hash(const unsigned char *key)
{
unsigned int hash = 0;
- size_t i;
while ( *key )
{
@@ -114,9 +113,11 @@
hash += (hash << 3);
hash ^= (hash >> 11);
hash += (hash << 15);
+
return hash;
}
+/*
static unsigned int knuth_hash(const unsigned char *key)
{
unsigned int keyval = *key;
@@ -124,14 +125,14 @@
keyval = keyval * 2147059363 + *key++;
return keyval;
}
+*/
static unsigned int hash_keyval( const char * key_ )
{
- /**
- return knuth_hash((const unsigned char *)key_);
- /*/
+ /*
+ return knuth_hash((const unsigned char *)key_);
+ */
return jenkins_one_at_a_time_hash((const unsigned char *)key_);
- /**/
}
#define hash_bucket(hp,keyval) ((hp)->tab.base + ( (keyval) % (hp)->tab.nel ))
@@ -364,7 +365,7 @@
hp->items.size = sizeof( struct hashhdr ) + ALIGNED( datalen );
hp->items.list = -1;
hp->items.nel = 0;
- hp->inel = /* */ 11 /*/ 47 /* */;
+ hp->inel = 11 /* 47 */;
hp->name = name;
return hp;
@@ -440,14 +441,14 @@
for ( i = nel; i > 0; --i )
{
- if ( here = ( *tab++ != (ITEM *)0 ) )
+ if ( ( here = ( *tab++ != (ITEM *)0 ) ) )
count++;
if ( here && !run )
sets++;
run = here;
}
- printf( "%s table: %d+%d+%d (%dK+%dK) items+table+hash, %f density\n",
+ printf( "%s table: %d+%d+%d (%dK+%ldK) items+table+hash, %f density\n",
hp->name,
count,
hp->items.nel,
Modified: branches/bcbboost/tools/jam/src/hcache.c
==============================================================================
--- branches/bcbboost/tools/jam/src/hcache.c (original)
+++ branches/bcbboost/tools/jam/src/hcache.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -327,10 +327,10 @@
else if ( c->age > maxage )
continue;
- sprintf( includes_count_str, "%lu", list_length( c->includes ) );
- sprintf( hdrscan_count_str, "%lu", list_length( c->hdrscan ) );
- sprintf( time_str, "%lu", c->time );
- sprintf( age_str, "%lu", c->age );
+ sprintf( includes_count_str, "%lu", (long unsigned) list_length( c->includes ) );
+ sprintf( hdrscan_count_str, "%lu", (long unsigned) list_length( c->hdrscan ) );
+ sprintf( time_str, "%lu", (long unsigned) c->time );
+ sprintf( age_str, "%lu", (long unsigned) c->age );
write_netstring( f, CACHE_RECORD_HEADER );
write_netstring( f, c->boundname );
Modified: branches/bcbboost/tools/jam/src/hdrmacro.c
==============================================================================
--- branches/bcbboost/tools/jam/src/hdrmacro.c (original)
+++ branches/bcbboost/tools/jam/src/hdrmacro.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -46,8 +46,6 @@
* just to invoke a rule.
*/
-static LIST * header_macros1( LIST * l, char * file, int rec, regexp * re[] );
-
/* this type is used to store a dictionary of file header macros */
typedef struct header_macro
{
Modified: branches/bcbboost/tools/jam/src/headers.c
==============================================================================
--- branches/bcbboost/tools/jam/src/headers.c (original)
+++ branches/bcbboost/tools/jam/src/headers.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -60,7 +60,9 @@
{
LIST * hdrscan;
LIST * hdrrule;
+ #ifndef OPT_HEADER_CACHE_EXT
LIST * headlist = 0;
+ #endif
regexp * re[ MAXINC ];
int rec = 0;
Modified: branches/bcbboost/tools/jam/src/jam.c
==============================================================================
--- branches/bcbboost/tools/jam/src/jam.c (original)
+++ branches/bcbboost/tools/jam/src/jam.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -300,7 +300,7 @@
globs.timeout = atoi( s );
/* Turn on/off debugging */
- for ( n = 0; s = getoptval( optv, 'd', n ); ++n )
+ for ( n = 0; ( s = getoptval( optv, 'd', n ) ); ++n )
{
int i;
@@ -414,7 +414,7 @@
var_defines( othersyms, 1 );
/* Load up variables set on command line. */
- for ( n = 0; s = getoptval( optv, 's', n ); ++n )
+ for ( n = 0; ( s = getoptval( optv, 's', n ) ); ++n )
{
char *symv[2];
symv[ 0 ] = s;
@@ -452,7 +452,7 @@
{
FRAME frame[ 1 ];
frame_init( frame );
- for ( n = 0; s = getoptval( optv, 'f', n ); ++n )
+ for ( n = 0; ( s = getoptval( optv, 'f', n ) ); ++n )
parse_file( s, frame );
if ( !n )
@@ -462,11 +462,11 @@
status = yyanyerrors();
/* Manually touch -t targets. */
- for ( n = 0; s = getoptval( optv, 't', n ); ++n )
+ for ( n = 0; ( s = getoptval( optv, 't', n ) ); ++n )
touch_target( s );
/* If an output file is specified, set globs.cmdout to that. */
- if ( s = getoptval( optv, 'o', 0 ) )
+ if ( ( s = getoptval( optv, 'o', 0 ) ) )
{
if ( !( globs.cmdout = fopen( s, "w" ) ) )
{
Modified: branches/bcbboost/tools/jam/src/make.c
==============================================================================
--- branches/bcbboost/tools/jam/src/make.c (original)
+++ branches/bcbboost/tools/jam/src/make.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -195,7 +195,7 @@
if ( DEBUG_FATE )
{
printf( "fate change %s from %s to %s (as dependant of %s)\n",
- p->name, target_fate[ fate0 ], target_fate[ p->fate ], t->name );
+ p->name, target_fate[ (int) fate0 ], target_fate[ (int) p->fate ], t->name );
}
/* If we are done visiting it, go back and make sure its dependants
@@ -224,7 +224,7 @@
{
if ( DEBUG_FATE )
printf( "fate change %s from %s to %s (by rebuild)\n",
- r->name, target_fate[ r->fate ], target_fate[ T_FATE_REBUILD ] );
+ r->name, target_fate[ (int) r->fate ], target_fate[ T_FATE_REBUILD ] );
/* Force rebuild it. */
r->fate = T_FATE_REBUILD;
@@ -253,7 +253,6 @@
) /* forcibly touch all (real) targets */
{
TARGETS * c;
- TARGETS * d;
TARGET * ptime = t;
time_t last;
time_t leaf;
@@ -352,7 +351,7 @@
case T_BIND_MISSING:
case T_BIND_PARENTS:
printf( "time\t--\t%s%s: %s\n",
- spaces( depth ), t->name, target_bind[ t->binding ] );
+ spaces( depth ), t->name, target_bind[ (int) t->binding ] );
break;
case T_BIND_EXISTS:
@@ -421,7 +420,7 @@
if ( DEBUG_FATE )
if ( fate < c->target->fate )
printf( "fate change %s from %s to %s by dependency %s\n",
- t->name, target_fate[fate], target_fate[c->target->fate],
+ t->name, target_fate[(int) fate], target_fate[(int) c->target->fate],
c->target->name );
#endif
}
@@ -540,6 +539,7 @@
}
#ifdef OPT_GRAPH_DEBUG_EXT
if ( DEBUG_FATE && ( fate != savedFate ) )
+ {
if ( savedFate == T_FATE_STABLE )
printf( "fate change %s set to %s%s\n", t->name,
target_fate[ fate ], oldTimeStamp ? " (by timestamp)" : "" );
@@ -547,6 +547,7 @@
printf( "fate change %s from %s to %s%s\n", t->name,
target_fate[ savedFate ], target_fate[ fate ],
oldTimeStamp ? " (by timestamp)" : "" );
+ }
#endif
/* Step 4e: handle missing files */
@@ -635,7 +636,7 @@
flag = "*";
if ( DEBUG_MAKEPROG )
- printf( "made%s\t%s\t%s%s\n", flag, target_fate[ t->fate ],
+ printf( "made%s\t%s\t%s%s\n", flag, target_fate[ (int) t->fate ],
spaces( depth ), t->name );
}
@@ -735,7 +736,7 @@
for ( c = t->depends; c; c = c->next )
{
printf( " %s : Depends on %s (%s)", spaces( depth ),
- target_name( c->target ), target_fate[ c->target->fate ] );
+ target_name( c->target ), target_fate[ (int) c->target->fate ] );
if ( c->target->time == t->time )
printf( " (max time)");
printf( "\n" );
Modified: branches/bcbboost/tools/jam/src/make1.c
==============================================================================
--- branches/bcbboost/tools/jam/src/make1.c (original)
+++ branches/bcbboost/tools/jam/src/make1.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -66,7 +66,7 @@
#include <stdlib.h>
-#if defined(sun) || defined(__sun)
+#if ! defined(NT) || defined(__GNUC__)
#include <unistd.h> /* for unlink */
#endif
@@ -914,8 +914,8 @@
ACTIONS * a0;
/* Step through actions. Actions may be shared with other targets or grouped
- /* using RULE_TOGETHER, so actions already seen are skipped.
- */
+ * using RULE_TOGETHER, so actions already seen are skipped.
+ */
for ( a0 = t->actions ; a0; a0 = a0->next )
{
RULE * rule = a0->action->rule;
Modified: branches/bcbboost/tools/jam/src/modules/order.c
==============================================================================
--- branches/bcbboost/tools/jam/src/modules/order.c (original)
+++ branches/bcbboost/tools/jam/src/modules/order.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -77,7 +77,7 @@
LIST* arg = lol_get( frame->args, 0 );
LIST* tmp;
LIST* result = 0;
- int src, dst;
+ int src;
/* We need to create a graph of order dependencies between
the passed objects. We assume that there are no duplicates
Modified: branches/bcbboost/tools/jam/src/modules/property-set.c
==============================================================================
--- branches/bcbboost/tools/jam/src/modules/property-set.c (original)
+++ branches/bcbboost/tools/jam/src/modules/property-set.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -45,7 +45,9 @@
{
LIST* properties = lol_get( frame->args, 0 );
LIST* sorted = 0;
+#if 0
LIST* order_sensitive = 0;
+#endif
LIST* unique;
LIST* tmp;
LIST* val;
Modified: branches/bcbboost/tools/jam/src/output.c
==============================================================================
--- branches/bcbboost/tools/jam/src/output.c (original)
+++ branches/bcbboost/tools/jam/src/output.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -71,7 +71,7 @@
if ( action )
{
/* But only output for non-quietly actions. */
- fprintf( bjam_out, "%d second time limit exceeded\n", globs.timeout );
+ fprintf( bjam_out, "%ld second time limit exceeded\n", globs.timeout );
}
break;
}
Modified: branches/bcbboost/tools/jam/src/pathunix.c
==============================================================================
--- branches/bcbboost/tools/jam/src/pathunix.c (original)
+++ branches/bcbboost/tools/jam/src/pathunix.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -122,7 +122,7 @@
p = 0;
q = file;
- while ( q = (char *)memchr( q, '.', end - q ) )
+ while ( ( q = (char *)memchr( q, '.', end - q ) ) )
p = q++;
if ( p )
Modified: branches/bcbboost/tools/jam/src/pwd.c
==============================================================================
--- branches/bcbboost/tools/jam/src/pwd.c (original)
+++ branches/bcbboost/tools/jam/src/pwd.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -6,25 +6,29 @@
#include "lists.h"
#include "newstr.h"
#include "pathsys.h"
+#include "mem.h"
#include <limits.h>
+#include <errno.h>
/* MinGW on windows declares PATH_MAX in limits.h */
#if defined(NT) && ! defined(__GNUC__)
#include <direct.h>
#define PATH_MAX _MAX_PATH
#else
-#include <limits.h>
#include <unistd.h>
#if defined(__COMO__)
#include <linux/limits.h>
#endif
#endif
+#ifndef PATH_MAX
+ #define PATH_MAX 1024
+#endif
+
/* The current directory can't change in bjam, so optimize this to cache
** the result.
*/
-static char pwd_buffer[PATH_MAX];
static char * pwd_result = NULL;
@@ -33,20 +37,30 @@
{
if (!pwd_result)
{
- if (getcwd(pwd_buffer, sizeof(pwd_buffer)) == NULL)
- {
+ int buffer_size = PATH_MAX;
+ char * result_buffer = 0;
+ do
+ {
+ char * buffer = BJAM_MALLOC_RAW(buffer_size);
+ result_buffer = getcwd(buffer,buffer_size);
+ if (result_buffer)
+ {
+ #ifdef NT
+ pwd_result = short_path_to_long_path(result_buffer);
+ #else
+ pwd_result = newstr(result_buffer);
+ #endif
+ }
+ buffer_size *= 2;
+ BJAM_FREE_RAW(buffer);
+ }
+ while (!pwd_result && errno == ERANGE);
+
+ if (!pwd_result)
+ {
perror("can not get current directory");
return L0;
}
- else
- {
-#ifdef NT
- pwd_result = short_path_to_long_path(pwd_buffer);
-#else
- pwd_result = newstr(pwd_buffer);
-#endif
- }
}
return list_new(L0, pwd_result);
}
-
Modified: branches/bcbboost/tools/jam/src/regexp.c
==============================================================================
--- branches/bcbboost/tools/jam/src/regexp.c (original)
+++ branches/bcbboost/tools/jam/src/regexp.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -309,7 +309,7 @@
register char *ret;
register char *br;
register char *ender;
- register int parno;
+ register int parno = 0;
int flags;
*flagp = HASWIDTH; /* Tentatively. */
Modified: branches/bcbboost/tools/jam/src/rules.c
==============================================================================
--- branches/bcbboost/tools/jam/src/rules.c (original)
+++ branches/bcbboost/tools/jam/src/rules.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -358,8 +358,6 @@
TARGETS * targetchain( TARGETS * chain, TARGETS * targets )
{
- TARGETS * c;
-
if ( !targets ) return chain;
if ( !chain ) return targets;
Modified: branches/bcbboost/tools/jam/src/search.c
==============================================================================
--- branches/bcbboost/tools/jam/src/search.c (original)
+++ branches/bcbboost/tools/jam/src/search.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -124,7 +124,7 @@
f->f_grist.ptr = 0;
f->f_grist.len = 0;
- if ( varlist = var_get( "LOCATE" ) )
+ if ( ( varlist = var_get( "LOCATE" ) ) )
{
f->f_root.ptr = varlist->string;
f->f_root.len = strlen( varlist->string );
@@ -139,7 +139,7 @@
timestamp( buf->value, time );
found = 1;
}
- else if ( varlist = var_get( "SEARCH" ) )
+ else if ( ( varlist = var_get( "SEARCH" ) ) )
{
while ( varlist )
{
Modified: branches/bcbboost/tools/jam/src/timestamp.c
==============================================================================
--- branches/bcbboost/tools/jam/src/timestamp.c (original)
+++ branches/bcbboost/tools/jam/src/timestamp.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -74,8 +74,10 @@
BINDING binding;
BINDING * b = &binding;
string buf[ 1 ];
+#ifdef DOWNSHIFT_PATHS
string path;
char * p;
+#endif
#ifdef DOWNSHIFT_PATHS
string_copy( &path, target );
Modified: branches/bcbboost/tools/jam/src/variable.c
==============================================================================
--- branches/bcbboost/tools/jam/src/variable.c (original)
+++ branches/bcbboost/tools/jam/src/variable.c 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -110,7 +110,7 @@
if ( ( val = strchr( *e, '=' ) ) || ( val = *e + strlen( *e ) ) )
# else
- if ( val = strchr( *e, '=' ) )
+ if ( ( val = strchr( *e, '=' ) ) )
# endif
{
LIST * l = L0;
Modified: branches/bcbboost/tools/quickbook/index.html
==============================================================================
--- branches/bcbboost/tools/quickbook/index.html (original)
+++ branches/bcbboost/tools/quickbook/index.html 2008-09-29 18:04:35 EDT (Mon, 29 Sep 2008)
@@ -1,10 +1,10 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
- <meta http-equiv="refresh" content="0; URL=doc/html/index.html">
+ <meta http-equiv="refresh" content="0; URL=../../doc/html/quickbook.html">
</head>
<body>
Automatic redirection failed, click this
- link
+ link
</body>
</html>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk