summaryrefslogtreecommitdiff
path: root/libstdc++-v3/aclocal.m4
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-22 15:51:55 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-22 15:51:55 +0000
commit440c107f2892c8e36b8667a30623c34c77a8f2c4 (patch)
treeb26e41a70bfc32ae8a5ebbdb7c88efd4978dbb10 /libstdc++-v3/aclocal.m4
parenta34619204046baf47d25e0333d0a79aeb0a1a3cd (diff)
downloadgcc-440c107f2892c8e36b8667a30623c34c77a8f2c4.tar.gz
2003-10-22 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/8610 * acinclude.m4 (GLIBCXX_CHECK_INT64_T): New macro, checking for the availability of int64_t. (GLIBCXX_CHECK_LFS): New macro, checking for LFS support. * configure.ac: Call here. * acconfig.h: Add undef for the corresponding symbols. * config/io/basic_file_stdio.cc (__basic_file<char>::open): Depending on _GLIBCXX_USE_LFS, call fopen64 or fopen. (__basic_file<char>::seekoff): Likewise, call lseek64 when available, otherwise lseek, checking the __off parameter. * include/bits/postypes.h: Typedef __streamoff_base_type to int64_t if available, otherwise long long. * aclocal.m4: Regenerate. * config.h.in: Likewise. * configure: Likewise. * acinclude.m4 (GLIBCXX_CHECK_POLL, GLIBCXX_CHECK_WRITEV): Use AC_TRY_LINK instead of AC_TRY_COMPILE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72806 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/aclocal.m4')
-rw-r--r--libstdc++-v3/aclocal.m439
1 files changed, 37 insertions, 2 deletions
diff --git a/libstdc++-v3/aclocal.m4 b/libstdc++-v3/aclocal.m4
index 9d7e3ac4922..ad6fc5e590b 100644
--- a/libstdc++-v3/aclocal.m4
+++ b/libstdc++-v3/aclocal.m4
@@ -553,7 +553,7 @@ dnl Check whether poll is available in <poll.h>, and define HAVE_POLL.
dnl
AC_DEFUN(GLIBCXX_CHECK_POLL, [
AC_CACHE_VAL(glibcxx_cv_POLL, [
- AC_TRY_COMPILE(
+ AC_TRY_LINK(
[#include <poll.h>],
[struct pollfd pfd[1];
pfd[0].events = POLLIN;
@@ -572,7 +572,7 @@ dnl Check whether writev is available in <sys/uio.h>, and define HAVE_WRITEV.
dnl
AC_DEFUN(GLIBCXX_CHECK_WRITEV, [
AC_CACHE_VAL(glibcxx_cv_WRITEV, [
- AC_TRY_COMPILE(
+ AC_TRY_LINK(
[#include <sys/uio.h>],
[struct iovec iov[2];
writev(0, iov, 0);],
@@ -586,6 +586,41 @@ AC_DEFUN(GLIBCXX_CHECK_WRITEV, [
dnl
+dnl Check whether int64_t is available in <stdint.h>, and define HAVE_INT64_T.
+dnl
+AC_DEFUN(GLIBCXX_CHECK_INT64_T, [
+ AC_CACHE_VAL(glibcxx_cv_INT64_T, [
+ AC_TRY_COMPILE(
+ [#include <stdint.h>],
+ [int64_t var;],
+ [glibcxx_cv_INT64_T=yes],
+ [glibcxx_cv_INT64_T=no])
+ ])
+ if test $glibcxx_cv_INT64_T = yes; then
+ AC_DEFINE(HAVE_INT64_T)
+ fi
+])
+
+
+dnl
+dnl Check whether LFS support is available.
+dnl
+AC_DEFUN(GLIBCXX_CHECK_LFS, [
+ AC_CACHE_VAL(glibcxx_cv_LFS, [
+ AC_TRY_LINK(
+ [#include <unistd.h>],
+ [fopen64("t", "w");
+ lseek64(1, 0, SEEK_CUR);],
+ [glibcxx_cv_LFS=yes],
+ [glibcxx_cv_LFS=no])
+ ])
+ if test $glibcxx_cv_LFS = yes; then
+ AC_DEFINE(_GLIBCXX_USE_LFS)
+ fi
+])
+
+
+dnl
dnl Does any necessary configuration of the testsuite directory. Generates
dnl the testsuite_hooks.h header.
dnl