summaryrefslogtreecommitdiffstats
path: root/devel/seed/files/patch-modules_os_seed-os.c
diff options
context:
space:
mode:
authorkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2011-01-16 02:52:14 +0800
committerkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2011-01-16 02:52:14 +0800
commit5e5e25da5cb715d8a62348665f36cbfb3314baa6 (patch)
treeb7934defccc0a73e30736669f4153635b8114a7d /devel/seed/files/patch-modules_os_seed-os.c
parent751b6d3ca64f255ceb5d6a166b89bf472d7587e6 (diff)
downloadmarcuscom-ports-5e5e25da5cb715d8a62348665f36cbfb3314baa6.tar
marcuscom-ports-5e5e25da5cb715d8a62348665f36cbfb3314baa6.tar.gz
marcuscom-ports-5e5e25da5cb715d8a62348665f36cbfb3314baa6.tar.bz2
marcuscom-ports-5e5e25da5cb715d8a62348665f36cbfb3314baa6.tar.lz
marcuscom-ports-5e5e25da5cb715d8a62348665f36cbfb3314baa6.tar.xz
marcuscom-ports-5e5e25da5cb715d8a62348665f36cbfb3314baa6.tar.zst
marcuscom-ports-5e5e25da5cb715d8a62348665f36cbfb3314baa6.zip
When you find a old attempt to do a seed-webkitgtk3 port in devel/seed
and you copy the lot over to devel/seed3 make sure you remove the CVS dirs. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@15032 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'devel/seed/files/patch-modules_os_seed-os.c')
-rw-r--r--devel/seed/files/patch-modules_os_seed-os.c95
1 files changed, 0 insertions, 95 deletions
diff --git a/devel/seed/files/patch-modules_os_seed-os.c b/devel/seed/files/patch-modules_os_seed-os.c
deleted file mode 100644
index 6d96d1478..000000000
--- a/devel/seed/files/patch-modules_os_seed-os.c
+++ /dev/null
@@ -1,95 +0,0 @@
---- modules/os/seed-os.c.orig 2009-12-31 05:44:49.000000000 -0500
-+++ modules/os/seed-os.c 2010-01-07 19:01:05.000000000 -0500
-@@ -29,8 +29,15 @@
-
- #include <sys/stat.h>
- #include <sys/utsname.h>
-+#if defined(__FreeBSD__)
-+#include <sys/param.h>
-+#endif
-
- #include <sys/types.h>
-+#include <sys/ioctl.h>
-+#include <termios.h>
-+#include <libutil.h>
-+#include <unistd.h>
-
- #include <fcntl.h>
-
-@@ -54,18 +61,32 @@ seed_os_realpath (SeedContext ctx,
- const SeedValue arguments[],
- SeedException * exception)
- {
-+ SeedValue sv;
- gchar *arg;
-+ gchar *resolved_path;
- gchar *ret;
-+ gsize path_max;
-
- if (argument_count != 1)
- {
- EXPECTED_EXCEPTION("os.realpath", "1 argument");
- }
- arg = seed_value_to_string (ctx, arguments[0], exception);
-- ret = realpath(arg, NULL);
-+#ifdef PATH_MAX
-+ path_max = PATH_MAX;
-+#else
-+ path_max = pathconf (arg, _PC_PATH_MAX);
-+ if (path_max <= 0)
-+ path_max = 4096;
-+#endif
-+ resolved_path = (gchar *) g_malloc (path_max);
-+ ret = realpath(arg, resolved_path);
- g_free (arg);
-
-- return seed_value_from_string (ctx, ret, exception);
-+ sv = seed_value_from_string (ctx, ret, exception);
-+ g_free (resolved_path);
-+
-+ return sv;
- }
-
- SeedValue
-@@ -559,7 +580,12 @@ seed_os_unsetenv (SeedContext ctx,
- }
-
- arg = seed_value_to_string (ctx, arguments[0], exception);
-+#if __FreeBSD_version < 700000
-+ ret = 0;
-+ unsetenv (arg);
-+#else
- ret = unsetenv (arg);
-+#endif
- g_free (arg);
-
- return seed_value_from_int (ctx, ret, exception);
-@@ -702,6 +728,7 @@ seed_os_fdatasync (SeedContext ctx,
- const SeedValue arguments[],
- SeedException * exception)
- {
-+#if !defined(__FreeBSD__)
- gint fd;
-
- if (argument_count != 1)
-@@ -711,6 +738,10 @@ seed_os_fdatasync (SeedContext ctx,
- fd = seed_value_to_int (ctx, arguments[0], exception);
-
- return seed_value_from_int (ctx, fdatasync (fd), exception);
-+#else
-+ errno = ENOSYS;
-+ return seed_value_from_int (ctx, -1, exception);
-+#endif
- }
-
- SeedValue
-@@ -1112,7 +1144,9 @@ seed_module_init(SeedEngine * eng)
- #if defined (O_DIRECT)
- OS_DEFINE_QUICK_ENUM (O_DIRECT);
- #endif
-+#if defined (O_DIRECTORY)
- OS_DEFINE_QUICK_ENUM (O_DIRECTORY);
-+#endif
- OS_DEFINE_QUICK_ENUM (O_NOFOLLOW);
- #if defined (O_NOATIME)
- OS_DEFINE_QUICK_ENUM (O_NOATIME);