mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-20 05:00:42 +01:00
Fix Large File Support (LFS) support (bug #182)
- _FILE_OFFSET_BITS must be defined before including any other system headers otherwise it does nothing. - Don't define it in rsyslog.h, let it be defined in config.h, and let ./configure script enable LFS since Autoconf provides a portable macro to enable LFS support : AC_SYS_LARGEFILE
This commit is contained in:
parent
cd8c6abcc8
commit
71ffb32ab8
19
configure.ac
19
configure.ac
@ -152,19 +152,12 @@ AC_SUBST(moddirs)
|
||||
|
||||
|
||||
# Large file support
|
||||
AC_ARG_ENABLE(largefile,
|
||||
[AS_HELP_STRING([--enable-largefile],[Enable large file support @<:@default=yes@:>@])],
|
||||
[case "${enableval}" in
|
||||
yes) enable_largefile="yes" ;;
|
||||
no) enable_largefile="no" ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-largefile) ;;
|
||||
esac],
|
||||
[enable_largefile="yes"]
|
||||
)
|
||||
if test "$enable_largefile" = "no"; then
|
||||
AC_DEFINE(NOLARGEFILE, 1, [Defined when large file support is disabled.])
|
||||
fi
|
||||
|
||||
# http://www.gnu.org/software/autoconf/manual/html_node/System-Services.html#index-AC_005fSYS_005fLARGEFILE-1028
|
||||
AC_SYS_LARGEFILE
|
||||
case "${enable_largefile}" in
|
||||
no) ;;
|
||||
*) enable_largefile="yes" ;;
|
||||
esac
|
||||
|
||||
# Regular expressions
|
||||
AC_ARG_ENABLE(regexp,
|
||||
|
||||
@ -46,15 +46,6 @@
|
||||
* # End Config Settings # *
|
||||
* ############################################################# */
|
||||
|
||||
#ifndef NOLARGEFILE
|
||||
# undef _LARGEFILE_SOURCE
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
# undef _FILE_OFFSET_BITS
|
||||
# define _LARGEFILE_SOURCE
|
||||
# define _LARGEFILE64_SOURCE
|
||||
# define _FILE_OFFSET_BITS 64
|
||||
#endif
|
||||
|
||||
/* portability: not all platforms have these defines, so we
|
||||
* define them here if they are missing. -- rgerhards, 2008-03-04
|
||||
*/
|
||||
|
||||
@ -2770,7 +2770,7 @@ static void printVersion(void)
|
||||
#else
|
||||
printf("\tFEATURE_REGEXP:\t\t\t\tNo\n");
|
||||
#endif
|
||||
#ifndef NOLARGEFILE
|
||||
#if defined(_LARGE_FILES) || (defined (_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS >= 64)
|
||||
printf("\tFEATURE_LARGEFILE:\t\t\tYes\n");
|
||||
#else
|
||||
printf("\tFEATURE_LARGEFILE:\t\t\tNo\n");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user