aboutsummaryrefslogtreecommitdiff
path: root/mkfontscale/mkfontscale.c
diff options
context:
space:
mode:
Diffstat (limited to 'mkfontscale/mkfontscale.c')
-rw-r--r--mkfontscale/mkfontscale.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/mkfontscale/mkfontscale.c b/mkfontscale/mkfontscale.c
index 265f91369..a2e96fff0 100644
--- a/mkfontscale/mkfontscale.c
+++ b/mkfontscale/mkfontscale.c
@@ -24,7 +24,11 @@
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <string.h>
+#ifdef _MSC_VER
+#include <direct.h>
+#endif
#include <sys/types.h>
#include <sys/stat.h>
@@ -115,7 +119,7 @@ static char *encodingPrefix;
static char *exclusionSuffix;
static char *ProgramName;
-static void _X_NORETURN _X_COLD
+static void
usage(void)
{
fprintf(stderr, "Usage:\n"
@@ -126,7 +130,7 @@ usage(void)
exit(1);
}
-static void _X_NORETURN _X_COLD
+static void
missing_arg (const char *option)
{
fprintf(stderr, "%s: %s requires an argument\n", ProgramName, option);
@@ -155,9 +159,9 @@ main(int argc, char **argv)
outfilename = NULL;
- encodings = makeList(encodings_array, countof(encodings_array), NULL, 0);
+ encodings = makeList((char **)encodings_array, countof(encodings_array), NULL, 0);
- extra_encodings = makeList(extra_encodings_array,
+ extra_encodings = makeList((char**)extra_encodings_array,
countof(extra_encodings_array),
NULL, 0);
doBitmaps = 0;
@@ -867,10 +871,12 @@ doDirectory(const char *dirname_given, int numEncodings, ListPtr encodingsToDo)
#endif
#ifdef S_ISLNK
{
+#ifndef WIN32
if (lstat(filename, &f_stat))
goto done;
if (S_ISLNK(f_stat.st_mode))
tprio = 0;
+#endif
}
#else
;