diff options
author | maho <maho@FreeBSD.org> | 2004-07-06 18:08:44 +0800 |
---|---|---|
committer | maho <maho@FreeBSD.org> | 2004-07-06 18:08:44 +0800 |
commit | 6928410ae76aaba90e17d6ea577ef18fe636e4cc (patch) | |
tree | e9edaaf89ea2cad858bc247f26862e8e0a4fb0b6 | |
parent | 89460ccb9a25eb398bdb6ba295fe024091c10dd3 (diff) | |
download | freebsd-ports-gnome-6928410ae76aaba90e17d6ea577ef18fe636e4cc.tar.gz freebsd-ports-gnome-6928410ae76aaba90e17d6ea577ef18fe636e4cc.tar.zst freebsd-ports-gnome-6928410ae76aaba90e17d6ea577ef18fe636e4cc.zip |
a) Fix open problem for ifc
b) update to 8.0.046.p049.1
PR: 67507
Submitted by: Alexander Usov <usov@kvi.nl>
-rw-r--r-- | lang/ifc/Makefile | 3 | ||||
-rw-r--r-- | lang/ifc/distinfo | 2 | ||||
-rw-r--r-- | lang/ifc/files/linux_file.c | 27 |
3 files changed, 30 insertions, 2 deletions
diff --git a/lang/ifc/Makefile b/lang/ifc/Makefile index b791189e3e47..75a2add85335 100644 --- a/lang/ifc/Makefile +++ b/lang/ifc/Makefile @@ -6,7 +6,7 @@ # PORTNAME= ifc -PORTVERSION= 8.0.046 +PORTVERSION= 8.0.046.p049.1 CATEGORIES= lang linux devel MASTER_SITES= DISTNAME= l_fc_pc_${PORTVERSION:C/\.p.+$//} @@ -165,7 +165,6 @@ do-build: @${OBJCOPY} \ --redefine-sym ftruncate=l_ftruncate \ --redefine-sym lseek64=lseek \ - --redefine-sym open64=open \ --redefine-sym fopen64=fopen \ --redefine-sym freopen64=freopen \ --redefine-sym creat64=creat \ diff --git a/lang/ifc/distinfo b/lang/ifc/distinfo index 3cc201a3bbd8..5d2a5e8afdd2 100644 --- a/lang/ifc/distinfo +++ b/lang/ifc/distinfo @@ -1,2 +1,4 @@ MD5 (l_fc_pc_8.0.046.tar.gz) = 73b204ac0eced3fc337a00c4264956df SIZE (l_fc_pc_8.0.046.tar.gz) = 84289874 +MD5 (l_fc_pc_8.0.046_pe049.1.tar.gz) = c4de5762132d317a56dc721ba85ea10d +SIZE (l_fc_pc_8.0.046_pe049.1.tar.gz) = 5283178 diff --git a/lang/ifc/files/linux_file.c b/lang/ifc/files/linux_file.c index cff6d2932919..1a87ce28d57a 100644 --- a/lang/ifc/files/linux_file.c +++ b/lang/ifc/files/linux_file.c @@ -46,7 +46,34 @@ int l_open(const char *path, int flags, ...) { va_list args; mode_t mode; int bsd_flags, error; + bsd_flags = 0; + + if (flags & LINUX_O_RDONLY ) bsd_flags |= O_RDONLY; + if (flags & LINUX_O_WRONLY ) bsd_flags |= O_WRONLY; + if (flags & LINUX_O_RDWR ) bsd_flags |= O_RDWR; + if (flags & LINUX_O_NDELAY ) bsd_flags |= O_NONBLOCK; + if (flags & LINUX_O_APPEND ) bsd_flags |= O_APPEND; + if (flags & LINUX_O_SYNC ) bsd_flags |= O_FSYNC; + if (flags & LINUX_O_NONBLOCK) bsd_flags |= O_NONBLOCK; + if (flags & LINUX_FASYNC ) bsd_flags |= O_ASYNC; + if (flags & LINUX_O_CREAT ) bsd_flags |= O_CREAT; + if (flags & LINUX_O_TRUNC ) bsd_flags |= O_TRUNC; + if (flags & LINUX_O_EXCL ) bsd_flags |= O_EXCL; + if (flags & LINUX_O_NOCTTY ) bsd_flags |= O_NOCTTY; + if (bsd_flags & O_CREAT) { + va_start (args, flags); + mode = (mode_t) va_arg(args, int); + return open(path, bsd_flags, mode); + va_end (args); + } else + return open(path, bsd_flags); +} + +int open64(const char *path, int flags, ...) { + va_list args; + mode_t mode; + int bsd_flags, error; bsd_flags = 0; if (flags & LINUX_O_RDONLY ) bsd_flags |= O_RDONLY; |