Fixed compilation errors on Unix

This commit is contained in:
L 2023-02-01 00:28:40 +01:00
parent b8c56cc23c
commit d4faf0c0e0
99 changed files with 1385 additions and 1659 deletions

View file

@ -31,7 +31,7 @@ MEM_TempAlloc parsetree_allocator;
yyparsedata parsedata;
sval_u node_none = { 0 };
char *str_replace( char *orig, char *rep, char *with ) {
char *str_replace( char *orig, const char *rep, const char *with ) {
char *result; // the return string
char *ins; // the next insert point
char *tmp; // varies
@ -50,7 +50,7 @@ char *str_replace( char *orig, char *rep, char *with ) {
len_with = strlen( with );
ins = orig;
for( count = 0; tmp = strstr( ins, rep ); ++count ) {
for( count = 0; (tmp = strstr( ins, rep )) != nullptr; ++count ) {
ins = tmp + len_rep;
}

View file

@ -993,7 +993,7 @@ static bool UseField( void )
* down here because we want the user's section 1 to have been scanned first.
* The user has a chance to override it with an option.
*/
#include <unistd.h>
//#include <unistd.h>
#endif
#ifndef YY_EXTRA_TYPE

View file

@ -300,7 +300,7 @@ extern char *yytext;
* down here because we want the user's section 1 to have been scanned first.
* The user has a chance to override it with an option.
*/
#include <unistd.h>
//#include <unistd.h>
#endif
#ifndef YY_EXTRA_TYPE