$NetBSD$

--- src/preferences.cc.orig	2004-11-20 14:39:15.000000000 +0000
+++ src/preferences.cc
@@ -35,7 +35,7 @@
 
 extern "C"
 {
-#include <wordexp.h>
+#include <glob.h>
 #include <sys/types.h>
 #include <regex.h>
 }
@@ -233,15 +233,15 @@ void Preferences :: add_score (const cha
 void Preferences :: set_headers_file (const char* name)
 {
   // Expand the given file name.
-  wordexp_t result;
-  if (wordexp (name, &result, 0) == 0)
-    headers_file_name = result.we_wordv[0];
+  glob_t result;
+  if (glob (name, 0, NULL, &result) == 0)
+    headers_file_name = result.gl_pathv[0];
   else
     {
       ERROR_MSG(_("Invalid file name: ") + (string)name + ".");
       exit (-1);
     }
-  wordfree (&result);
+  globfree (&result);
 }
 
 string Preferences :: headers_file (void)
@@ -259,15 +259,15 @@ void Preferences :: set_log_file (const 
   // command line.
   if (log_file_name.length () == 0)
     {
-      wordexp_t result;
-      if (wordexp (name, &result, 0) == 0)
-	log_file_name = result.we_wordv[0];
+      glob_t result;
+      if (glob (name, 0, NULL, &result) == 0)
+	log_file_name = result.gl_pathv[0];
       else
 	{
 	  ERROR_MSG(_("Invalid file name: ") + (string)name + ".");
 	  exit (-1);
 	}
-      wordfree (&result);
+      globfree (&result);
     }
 }
 
