#include "pathsys.h"
#include "rules.h"
#include "jam_strings.h"
+#include "startup.h"
#include "subst.h"
#include "timestamp.h"
#include "variable.h"
#include "output.h"
#include <ctype.h>
+#include <stdlib.h>
#ifdef OS_NT
#include <windows.h>
if ( flags )
target_include_many( t, sources );
else
- t->depends = targetlist( t->depends, sources );
+ targetlist( t->depends, sources );
}
/* Enter reverse links */
LISTITER t_iter = list_begin( targets );
LISTITER const t_end = list_end( targets );
for ( ; t_iter != t_end; t_iter = list_next( t_iter ) )
- s->dependants = targetentry( s->dependants, bindtarget(
+ targetentry( s->dependants, bindtarget(
list_item( t_iter ) )->includes );
}
else
- s->dependants = targetlist( s->dependants, targets );
+ targetlist( s->dependants, targets );
}
return L0;
for ( ; iter != end; iter = list_next( iter ) )
{
TARGET * const t = bindtarget( list_item( iter ) );
- t->rebuilds = targetlist( t->rebuilds, rebuilds );
+ targetlist( t->rebuilds, rebuilds );
}
return L0;
}
break;
}
#endif
- exit( status );
+ b2::clean_exit( status );
}
else
- exit( EXITBAD ); /* yeech */
+ b2::clean_exit( EXITBAD ); /* yeech */
return L0;
}
{
OBJECT * p;
path->f_dir.ptr = object_str( list_item( iter ) );
- path->f_dir.len = strlen( object_str( list_item( iter ) ) );
+ path->f_dir.len = int32_t(strlen( object_str( list_item( iter ) ) ));
path_build( path, file_string );
p = object_new( file_string->value );
else
out_printf( "root module.\n" );
backtrace( frame->prev );
- exit( EXITBAD );
+ b2::clean_exit( EXITBAD );
}
list_print( target_rules );
out_printf( "\n" );
backtrace( frame->prev );
- exit( EXITBAD );
+ b2::clean_exit( EXITBAD );
}
return L0;
out_printf( "error: no native rule \"%s\" defined in module \"%s.\"\n",
object_str( list_front( rule_name ) ), object_str( module->name ) );
backtrace( frame->prev );
- exit( EXITBAD );
+ b2::clean_exit( EXITBAD );
}
return L0;
}
OBJECT * string = list_front( lol_get( frame->args, 0 ) );
char const * width_s = object_str( list_front( lol_get( frame->args, 1 ) ) );
- int current = strlen( object_str( string ) );
- int desired = atoi( width_s );
+ int32_t current = int32_t(strlen( object_str( string ) ));
+ int32_t desired = atoi( width_s );
if ( current >= desired )
return list_new( object_copy( string ) );
else
{
char * buffer = (char *)BJAM_MALLOC( desired + 1 );
- int i;
+ int32_t i;
LIST * result;
strcpy( buffer, object_str( string ) );
#else
char static_buf[256];
char * buf = static_buf;
- size_t bufsize = 256;
+ int32_t bufsize = 256;
LIST * result = 0;
while (1) {
ssize_t len = readlink( path, buf, bufsize );
{
break;
}
- else if ( size_t(len) < bufsize )
+ else if ( int32_t(len) < bufsize )
{
buf[ len ] = '\0';
result = list_new( object_new( buf ) );
LIST * command = lol_get( frame->args, 0 );
LIST * result = L0;
string s;
- int ret;
+ int32_t ret;
char buffer[ 1024 ];
FILE * p = NULL;
int exit_status = -1;
string_new( &s );
- while ( ( ret = fread( buffer, sizeof( char ), sizeof( buffer ) - 1, p ) ) >
+ while ( ( ret = int32_t(fread( buffer, sizeof( char ), sizeof( buffer ) - 1, p )) ) >
0 )
{
buffer[ ret ] = 0;