From 035484a411d67390b0a40d6fa5ce77d112ac5a49 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 15 Nov 2004 13:50:31 +0000 Subject: [PATCH] Use S_ISREG(), since S_IFMT and S_IFREG are apprarently missing on some 2004-11-15 Matthias Clasen * glib/gkeyfile.c (g_key_file_load_from_fd): Use S_ISREG(), since S_IFMT and S_IFREG are apprarently missing on some systems (they are SUS, but not Posix). (#158263) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ glib/gkeyfile.c | 2 +- 6 files changed, 31 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 221305f..ab6c694 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-11-15 Matthias Clasen + + * glib/gkeyfile.c (g_key_file_load_from_fd): Use S_ISREG(), since + S_IFMT and S_IFREG are apprarently missing on some systems (they + are SUS, but not Posix). (#158263) + 2004-11-12 Matthias Clasen * configure.in: Bump version. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 221305f..ab6c694 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2004-11-15 Matthias Clasen + + * glib/gkeyfile.c (g_key_file_load_from_fd): Use S_ISREG(), since + S_IFMT and S_IFREG are apprarently missing on some systems (they + are SUS, but not Posix). (#158263) + 2004-11-12 Matthias Clasen * configure.in: Bump version. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 221305f..ab6c694 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +2004-11-15 Matthias Clasen + + * glib/gkeyfile.c (g_key_file_load_from_fd): Use S_ISREG(), since + S_IFMT and S_IFREG are apprarently missing on some systems (they + are SUS, but not Posix). (#158263) + 2004-11-12 Matthias Clasen * configure.in: Bump version. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 221305f..ab6c694 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2004-11-15 Matthias Clasen + + * glib/gkeyfile.c (g_key_file_load_from_fd): Use S_ISREG(), since + S_IFMT and S_IFREG are apprarently missing on some systems (they + are SUS, but not Posix). (#158263) + 2004-11-12 Matthias Clasen * configure.in: Bump version. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 221305f..ab6c694 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2004-11-15 Matthias Clasen + + * glib/gkeyfile.c (g_key_file_load_from_fd): Use S_ISREG(), since + S_IFMT and S_IFREG are apprarently missing on some systems (they + are SUS, but not Posix). (#158263) + 2004-11-12 Matthias Clasen * configure.in: Bump version. diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c index ffa2fc8..397777f 100644 --- a/glib/gkeyfile.c +++ b/glib/gkeyfile.c @@ -359,7 +359,7 @@ g_key_file_load_from_fd (GKeyFile *key_file, return FALSE; } - if ((stat_buf.st_mode & S_IFMT) != S_IFREG) + if (!S_ISREG (stat_buf.st_mode)) { g_set_error (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_PARSE, -- 2.7.4