summaryrefslogtreecommitdiff
path: root/lang/mawk/patches/patch-ad
blob: 40e9bda0e3fadbf9c0e43028f003a6365cf60a8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
$NetBSD: patch-ad,v 1.3 2005/12/23 15:36:25 joerg Exp $

--- configure.orig	1996-09-04 23:43:01.000000000 +0000
+++ configure
@@ -528,9 +528,10 @@ cat > conftest.$ac_ext <<EOF
 #include "confdefs.h"
 
 int main() { return 0; }
+double testval;
 int t() {
-log()
-; return 0; }
+floor(testval);
+return 0; }
 EOF
 if eval $ac_link; then
   rm -rf conftest*
@@ -549,18 +550,18 @@ if eval "test \"`echo '$ac_cv_lib_'m`\" 
 else
   echo "$ac_t""no" 1>&6
 # maybe don't need separate math library
-echo $ac_n "checking for log""... $ac_c" 1>&6
-if eval "test \"`echo '$''{'ac_cv_func_log'+set}'`\" = set"; then
+echo $ac_n "checking for floor""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_func_floor'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 #line 558 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char log(); below.  */
+    which can conflict with char floor(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
-char log(); 
+char floor(); 
 
 int main() { return 0; }
 int t() {
@@ -568,32 +569,32 @@ int t() {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_log) || defined (__stub___log)
+#if defined (__stub_floor) || defined (__stub___floor)
 choke me
 #else
-log();
+floor();
 #endif
 
 ; return 0; }
 EOF
 if eval $ac_link; then
   rm -rf conftest*
-  eval "ac_cv_func_log=yes"
+  eval "ac_cv_func_floor=yes"
 else
   rm -rf conftest*
-  eval "ac_cv_func_log=no"
+  eval "ac_cv_func_floor=no"
 fi
 rm -f conftest*
 
 fi
-if eval "test \"`echo '$ac_cv_func_'log`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'floor`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  log=yes
+  floor=yes
 else
   echo "$ac_t""no" 1>&6
 fi
 
-if test "$log$" = yes
+if test "$floor" = yes
 then
    MATHLIB='' # evidently don't need one
 else