diff options
Diffstat (limited to 'Utilities/cmtar/handle.c')
-rw-r--r-- | Utilities/cmtar/handle.c | 15 |
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 |