Skip to content

Commit

Permalink
Fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eggert committed Aug 9, 2022
1 parent 234fc6c commit 2b4b96d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/autoconf/functions.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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);]])
Expand Down

0 comments on commit 2b4b96d

Please sign in to comment.