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.

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