diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2022-08-08 09:08:20 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2022-08-09 11:07:03 -0700 |
commit | 2b4b96d9823101cd2b9bc294181c65a1ae12002e (patch) | |
tree | c4a7d31efdf2804b94c3aa99d30f167a8cc6ebfa | |
parent | 234fc6c86613ed3f366dd1d88996e4d5d85ee222 (diff) | |
download | autoconf-2b4b96d9823101cd2b9bc294181c65a1ae12002e.tar.gz |
Fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64
This should render unnecessary Gnulib’s gl_SET_LARGEFILE_SOURCE hack
https://lists.gnu.org/r/bug-gnulib/2019-12/msg00046.html
* lib/autoconf/functions.m4 (AC_FUNC_FSEEKO):
On that platform, simply set _LARGEFILE_SOURCE.
-rw-r--r-- | lib/autoconf/functions.m4 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 70eb8760..9f44a1ce 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -649,7 +649,13 @@ AC_DEFUN([AC_FUNC_FSEEKO], [_AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1, [ac_cv_sys_largefile_source], [Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).], - [[#include <sys/types.h> /* for off_t */ + [[#if defined __hpux && !defined _LARGEFILE_SOURCE + #include <limits.h> + #if LONG_MAX >> 31 == 0 + #error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++" + #endif + #endif + #include <sys/types.h> /* for off_t */ #include <stdio.h>]], [[int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);]]) |