summaryrefslogtreecommitdiffstats
path: root/meta/packages/nfs-utils/nfs-utils-1.0.6/acinclude-lossage.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/nfs-utils/nfs-utils-1.0.6/acinclude-lossage.patch')
-rw-r--r--meta/packages/nfs-utils/nfs-utils-1.0.6/acinclude-lossage.patch142
1 files changed, 142 insertions, 0 deletions
diff --git a/meta/packages/nfs-utils/nfs-utils-1.0.6/acinclude-lossage.patch b/meta/packages/nfs-utils/nfs-utils-1.0.6/acinclude-lossage.patch
new file mode 100644
index 0000000000..0d2d7f3824
--- /dev/null
+++ b/meta/packages/nfs-utils/nfs-utils-1.0.6/acinclude-lossage.patch
@@ -0,0 +1,142 @@
1--- nfs-utils-1.0.6/acinclude.m4.old 2004-11-07 12:28:58.000000000 +0000
2+++ nfs-utils-1.0.6/acinclude.m4 2000-10-11 22:49:45.000000000 +0100
3@@ -0,0 +1,139 @@
4+dnl aclocal.m4 -- custom autoconf macros for various purposes
5+dnl Updated for Autoconf v2
6+dnl
7+dnl ******** save/restore stuff **********
8+define(AC_KNFSD_SAVE,
9+ [AC_LANG_SAVE
10+ save_LDFLAGS=$LDFLAGS
11+ save_CFLAGS=$CFLAGS
12+ save_CXXFLAGS=$CXXFLAGS
13+ save_LIBS=$LIBS
14+])dnl
15+define(AC_KNFSD_RESTORE,
16+ [LDFLAGS=$save_LDFLAGS
17+ CFLAGS=$save_CFLAGS
18+ CXXFLAGS=$save_CXXFLAGS
19+ LIBS=$save_LIBS
20+ AC_LANG_RESTORE
21+])dnl
22+dnl *********** GNU libc 2 ***************
23+define(AC_GNULIBC,
24+ [AC_MSG_CHECKING(for GNU libc2)
25+ AC_CACHE_VAL(knfsd_cv_glibc2,
26+ [AC_TRY_CPP([
27+ #include <features.h>
28+ #if !defined(__GLIBC__)
29+ # error Nope
30+ #endif], knfsd_cv_glibc2=yes, knfsd_cv_glibc2=no)])
31+ AC_MSG_RESULT($knfsd_cv_glibc2)
32+ if test $knfsd_cv_glibc2 = yes; then
33+ CFLAGS="$CFLAGS -D_GNU_SOURCE"
34+ CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE"
35+ fi
36+]) dnl
37+dnl
38+dnl ************* egcs *******************
39+define(AC_PROG_EGCS,
40+ [AC_MSG_CHECKING(for egcs)
41+ AC_CACHE_VAL(knfsd_cv_prog_EGCS,
42+ [case `$CC --version 2>/dev/null` in
43+ egcs*)
44+ knfsd_cv_prog_EGCS=yes;;
45+ *)
46+ knfsd_cv_prog_EGCS=no;;
47+ esac
48+ ])
49+ AC_MSG_RESULT($knfsd_cv_prog_EGCS)
50+ test $knfsd_cv_prog_EGCS = yes && AC_DEFINE(HAVE_EGCS)
51+]) dnl
52+dnl *********** sizeof(dev_t) **************
53+dnl ** We have to kludge this rather than use AC_CHECK_SIZEOF because
54+dnl ** we have to include sys/types.h. Ugh.
55+define(AC_DEV_T_SIZE,
56+ [AC_MSG_CHECKING(size of dev_t)
57+ AC_CACHE_VAL(ac_cv_sizeof_dev_t,
58+ [AC_TRY_LINK(
59+ [#include <stdio.h>
60+ #include <sys/types.h>
61+ main()
62+ {
63+ FILE *f=fopen("conftestval", "w");
64+ if (!f) exit(1);
65+ fprintf(f, "%d\n", sizeof(dev_t));
66+ exit(0);
67+ }], ac_cv_sizeof_dev_t=`cat conftestval`, ac_cv_sizeof_dev_t=0)])
68+ AC_MSG_RESULT($ac_cv_sizeof_dev_t)
69+ AC_DEFINE(SIZEOF_DEV_T,$ac_cv_sizeof_dev_t)
70+ ])
71+dnl *********** sizeof(xxx_t) **************
72+dnl ** Overwrite the AC_CHECK_SIZEOF macro as we must include sys/types.h
73+define([AC_CHECK_SIZEOF],
74+ [changequote(<<, >>)dnl
75+ define(<<AC_TYPE_NAME>>,translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
76+ define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
77+ changequote([, ])dnl
78+ AC_MSG_CHECKING(size of $1)
79+ AC_CACHE_VAL(AC_CV_NAME,
80+ [AC_TRY_RUN(
81+ [#include <stdio.h>
82+ #include <sys/types.h>
83+ main()
84+ {
85+ FILE *f=fopen("conftestval", "w");
86+ if (!f) exit(1);
87+ fprintf(f, "%d\n", sizeof($1));
88+ exit(0);
89+ }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0)])
90+ AC_MSG_RESULT($AC_CV_NAME)
91+ AC_DEFINE_UNQUOTED(AC_TYPE_NAME,$AC_CV_NAME)
92+ undefine([AC_TYPE_NAME])dnl
93+ undefine([AC_CV_NAME])dnl
94+ ])
95+dnl *********** BSD vs. POSIX signal handling **************
96+define([AC_BSD_SIGNALS],
97+ [AC_MSG_CHECKING(for BSD signal semantics)
98+ AC_CACHE_VAL(knfsd_cv_bsd_signals,
99+ [AC_TRY_RUN([
100+ #include <signal.h>
101+ #include <unistd.h>
102+ #include <sys/wait.h>
103+
104+ static int counter = 0;
105+ static RETSIGTYPE handler(int num) { counter++; }
106+
107+ int main()
108+ {
109+ int s;
110+ if ((s = fork()) < 0) return 1;
111+ if (s != 0) {
112+ if (wait(&s) < 0) return 1;
113+ return WIFSIGNALED(s)? 1 : 0;
114+ }
115+
116+ signal(SIGHUP, handler);
117+ kill(getpid(), SIGHUP); kill(getpid(), SIGHUP);
118+ return (counter == 2)? 0 : 1;
119+ }
120+ ], knfsd_cv_bsd_signals=yes, knfsd_cv_bsd_signals=no)]) dnl
121+ AC_MSG_RESULT($knfsd_cv_bsd_signals)
122+ test $knfsd_cv_bsd_signals = yes && AC_DEFINE(HAVE_BSD_SIGNALS)
123+])dnl
124+dnl *********** the tcp wrapper library ***************
125+define(AC_TCP_WRAPPER,
126+ [AC_MSG_CHECKING(for the tcp wrapper library)
127+ AC_CACHE_VAL(knfsd_cv_tcp_wrapper,
128+ [old_LIBS="$LIBS"
129+ LIBS="$LIBS -lwrap $LIBNSL"
130+ AC_TRY_LINK([
131+ int deny_severity = 0;
132+ int allow_severity = 0;],
133+ [return hosts_ctl ("nfsd", "", "")],
134+ knfsd_cv_tcp_wrapper=yes, knfsd_cv_tcp_wrapper=no)
135+ LIBS="$old_LIBS"])
136+ AC_MSG_RESULT($knfsd_cv_tcp_wrapper)
137+ if test "$knfsd_cv_tcp_wrapper" = yes; then
138+ CFLAGS="$CFLAGS -DHAVE_TCP_WRAPPER"
139+ CXXFLAGS="$CXXFLAGS -DHAVE_TCP_WRAPPER"
140+ LIBWRAP="-lwrap"
141+ fi
142+]) dnl