[seed] Check for O_DSYNC, O_RSYNC, O_DIRECT, and O_NOATIME as they do not exist on non GNU c library platfo
- From: Robert Carr <racarr src gnome org>
- To: svn-commits-list gnome org
- Subject: [seed] Check for O_DSYNC, O_RSYNC, O_DIRECT, and O_NOATIME as they do not exist on non GNU c library platfo
- Date: Tue, 28 Apr 2009 12:56:57 -0400 (EDT)
commit e51eb6abe7409440edf013031238be9b429b4581
Author: Robert Carr <racarr svn gnome org>
Date: Tue Apr 28 12:56:53 2009 -0400
Check for O_DSYNC, O_RSYNC, O_DIRECT, and O_NOATIME as they do not exist on non GNU c library platforms
---
modules/os/os.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/modules/os/os.c b/modules/os/os.c
index 0f0816b..c5dd5a3 100644
--- a/modules/os/os.c
+++ b/modules/os/os.c
@@ -994,7 +994,7 @@ seed_static_function os_funcs[] = {
seed_value_from_long (eng->context, value, NULL))
#define OS_DEFINE_QUICK_ENUM(value) \
seed_object_set_property (eng->context, os_namespace, #value, \
- seed_value_from_long (eng->context, value, NULL))
+ seed_value_from_long (eng->context, value, NULL)) \
SeedObject
seed_module_init(SeedEngine * eng)
@@ -1015,8 +1015,13 @@ seed_module_init(SeedEngine * eng)
OS_DEFINE_QUICK_ENUM (O_EXCL);
OS_DEFINE_QUICK_ENUM (O_TRUNC);
+#if defined (O_DSYNC)
OS_DEFINE_QUICK_ENUM (O_DSYNC);
+#endif
+#if defined (O_RSYNC)
OS_DEFINE_QUICK_ENUM (O_RSYNC);
+#endif
+
OS_DEFINE_QUICK_ENUM (O_SYNC);
OS_DEFINE_QUICK_ENUM (O_NDELAY);
OS_DEFINE_QUICK_ENUM (O_NONBLOCK);
@@ -1025,11 +1030,14 @@ seed_module_init(SeedEngine * eng)
// OS_DEFINE_QUICK_ENUM (O_EXLOCK);
OS_DEFINE_QUICK_ENUM (O_ASYNC);
+#if defined (O_DIRECT)
OS_DEFINE_QUICK_ENUM (O_DIRECT);
+#endif
OS_DEFINE_QUICK_ENUM (O_DIRECTORY);
OS_DEFINE_QUICK_ENUM (O_NOFOLLOW);
+#if defined (O_NOATIME)
OS_DEFINE_QUICK_ENUM (O_NOATIME);
-
+#endif
OS_DEFINE_QUICK_ENUM (SEEK_SET);
OS_DEFINE_QUICK_ENUM (SEEK_CUR);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]