On Wed, Apr 02, Phil Pennock wrote:
On 2003-04-02 at 20:19 +0200, Sebastian Geerken wrote:
Why not use $(sysconfdir) in the code, as in the attached patch?
Uhm, isn't $(sysconfdir) a directory, not a file?
diff -pru dillo1/src/prefs.c dillo2/src/prefs.c --- dillo1/src/prefs.c Wed Apr 2 19:40:36 2003 +++ dillo2/src/prefs.c Wed Apr 2 20:07:10 2003 @@ -250,10 +250,9 @@ static gint Prefs_load(void) file = a_Misc_prepend_user_home(".dillo/dillorc"); fd = open(file, O_RDONLY); g_free(file); - if (fd < 0 && (fd = open("/etc/dillorc", O_RDONLY)) < 0) - if ((fd = open("/usr/local/etc/dillorc", O_RDONLY)) < 0) - return FILE_NOT_FOUND; - + if (fd < 0 && (fd = open(DILLO_SYSCONFDIR, O_RDONLY)) < 0) + return FILE_NOT_FOUND; + fcntl(fd, F_SETFD, FD_CLOEXEC | fcntl(fd, F_GETFD));
scanner = g_scanner_new(NULL);
I might be missing something, but your new open() is on a directory there.
Ah, yes, of course. This was just a suggestion, and should be simple to fix. Sebastian