Check-in Number:
|
5697 | |
Date: |
2007-Mar-02 16:13:28 (local)
2007-Mar-02 15:13:28 (UTC) |
User: | thl |
Branch: | |
Comment: |
large file support for l2_ch_file, motivated by the Kolab-Konsortium |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/l2/ChangeLog 1.32 -> 1.33
--- ChangeLog 2007/03/02 15:09:43 1.32
+++ ChangeLog 2007/03/02 15:13:28 1.33
@@ -9,7 +9,13 @@
ChangeLog
=========
- Changes between 0.9.11 and ...
+ Changes between 0.9.11 and 0.9.12 (03-Oct-2005 to 02-Mar-2007)
+
+ *) Support for 1996-03-20 addition to Single UNIX Specification for
+ systems that still require the Transitional Extensions to System
+ Interfaces to support arbitrary file sizes (LFS >2GiB).
+ Motivated by the Kolab-Konsortium.
+ [http://thomas.lotterer.net]
*) Upgraded build environment to
GNU Shtool 2.0.6, GNU Libtool 1.5.22 and GNU Autoconf 2.61
|
|
ossp-pkg/l2/configure.ac 1.31 -> 1.32
--- configure.ac 2005/10/03 08:08:11 1.31
+++ configure.ac 2007/03/02 15:13:28 1.32
@@ -57,6 +57,25 @@
AC_CHECK_HEADERS(sys/time.h)
+AC_HAVE_HEADERS(features.h)
+AC_MSG_CHECKING(whether _GNU_SOURCE is required under GNU glibc)
+AC_TRY_RUN(
+#define RETURN 1
+#ifdef HAVE_FEATURES_H
+#include <features.h>
+#if (__GLIBC__+0) > 0
+#undef RETURN
+#define RETURN 0
+#endif
+#endif
+int main(int argc, char *argv[]) { return RETURN; }
+,dnl
+AC_MSG_RESULT(yes)
+CFLAGS="$CFLAGS -D_GNU_SOURCE"
+,dnl
+AC_MSG_RESULT(no)
+)
+
AC_CHECK_FUNCS(inet_aton inet_pton inet_ntoa inet_ntop snprintf vsnprintf setitimer isnan isinf)
CHECK_VA_COPY
|
|
ossp-pkg/l2/l2_ch_file.c 1.33 -> 1.34
--- l2_ch_file.c 2005/10/03 08:08:11 1.33
+++ l2_ch_file.c 2007/03/02 15:13:28 1.34
@@ -60,6 +60,14 @@
struct timeval tv;
struct stat st;
+#ifdef O_LARGEFILE
+ /* Support for 1996-03-20 addition to Single UNIX Specification for
+ * systems that still require the Transitional Extensions to System
+ * Interfaces to support arbitrary file sizes (LFS >2GiB)
+ */
+ mode |= O_LARGEFILE;
+#endif
+
/* open channel file */
mask = umask(0);
cfg->fd = open(cfg->path, mode, cfg->perm);
|
|