Require "unistd" gnulib module. Removed tests for HAVE_UNISTD_H from
[pspp-builds.git] / src / data / filename.c
index 2865bd33e09c9794a79b84a90bf0190ef0612aa9..569d185d223a1313e756cb50ac2b7f7563a7bfd8 100644 (file)
    02110-1301, USA. */
 
 #include <config.h>
-#include "message.h"
+#include <libpspp/message.h>
 #include "filename.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <errno.h>
-#include "alloc.h"
-#include "message.h"
-#include "str.h"
+#include <libpspp/alloc.h>
+#include "intprops.h"
+#include <libpspp/message.h>
+#include <libpspp/str.h>
 #include "settings.h"
-#include "version.h"
+#include <libpspp/version.h>
 #include "xreadlink.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-#include "debug-print.h"
+#include <libpspp/debug-print.h>
 
 /* PORTME: Everything in this file is system dependent. */
 
 #ifdef unix
 #include <pwd.h>
-#if HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 #include <sys/stat.h>
 #include "stat-macros.h"
 #endif
@@ -770,7 +769,8 @@ fn_open_ext (struct file_ext *f)
   p = strstr (f->filename, "%d");
   if (p)
     {
-      char *s = local_alloc (strlen (f->filename) + INT_DIGITS - 1);
+      char *s = local_alloc (strlen (f->filename)
+                             + INT_STRLEN_BOUND (int) - 1);
       char *cp;
 
       memcpy (s, f->filename, p - f->filename);