summaryrefslogtreecommitdiffstats
path: root/Utilities/cmtar/handle.c
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-12-28 19:58:07 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-12-28 19:58:07 (GMT)
commit18d31fd97c3305b54a6d1d56b6ef8600089ef6da (patch)
treefad65ce7d2ba37095405c27df79a9c7a5883f448 /Utilities/cmtar/handle.c
parentd715d52a11fbcbc3310412ae7c7ec1e71e5bcbed (diff)
downloadCMake-18d31fd97c3305b54a6d1d56b6ef8600089ef6da.zip
CMake-18d31fd97c3305b54a6d1d56b6ef8600089ef6da.tar.gz
CMake-18d31fd97c3305b54a6d1d56b6ef8600089ef6da.tar.bz2
COMP: Several borland fixes
Diffstat (limited to 'Utilities/cmtar/handle.c')
-rw-r--r--Utilities/cmtar/handle.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/Utilities/cmtar/handle.c b/Utilities/cmtar/handle.c
index 1fe053e..5238e03 100644
--- a/Utilities/cmtar/handle.c
+++ b/Utilities/cmtar/handle.c
@@ -34,7 +34,22 @@
const char libtar_version[] = PACKAGE_VERSION;
+#define libtar_symbol(name, ret, args, callargs) \
+ static ret libtar_##name args \
+ { \
+ return name callargs; \
+ }
+
+#if defined(__BORLANDC__)
+libtar_symbol(open, int, (const char* pathname, int flags, mode_t mode), (pathname, flags, mode));
+libtar_symbol(close, int, (int fd), (fd));
+libtar_symbol(read, ssize_t, (int fd, void* buf, size_t count), (fd, buf, count));
+libtar_symbol(write, ssize_t, (int fd, void* buf, size_t count), (fd, buf, count));
+
+static tartype_t default_type = { libtar_open, libtar_close, libtar_read, libtar_write };
+#else
static tartype_t default_type = { open, close, read, write };
+#endif
static int