mirror of
https://github.com/boostorg/build.git
synced 2026-02-22 03:12:16 +00:00
64/32 bit compile working by using int32 types as needed.
This commit is contained in:
@@ -59,24 +59,24 @@
|
||||
#endif
|
||||
|
||||
static CMD * make1cmds ( TARGET * );
|
||||
static LIST * make1list ( LIST *, TARGETS *, int flags );
|
||||
static LIST * make1list ( LIST *, TARGETS *, int32_t flags );
|
||||
static SETTINGS * make1settings ( struct module_t *, LIST * vars );
|
||||
static void make1bind ( TARGET * );
|
||||
static void push_cmds( CMDLIST * cmds, int status );
|
||||
static int cmd_sem_lock( TARGET * t );
|
||||
static void push_cmds( CMDLIST * cmds, int32_t status );
|
||||
static int32_t cmd_sem_lock( TARGET * t );
|
||||
static void cmd_sem_unlock( TARGET * t );
|
||||
|
||||
static int targets_contains( TARGETS * l, TARGET * t );
|
||||
static int targets_equal( TARGETS * l1, TARGETS * l2 );
|
||||
static int32_t targets_contains( TARGETS * l, TARGET * t );
|
||||
static int32_t targets_equal( TARGETS * l1, TARGETS * l2 );
|
||||
|
||||
/* Ugly static - it is too hard to carry it through the callbacks. */
|
||||
|
||||
static struct
|
||||
{
|
||||
int failed;
|
||||
int skipped;
|
||||
int total;
|
||||
int made;
|
||||
int32_t failed;
|
||||
int32_t skipped;
|
||||
int32_t total;
|
||||
int32_t made;
|
||||
} counts[ 1 ];
|
||||
|
||||
/* Target state. */
|
||||
@@ -90,16 +90,16 @@ struct _state
|
||||
state * prev; /* previous state on stack */
|
||||
TARGET * t; /* current target */
|
||||
TARGET * parent; /* parent argument necessary for MAKE1A */
|
||||
int curstate; /* current state */
|
||||
int32_t curstate; /* current state */
|
||||
};
|
||||
|
||||
static void make1a( state * const );
|
||||
static void make1b( state * const );
|
||||
static void make1c( state const * const );
|
||||
|
||||
static void make1c_closure( void * const closure, int status,
|
||||
static void make1c_closure( void * const closure, int32_t status,
|
||||
timing_info const * const, char const * const cmd_stdout,
|
||||
char const * const cmd_stderr, int const cmd_exit_reason );
|
||||
char const * const cmd_stderr, int32_t const cmd_exit_reason );
|
||||
|
||||
typedef struct _stack
|
||||
{
|
||||
@@ -111,7 +111,7 @@ static stack state_stack = { NULL };
|
||||
static state * state_freelist = NULL;
|
||||
|
||||
/* Currently running command counter. */
|
||||
static int cmdsrunning;
|
||||
static int32_t cmdsrunning;
|
||||
|
||||
|
||||
static state * alloc_state()
|
||||
@@ -163,7 +163,7 @@ static void pop_state( stack * const pStack )
|
||||
|
||||
|
||||
static state * push_state( stack * const pStack, TARGET * const t,
|
||||
TARGET * const parent, int const curstate )
|
||||
TARGET * const parent, int32_t const curstate )
|
||||
{
|
||||
state * const pState = alloc_state();
|
||||
pState->t = t;
|
||||
@@ -194,13 +194,13 @@ static void push_stack_on_stack( stack * const pDest, stack * const pSrc )
|
||||
* make1() - execute commands to update a list of targets and all of their dependencies
|
||||
*/
|
||||
|
||||
static int intr = 0;
|
||||
static int quit = 0;
|
||||
static int32_t intr = 0;
|
||||
static int32_t quit = 0;
|
||||
|
||||
int make1( LIST * targets )
|
||||
int32_t make1( LIST * targets )
|
||||
{
|
||||
state * pState;
|
||||
int status = 0;
|
||||
int32_t status = 0;
|
||||
|
||||
memset( (char *)counts, 0, sizeof( *counts ) );
|
||||
|
||||
@@ -512,7 +512,7 @@ static void make1c( state const * const pState )
|
||||
{
|
||||
TARGET * const t = pState->t;
|
||||
CMD * const cmd = (CMD *)t->cmds;
|
||||
int exec_flags = 0;
|
||||
int32_t exec_flags = 0;
|
||||
|
||||
if ( cmd )
|
||||
{
|
||||
@@ -786,7 +786,7 @@ static void call_timing_rule( TARGET * target, timing_info const * const time )
|
||||
static void call_action_rule
|
||||
(
|
||||
TARGET * target,
|
||||
int status,
|
||||
int32_t status,
|
||||
timing_info const * time,
|
||||
char const * executed_command,
|
||||
char const * command_output
|
||||
@@ -869,11 +869,11 @@ static void call_action_rule
|
||||
static void make1c_closure
|
||||
(
|
||||
void * const closure,
|
||||
int status_orig,
|
||||
int32_t status_orig,
|
||||
timing_info const * const time,
|
||||
char const * const cmd_stdout,
|
||||
char const * const cmd_stderr,
|
||||
int const cmd_exit_reason
|
||||
int32_t const cmd_exit_reason
|
||||
)
|
||||
{
|
||||
TARGET * const t = (TARGET *)closure;
|
||||
@@ -984,7 +984,7 @@ static void make1c_closure
|
||||
}
|
||||
|
||||
/* push the next MAKE1C state after a command is run. */
|
||||
static void push_cmds( CMDLIST * cmds, int status )
|
||||
static void push_cmds( CMDLIST * cmds, int32_t status )
|
||||
{
|
||||
CMDLIST * cmd_iter;
|
||||
for( cmd_iter = cmds; cmd_iter; cmd_iter = cmd_iter->next )
|
||||
@@ -1070,7 +1070,7 @@ static CMD * make1cmds( TARGET * t )
|
||||
module_t * settings_module = 0;
|
||||
TARGET * settings_target = 0;
|
||||
ACTIONS * a0;
|
||||
int const running_flag = globs.noexec ? A_RUNNING_NOEXEC : A_RUNNING;
|
||||
int32_t const running_flag = globs.noexec ? A_RUNNING_NOEXEC : A_RUNNING;
|
||||
|
||||
/* Step through actions.
|
||||
*/
|
||||
@@ -1168,21 +1168,21 @@ static CMD * make1cmds( TARGET * t )
|
||||
* Note that we loop through at least once, for sourceless actions.
|
||||
*/
|
||||
{
|
||||
int const length = list_length( ns );
|
||||
int start = 0;
|
||||
int chunk = length;
|
||||
int cmd_count = 0;
|
||||
int32_t const length = list_length( ns );
|
||||
int32_t start = 0;
|
||||
int32_t chunk = length;
|
||||
int32_t cmd_count = 0;
|
||||
TARGETS * semaphores = NULL;
|
||||
TARGETS * targets_iter;
|
||||
int unique_targets;
|
||||
int32_t unique_targets;
|
||||
do
|
||||
{
|
||||
CMD * cmd;
|
||||
int cmd_check_result;
|
||||
size_t cmd_error_length;
|
||||
size_t cmd_error_max_length;
|
||||
int retry = 0;
|
||||
int accept_command = 0;
|
||||
int32_t cmd_check_result;
|
||||
int32_t cmd_error_length;
|
||||
int32_t cmd_error_max_length;
|
||||
int32_t retry = 0;
|
||||
int32_t accept_command = 0;
|
||||
|
||||
/* Build cmd: cmd_new() takes ownership of its lists. */
|
||||
cmd = cmd_new( rule, list_copy( nt ), list_sublist( ns, start,
|
||||
@@ -1219,21 +1219,10 @@ static CMD * make1cmds( TARGET * t )
|
||||
: "contains a line that is too long";
|
||||
assert( cmd_check_result == EXEC_CHECK_TOO_LONG ||
|
||||
cmd_check_result == EXEC_CHECK_LINE_TOO_LONG );
|
||||
if (sizeof(size_t) == (sizeof(long long int)))
|
||||
out_printf(
|
||||
"%s action %s (%lld, max %lld):\n",
|
||||
object_str( rule->name ), error_message,
|
||||
cmd_error_length, cmd_error_max_length );
|
||||
else if (sizeof(size_t) == (sizeof(long int)))
|
||||
out_printf(
|
||||
"%s action %s (%ld, max %ld):\n",
|
||||
object_str( rule->name ), error_message,
|
||||
cmd_error_length, cmd_error_max_length );
|
||||
else
|
||||
out_printf(
|
||||
"%s action %s (%d, max %d):\n",
|
||||
object_str( rule->name ), error_message,
|
||||
cmd_error_length, cmd_error_max_length );
|
||||
out_printf(
|
||||
"%s action %s (%d, max %d):\n",
|
||||
object_str( rule->name ), error_message,
|
||||
cmd_error_length, cmd_error_max_length );
|
||||
|
||||
/* Tell the user what did not fit. */
|
||||
out_puts( cmd->buf->value );
|
||||
@@ -1326,7 +1315,7 @@ static CMD * make1cmds( TARGET * t )
|
||||
* make1list() - turn a list of targets into a LIST, for $(<) and $(>)
|
||||
*/
|
||||
|
||||
static LIST * make1list( LIST * l, TARGETS * targets, int flags )
|
||||
static LIST * make1list( LIST * l, TARGETS * targets, int32_t flags )
|
||||
{
|
||||
for ( ; targets; targets = targets->next )
|
||||
{
|
||||
@@ -1429,7 +1418,7 @@ static void make1bind( TARGET * t )
|
||||
}
|
||||
|
||||
|
||||
static int targets_contains( TARGETS * l, TARGET * t )
|
||||
static int32_t targets_contains( TARGETS * l, TARGET * t )
|
||||
{
|
||||
for ( ; l; l = l->next )
|
||||
{
|
||||
@@ -1441,7 +1430,7 @@ static int targets_contains( TARGETS * l, TARGET * t )
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int targets_equal( TARGETS * l1, TARGETS * l2 )
|
||||
static int32_t targets_equal( TARGETS * l1, TARGETS * l2 )
|
||||
{
|
||||
for ( ; l1 && l2; l1 = l1->next, l2 = l2->next )
|
||||
{
|
||||
@@ -1454,7 +1443,7 @@ static int targets_equal( TARGETS * l1, TARGETS * l2 )
|
||||
|
||||
#ifdef OPT_SEMAPHORE
|
||||
|
||||
static int cmd_sem_lock( TARGET * t )
|
||||
static int32_t cmd_sem_lock( TARGET * t )
|
||||
{
|
||||
CMD * cmd = (CMD *)t->cmds;
|
||||
TARGETS * iter;
|
||||
|
||||
Reference in New Issue
Block a user