Use S_ISREG(), since S_IFMT and S_IFREG are apprarently missing on some
authorMatthias Clasen <mclasen@redhat.com>
Mon, 15 Nov 2004 13:50:31 +0000 (13:50 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 15 Nov 2004 13:50:31 +0000 (13:50 +0000)
2004-11-15  Matthias Clasen  <mclasen@redhat.com>

* 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
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gkeyfile.c

index 221305f..ab6c694 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-11-15  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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  <mclasen@redhat.com>
 
        * configure.in: Bump version.
index 221305f..ab6c694 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-15  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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  <mclasen@redhat.com>
 
        * configure.in: Bump version.
index 221305f..ab6c694 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-15  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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  <mclasen@redhat.com>
 
        * configure.in: Bump version.
index 221305f..ab6c694 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-15  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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  <mclasen@redhat.com>
 
        * configure.in: Bump version.
index 221305f..ab6c694 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-15  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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  <mclasen@redhat.com>
 
        * configure.in: Bump version.
index ffa2fc8..397777f 100644 (file)
@@ -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,