summaryrefslogtreecommitdiff
path: root/lang/moscow_ml/files/patch-config::auto_aux::hasgot
blob: 496e137b5f6e9fc13b40e32a4784c8dacb21bbd1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- config/auto-aux/hasgot.orig	2011-07-25 21:36:30.000000000 +0200
+++ config/auto-aux/hasgot	2011-07-25 21:36:36.000000000 +0200
@@ -1,5 +1,7 @@
 #!/bin/sh
-(echo "main() {"
+(
+ for f in $*; do echo "extern void $f(void);"; done
+ echo "int main() {"
  for f in $*; do echo "  $f();"; done
- echo "}") > hasgot.c
-exec $cc -o tst hasgot.c > /dev/null 2>/dev/null
+ echo "return 0; }") > hasgot.c
+exec $cc -o tst hasgot.c