summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/libunix.cc6
-rw-r--r--crawl-ref/source/libunix.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc
index 4f1f3c0d65..03c1631b9a 100644
--- a/crawl-ref/source/libunix.cc
+++ b/crawl-ref/source/libunix.cc
@@ -626,7 +626,7 @@ void unixcurses_shutdown()
/* Convert value to string */
-int itoa(int value, char *strptr, int radix)
+extern "C" char *itoa(int value, char *strptr, int radix)
{
unsigned int bitmask = 32768;
int ctr = 0;
@@ -661,7 +661,7 @@ int itoa(int value, char *strptr, int radix)
strptr[ctr] = (char) NULL;
}
- return (OK); /* Me? Fail? Nah. */
+ return strptr;
}
int cprintf(const char *format,...)
@@ -1131,7 +1131,7 @@ int wherey()
}
-int stricmp( const char *str1, const char *str2 )
+extern "C" int stricmp( const char *str1, const char *str2 )
{
return (strcmp(str1, str2));
}
diff --git a/crawl-ref/source/libunix.h b/crawl-ref/source/libunix.h
index 0d6a623d9c..11d5c8a019 100644
--- a/crawl-ref/source/libunix.h
+++ b/crawl-ref/source/libunix.h
@@ -35,12 +35,12 @@ int clrscr(void);
int cprintf(const char *format,...);
int gotoxy_sys(int x, int y);
void fakecursorxy(int x, int y);
-int itoa(int value, char *strptr, int radix);
+extern "C" char *itoa(int value, char *strptr, int radix);
int kbhit(void);
int putch(unsigned char chr);
int putwch(unsigned chr);
void put_colour_ch(int colour, unsigned ch);
-int stricmp(const char *str1, const char *str2);
+extern "C" int stricmp(const char *str1, const char *str2);
int translate_keypad(int keyin);
int wherex(void);
int wherey(void);