netkittelnet.patch 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. --- netkit-telnet-0.17/configure Thu Apr 11 10:40:58 2002
  2. +++ FIXEDnetkittelnet/configure Thu Apr 11 10:39:59 2002
  3. @@ -78,7 +78,6 @@
  4. for TRY in egcs gcc g++ CC c++ cc; do
  5. (
  6. $TRY __conftest.c -o __conftest || exit 1;
  7. - ./__conftest || exit 1;
  8. ) >/dev/null 2>&1 || continue;
  9. CC=$TRY
  10. break;
  11. @@ -94,7 +93,6 @@
  12. echo -n 'Checking if C compiler works... '
  13. if (
  14. $CC __conftest.c -o __conftest || exit 1
  15. - ./__conftest || exit 1
  16. ) >/dev/null 2>&1; then
  17. echo 'yes'
  18. else
  19. @@ -125,7 +123,6 @@
  20. for TRY in egcs gcc g++ CC c++ cc; do
  21. (
  22. $TRY __conftest.cc -o __conftest || exit 1;
  23. - ./__conftest || exit 1;
  24. ) >/dev/null 2>&1 || continue;
  25. CXX=$TRY
  26. break;
  27. @@ -141,7 +138,6 @@
  28. echo -n 'Checking if C++ compiler works... '
  29. if (
  30. $CXX __conftest.cc -o __conftest || exit 1
  31. - ./__conftest || exit 1
  32. ) >/dev/null 2>&1; then
  33. echo 'yes'
  34. else
  35. @@ -278,13 +274,11 @@
  36. EOF
  37. if (
  38. $CXX $CXXFLAGS __conftest.cc -o __conftest || exit 1
  39. - ./__conftest || exit 1
  40. ) >/dev/null 2>&1; then
  41. echo 'yes'
  42. else
  43. if (
  44. $CXX $CXXFLAGS -D__USE_BSD_SIGNAL __conftest.cc -o __conftest || exit 1
  45. - ./__conftest || exit 1
  46. ) >/dev/null 2>&1; then
  47. echo '-D__USE_BSD_SIGNAL'
  48. CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL"
  49. @@ -292,6 +286,7 @@
  50. else
  51. echo 'no'
  52. echo 'This package needs BSD signal semantics to run.'
  53. + echo "$CXX $CXXFLAGS -D__USE_BSD_SIGNAL __conftest.cc -o __conftest failed"
  54. rm -f __conftest*
  55. exit
  56. fi
  57. @@ -330,31 +325,6 @@
  58. echo 'no'
  59. fi
  60. fi
  61. -
  62. -if [ x$NCURSES != x ]; then
  63. - LIBTERMCAP=-lncurses
  64. -else
  65. - echo -n 'Checking for traditional termcap... '
  66. -cat <<EOF >__conftest.cc
  67. -#include <stdio.h>
  68. -#include <termcap.h>
  69. -int main(void) {
  70. - tgetent(NULL, NULL); return 0;
  71. -}
  72. -
  73. -EOF
  74. - if (
  75. - $CXX $CXXFLAGS __conftest.cc -ltermcap -o __conftest || exit 1
  76. - ) >/dev/null 2>&1; then
  77. - echo '-ltermcap'
  78. - LIBTERMCAP=-ltermcap
  79. - else
  80. - echo 'not found'
  81. - echo 'This package needs termcap to run.'
  82. - rm -f __conftest*
  83. - exit
  84. - fi
  85. -fi
  86. rm -f __conftest*
  87. ##################################################
  88. @@ -468,7 +438,6 @@
  89. else
  90. if (
  91. $CXX $CXXFLAGS -D_GNU_SOURCE __conftest.cc -o __conftest || exit 1
  92. - ./__conftest || exit 1
  93. ) >/dev/null 2>&1; then
  94. echo '-D_GNU_SOURCE'
  95. CFLAGS="$CFLAGS -D_GNU_SOURCE"
  96. @@ -501,20 +470,17 @@
  97. EOF
  98. if (
  99. $CXX $CXXFLAGS __conftest.cc $LIBBSD -o __conftest || exit 1
  100. - ./__conftest || exit 1
  101. ) >/dev/null 2>&1; then
  102. echo 'ok'
  103. else
  104. if (
  105. $CXX $CXXFLAGS __conftest.cc -lsnprintf $LIBBSD -o __conftest || exit 1
  106. - ./__conftest || exit 1
  107. ) >/dev/null 2>&1; then
  108. echo '-lsnprintf'
  109. LIBS="$LIBS -lsnprintf"
  110. else
  111. if (
  112. $CXX $CXXFLAGS __conftest.cc -ldb $LIBBSD -o __conftest || exit 1
  113. - ./__conftest || exit 1
  114. ) >/dev/null 2>&1; then
  115. echo '-ldb'
  116. LIBS="$LIBS -ldb"
  117. diff -urN netkit-telnet-0.17/telnetd/state.c netkit-telnet-0.17-dm/telnetd/state.c
  118. --- netkit-telnet-0.17/telnetd/state.c 1999-12-12 11:41:44.000000000 -0800
  119. +++ netkit-telnet-0.17-dm/telnetd/state.c 2003-07-23 19:20:38.000000000 -0700
  120. @@ -43,10 +43,10 @@
  121. static int envvarok(char *varp);
  122. -static unsigned char doopt[] = { IAC, DO, '%', 'c', 0 };
  123. -static unsigned char dont[] = { IAC, DONT, '%', 'c', 0 };
  124. -unsigned char will[] = { IAC, WILL, '%', 'c', 0 };
  125. -unsigned char wont[] = { IAC, WONT, '%', 'c', 0 };
  126. +//static unsigned char doopt[] = { IAC, DO, '%', 'c', 0 };
  127. +//static unsigned char dont[] = { IAC, DONT, '%', 'c', 0 };
  128. +//unsigned char will[] = { IAC, WILL, '%', 'c', 0 };
  129. +//unsigned char wont[] = { IAC, WONT, '%', 'c', 0 };
  130. /*
  131. * Buffer for sub-options, and macros
  132. @@ -422,7 +422,7 @@
  133. set_his_want_state_will(option);
  134. do_dont_resp[option]++;
  135. }
  136. - netoprintf((char *)doopt, option);
  137. + netoprintf( "%c%c%c", IAC, DO, option );
  138. DIAG(TD_OPTIONS, printoption("td: send do", option));
  139. }
  140. @@ -632,7 +632,7 @@
  141. set_his_want_state_wont(option);
  142. do_dont_resp[option]++;
  143. }
  144. - netoprintf((char *) dont, option);
  145. + netoprintf ( "%c%c%c", IAC, DONT, option );
  146. DIAG(TD_OPTIONS, printoption("td: send dont", option));
  147. }
  148. @@ -769,7 +769,7 @@
  149. set_my_want_state_will(option);
  150. will_wont_resp[option]++;
  151. }
  152. - netoprintf((char *) will, option);
  153. + netoprintf( "%c%c%c", IAC, WILL, option);
  154. DIAG(TD_OPTIONS, printoption("td: send will", option));
  155. }
  156. @@ -917,7 +917,7 @@
  157. set_my_want_state_wont(option);
  158. will_wont_resp[option]++;
  159. }
  160. - netoprintf((char *)wont, option);
  161. + netoprintf( "%c%c%c", IAC, WONT, option);
  162. DIAG(TD_OPTIONS, printoption("td: send wont", option));
  163. }