CROSS_TO_WASM build fixes
This commit is contained in:
+2
-2
@@ -2050,7 +2050,7 @@ problematic_savefile(int sfstatus, const char *savefilenm)
|
|||||||
|
|
||||||
/* ---------- BEGIN EXTERNAL CONVERSION HANDLING ----------- */
|
/* ---------- BEGIN EXTERNAL CONVERSION HANDLING ----------- */
|
||||||
|
|
||||||
static boolean cvtinit = FALSE;
|
/* static boolean cvtinit = FALSE; */
|
||||||
|
|
||||||
#ifndef SFCTOOL
|
#ifndef SFCTOOL
|
||||||
static char *unconverted_filename = 0, *converted_filename = 0;
|
static char *unconverted_filename = 0, *converted_filename = 0;
|
||||||
@@ -2171,7 +2171,7 @@ free_convert_filenames(void)
|
|||||||
free((genericptr_t) converted_filename), converted_filename = 0;
|
free((genericptr_t) converted_filename), converted_filename = 0;
|
||||||
if (unconverted_filename)
|
if (unconverted_filename)
|
||||||
free((genericptr_t) unconverted_filename), unconverted_filename = 0;
|
free((genericptr_t) unconverted_filename), unconverted_filename = 0;
|
||||||
cvtinit = FALSE;
|
/* cvtinit = FALSE; */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* return TRUE if s contains a directory, not just a filespec */
|
/* return TRUE if s contains a directory, not just a filespec */
|
||||||
|
|||||||
+28
-2
@@ -51,7 +51,7 @@ extern void init_linux_cons(void);
|
|||||||
|
|
||||||
static void wd_message(void);
|
static void wd_message(void);
|
||||||
static struct passwd *get_unix_pw(void);
|
static struct passwd *get_unix_pw(void);
|
||||||
ATTRNORETURN static void opt_terminate(void) NORETURN;
|
/* ATTRNORETURN static void opt_terminate(void) NORETURN; */
|
||||||
|
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
/* if WebAssembly, export this API and don't optimize it out */
|
/* if WebAssembly, export this API and don't optimize it out */
|
||||||
@@ -769,6 +769,8 @@ sys_random_seed(void)
|
|||||||
return seed;
|
return seed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* now found in earlyarg.c */
|
||||||
/* for command-line options that perform some immediate action and then
|
/* for command-line options that perform some immediate action and then
|
||||||
terminate the program without starting play, like 'nethack --version'
|
terminate the program without starting play, like 'nethack --version'
|
||||||
or 'nethack -s Zelda'; do some cleanup before that termination */
|
or 'nethack -s Zelda'; do some cleanup before that termination */
|
||||||
@@ -780,7 +782,6 @@ opt_terminate(void)
|
|||||||
nh_terminate(EXIT_SUCCESS);
|
nh_terminate(EXIT_SUCCESS);
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/* show the sysconf file name, playground directory, run-time configuration
|
/* show the sysconf file name, playground directory, run-time configuration
|
||||||
file name, dumplog file name if applicable, and some other things */
|
file name, dumplog file name if applicable, and some other things */
|
||||||
ATTRNORETURN void
|
ATTRNORETURN void
|
||||||
@@ -794,6 +795,31 @@ after_opt_showpaths(const char *dir)
|
|||||||
opt_terminate();
|
opt_terminate();
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void
|
||||||
|
get_nhuuid(void)
|
||||||
|
{
|
||||||
|
unsigned char stmp[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
|
if (svn.nhuuid[0])
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* FIXME: fill in a useful valid UUID somehow */
|
||||||
|
Snprintf(svn.nhuuid, sizeof svn.nhuuid, "%s", (char *) stmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
free_nhuuid(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < SIZE(svn.nhuuid); i++) {
|
||||||
|
svn.nhuuid[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
/***
|
/***
|
||||||
|
|||||||
Reference in New Issue
Block a user