summaryrefslogtreecommitdiff
path: root/fonts/chkfontpath/patches/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'fonts/chkfontpath/patches/patch-ab')
-rw-r--r--fonts/chkfontpath/patches/patch-ab49
1 files changed, 49 insertions, 0 deletions
diff --git a/fonts/chkfontpath/patches/patch-ab b/fonts/chkfontpath/patches/patch-ab
new file mode 100644
index 00000000000..9d3b739c7a2
--- /dev/null
+++ b/fonts/chkfontpath/patches/patch-ab
@@ -0,0 +1,49 @@
+$NetBSD: patch-ab,v 1.1.1.1 2003/10/03 18:20:40 hubertf Exp $
+
+--- chkfontpath.c.orig Thu Jan 18 22:27:13 2001
++++ chkfontpath.c
+@@ -44,7 +44,7 @@ void readFontPath()
+ int catFlag = 0;
+ int noFirstLine = 0;
+
+- f = fopen("/etc/X11/fs/config", "r");
++ f = fopen(X11BASE "/lib/X11/fs/config", "r");
+ if (!f) {
+ if (!quiet) {
+ fprintf(stderr, "%s: error opening /etc/X11/fs/config\n", progName);
+@@ -136,9 +136,9 @@ void writeNewConfig()
+ int catFlag = 0, i;
+ struct stat sb;
+
+- stat("/etc/X11/fs/config", &sb);
++ stat(X11BASE "/lib/X11/fs/config", &sb);
+
+- f = fopen("/etc/X11/fs/config", "r");
++ f = fopen(X11BASE "/lib/X11/fs/config", "r");
+ if (!f) {
+ if (!quiet) {
+ fprintf(stderr, "%s: error opening /etc/X11/fs/config for reading\n",
+@@ -147,7 +147,7 @@ void writeNewConfig()
+ } else
+ exit(0);
+ }
+- f1 = fopen("/etc/X11/fs/config-", "w");
++ f1 = fopen(X11BASE "/lib/X11/fs/config-", "w");
+ if (!f1) {
+ if (!quiet) {
+ fprintf(stderr, "%s: error opening /etc/X11/fs/config- for writing\n",
+@@ -202,11 +202,11 @@ void writeNewConfig()
+
+ fclose(f);
+ fclose(f1);
+- unlink("/etc/X11/fs/config");
+- rename("/etc/X11/fs/config-", "/etc/X11/fs/config");
++ unlink(X11BASE "/lib/X11/fs/config");
++ rename(X11BASE "/lib/X11/fs/config-", X11BASE "/lib/X11/fs/config");
+
+ /* fix up permissions on the new file */
+- chmod("/etc/X11/fs/config", sb.st_mode);
++ chmod(X11BASE "/lib/X11/fs/config", sb.st_mode);
+ }
+
+ void addDir(const char *newDir)