1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Ensure VFS modules will build correctly by adding defines for CPPFLAGS

defines into acconfig.h - only defined if seen.
Jeremy.
This commit is contained in:
Jeremy Allison 0001-01-01 00:00:00 +00:00
parent b69f11170c
commit 9f2753a149
4 changed files with 1008 additions and 841 deletions

View File

@ -186,3 +186,34 @@
#undef STAT_ST_BLOCKSIZE
#undef HAVE_DEVICE_MAJOR_FN
#undef HAVE_DEVICE_MINOR_FN
/*
* Add these definitions to allow VFS modules to
* see the CPPFLAGS defines.
*/
#ifndef _HPUX_SOURCE
#undef _HPUX_SOURCE
#endif
#ifndef _POSIX_SOURCE
#undef _POSIX_SOURCE
#endif
#ifndef _LARGEFILE64_SOURCE
#undef _LARGEFILE64_SOURCE
#endif
#ifndef _ALIGNMENT_REQUIRED
#undef _ALIGNMENT_REQUIRED
#endif
#ifndef _MAX_ALIGNMENT
#undef _MAX_ALIGNMENT
#endif
#ifndef _LARGE_FILES
#undef _LARGE_FILES
#endif
#ifndef _LARGEFILE64_SOURCE
#undef _LARGEFILE64_SOURCE
#endif
#ifndef _FILE_OFFSET_BITS
#undef _FILE_OFFSET_BITS
#endif
#ifndef _GNU_SOURCE
#undef _GNU_SOURCE
#endif

1760
source/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -108,12 +108,21 @@ case "$host_os" in
#
case `uname -r` in
*9*|*10*)
CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
AC_DEFINE(USE_BOTH_CRYPT_CALLS)
AC_DEFINE(_HPUX_SOURCE)
AC_DEFINE(_POSIX_SOURCE)
AC_DEFINE(_ALIGNMENT_REQUIRED,1)
AC_DEFINE(_MAX_ALIGNMENT,4)
;;
*11*)
CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
AC_DEFINE(USE_BOTH_CRYPT_CALLS)
AC_DEFINE(_HPUX_SOURCE)
AC_DEFINE(_POSIX_SOURCE)
AC_DEFINE(_LARGEFILE64_SOURCE)
AC_DEFINE(_ALIGNMENT_REQUIRED,1)
AC_DEFINE(_MAX_ALIGNMENT,4)
;;
esac
DYNEXP="-Wl,-E"
@ -133,6 +142,7 @@ case "$host_os" in
*aix4*)
AC_MSG_RESULT([enabling large file support])
CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
AC_DEFINE(_LARGE_FILES)
;;
#
# Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
@ -156,14 +166,19 @@ case "$host_os" in
case "$ac_cv_gcc_compiler_version_number" in
*"gcc version 2.6"*|*"gcc version 2.7"*)
CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
AC_DEFINE(_LARGEFILE64_SOURCE)
;;
*)
CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
AC_DEFINE(_LARGEFILE64_SOURCE)
AC_DEFINE(_FILE_OFFSET_BITS,64)
;;
esac
else
DYNEXP="-dc -dp"
DYNEXP="-dc -dp"
CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
AC_DEFINE(_LARGEFILE64_SOURCE)
AC_DEFINE(_FILE_OFFSET_BITS,64)
fi
;;
esac
@ -188,6 +203,7 @@ exit(1);
CPPFLAGS="$old_CPPFLAGS"
if test x$SINIX_LFS_SUPPORT = xyes ; then
CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
AC_DEFINE(_LARGEFILE64_SOURCE)
CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
LIBS="`getconf LFS64_LIBS` $LIBS"
@ -240,6 +256,9 @@ main() {
CPPFLAGS="$old_CPPFLAGS"
if test x$LINUX_LFS_SUPPORT = xyes ; then
CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
AC_DEFINE(_LARGEFILE64_SOURCE)
AC_DEFINE(_FILE_OFFSET_BITS,64)
AC_DEFINE(_GNU_SOURCE)
fi
AC_MSG_RESULT([$LINUX_LFS_SUPPORT])
;;
@ -260,6 +279,8 @@ exit(1);
CPPFLAGS="$old_CPPFLAGS"
if test x$GLIBC_LFS_SUPPORT = xyes ; then
CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
AC_DEFINE(_LARGEFILE64_SOURCE)
AC_DEFINE(_GNU_SOURCE)
fi
AC_MSG_RESULT([$GLIBC_LFS_SUPPORT])
;;

View File

@ -252,6 +252,37 @@
#undef STAT_ST_BLOCKSIZE
#undef HAVE_DEVICE_MAJOR_FN
#undef HAVE_DEVICE_MINOR_FN
/*
* Add these definitions to allow VFS modules to
* see the CPPFLAGS defines.
*/
#ifndef _HPUX_SOURCE
#undef _HPUX_SOURCE
#endif
#ifndef _POSIX_SOURCE
#undef _POSIX_SOURCE
#endif
#ifndef _LARGEFILE64_SOURCE
#undef _LARGEFILE64_SOURCE
#endif
#ifndef _ALIGNMENT_REQUIRED
#undef _ALIGNMENT_REQUIRED
#endif
#ifndef _MAX_ALIGNMENT
#undef _MAX_ALIGNMENT
#endif
#ifndef _LARGE_FILES
#undef _LARGE_FILES
#endif
#ifndef _LARGEFILE64_SOURCE
#undef _LARGEFILE64_SOURCE
#endif
#ifndef _FILE_OFFSET_BITS
#undef _FILE_OFFSET_BITS
#endif
#ifndef _GNU_SOURCE
#undef _GNU_SOURCE
#endif
/* The number of bytes in a int. */
#undef SIZEOF_INT