Code

[PATCH] Added large file support ("backported" to collectd-3).
authorSebastian Harl <sh@tokkee.org>
Mon, 14 May 2007 18:57:03 +0000 (20:57 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Tue, 15 May 2007 17:17:39 +0000 (19:17 +0200)
This adds large file support to collectd by using the AC_SYS_LARGEFILE macro
in configure.in. In order to apply any necessary options to all parts of
collectd, we have to make sure config.h is included in all source files
(either directly or by including collectd.h) and before any other header files
are included.

This should fix http://bugs.debian.org/422212.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
configure.in
src/common.c
src/multimeter.c
src/network.c
src/utils_debug.c
src/utils_ignorelist.c
src/utils_mount.c

index 0f6d3c092174cb5a320f80602e93c7c6d7f833f2..9fe842ace930bce4225e955becc3fe56976ab3f1 100644 (file)
@@ -7,6 +7,8 @@ AC_LANG(C)
 
 AC_PREFIX_DEFAULT("/opt/collectd")
 
+AC_SYS_LARGEFILE
+
 #
 # Checks for programs.
 #
index 5487b326fd34ac31eb8adfe20fa6971ecd0c4fec..e7d561fd447662f706b3003786d617fa5722fcfe 100644 (file)
  *   Niki W. Waibel <niki.waibel@gmx.net>
 **/
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "common.h"
 #include "utils_debug.h"
 
index 46438bf37beb6566207aede99b388fb2bce7d8d2..09073abab2d7449804e764151d45b028238e671a 100644 (file)
  *
  **/
 
-#include <termios.h>
-#include <sys/ioctl.h>
-#include <math.h>
 #include "collectd.h"
 #include "common.h"
 #include "plugin.h"
 
+#include <termios.h>
+#include <sys/ioctl.h>
+#include <math.h>
+
 #define MODULE_NAME "multimeter"
 
 static char *multimeter_file = "multimeter.rrd";
index e9ba84bb4210037f0cae97a6612c3fe0ef319bb6..f2908d3c2c6ddedbe47501fb896e9b4a1f8c839c 100644 (file)
  *   Florian octo Forster <octo at verplant.org>
  **/
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index 9fc9040b23ff74ee16be33305174d9cada4e1fe7..067af21cf3dfc64d4bf2fed1beb71df212b40780 100644 (file)
  *   Niki W. Waibel <niki.waibel at gmx.net>
  **/
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "common.h"
 #include "utils_debug.h"
 
index 532eb4b0029837318cf60a2adbecf901a2590b3a..7f9e5c6d7adcdffdc092c3c75992f829a906faff 100644 (file)
  *     return;
  **/
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "common.h"
 #include "utils_debug.h"
 #include "utils_ignorelist.h"
index 7748c610bc871faf99a2f75a30f6db99e6c6fbbb..0e1a5c9c3565e9e899fa6c02bb40ba59c2bf191e 100644 (file)
@@ -21,7 +21,9 @@
  *   Niki W. Waibel <niki.waibel@gmx.net>
 **/
 
-
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include "common.h"
 #if HAVE_XFS_XQM_H