summaryrefslogtreecommitdiff
path: root/lang/ifc
diff options
context:
space:
mode:
authorMaho Nakata <maho@FreeBSD.org>2004-07-06 10:08:44 +0000
committerMaho Nakata <maho@FreeBSD.org>2004-07-06 10:08:44 +0000
commit50b39a097d2fd059850b6dd27d8dc978e43418b3 (patch)
tree7b320c56c8bbd47fff76c4481c93a636ccd454e2 /lang/ifc
parentUpdate to 2.3.2 (diff)
a) Fix open problem for ifc
b) update to 8.0.046.p049.1 PR: 67507 Submitted by: Alexander Usov <usov@kvi.nl>
Notes
Notes: svn path=/head/; revision=113044
Diffstat (limited to 'lang/ifc')
-rw-r--r--lang/ifc/Makefile3
-rw-r--r--lang/ifc/distinfo2
-rw-r--r--lang/ifc/files/linux_file.c27
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;