Make roken build on windows

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
This commit is contained in:
Asanka Herath
2009-11-24 21:42:02 -08:00
committed by Love Hornquist Astrand
parent c4b95f7330
commit d00f9984a5
168 changed files with 3688 additions and 607 deletions

View File

@@ -91,7 +91,7 @@ mandoc_template(struct getargs *args,
const char *extra_string,
char *(i18n)(const char *))
{
int i;
size_t i;
char timestr[64], cmd[64];
char buf[128];
const char *p;
@@ -207,7 +207,7 @@ builtin_i18n(const char *str)
return rk_UNCONST(str);
}
void ROKEN_LIB_FUNCTION
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
arg_printusage (struct getargs *args,
size_t num_args,
const char *progname,
@@ -217,7 +217,7 @@ arg_printusage (struct getargs *args,
progname, extra_string, builtin_i18n);
}
void ROKEN_LIB_FUNCTION
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
arg_printusage_i18n (struct getargs *args,
size_t num_args,
const char *usage,
@@ -225,8 +225,7 @@ arg_printusage_i18n (struct getargs *args,
const char *extra_string,
char *(i18n)(const char *))
{
int i;
size_t max_len = 0;
size_t i, max_len = 0;
char buf[128];
int col = 0, columns;
struct winsize ws;
@@ -474,6 +473,7 @@ arg_match_long(struct getargs *args, size_t num_args,
default:
abort ();
UNREACHABLE(return 0);
}
/* not reached */
@@ -550,7 +550,7 @@ arg_match_short (struct getargs *args, size_t num_args,
return 0;
}
int ROKEN_LIB_FUNCTION
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
getarg(struct getargs *args, size_t num_args,
int argc, char **argv, int *goptind)
{
@@ -562,7 +562,7 @@ getarg(struct getargs *args, size_t num_args,
#elif defined(HAVE_RANDOM)
srandom(time(NULL));
#else
srand (time(NULL));
srand ((int) time(NULL));
#endif
(*goptind)++;
for(i = *goptind; i < argc; i++) {
@@ -586,7 +586,7 @@ getarg(struct getargs *args, size_t num_args,
return ret;
}
void ROKEN_LIB_FUNCTION
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
free_getarg_strings (getarg_strings *s)
{
free (s->strings);