Use S_ISREG(), since S_IFMT and S_IFREG are apprarently missing on some

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)
This commit is contained in:
Matthias Clasen 2004-11-15 13:50:31 +00:00 committed by Matthias Clasen
parent 2691609ffc
commit 035484a411
6 changed files with 31 additions and 1 deletions

View 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> 2004-11-12 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version. * configure.in: Bump version.

View 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> 2004-11-12 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version. * configure.in: Bump version.

View 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> 2004-11-12 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version. * configure.in: Bump version.

View 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> 2004-11-12 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version. * configure.in: Bump version.

View 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> 2004-11-12 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version. * configure.in: Bump version.

View File

@ -359,7 +359,7 @@ g_key_file_load_from_fd (GKeyFile *key_file,
return FALSE; 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_set_error (error, G_KEY_FILE_ERROR,
G_KEY_FILE_ERROR_PARSE, G_KEY_FILE_ERROR_PARSE,