summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-11-21 17:48:40 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-11-21 17:48:40 +0000
commitdc8bd638e395eada4cdea03c5f1a1c28d506f003 (patch)
tree88d2a16cb750ef08c02975f41db3ea0bd149cd6d /src/common.h
parentdc7efcb45bc7298a786bc8392adb488b3c704718 (diff)
downloadirssi-dc8bd638e395eada4cdea03c5f1a1c28d506f003.zip
Irssi now uses 64bit file offets if it's only supported by system. Also did
a few changes to DCC so that it should be possible to send >4GB files. DCC protocol uses 32bit "n bytes transferred" notifications, so I had to bend the protocol a bit to allow 64bit files by truncating the value to lowest 32bits. I'm not sure how other clients handle those notifications, but irssi uses it only to figure out when the DCC SEND transfer is complete, so it's quite safe to assume that if we've managed to write() all the bytes and we receive the last 32bit of file size, it means the total file size instead of the total - (n+1)*4GB. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3018 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index 95a49b2f..66af15cf 100644
--- a/src/common.h
+++ b/src/common.h
@@ -52,6 +52,16 @@
# include <gmodule.h>
#endif
+#if defined (UOFF_T_INT)
+typedef unsigned int uoff_t;
+#elif defined (UOFF_T_LONG)
+typedef unsigned long uoff_t;
+#elif defined (UOFF_T_LONG_LONG)
+typedef unsigned long long uoff_t;
+#else
+# error uoff_t size not set
+#endif
+
/* input functions */
#define G_INPUT_READ (1 << 0)
#define G_INPUT_WRITE (1 << 1)