mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

172 lines
4.9 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/dietlibc/pkg_patch/pkg_gawk.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. --- ./configure.orig 2003-07-28 10:26:06.000000000 +0200
  23. +++ ./configure 2003-07-28 10:28:01.000000000 +0200
  24. @@ -12,6 +12,11 @@
  25. ## M4sh Initialization. ##
  26. ## --------------------- ##
  27. +ac_cv_header_mcheck_h=no
  28. +ac_cv_header_stropts_h=no
  29. +ac_cv_header_wchar_h=no
  30. +ac_cv_header_wctype_h=no
  31. +
  32. # Be Bourne compatible
  33. if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  34. emulate sh
  35. @@ -10821,9 +10826,9 @@
  36. fi
  37. if test $ac_cv_header_dlfcn_h = yes; then
  38. -cat >>confdefs.h <<\_ACEOF
  39. -#define DYNAMIC 1
  40. -_ACEOF
  41. +# cat >>confdefs.h <<\_ACEOF
  42. +# #define DYNAMIC 1
  43. +# _ACEOF
  44. if test "$GCC" = yes
  45. then
  46. This part disables the useage of math.h functions since dietlibs only support
  47. them correctly for x86.
  48. This is a ugly hack which return 0.0 for all such function - and we should
  49. consider working on fixing dietlibc in this regard.
  50. - Rene Rebe <rene@rocklinux.org>
  51. diff -ur gawk-3.1.3/builtin.c gawk-3.1.3-hacked/builtin.c
  52. --- gawk-3.1.3/builtin.c 2003-07-07 00:08:08.000000000 +0200
  53. +++ gawk-3.1.3-hacked/builtin.c 2003-09-07 20:48:44.000000000 +0200
  54. @@ -153,7 +153,7 @@
  55. d = force_number(tmp);
  56. free_temp(tmp);
  57. errno = 0;
  58. - res = exp(d);
  59. + res = 0.0i; /* exp(d); */
  60. if (errno == ERANGE)
  61. warning(_("exp: argument %g is out of range"), d);
  62. return tmp_number((AWKNUM) res);
  63. @@ -418,9 +418,9 @@
  64. double_to_int(double d)
  65. {
  66. if (d >= 0)
  67. - d = Floor(d);
  68. + d = /*Floor(*/d/*)*/;
  69. else
  70. - d = Ceil(d);
  71. + d = /*Ceil(*/d/*)*/;
  72. return d;
  73. }
  74. @@ -471,7 +471,7 @@
  75. arg = (double) force_number(tmp);
  76. if (arg < 0.0)
  77. warning(_("log: received negative argument %g"), arg);
  78. - d = log(arg);
  79. + d = 0.0; /* log(arg); */
  80. free_temp(tmp);
  81. return tmp_number((AWKNUM) d);
  82. }
  83. @@ -1213,7 +1213,7 @@
  84. free_temp(tmp);
  85. if (arg < 0.0)
  86. warning(_("sqrt: called with negative argument %g"), arg);
  87. - return tmp_number((AWKNUM) sqrt(arg));
  88. + return tmp_number((AWKNUM) 0.0 /* sqrt(arg) */ );
  89. }
  90. /* do_substr --- do the substr function */
  91. @@ -1707,7 +1707,7 @@
  92. d2 = force_number(t2);
  93. free_temp(t1);
  94. free_temp(t2);
  95. - return tmp_number((AWKNUM) atan2(d1, d2));
  96. + return tmp_number((AWKNUM) 0.0 /* atan2(d1, d2) */ );
  97. }
  98. /* do_sin --- do the sin function */
  99. @@ -1721,7 +1721,7 @@
  100. tmp = tree_eval(tree->lnode);
  101. if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0)
  102. lintwarn(_("sin: received non-numeric argument"));
  103. - d = sin((double) force_number(tmp));
  104. + d = 0.0; /* sin((double) force_number(tmp)); */
  105. free_temp(tmp);
  106. return tmp_number((AWKNUM) d);
  107. }
  108. @@ -1737,7 +1737,7 @@
  109. tmp = tree_eval(tree->lnode);
  110. if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0)
  111. lintwarn(_("cos: received non-numeric argument"));
  112. - d = cos((double) force_number(tmp));
  113. + d = 0.0; /* cos((double) force_number(tmp)); */
  114. free_temp(tmp);
  115. return tmp_number((AWKNUM) d);
  116. }
  117. diff -ur gawk-3.1.3/eval.c gawk-3.1.3-hacked/eval.c
  118. --- gawk-3.1.3/eval.c 2003-06-22 10:56:04.000000000 +0200
  119. +++ gawk-3.1.3-hacked/eval.c 2003-09-07 20:53:06.000000000 +0200
  120. @@ -1111,7 +1111,7 @@
  121. x *= x1;
  122. }
  123. } else
  124. - x = pow((double) x1, (double) x2);
  125. + x = 0.0; /* pow((double) x1, (double) x2); */
  126. return tmp_number(x);
  127. case Node_times:
  128. @@ -1138,8 +1138,8 @@
  129. #ifdef HAVE_FMOD
  130. return tmp_number(fmod(x1, x2));
  131. #else /* ! HAVE_FMOD */
  132. - (void) modf(x1 / x2, &x);
  133. - return tmp_number(x1 - x * x2);
  134. + /* (void) modf(x1 / x2, &x); */
  135. + return tmp_number( 0.0 /* x1 - x * x2 */ );
  136. #endif /* ! HAVE_FMOD */
  137. case Node_plus:
  138. @@ -1316,7 +1316,7 @@
  139. *lhs = make_number(t1);
  140. }
  141. } else
  142. - *lhs = make_number((AWKNUM) pow((double) lval, (double) rval));
  143. + *lhs = make_number((AWKNUM) 0.0 /* pow((double) lval, (double) rval)*/);
  144. break;
  145. case Node_assign_times:
  146. @@ -1347,8 +1347,8 @@
  147. #ifdef HAVE_FMOD
  148. *lhs = make_number(fmod(lval, rval));
  149. #else /* ! HAVE_FMOD */
  150. - (void) modf(lval / rval, &t1);
  151. - t2 = lval - rval * t1;
  152. + /*(void) modf(lval / rval, &t1);*/
  153. + t2 = 0.0; /* lval - rval * t1; */
  154. *lhs = make_number(t2);
  155. #endif /* ! HAVE_FMOD */
  156. break;