From: Matthias Clasen Date: Mon, 15 Nov 2004 13:50:31 +0000 (+0000) Subject: Use S_ISREG(), since S_IFMT and S_IFREG are apprarently missing on some X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=035484a411d67390b0a40d6fa5ce77d112ac5a49;p=dana%2Fcg-glib.git 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) --- diff --git a/ChangeLog b/ChangeLog index 221305fe..ab6c6944 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 221305fe..ab6c6944 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 221305fe..ab6c6944 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 221305fe..ab6c6944 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 221305fe..ab6c6944 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 ffa2fc8c..397777f4 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,