if (start < 1)
ON (fatal, *expanding_var,
- "invalid first argument to 'wordlist' function: '%lld'", start);
+ "invalid first argument to 'wordlist' function: '%" PRId64 "'", start);
if (stop < 0)
ON (fatal, *expanding_var,
- "invalid second argument to 'wordlist' function: '%lld'", stop);
+ "invalid second argument to 'wordlist' function: '%" PRId64 "'", stop);
count = stop - start + 1;
#if HAVE_INTTYPES_H
# include <inttypes.h>
+#else
+# ifndef PRId64
+# ifdef WINDOWS32
+# define PRId64 "I64d"
+# else
+# define PRId64 "lld"
+# endif
+# endif
#endif
#if HAVE_STDINT_H
# include <stdint.h>
if (resolve)
{
char *fp = _fullpath (NULL, filename, sizeof (w32_path));
- strncpy (w32_path, fp, sizeof (w32_path));
+ strncpy (w32_path, fp, sizeof (w32_path) - 1);
free (fp);
}
else
- strncpy(w32_path, filename, sizeof (w32_path));
+ strncpy(w32_path, filename, sizeof (w32_path) - 1);
for (p = w32_path; p && *p; p++)
if (*p == '\\')
#include <windows.h>
#include <process.h>
#include <io.h>
+#if _WIN32_WINNT > 0x0601
#include <synchapi.h>
+#endif
#include "pathstuff.h"
#include "sub_proc.h"
#include "w32err.h"
/* Prepare the mutex handle string for our children.
2 hex digits per byte + 2 characters for "0x" + null. */
mutex = xmalloc ((2 * sizeof (osync_handle)) + 2 + 1);
- sprintf (mutex, "0x%Ix", (unsigned long long)osync_handle);
+ sprintf (mutex, "0x%Ix", (unsigned long long)(DWORD_PTR)osync_handle);
}
return mutex;
if (endp[0] != '\0')
OS (fatal, NILF, _("invalid output sync mutex: %s"), mutex);
- osync_handle = (HANDLE) i;
+ osync_handle = (HANDLE) (DWORD_PTR) i;
return 1;
}