Apply patch: ncpfs-hg-commit-425.patch
This commit is contained in:
2802
.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-425.patch
Normal file
2802
.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-425.patch
Normal file
File diff suppressed because it is too large
Load Diff
151
configure.ac
151
configure.ac
@@ -245,10 +245,30 @@ AM_GNU_GETTEXT
|
||||
localedir="\${prefix}/$DATADIRNAME/locale"
|
||||
AC_SUBST(localedir)
|
||||
|
||||
AC_CHECK_HEADERS([sys/types.h])
|
||||
AC_CHECK_HEADERS([sys/socket.h], [], [],
|
||||
[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
])
|
||||
AC_CHECK_HEADERS([net/if.h], [], [],
|
||||
[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
dnl Checks for IPX support style
|
||||
AC_CACHE_CHECK(for GNU style IPX support, ncp_cv_c_ipx_netipx,
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[[#include <sys/socket.h>
|
||||
[AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#include <sys/ioctl.h>
|
||||
#include <netipx/ipx.h>]]],
|
||||
[[[((struct sockaddr_ipx*)0)->sipx_family == AF_IPX]]])],
|
||||
@@ -262,7 +282,12 @@ if test "$ncp_cv_c_ipx_netipx" = "no"
|
||||
then
|
||||
AC_CACHE_CHECK(for Linux style IPX support, ncp_cv_c_ipx_linux,
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[[#include <sys/socket.h>
|
||||
[AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#include <asm/types.h>
|
||||
#include <linux/ipx.h>]]],
|
||||
[[[((struct sockaddr_ipx*)0)->sipx_family == AF_IPX]]])],
|
||||
@@ -349,48 +374,23 @@ dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_SYS_WAIT
|
||||
|
||||
dnl sys/mount is required by ncpmount
|
||||
dnl currently code does not work without sys/mount.h
|
||||
AC_CHECK_HEADER(sys/mount.h)
|
||||
if test "$ac_cv_header_sys_mount_h" = "no"
|
||||
then
|
||||
if test "$USE_KERNEL" = "1"
|
||||
then
|
||||
AC_MSG_WARN(Cannot build kernel support because of no sys/mount.h file)
|
||||
USE_KERNEL=0
|
||||
fi
|
||||
ncp_sys_mount_h="/* sys/mount.h does not exist */"
|
||||
ncp_linux_fs_h="/* linux/fs.h is not needed */"
|
||||
else
|
||||
ncp_sys_mount_h="#include <sys/mount.h>"
|
||||
AC_CACHE_CHECK(for mount constants in sys/mount.h, ncp_cv_linux_fs_needed,
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[[#include <sys/mount.h>]]],
|
||||
[[[mount(0,0,0,MS_RDONLY,0); umount(0)]]])],
|
||||
[ncp_cv_linux_fs_needed="yes"],
|
||||
[ncp_cv_linux_fs_needed="no"]
|
||||
)
|
||||
)
|
||||
if test "$ncp_cv_linux_fs_needed" = "yes"; then
|
||||
ncp_linux_fs_h="/* linux/fs.h not needed */"
|
||||
else
|
||||
ncp_linux_fs_h="#include <linux/fs.h>"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(ncp_sys_mount_h)
|
||||
AC_SUBST(ncp_linux_fs_h)
|
||||
|
||||
dnl net/if is required by IPX tools
|
||||
dnl currently code does not work without net/if.h
|
||||
AC_CHECK_HEADER(net/if.h,
|
||||
AC_CHECK_HEADER([net/if.h],
|
||||
[ncp_net_if_h="#include <net/if.h>"],
|
||||
[AC_CHECK_HEADER(linux/if.h,
|
||||
[ncp_net_if_h="#include <linux/if.h>"],
|
||||
[ncp_net_if_h="/* No interfaces support... */"
|
||||
AC_DEFINE(NO_NET_IF_SUPPORT, 1, [neither net/if.h nor linux/if.h was found, so ipx_* will not build...])
|
||||
AC_MSG_WARN(Neither <net/if.h> nor <linux/if.h> does exist, only partial make configured)]
|
||||
)]
|
||||
)
|
||||
)],
|
||||
[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
])
|
||||
AC_SUBST(ncp_net_if_h)
|
||||
|
||||
dnl net/route is required for now in ncplib
|
||||
@@ -403,14 +403,27 @@ AC_CHECK_HEADER(net/route.h,
|
||||
AC_DEFINE(NO_NET_ROUTE_SUPPORT, 1, [neither net/route.h nor linux/route.h was found ...])
|
||||
dnl In future, {net|linux}/route.h should be required only by ipx code
|
||||
AC_MSG_ERROR(Neither <net/route.h> nor <linux/route.h> does exist)]
|
||||
)]
|
||||
)
|
||||
)],
|
||||
[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
])
|
||||
AC_SUBST(ncp_net_route_h)
|
||||
|
||||
dnl netinet/if_ether.h vs. linux/if_ether.h
|
||||
dnl required only in ipxdump/ipxparse
|
||||
ncp_if_ether_support="yes"
|
||||
AC_CHECK_HEADER(netinet/if_ether.h)
|
||||
AC_CHECK_HEADER([netinet/if_ether.h], [], [],
|
||||
[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
])
|
||||
if test "$ac_cv_header_netinet_if_ether_h" = "no"
|
||||
then
|
||||
AC_CHECK_HEADER(linux/if_ether.h)
|
||||
@@ -475,14 +488,56 @@ select(0, &a, &a, &a, 0)]]])],
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl sys/mount is required by ncpmount
|
||||
dnl currently code does not work without sys/mount.h
|
||||
AC_CHECK_HEADER(sys/mount.h)
|
||||
ncp_sys_mount_h="/* sys/mount.h does not exist */"
|
||||
ncp_linux_fs_h="/* linux/fs.h not needed */"
|
||||
if test "$USE_KERNEL" = "1"
|
||||
then
|
||||
if test "$ac_cv_header_sys_mount_h" = "no"
|
||||
then
|
||||
AC_MSG_WARN(Cannot build kernel support because of no sys/mount.h file)
|
||||
USE_KERNEL=0
|
||||
else
|
||||
ncp_sys_mount_h="#include <sys/mount.h>"
|
||||
AC_CACHE_CHECK(for mount constants in sys/mount.h, ncp_cv_linux_fs_needed,
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[[#include <sys/mount.h>]]],
|
||||
[[[mount(0,0,0,MS_RDONLY,0); umount(0)]]])],
|
||||
[ncp_cv_linux_fs_needed="no"],
|
||||
[ncp_cv_linux_fs_needed="yes"]
|
||||
)
|
||||
)
|
||||
if test "$ncp_cv_linux_fs_needed" = "yes"; then
|
||||
ncp_linux_fs_h="#include <linux/fs.h>"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(ncp_sys_mount_h)
|
||||
AC_SUBST(ncp_linux_fs_h)
|
||||
|
||||
|
||||
dnl Third parameter to accept is socklen_t or signed int
|
||||
AC_CACHE_CHECK(for third parameter to accept,
|
||||
ncp_cv_socklen_t,
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include <sys/socket.h>]]],
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include <stdlib.h>
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif]]],
|
||||
[[[socklen_t a;
|
||||
accept(0, NULL, &a)]]])],
|
||||
[ncp_cv_socklen_t="socklen_t"],
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include <sys/socket.h>]]],
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include <stdlib.h>
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif]]],
|
||||
[[[int a;
|
||||
accept(0, NULL, &a)]]])],
|
||||
[ncp_cv_socklen_t="int"],
|
||||
@@ -501,8 +556,12 @@ AC_SUBST(socklen_t)
|
||||
|
||||
AC_CACHE_CHECK(whether SO_NOSIGPIPE exists,
|
||||
ncp_cv_so_nosigpipe,
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include <sys/types.h>
|
||||
#include <sys/socket.h>]]],
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif]]],
|
||||
[[[int s;
|
||||
int o = 0;
|
||||
s = socket(0, 0, 0);
|
||||
@@ -518,8 +577,12 @@ fi
|
||||
|
||||
AC_CACHE_CHECK(whether MSG_NOSIGNAL exists,
|
||||
ncp_cv_msg_nosignal,
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include <sys/types.h>
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
struct msghdr msg;]]],
|
||||
[[[sendmsg(0, &msg, MSG_NOSIGNAL)]]])],
|
||||
[ncp_cv_msg_nosignal="yes"],
|
||||
|
||||
@@ -152,6 +152,9 @@
|
||||
/* Define if you have IPX header netipx/ipx.h */
|
||||
#undef HAVE_NETIPX_IPX_H
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#undef HAVE_NET_IF_H
|
||||
|
||||
/* Define to 1 if you have the <nl_types.h> header file. */
|
||||
#undef HAVE_NL_TYPES_H
|
||||
|
||||
@@ -207,6 +210,9 @@
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user