summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-10-19 12:54:38 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-10-19 12:54:38 +0200
commited36822e37b3328dc52c70f96c0a099f224edc1a (patch)
treed271ea51301cac4daddaa482a4f9ff6e27b145df /m4
parent0972943f5265dca1f56dcb25bd361d40040bef87 (diff)
parent0a24b3afc093e16038da170458e2ecb68b363bdd (diff)
downloadrsyslog-ed36822e37b3328dc52c70f96c0a099f224edc1a.tar.gz
rsyslog-ed36822e37b3328dc52c70f96c0a099f224edc1a.tar.xz
rsyslog-ed36822e37b3328dc52c70f96c0a099f224edc1a.zip
Merge branch 'v4-stable' into v5-stable
Conflicts: configure.ac runtime/cfsysline.c tools/ompipe.c
Diffstat (limited to 'm4')
-rw-r--r--m4/ax_check_off64_t.m469
1 files changed, 69 insertions, 0 deletions
diff --git a/m4/ax_check_off64_t.m4 b/m4/ax_check_off64_t.m4
new file mode 100644
index 00000000..05d6f45d
--- /dev/null
+++ b/m4/ax_check_off64_t.m4
@@ -0,0 +1,69 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_check_off64_t.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CHECK_OFF64_T
+#
+# DESCRIPTION
+#
+# Check if off64_t is defined. On true define HAVE_OFF64_T, also define
+# __LARGEFILE64_SOURCE where one is needed. (Note that an appropriative
+# entry must be in config.h.in.)
+#
+# LICENSE
+#
+# Copyright (c) 2008 Ruslan Shevchenko <Ruslan@Shevchenko.Kiev.UA>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 6
+
+AU_ALIAS([RSSH_CHECK_OFF64_T], [AX_CHECK_OFF64_T])
+AC_DEFUN([AX_CHECK_OFF64_T], [
+AC_REQUIRE([AC_SYS_LARGEFILE])dnl
+AC_CHECK_HEADER(unistd.h)
+AC_CACHE_CHECK([whether type off64_t support],
+ [ax_cv_check_off64_t],
+ [
+ AC_COMPILE_IFELSE(
+AC_LANG_SOURCE([
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+extern off64_t x1;
+])
+,ax_have_off64t=1)
+ if test "x$ax_have_off64t" = "x"
+ then
+ AC_COMPILE_IFELSE(
+AC_LANG_SOURCE([
+#define _LARGEFILE64_SOURCE
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+extern off64_t x1;
+]),
+ ax_cv_check_off64_t="_LARGEFILE64_SOURCE",
+ ax_cv_check_off64_t="no"
+)dnl
+
+ else
+ ax_cv_check_off64_t=yes
+ fi
+ ])dnl
+
+if test "x$ax_cv_check_off64_t" = "x_LARGEFILE64_SOURCE"
+then
+ AC_DEFINE(_LARGEFILE64_SOURCE)
+ AC_DEFINE(HAVE_OFF64_T)
+elif test "x$ax_cv_check_off64_t" = "xyes"
+then
+ AC_DEFINE(HAVE_OFF64_T)
+fi
+])dnl
+