* Changed dict_get_case_weight() to accept an additional int * flag to complain about...
[pspp] / src / filename.c
index f666674b31886e76c2e3496437146a8686ab4e6e..aa92a323c83946e9686c84f46595dc70b4c67bb9 100644 (file)
@@ -18,7 +18,7 @@
    02111-1307, USA. */
 
 #include <config.h>
-#include <assert.h>
+#include "error.h"
 #include "filename.h"
 #include <stdlib.h>
 #include <ctype.h>
@@ -186,7 +186,7 @@ fn_tilde_expand (const char *input)
 }
 #else /* !unix */
 char *
-fn_tilde_expand (char *input)
+fn_tilde_expand (const char *input)
 {
   return xstrdup (input);
 }
@@ -525,6 +525,7 @@ fn_basename (const char *filename)
 }
 #endif
 \f
+#if unix
 /* Returns the current working directory, as a malloc()'d string.
    From libc.info. */
 char *
@@ -544,6 +545,22 @@ fn_get_cwd (void)
       buffer = xmalloc (size);
     }
 }
+#else
+char *
+fn_get_cwd (void)
+{
+  int size = 2;
+  char *buffer = xmalloc (size);
+  if ( buffer) 
+  {
+    buffer[0]='.';
+    buffer[1]='\0';
+  }
+
+  return buffer;
+     
+}
+#endif
 \f
 /* Find out information about files. */