diff -ur nano-4447/src/global.c nano-4447-fixed/src/global.c
--- nano-4447/src/global.c	2009-11-28 11:36:06.890085806 -0600
+++ nano-4447-fixed/src/global.c	2009-11-28 12:11:01.205079389 -0600
@@ -214,7 +214,7 @@
 }
 
 /* Set type of function based on the string */
-function_type strtokeytype(char *str)
+function_type strtokeytype(const char *str)
 {
     if (str[0] ==  'M' || str[0] == 'm')
         return META;
@@ -289,7 +289,7 @@
 
 /* Add a string to the new shortcut list implementation
    Allows updates to existing entries in the list */
-void add_to_sclist(int menu, char *scstring, short func, int toggle, int execute)
+void add_to_sclist(int menu, const char *scstring, short func, int toggle, int execute)
 {
     sc *s;
 
@@ -315,7 +315,7 @@
     s->type = strtokeytype(scstring);
     s->menu = menu;
     s->toggle = toggle;
-    s->keystr = scstring;
+    s->keystr = (char *) scstring;
     s->scfunc = func;
     s->execute = execute;
     assign_keyinfo(s);
@@ -1344,7 +1348,7 @@
 #ifndef NANO_TINY
 /* Now lets come up with a single (hopefully)
    function to get a string for each flag */
-char *flagtostr(int flag)
+const char *flagtostr(int flag)
 {
    switch (flag) {
         case NO_HELP:
diff -ur nano-4447/src/nano.c nano-4447-fixed/src/nano.c
--- nano-4447/src/nano.c	2009-11-28 11:36:06.955079850 -0600
+++ nano-4447-fixed/src/nano.c	2009-11-28 11:50:09.498233818 -0600
@@ -1752,7 +1751,7 @@
 void alloc_multidata_if_needed(filestruct *fileptr)
 {
     if (!fileptr->multidata)
-	fileptr->multidata = nmalloc(openfile->syntax->nmultis * sizeof(short));
+	fileptr->multidata = (short *) nmalloc(openfile->syntax->nmultis * sizeof(short));
 }
 
 /* Precalculate the multi-line start and end regex info so we can speed up
diff -ur nano-4447/src/proto.h nano-4447-fixed/src/proto.h
--- nano-4447/src/proto.h	2009-11-28 11:36:06.919086167 -0600
+++ nano-4447-fixed/src/proto.h	2009-11-28 11:48:55.216769256 -0600
@@ -783,12 +783,12 @@
 void do_cursorpos(bool constant);
 void do_cursorpos_void(void);
 void do_replace_highlight(bool highlight, const char *word);
-char *flagtostr(int flag);
+const char *flagtostr(int flag);
 const subnfunc *sctofunc(sc *s);
 const subnfunc *getfuncfromkey(WINDOW *win);
 void print_sclist(void);
 sc *strtosc(int menu, char *input);
-function_type strtokeytype(char *str);
+function_type strtokeytype(const char *str);
 int strtomenu(char *input);
 void assign_keyinfo(sc *s);
 void xon_complaint(void);
@@ -796,35 +796,36 @@
 int sc_seq_or (short func, int defaultval);
 void do_suspend_void(void);
 
-const char *cancel_msg;
+extern const char *cancel_msg;
 #ifndef NANO_TINY
-const char *case_sens_msg;
-const char *backwards_msg;
-const char *prev_history_msg;
-const char *next_history_msg;
+extern const char *case_sens_msg;
+extern const char *backwards_msg;
+extern const char *prev_history_msg;
+extern const char *next_history_msg;
 #endif
-const char *replace_msg;
-const char *no_replace_msg;
-const char *go_to_line_msg;
-const char *whereis_next_msg;
-const char *first_file_msg;
-const char *last_file_msg;
-const char *goto_dir_msg;
-const char *ext_cmd_msg;
-const char *to_files_msg;
-const char *dos_format_msg;
-const char *mac_format_msg;
-const char *append_msg;
-const char *prepend_msg;
-const char *backup_file_msg;
-const char *gototext_msg;
-const char *new_buffer_msg;
+extern const char *replace_msg;
+extern const char *no_replace_msg;
+extern const char *go_to_line_msg;
+extern const char *whereis_next_msg;
+extern const char *first_file_msg;
+extern const char *last_file_msg;
+extern const char *goto_dir_msg;
+extern const char *ext_cmd_msg;
+extern const char *to_files_msg;
+extern const char *dos_format_msg;
+extern const char *mac_format_msg;
+extern const char *append_msg;
+extern const char *prepend_msg;
+extern const char *backup_file_msg;
+extern const char *gototext_msg;
+extern const char *new_buffer_msg;
+
 void iso_me_harder_funcmap(short func);
 void enable_nodelay(void);
 void disable_nodelay(void);
 
 #ifdef HAVE_REGEX_H
-const char *regexp_msg;
+extern const char *regexp_msg;
 #endif
 
 #ifdef NANO_EXTRA
diff -ur nano-4447/src/text.c nano-4447-fixed/src/text.c
--- nano-4447/src/text.c	2009-11-28 11:36:06.944081361 -0600
+++ nano-4447-fixed/src/text.c	2009-11-28 11:57:13.939918285 -0600
@@ -181,7 +181,7 @@
 	free(output);
     } else {
 #endif
-	do_output("\t", 1, TRUE);
+	do_output((char *) "\t", 1, TRUE);
 #ifndef NANO_TINY
     }
 #endif
@@ -483,7 +483,7 @@
 	break;
     case SPLIT:
 	undidmsg = _("line wrap");
-	f->data = nrealloc(f->data, strlen(f->data) + strlen(u->strdata) + 1);
+	f->data = (char *) nrealloc(f->data, strlen(f->data) + strlen(u->strdata) + 1);
 	strcpy(&f->data[strlen(f->data) - 1], u->strdata);
 	if (u->strdata2 != NULL)
 	    f->next->data = mallocstrcpy(f->next->data, u->strdata2);
@@ -517,7 +517,7 @@
 	undidmsg = _("line break");
 	if (f->next) {
 	    filestruct *foo = f->next;
-	    f->data = nrealloc(f->data, strlen(f->data) + strlen(f->next->data) + 1);
+	    f->data = (char *) nrealloc(f->data, strlen(f->data) + strlen(f->next->data) + 1);
 	    strcat(f->data,  f->next->data);
 	    unlink_node(foo);
 	    delete_node(foo);
@@ -765,7 +765,7 @@
      * arguments. */
     shellenv = getenv("SHELL");
     if (shellenv == NULL)
-	shellenv = "/bin/sh";
+	shellenv = (char *) "/bin/sh";
 
     /* Fork a child. */
     if ((pid = fork()) == 0) {
@@ -859,7 +859,7 @@
     }
 
     /* Allocate and initialize a new undo type */
-    u = nmalloc(sizeof(undo));
+    u = (undo *) nmalloc(sizeof(undo));
     u->type = current_action;
     u->lineno = fs->current->lineno;
     u->begin = fs->current_x;
@@ -993,7 +993,7 @@
 			fs->current->data, (unsigned long) fs->current_x, u->begin);
 #endif
         len = strlen(u->strdata) + 2;
-        data = nrealloc((void *) u->strdata, len * sizeof(char *));
+        data = (char *) nrealloc((void *) u->strdata, len * sizeof(char *));
         data[len-2] = fs->current->data[fs->current_x];
         data[len-1] = '\0';
         u->strdata = (char *) data;
diff -ur nano-4447/src/winio.c nano-4447-fixed/src/winio.c
--- nano-4447/src/winio.c	2009-11-28 11:36:06.949080343 -0600
+++ nano-4447-fixed/src/winio.c	2009-11-28 11:53:05.072617860 -0600
@@ -2495,7 +2495,7 @@
         if (fileptr->multidata == NULL && openfile->syntax
 		&& openfile->syntax->nmultis > 0) {
  	    int i;
-	    fileptr->multidata = nmalloc(openfile->syntax->nmultis * sizeof(short));
+	    fileptr->multidata = (short *) nmalloc(openfile->syntax->nmultis * sizeof(short));
             for (i = 0; i < openfile->syntax->nmultis; i++)
 		fileptr->multidata[i] = -1;	/* Assue this applies until we know otherwise */
 	}
