From 7cacaef33516ac1d9b3b9c1eba2c107a07cb07ea Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 2 Sep 2020 23:46:48 -0500 Subject: [PATCH] Tweaks to support 64 bit compile of engine. --- src/engine/execcmd.h | 4 ++-- src/engine/execnt.cpp | 4 ++-- src/engine/execunix.cpp | 4 ++-- src/engine/execvms.cpp | 4 ++-- src/engine/jamgram.cpp | 22 +++++++++++----------- src/engine/jamgram.hpp | 2 +- src/engine/make1.cpp | 6 +++--- src/engine/md5.h | 4 +++- 8 files changed, 26 insertions(+), 24 deletions(-) diff --git a/src/engine/execcmd.h b/src/engine/execcmd.h index 36f13aecf..ec7a22649 100644 --- a/src/engine/execcmd.h +++ b/src/engine/execcmd.h @@ -54,8 +54,8 @@ int exec_check ( string const * command, LIST * * pShell, - int * error_length, - int * error_max_length + size_t * error_length, + size_t * error_max_length ); /* exec_check() return codes. */ diff --git a/src/engine/execnt.cpp b/src/engine/execnt.cpp index 0b28087fe..512d405fe 100644 --- a/src/engine/execnt.cpp +++ b/src/engine/execnt.cpp @@ -270,8 +270,8 @@ int exec_check ( string const * command, LIST * * pShell, - int * error_length, - int * error_max_length + size_t * error_length, + size_t * error_max_length ) { /* Default shell does nothing when triggered with an empty or a diff --git a/src/engine/execunix.cpp b/src/engine/execunix.cpp index 2740743c7..871942481 100644 --- a/src/engine/execunix.cpp +++ b/src/engine/execunix.cpp @@ -140,8 +140,8 @@ int exec_check ( string const * command, LIST * * pShell, - int * error_length, - int * error_max_length + size_t * error_length, + size_t * error_max_length ) { int const is_raw_cmd = is_raw_command_request( *pShell ); diff --git a/src/engine/execvms.cpp b/src/engine/execvms.cpp index b4b061845..3ed161649 100644 --- a/src/engine/execvms.cpp +++ b/src/engine/execvms.cpp @@ -75,8 +75,8 @@ int exec_check ( string const * command, LIST * * pShell, - int * error_length, - int * error_max_length + size_t * error_length, + size_t * error_max_length ) { int const is_raw_cmd = 1; diff --git a/src/engine/jamgram.cpp b/src/engine/jamgram.cpp index 163428b1d..2f7382dfa 100644 --- a/src/engine/jamgram.cpp +++ b/src/engine/jamgram.cpp @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 3.6.2. */ +/* A Bison parser, made by GNU Bison 3.6.4. */ /* Bison implementation for Yacc-like parsers in C @@ -49,7 +49,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.6.2" +#define YYBISON_VERSION "3.6.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -764,7 +764,7 @@ static const yytype_int8 yytranslate[] = }; #if YYDEBUG - /* YYRLINEYYN -- Source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { 0, 145, 145, 147, 158, 160, 164, 166, 168, 168, @@ -846,7 +846,7 @@ static const yytype_int16 yytoknum[] = #define yytable_value_is_error(Yyn) \ 0 - /* YYPACTSTATE-NUM -- Index in YYTABLE of the portion describing + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { @@ -873,7 +873,7 @@ static const yytype_int16 yypact[] = -119, 115, -119, -119, -119, 140, -119 }; - /* YYDEFACTSTATE-NUM -- Default reduction number in state STATE-NUM. + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ static const yytype_int8 yydefact[] = @@ -901,7 +901,7 @@ static const yytype_int8 yydefact[] = 60, 0, 19, 95, 37, 11, 96 }; - /* YYPGOTONTERM-NUM. */ + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -119, -119, -118, 25, -119, -119, 96, -119, -119, -119, @@ -913,7 +913,7 @@ static const yytype_int16 yypgoto[] = -119, -119, -119, -119, -119, -119, -119, -119 }; - /* YYDEFGOTONTERM-NUM. */ + /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 17, 38, 39, 31, 168, 40, 109, 140, 175, @@ -925,7 +925,7 @@ static const yytype_int16 yydefgoto[] = 53, 84, 149, 148, 23, 61, 87, 121 }; - /* YYTABLEYYPACT[STATE-NUM] -- What to do in state STATE-NUM. If + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = @@ -986,7 +986,7 @@ static const yytype_int16 yycheck[] = 14, 15, 16 }; - /* YYSTOSSTATE-NUM -- The (internal number of the) accessing + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_int8 yystos[] = { @@ -1013,7 +1013,7 @@ static const yytype_int8 yystos[] = 48, 53, 63, 10, 48, 105, 53 }; - /* YYR1YYN -- Symbol number of symbol that rule YYN derives. */ + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_int8 yyr1[] = { 0, 51, 52, 52, 53, 53, 54, 54, 55, 56, @@ -1031,7 +1031,7 @@ static const yytype_int8 yyr1[] = 118, 117 }; - /* YYR2YYN -- Number of symbols on the right hand side of rule YYN. */ + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_int8 yyr2[] = { 0, 2, 0, 1, 1, 1, 1, 2, 0, 0, diff --git a/src/engine/jamgram.hpp b/src/engine/jamgram.hpp index 6d19ae77b..325bbe141 100644 --- a/src/engine/jamgram.hpp +++ b/src/engine/jamgram.hpp @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 3.6.2. */ +/* A Bison parser, made by GNU Bison 3.6.4. */ /* Bison interface for Yacc-like parsers in C diff --git a/src/engine/make1.cpp b/src/engine/make1.cpp index 61f0614a1..1ab3beafc 100644 --- a/src/engine/make1.cpp +++ b/src/engine/make1.cpp @@ -1179,8 +1179,8 @@ static CMD * make1cmds( TARGET * t ) { CMD * cmd; int cmd_check_result; - int cmd_error_length; - int cmd_error_max_length; + size_t cmd_error_length; + size_t cmd_error_max_length; int retry = 0; int accept_command = 0; @@ -1219,7 +1219,7 @@ 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 ); - out_printf( "%s action %s (%d, max %d):\n", object_str( + out_printf( "%s action %s (%zd, max %zd):\n", object_str( rule->name ), error_message, cmd_error_length, cmd_error_max_length ); diff --git a/src/engine/md5.h b/src/engine/md5.h index d76ddcf2c..cbfde5976 100644 --- a/src/engine/md5.h +++ b/src/engine/md5.h @@ -50,6 +50,8 @@ #ifndef md5_INCLUDED # define md5_INCLUDED +#include + /* * This package supports both compile-time and run-time determination of CPU * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be @@ -71,7 +73,7 @@ typedef struct md5_state_s { } md5_state_t; #ifdef __cplusplus -extern "C" +extern "C" { #endif