GNU file utilities
[gnulib.git] / lib / backupfile.c
index 7a624cf..670db0f 100644 (file)
 #include "backupfile.h"
 #if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
 #include <string.h>
+#ifndef index
 #define index strchr
+#endif
+#ifndef rindex
 #define rindex strrchr
+#endif
 #else
 #include <strings.h>
 #endif
@@ -212,7 +216,7 @@ concat (str1, str2)
      char *str1, *str2;
 {
   char *newstr;
-  char str1_length = strlen (str1);
+  int str1_length = strlen (str1);
 
   newstr = malloc (str1_length + strlen (str2) + 1);
   if (newstr == 0)